PHP Web Host - Quality Web Hosting For All PHP Applications Free RavenNuke(tm) Add Ons
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
Fphilip84
Regular
Regular


Joined: Oct 27, 2003
Posts: 73

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

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: 16987
Location: Kansas

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

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 Visit poster's website AIM Address Yahoo Messenger
Fphilip84
Regular
Regular


Joined: Oct 27, 2003
Posts: 73

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

That did not work. It still lists the newest message as the last message in the home.
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

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

Don't know what to tell you. It works perfectly on my site.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Fphilip84
Regular
Regular


Joined: Oct 27, 2003
Posts: 73

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

Raven, im so sorry...it was my fault....for some reason the stupid FTP was caching everything....it works great now...THANKS!! Very Happy
View user's profile Send private message
Fphilip84
Regular
Regular


Joined: Oct 27, 2003
Posts: 73

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

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


Joined: Aug 28, 2003
Posts: 227

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

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
Regular
Regular


Joined: Oct 27, 2003
Posts: 73

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

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


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

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

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 to the forums!
. Now it was written for v6.5 but will work on later releases also by replicating the code.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

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

Oops! I didn't see your last message. if you are using Mozaks then never mind.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Fphilip84
Regular
Regular


Joined: Oct 27, 2003
Posts: 73

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

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


Joined: Aug 28, 2003
Posts: 227

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

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

It's thaihealthnews - get it at
Only registered users can see links on this board!
Get registered or login to the forums!


see it here:
Only registered users can see links on this board!
Get registered or login to the forums!


very customizable.
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum