Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Sort forum by thread date Details »»
Sort forum by thread date
Version: 1.00, by tgmorris tgmorris is offline
Developer Last Online: Oct 2013 Show Printable Version Email this Page

Version: 3.0.6 Rating:
Released: 01-26-2005 Last Update: Never Installs: 4
 
No support by the author.

A few people have been asking for a way to sort forums by the date the thread was originally posted. Here's a quick change to allow the capability to sort the threads in a forum in either ascending or descending date order.

I've tested this against 3.0.3 but it should work fine using 3.0.6.

In forumdisplay.php find the following and insert the highlighted line.
Code:
        switch ($sortfield)
        {
                case 'title':
                        $sqlsortfield = 'thread.title';
                        break;
                case 'lastpost':
                case 'replycount':
                case 'views':
                case 'postusername':
                case 'dateline':
                        $sqlsortfield = $sortfield;
                        break;
                case 'voteavg':
                        if ($foruminfo['allowratings'])
                        {
                                $sqlsortfield = 'voteavg';
                                break;
                        } // else, use last post
                default:
                        $sqlsortfield = 'lastpost';
                        $sortfield = 'lastpost';
        }
In the FORUMDISPLAY template find the following and add the highlighted portion. Be sure to add the " / " on the line above newly added line.
Code:
	<td class="thead" width="100%">
		<if condition="$show['threadratings']"><span style="float:$stylevar[right]"><a href="$sorturl&amp;order=desc&amp;sort=voteavg">$vbphrase[rating]</a> $sortarrow[voteavg]</span></if>
		<a href="$sorturl&amp;order=asc&amp;sort=title">$vbphrase[thread]</a> $sortarrow[title] /
		<a href="$sorturl&amp;order=asc&amp;sort=postusername">$vbphrase[thread_starter]</a> $sortarrow[postusername] / 
		<a href="$sorturl&amp;order=asc&amp;sort=dateline">Thread Date</a> $sortarrow[dateline]
	</td>
As always, back up any files you will be changing.

What it does:

Adds the " / Thread Date" link to the fourm header - see the attached image. This allows the forum to be sorted by ascending date. Once selected the standard sort arrow will appear and allow the order to be changed to descending.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 01-27-2005, 05:18 PM
nexialys
Guest
 
Posts: n/a
Default

next times, do a little search before releasing a tool...

i will not even look at your code, but it's sure is a duplicate of one of my hacks:

https://vborg.vbsupport.ru/showthrea...threadid=68434
https://vborg.vbsupport.ru/showthrea...threadid=68382
Reply With Quote
  #3  
Old 01-27-2005, 06:24 PM
tgmorris tgmorris is offline
 
Join Date: Nov 2003
Posts: 180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by nexialys
next times, do a little search before releasing a tool...

i will not even look at your code, but it's sure is a duplicate of one of my hacks:

https://vborg.vbsupport.ru/showthrea...threadid=68434
https://vborg.vbsupport.ru/showthrea...threadid=68382
Well, excuuuuuuze me.

I did a brief search and came up empty. Since no one has posted any help to the requests for such a feature over at vb.com I thought I'd do this to be nice.

Oh, and there's really no reason to be so gd rude about it as it's a very simple modification that's I'm sure you had little trouble with. Hopefully my version would live up to your exceedingly high standards. /sarcasm :ermm:
Reply With Quote
  #4  
Old 01-27-2005, 06:32 PM
nexialys
Guest
 
Posts: n/a
Default

why in the world is someone not add smilies it is supposed to be rude ?!

this was a simple comment... read it back without sensing being attacked please!



... and no, i don't care about standards... but yes, a $vbphrase would have helped...
Reply With Quote
  #5  
Old 01-28-2005, 12:02 AM
rookie7 rookie7 is offline
 
Join Date: Apr 2004
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Releasing another mod doesn't kill anyone, does it? Accusing someone of stealing your codes without even looking at their codes is pretty rude in my book. If you don't have anything good to say, please don't say it at all. It's people like you that prevent other people from sharing their talents.

Nice mod by the way.
Reply With Quote
  #6  
Old 01-28-2005, 08:08 AM
nexialys
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by rookie7
It's people like you that prevent other people from sharing their talents.
something to say to me, please use the PM. something off-topic doesn't have to be discussed on the thread either.

discussion closed.
Reply With Quote
  #7  
Old 01-28-2005, 08:12 PM
zurih zurih is offline
 
Join Date: Nov 2004
Location: Israel
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

useful mod, installed!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:23 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.10405 seconds
  • Memory Usage 2,253KB
  • Queries Executed 20 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (4)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete