Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff
Author Message
Fphilip84
Regular
Regular



Joined: Oct 27, 2003
Posts: 73

PostPosted: Wed Jan 21, 2004 2:20 pm Reply with quote

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
 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Wed Jan 21, 2004 4:29 pm Reply with quote

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.
 
View user's profile Send private message
Fphilip84







PostPosted: Wed Jan 21, 2004 6:33 pm Reply with quote

That did not work. It still lists the newest message as the last message in the home.
 
Raven







PostPosted: Wed Jan 21, 2004 6:49 pm Reply with quote

Don't know what to tell you. It works perfectly on my site.
 
Fphilip84







PostPosted: Wed Jan 21, 2004 6:51 pm Reply with quote

Raven, im so sorry...it was my fault....for some reason the stupid FTP was caching everything....it works great now...THANKS!! Very Happy
 
Fphilip84







PostPosted: Wed Jan 21, 2004 6:59 pm Reply with quote

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
Worker



Joined: Aug 28, 2003
Posts: 227

PostPosted: Wed Jan 21, 2004 7:49 pm Reply with quote

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
 
View user's profile Send private message
Fphilip84







PostPosted: Wed Jan 21, 2004 8:08 pm Reply with quote

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







PostPosted: Wed Jan 21, 2004 8:29 pm Reply with quote

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 Only registered users can see links on this board! Get registered or login!. Now it was written for v6.5 but will work on later releases also by replicating the code.
 
Raven







PostPosted: Wed Jan 21, 2004 8:30 pm Reply with quote

Oops! I didn't see your last message. if you are using Mozaks then never mind.
 
Fphilip84







PostPosted: Thu Jan 22, 2004 12:30 am Reply with quote

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







PostPosted: Sun Jan 25, 2004 10:57 am Reply with quote

I'm using a derivative of mozaks that doesn't use the messages - it uses stories/articles.

It's thaihealthnews - get it at www.karllois.com/files

see it here: www.st.raphael.org

very customizable.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff

View next topic
View previous topic
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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©