Forum

Challenges order by...
 
Notifications
Clear all

Challenges order by newest first

5 Posts
4 Users
0 Likes
2,140 Views
Jan_AQ
(@jan_aq)
Posts: 1297
Noble Member
Topic starter
 

I have been trying to figure out a way to view the newest challenges on my site and I came up with this briefly:

A way to view the newest challenges first. (Challenges module version 1.4)
Challenges will be listed by newest first on the Challenges page, as well as under every letter.

In the Challenges module folder open browse.php

Line 66:

change from:

$query = "SELECT chal.* FROM ".TABLEPREFIX."fanfiction_challenges as chal $chalquery ORDER BY title LIMIT $offset, $itemsperpage";

to:
$query = "SELECT chal.* FROM ".TABLEPREFIX."fanfiction_challenges as chal $chalquery ORDER BY chalid DESC LIMIT $offset, $itemsperpage";

Whoever said nothing is impossible never tried slamming a revolving door.

url: https://www.potionsandsnitches.org/fanfiction
php: 7.4.33 msql: 5.6.51-community GPL
efic version: 3.5.5 latest patches: yes
bridges: none mods: challenges, tracker, story end, beta, word

 
Posted : 22/04/2009 3:17 am
(@jacci)
Posts: 503
Honorable Member
 

Want to thank you for this snippet of coding Jan_AQ,  has come in very useful.

why is nothing ever easy?
url: http://www.pretendercentre.com/missingpieces/     
php: 5.2.5  msql: 5.0.45-community
efic version: 3.4.3           latest patches: yes
bridges: none              mods: challenges, displayword, beta-search

 
Posted : 07/04/2011 1:27 am
(@izdoodle)
Posts: 101
Estimable Member
 

This was super easy, and super helpful. I was trying to figure out how to do this. Thanks so much.

http://www.twiwrite.net
Where Your Imagination Can Run Free
18+ TwiWrite Fan Fiction Archives.
efiction vs.3.5.2
SQL vs. 5.0.77
PHP vs. 5.2.2
Happily soaking up any and all php, tpl, and html knowledge I can.

 
Posted : 17/08/2011 12:15 pm
(@somethingblue42)
Posts: 13
Active Member
 

I've been wondering if there was a way to do this for a LONG time now. Very useful! Thanks!

 
Posted : 15/12/2011 11:07 am
Jan_AQ
(@jan_aq)
Posts: 1297
Noble Member
Topic starter
 

Oh Thank Merlin i posted this.

This NEEDS to be in the default download. This is the only way you can view the most recent and screen them, deleting or fixing them as they show up.

This post was modified 1 month ago by Jan_AQ

Whoever said nothing is impossible never tried slamming a revolving door.

url: https://www.potionsandsnitches.org/fanfiction
php: 7.4.33 msql: 5.6.51-community GPL
efic version: 3.5.5 latest patches: yes
bridges: none mods: challenges, tracker, story end, beta, word

 
Posted : 21/08/2023 4:59 am
Share: