You are missing our premiere tool bar navigation system! Register and use it for FREE!

•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
· Home
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 301 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
How to create a Logout module

21.10. How to create a Logout module

Figure 21-4. Logout link in the Modules block.

Logout link in the Modules block.

Do you consider it too much work for your registered users to have to click on the "Your Account" link in the Modules block, be directed to their personal account page, then have to click on "Logout" in order to get logged out of your site? Why not have a direct "Logout" link in the Modules block? Well, since all links in the Modules block are automatically created from the active modules (unless you created a custom Modules block along the lines of Section 17.2), asking for a Logout link in the Modules block is asking for a Logout module!

In fact, it is easy to construct a Logout module - and is another example of using Javascript in modules (see Section 21.9):

Create a new folder, call it Logout, in the modules directory. In the Logout folder, create an index.php file that contains (see Add "Logout" to Modules Block):

echo "
<script type=\"text/javascript\">
top.location.replace ('modules.php?name=Your_Account&file=index&op=logout')

Activate the Logout module from the administration panel. From now on, a Logout link will appear in the Modules block - it will log a registered user immediately upon clicking on it.

Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.123 Seconds - 252 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded ( ::