View Full Version : Sticky News Posts
I know this has been posted before but I couldn't find the adv_index.php file. I'm guessing it was changed in the latest release.
I'd like to be able to sticky a news thread so it remains at the top of the portal page. I didn't see any options for that in the admincp.
BTW I'm using CMPS Gold
gulfan
06-07-2004, 11:47 PM
I'm trying to figure this one out also. It looks like the file you change is news.php
Here's the info for the old Sticky if anyone wants to figure this out:
I'm sure this will be an option in a future version, but for now you can open your adv_index.php file and look for:
ORDER BY postdateline DESC
Replace that with:
ORDER BY sticky DESC, postdateline DESC
That's it. :)
Also, this could be the line:
ORDER BY " . iif($vboptions['stickynewsthreads'], 'sticky DESC,') . " postdateline DESC" . iif($vboptions['shownewsattach'], ', attachmentid') . " It looks like there's an option somewhere to enable this.
Brian
06-08-2004, 10:31 AM
Actually that's just some left over code from vBa Homepage. If you'll look for:
ORDER BY " . iif($vboptions['stickynewsthreads'], 'sticky DESC,') . " postdateline DESC" .
And replace it with:
ORDER BY sticky DESC, postdateline DESC" .
Then that will allow for sticky news posts. ;)
Porthos
06-08-2004, 04:33 PM
Actually that's just some left over code from vBa Homepage. If you'll look for:
ORDER BY " . iif($vboptions['stickynewsthreads'], 'sticky DESC,') . " postdateline DESC" .
And replace it with:
ORDER BY sticky DESC postdateline DESC" .
Then that will allow for sticky news posts. ;)
I replaced that line in news.php and I get a MySql error message.
Brian
06-08-2004, 05:01 PM
I swear that if I had a dollar for every simple mistake I made I'd be a millionaire by now. :p
I just updated my other post with the correct code. Basically there should be a ',' between DESC and postdateline. ;)
Zachery
06-08-2004, 05:11 PM
Ill confirm that :p
Brian
06-08-2004, 05:19 PM
Hey, screw you buddy! :p
gulfan
06-08-2004, 05:21 PM
Thanks for your help. Perhaps this could be an option in future releases? It seems to be somewhat popular.
Brian
06-08-2004, 05:22 PM
I'm sure it will be. A while ago I was going to add it as a feature (as you might have guessed from the left over code), but apparently forgot about it.
TexasOutdoors
06-08-2004, 06:33 PM
I swear that if I had a dollar for every simple mistake I made I'd be a millionaire by now. :p
I just updated my other post with the correct code. Basically there should be a ',' between DESC and postdateline. ;)
Millionairre? or Billionnaire? lol.
I remember requesting this the first time and figured it out this go round. Shoulda posted it up sooner. I'm glad someone brought this up though to keep Brian straight. lol
Thanks guys! Worked great.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.