Stop data retention! Click here & act! Are you a webmaster and want to participate? Here you can find all necessary material for your website - Willst du auch an der Aktion teilnehmen? Hier findest du alle relevanten Infos und Materialien:
Chris Karakas Online Forum Index Karakas Online
 FAQFAQ   Forum SearchForum Search   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
How to reverse the order of Messages in the PHP-Nuke Home


Goto page 1, 2  Next
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
   Chris Karakas Online Forum Index -> PHP-Nuke Forum RSS Feed of this Forum
Share this page: These icons link to social bookmarking sites where readers can share and discover new web pages.Digg  del.icio.us  tc.eserver.org  Blinklist  Furl  Reddit  Blogmarks  Magnolia  Sphere  Yahoo!  Google  Windows Live  Technorati  Blue Dot  Simpy  Newsvine  Stumble Upon  co.mments.com  Blinkbits  BlogMemes  Connotea  View previous topic :: View next topic  
Author Message
Conner5
Private
Private


Joined: 03 Jan 2004
Posts: 3

PostPosted: Sat Jan 03, 2004 10:43 pm    Post subject: How to reverse the order of Messages in the PHP-Nuke Home
Reply with quote

When ever I post a new message on my php-nuke website it gets posted at the bottom. How can i fix this?

-C
http://spartania.net
Back to top
View user's profile Send private message
Truden
Major
Major


Joined: 23 Jul 2003
Posts: 280
Location: Johannesburg

PostPosted: Sun Jan 04, 2004 12:18 am    Post subject:
Reply with quote

Hi Conner5 Smile

If you look at the bottom of the last post you will see the option:
Display posts from previous:
Choose which post you want to be first: the old or the new one.

Cheers
Truden
_________________
Thank you for being with you!
Back to top
View user's profile Send private message Visit poster's website
Conner5
Private
Private


Joined: 03 Jan 2004
Posts: 3

PostPosted: Sun Jan 04, 2004 12:23 am    Post subject:
Reply with quote

Hmm, bottom of what? All i see at the bottom of the message is [ View: All Visitors - Unlimited - Edit ]
Back to top
View user's profile Send private message
chris
Dark Lord of the Sith


Joined: 10 May 2003
Posts: 6267
Location: Outer Space

PostPosted: Sun Jan 04, 2004 2:04 am    Post subject:
Reply with quote

The bottom of the last displayed message in a thread.
_________________
Regards

Chris Karakas
www.karakas-online.de
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Conner5
Private
Private


Joined: 03 Jan 2004
Posts: 3

PostPosted: Sun Jan 04, 2004 4:16 am    Post subject:
Reply with quote

I think your missunderstanding my question. See, on my site i got to messages (in the admin section) and add a message. Then i go to my site and its at the bottom of all the messages. Basicly displays from oldest to newest.
Back to top
View user's profile Send private message
arnoldkrg
President
President


Joined: 29 Jun 2003
Posts: 1578
Location: United Kingdom

PostPosted: Sun Jan 04, 2004 11:22 am    Post subject: Messages
Reply with quote

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 to post articles on your site and these will appear in reverse order (last posted at the top). 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.

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.

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

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


to

Code:
$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
_________________
Image
Back to top
View user's profile Send private message Send e-mail
Indifferent7
Private
Private


Joined: 28 Jul 2004
Posts: 3

PostPosted: Wed Jul 28, 2004 2:58 am    Post subject: Re: Messages
Reply with quote

Or if you make the change suggested above by arnoldkrg, you can go into your database and change the mid of the message you want to stay at the top of the list to a really big number (eg. 999999). Then all the other mid's that are lower in number (eg. 1, 2, 3 etc) will show in reverse order beneath the 999999 mid message. Although you may have to make this number bigger if your mid's exceed that ammount.

I've only trialed this on my local windows/apache phpnuke via phpmyadmin. Its seems to work though.
Back to top
View user's profile Send private message
omegaxx1
Private
Private


Joined: 06 Oct 2004
Posts: 1

PostPosted: Wed Oct 06, 2004 2:04 am    Post subject:
Reply with quote

I did that change and now my security code is gone, anyone have any suggestions?
Back to top
View user's profile Send private message
chris
Dark Lord of the Sith


Joined: 10 May 2003
Posts: 6267
Location: Outer Space

PostPosted: Wed Oct 06, 2004 9:45 am    Post subject:
Reply with quote

I cannot see any connection of the code changes above and the security code. Confused
_________________
Regards

Chris Karakas
www.karakas-online.de
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Silver
Private
Private


Joined: 03 Nov 2004
Posts: 3

PostPosted: Wed Nov 03, 2004 10:39 am    Post subject: problem with messade id (mid)
Reply with quote

hy there, i am using nuke 6.0 and also had the problem with the lifo/fifo. so i did the changes to the mainfile and it worked. Smile

... but i also changed the id in the database to 999999 like "Indifferent7" wrote to get the one messaeg always on top.
now every new message i write get's an even higher id like the one i changed.
i also changed the id of the one message back to 1, but still every id is very high (eg. 1000015). and it doesn't matters if i create a new message in nuke or directly in the database.

How can i change this?

thx for your help. im getting nuts to fix this...

greetz Silver
Back to top
View user's profile Send private message
Share this page: These icons link to social bookmarking sites where readers can share and discover new web pages.Digg  del.icio.us  tc.eserver.org  Blinklist  Furl  Reddit  Blogmarks  Magnolia  Sphere  Yahoo!  Google  Windows Live  Technorati  Blue Dot  Simpy  Newsvine  Stumble Upon  co.mments.com  Blinkbits  BlogMemes  Connotea 
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
   Chris Karakas Online Forum Index -> PHP-Nuke Forum
Page 1 of 2
This page contains valid HTML 4.01 Transitional - click here to check it!
This page contains a valid CSS - click here to check it!

 

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group