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

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

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

You are Anonymous user. You can register for free by clicking here
How to change the order of messages

16.2. How to change the order of messages

Figure 16-1. Administration panel: Messages.

Administration panel: Messages.



The default for PHP-Nuke is to display messages in ascending order of mid (the id number for each message). You can use Add Story (Figure 7-2) to post articles on your site and these will appear in reverse order, i.e. last posted at the top (see also Section 18.9.1, on how to order articles in Sections and Section 18.11.1, on how to order articles in the Stories Archive). Thus you could have a main "Welcome Message" at the top which will always be there as a home page, followed by a series of announcements appearing in reverse order below the Welcome Message. But what happens if you don't use "Add Story" to add articles, but would rather like to use Messages (Figure 7-17) for communicating your news?

If you really want to use Messages and have them appear in reverse order (last one at the top), you need to edit mainfile.php using a decent editor (see Chapter 11).

At around line 334 in mainfile.php, in function message_box(), change

$sql = "SELECT mid, title, content, date, expire, view 
FROM ".$prefix."_message WHERE active='1' $querylang";

to

$sql = "SELECT mid, title, content, date, expire, view 
FROM ".$prefix."_message WHERE active='1' $querylang ORDER by mid DESC";

and this will display your messages in reverse order (last one at the top). See also How to reverse the order of Messages in the Homepage.

Powered by TOGETHER TEAM srl ITALY http://www.togetherteam.it - DONDELEO E-COMMERCE http://www.DonDeLeo.com - TUTTISU E-COMMERCE http://www.tuttisu.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.178 Seconds - 189 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::