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

Reply
 
Thread Tools
Details »»

Version: 1.00, by Hoffi Hoffi is offline
Developer Last Online: Mar 2016 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 01-27-2002 Last Update: Never Installs: 17
Is in Beta Stage  
No support by the author.

some time ago, i asked if it's possible to enter an extra sorting option for each forum.
a small but Ppowerful hint came up from FireFly, and i build a Hack around it.

I hope it works and you like it.

What it does: it adds new Fileds to every Forum-Properties and you can select, if the Board-defaults were shown when the forum is opend, or you you can say which Row schould be sorted. Ascending or Descending is also selectable.
To build it as much as flexible, I add an Admin-Page, where you can Select some of all Listed Colums existing in the forum-Table. Even new added through Hack. So have only These Colums in your Drop-Down Box.

Part 1 of this Hack is the DaysPruneOverride Hack.
Later i will release all of them in one Big hack.

I hope you like it.
-----
Update:
The SQL ALTER-Command was wrong. Fixed.
-----
Update:
I must be blind and used the wrong table. Fixed.

Demo:

Show Your Support

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

Comments
  #12  
Old 01-31-2002, 07:44 PM
DarkReaper DarkReaper is offline
 
Join Date: Oct 2001
Posts: 429
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wait...doesn't this allow you to change the default sort settings of the threads within a forum? So when they go to the forum it defaults to sorting ASC/DESC ordered by title, posts, views, or whatever you choose?
Reply With Quote
  #13  
Old 01-31-2002, 08:41 PM
Hoffi's Avatar
Hoffi Hoffi is offline
 
Join Date: Nov 2001
Location: Germany
Posts: 342
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes. It sorts the Threads in the specified Forum. But i don't use any thread-properties. The Threads inside the Forum were sorted like my choose in the CP. eg. Title, ASC.
With my Part 1 of the Hack, to override the User-Settings how old threads should be shown, this is perfect or an archive. Thats why i develop this Hacks.
When all is done, i will release on big Hack named Advanced Forum properties.
Reply With Quote
  #14  
Old 02-01-2002, 03:54 AM
DarkReaper DarkReaper is offline
 
Join Date: Oct 2001
Posts: 429
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't understand how you would be ordering threads a certain way by using properties that apply to the forum. It doesn't make sense...threads should be ordered by their own properties - replies, views, titles, starter, last poster, etc...not by the forum's properties. Just one example(because I'm too tired to list them all) - you wouldn't sort threads by the 'allowposting' option
Reply With Quote
  #15  
Old 02-01-2002, 04:56 AM
Hoffi's Avatar
Hoffi Hoffi is offline
 
Join Date: Nov 2001
Location: Germany
Posts: 342
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

D'oh!
Now I understand you. I must be blind...
Thanks DarkReaper!
It works, because the filed-names in both tables were nearly the same... I Updated the hack. The Changes were small, but now it is better.

Update:
First go to the New Menu. Sort Preselection.
Disable all Columns. (You not disable rows, if you are shure, the they are in both tables the same! e.g. title)

Opel admin/forum.php:

Search for:
PHP Code:
$sortinfos=$DB_site->query("describe forum"); 
It appears two times, replace both with:
PHP Code:
$sortinfos=$DB_site->query("describe thread"); 
Now you can reset you Sort Preselection! You will see, that the List is smaller.

That's all!
Reply With Quote
  #16  
Old 02-08-2002, 08:18 PM
LangTuDaTinh LangTuDaTinh is offline
 
Join Date: Dec 2001
Posts: 159
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I did install as you said and but it seems that ascending doesn't work. it always display in descending order. (note i changed to ASC in my forum properties) pls tell me what should i need to fix.
Reply With Quote
  #17  
Old 02-08-2002, 09:23 PM
Hoffi's Avatar
Hoffi Hoffi is offline
 
Join Date: Nov 2001
Location: Germany
Posts: 342
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you installed all Correctly, it must work. So please take a look, if you changed all correctly, and upload your files again.

I think you forgot some Code in forumdisplay.php
Reply With Quote
  #18  
Old 03-06-2002, 11:50 AM
eg_92901's Avatar
eg_92901 eg_92901 is offline
 
Join Date: Oct 2001
Location: Atlanta, GA
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I had the same problem, I restored the original forumdisplay.php and reapplied the code just for that page and it works now.

Thanks for the great hack, its just what I needed!
Reply With Quote
  #19  
Old 06-12-2002, 01:34 PM
ladyfyre's Avatar
ladyfyre ladyfyre is offline
 
Join Date: Nov 2001
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Two questions:

1. Will this work with 2.2.6?

2. Can you add the option to allow a sort by the date the thread was started?
Reply With Quote
  #20  
Old 06-13-2002, 03:24 PM
Hoffi's Avatar
Hoffi Hoffi is offline
 
Join Date: Nov 2001
Location: Germany
Posts: 342
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I haven't tested it with 2.2.6
You can chooser yourself which Table-Fields are Displayed in the Drop-Down Box. I am just not shure if this Date is in one of the Fileds, if yes you can do It by Yourself. Otherwise i must take a look to the DB-Structure.
Reply With Quote
  #21  
Old 07-31-2002, 05:46 PM
Pontemonti Pontemonti is offline
 
Join Date: Jan 2002
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I got it to work with 2.26.
I had one problem, though - I had to modify forumdisplay.php

Find:
PHP Code:
switch ($sortfield) { 
Now, the fields you want to be able to sort on should be added below that line...For example, I wanted to sort on threadid (making the forum display the threads in the order which they were posted), so I added the following line:
PHP Code:
  case 'threadid'

I also made a template modification to allow everyone to sort on threadid...I modified this template:
forumdisplay_threadslist

Find:
PHP Code:
<option value="title" $sort[title]>thread title</option
Add below:
PHP Code:
<option value="threadid" $sort[threadid]>thread post time</option

Okay, that should be it. A small improvement...hope it helps someone :nervous:
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 02:00 AM.


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.09667 seconds
  • Memory Usage 2,316KB
  • Queries Executed 27 (?)
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
  • (6)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_postinfo_query
  • fetch_postinfo
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete