| Author |
Message |
Fphilip84 Regular


Joined: Oct 27, 2003 Posts: 73
|
Posted:
Wed Jan 21, 2004 2:20 pm |
|
Hi, is there anyway to order the messages from newest to oldest? For even give it a numerical ID so it can be changed according to the way I want it? Right now it displays from oldest to newest. When I tried changing the # of the message in the phpmyadmin, it still lists it the same way. Anyway to change this? Just curious |
|
|
|
 |
Raven Site Admin/Owner

Joined: Aug 27, 2002 Posts: 16987 Location: Kansas
|
Posted:
Wed Jan 21, 2004 4:29 pm |
|
Edit mainfile.php and find function message_box(). Change this line | 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"; |
Make sure there is a space before the word ORDER. |
|
|
|
 |
Fphilip84 Regular


Joined: Oct 27, 2003 Posts: 73
|
Posted:
Wed Jan 21, 2004 6:33 pm |
|
That did not work. It still lists the newest message as the last message in the home. |
|
|
|
 |
Raven Site Admin/Owner

Joined: Aug 27, 2002 Posts: 16987 Location: Kansas
|
Posted:
Wed Jan 21, 2004 6:49 pm |
|
Don't know what to tell you. It works perfectly on my site. |
|
|
|
 |
Fphilip84 Regular


Joined: Oct 27, 2003 Posts: 73
|
Posted:
Wed Jan 21, 2004 6:51 pm |
|
Raven, im so sorry...it was my fault....for some reason the stupid FTP was caching everything....it works great now...THANKS!!  |
|
|
|
 |
Fphilip84 Regular


Joined: Oct 27, 2003 Posts: 73
|
Posted:
Wed Jan 21, 2004 6:59 pm |
|
Hey, is it possible to keep 1 message set permanently on the top? Then the rest just comes below that from newest to oldest?....the newest to oldest works good now, cept the message I want all the way at the top is now moved all the way at the bottom. |
|
|
|
 |
paranor Worker


Joined: Aug 28, 2003 Posts: 227
|
Posted:
Wed Jan 21, 2004 7:49 pm |
|
Some ideas that come to my mind:
1) change the date manually via editing the mysql file.
2) Use the "message" feature of php-nuke |
|
|
|
 |
Fphilip84 Regular


Joined: Oct 27, 2003 Posts: 73
|
Posted:
Wed Jan 21, 2004 8:08 pm |
|
Change the date manually?? You mean change the auto_increment ID manually using phpmyadmin? I am using the message feature of nuke...the stories are listed using the Mozaks_news module...therefore I need to use messages to do updates....but I want 1 message always on top of the rest. |
|
|
|
 |
Raven Site Admin/Owner

Joined: Aug 27, 2002 Posts: 16987 Location: Kansas
|
Posted:
Wed Jan 21, 2004 8:29 pm |
|
You might want to not use messages at all. Use stories (News Items). The newest is always on top so that solves that issue. Then, to keep a story always on top, I have this mod I wrote . Now it was written for v6.5 but will work on later releases also by replicating the code. |
|
|
|
 |
Raven Site Admin/Owner

Joined: Aug 27, 2002 Posts: 16987 Location: Kansas
|
Posted:
Wed Jan 21, 2004 8:30 pm |
|
Oops! I didn't see your last message. if you are using Mozaks then never mind. |
|
|
|
 |
Fphilip84 Regular


Joined: Oct 27, 2003 Posts: 73
|
Posted:
Thu Jan 22, 2004 12:30 am |
|
Yeah, thats the problem...I'm using Mozaks...ahh whatever, I guess I'll just have to keep changing the ID for the message I want on top everytime I add a new message. |
|
|
|
 |
paranor Worker


Joined: Aug 28, 2003 Posts: 227
|
Posted:
Sun Jan 25, 2004 10:57 am |
|
I'm using a derivative of mozaks that doesn't use the messages - it uses stories/articles.
It's thaihealthnews - get it at
see it here:
very customizable. |
|
|
|
 |
|
|
|
|