View Full Version : Default Sort Field/Order for Forumdisplay
Andreas
07-27-2005, 10:00 PM
Default Sort Field/Order for Forumdisplay
Description
This Hacks allows you to specify default Sort Field/Order for Thread Display on a System, Forum and User basis.
It also adds Thread Start Date.
Please note: Current selection > User Default > Forum Default > Board/System Default.
Details
1 Product XML with 2 Queries, 12 Plugins, 19 Phrases and 2 Settings
4 Template Edits
History
1.0.0
Initial Version
1.0.1
Added missing Template Edit in readme.txt (shame on me for forgetting this in first place!) and fixed a slight issue with "Default" not working properly.
1.0.2
Updated for RC3 => Code cleanup :)
Thread Start Date is now also being displayed in UserCP, Subscribed Threads and Search.
Subscribed Threads can be sorted by Thread Starte Date.
Please only click Install if you actually have installed/are using this Hack, and click Uninstall whan you don't use it any longer!
Attention
This Modification does not work with vBulletin 3.6+ as this is a built-in feature now.
To upgrade an existing board from 3.5.x to a newer version:
Disable this modification
Upgrade vBulletin
UPDATE forum SET defaultsortfield = defsortfield, defaultsortorder = defsortorder
Save Forum Display Oder
Uninstall this modification
Christine
07-28-2005, 09:07 PM
You rock, Kirby. :)
Thanks!
FleaBag
07-28-2005, 11:43 PM
Awesome Kirby! Thanks...
Boofo
08-01-2005, 12:44 PM
Kirby, is there a way to add the start time as well as the start date to this?
Andreas
08-01-2005, 12:51 PM
That's a secret ;)
Place $thread[creationtime] where you want to have it in Template threadbit
Boofo
08-01-2005, 12:59 PM
Thanks! The reason I asked is because I changed the phrase Today to read Today at and now it looks kind of wierd. ;)
endquote
08-03-2005, 07:32 PM
Nice. This is something I was going to make myself.
How do you get the admincp settings to come out in the product XML? I've been having trouble with that.
Andreas
08-03-2005, 07:46 PM
Hmm ... they should be installed automatically.
Did you import this as a Product?
endquote
08-03-2005, 07:47 PM
I mean in the hack I'm creating, I can't get the CP settings to come out for other people to install, even though they're associated with the product. I'm sure yours works fine. :)
Andreas
08-03-2005, 07:56 PM
Did you check that they are actually in the XML?
endquote
08-03-2005, 08:15 PM
When I export my product, I get the phrases for the settings in the XML, but not the optiongroups or whatever. It's over here: https://vborg.vbsupport.ru/showthread.php?t=93308
chikkoo
08-06-2005, 12:37 PM
I have problem in installing this plug in.
I get an error message:
Warning: Invalid argument supplied for foreach() in /includes/functions/php on line 769
Can u tell me how to fix this?
I am using vb 3.5.0 beta 3.
Do I have to upgrade?
Andreas
08-06-2005, 12:52 PM
This is a Product XML, does Beta 3 support Products?
chikkoo
08-07-2005, 07:35 AM
I installed a test board with RC1, there too I get the same error.
So it seems I am doing something wrong.
Can somebody tell me how to install this Mod step by step.
Andreas
08-07-2005, 08:52 AM
Did you import this as a Product (ACP / Plugin System / Manage Products)?
endquote
08-08-2005, 12:42 AM
I'm not sure if this is working. I installed it (RC2) and edited the templates. I can go to a forum page and sort it by "thread started", and it works fine. However if I set "default sort field" in "forum display options" to "thread start date" and then visit my forums, they are all still sorted by last post.
If I change the setting on an individual forum, it is also still sorted by last post.
Brinnie
08-08-2005, 06:28 AM
Hi Kirby, how are you?
I just made a request, without seeing this. Anways;
I have a personals/classifieds section that I want to have sorted by Thread Creation Date. It's the only forum on my board that I need to have set up like this, but I'm a little confused about my options...
From my understanding this has 2 queries. Are they executed as the search is being performed, or everytime a forum dex is loaded?
Also, my users are very basic people and I do not want to load them with too many buttons and menus. That said, I would really like to just go "bare bones" and only install the admin part, is that possible?
Please respond in n00b speak... I'm still learning vB terminology.
Thank you. :)
GrendelKhan{TSU
08-08-2005, 09:09 AM
RC1 installed :D
everything seems to work except:
the thread sort option does NOT appear in the USER CP. admin ones seem to be fine. But the User CP one is MIA. :(
any thoughts? did I forget something?
Boofo
08-08-2005, 10:14 AM
LOL I never noticed that until you posted. I don't have it in the User CP either. ;)
Lord Brar
08-08-2005, 12:56 PM
Just what I was looking for :D Thanks mate!
Andreas
08-08-2005, 02:12 PM
LOL. I totally forgot the Template Edit for the UserCP part in the readme and nobody noticed so far ^.^
Works fine for me on RC2, except that there was slight issue that selecting "Default" in Forum Manager did not work.
Should be fixed now
@Brinnie
This does not add any queries upon execution.
You can just leave out the modifyoptions Template Edit and you will only have the Admin Part.
Boofo
08-08-2005, 02:15 PM
Do we need to un-install and then re-install?
Boofo
08-08-2005, 02:23 PM
I don't see the additional file edits in the readme text file. And the files have a 7/28 date stamp on them. And, yes, I cleaned my cache before downloading the zip file. ;)
Andreas
08-08-2005, 02:39 PM
I thought I did upload it ... hmm, uploaded again.
Just import and tick Overwrite, then make the missing Template Edit.
Boofo
08-08-2005, 02:53 PM
It uploaded fine this time. Thank you, sir. ;)
Marco van Herwaarden
08-08-2005, 08:10 PM
I thought I did upload it ... hmm, uploaded again.
Easy to say it doesn't add queries, if you have no file. :D
Andreas
08-08-2005, 08:28 PM
Easy to say it doesn't add queries, if you have no file. :D
Yeah, that's for sure that it doesn't add queries when there is no file :D
Brinnie
08-09-2005, 12:05 AM
LOL. I totally forgot the Template Edit for the UserCP part in the readme and nobody noticed so far ^.^
Works fine for me on RC2, except that there was slight issue that selecting "Default" in Forum Manager did not work.
Should be fixed now
@Brinnie
This does not add any queries upon execution.
You can just leave out the modifyoptions Template Edit and you will only have the Admin Part.
Cool thx. :D
(i always click install)
chikkoo
08-09-2005, 06:04 AM
Did you import this as a Product (ACP / Plugin System / Manage Products)?
Yes, I did the same thing. Still I am getting the same Warning message.
Andreas
08-09-2005, 01:45 PM
Uninstall, make sure you don't have any Plugins enabled (as those could interfere and cause Problems), then Reinstall
chikkoo
08-10-2005, 01:15 PM
I upgraded to rc2, uninstalled and reinstalled it..
Wow.. it started working..
This was a strange problem in my beta4 & rc1 problems.
Thanks... KirbyDE
Fj?rgyn
08-16-2005, 11:18 PM
XML file not work, install an empty hook.
I added manually the hooks and phrases, but how I add settings?
Edit: Settings can be add over phpMyAdmin :devious: *hrhr*
Andreas
08-16-2005, 11:27 PM
Common Mistake: You imported this as a Plugin while it is a Product and must be imported this way.
Stormwolf
08-30-2005, 07:17 PM
Thanks for pointing me in this direction from the older topic kirby installed and so far its working like a charm.
wilky49
08-30-2005, 11:35 PM
KirbyDE,
Another great hack.
-Wilky49
feldon23
09-07-2005, 07:56 PM
KirbyDE,
Another great hack.
-Wilky49
What about a 'lite' version just for Admins to specify the sort order of certain forums?
Shouldn't require any template mods, just XML bitfield and XML admincp.
Andreas
09-08-2005, 03:41 AM
Lite Version = Don't do the Template Edits :)
Btw: Bitfield XML?
Omega Prime
09-08-2005, 03:51 AM
Kinda random to ask this here, but is there a way to have the creation date appear in its own column (similar to this thread (https://vborg.vbsupport.ru/showthread.php?t=68878))? Thanks in advance :)
Andreas
09-08-2005, 04:15 AM
Sure - edit the Templates as needed.
Andreas
09-09-2005, 04:16 AM
Updated for RC3.
Details see first Post.
feldon23
09-09-2005, 02:57 PM
Updated for RC3.
Details see first Post.
So if I just want this to be an AdminCP option, I ignore the template edits, the phrase uploads, what else? I really only need one of the 2 MySQL queries, right?
I think this is an awesome plugin, but I am needing to sort specific forums because of the naming scheme of their thread titles.
Andreas
09-09-2005, 04:15 PM
Just import the XML, make your settings - that's it.
HondaATC
10-04-2005, 08:34 PM
Like another poster, I have a classifieds section that needs to be sorted by the creation date. Does this product enable that, or would something have to changed to allow it? Thanks.
imported_magjr
10-04-2005, 10:19 PM
Put it on vb3.5 gold and works like a charm. Guys have been afte rme for years to do this. THANKS!
*clicks install*
GamerzWorld
10-10-2005, 02:06 PM
Im kind of not getting what this hack does. Does it sort the thread order? If so is there anyway i can edit to sort the forum order ie forum catergories in different orders
vktechnology
10-12-2005, 04:55 PM
Is it possible to sort by ID
Andreas
10-12-2005, 05:03 PM
No. What would be the sense of sorting by ID?
Unless you have an imported Forum or are constantly manipulating the clock, this would be the same order as thread.dateline.
vktechnology
10-12-2005, 10:22 PM
No. What would be the sense of sorting by ID?
Unless you have an imported Forum or are constantly manipulating the clock, this would be the same order as thread.dateline.
sort by ID It's good import,,
but if it work like you said then no need for sort by ID.
thank you
vktechnology
10-12-2005, 10:29 PM
I've got some idea for new feature
Default Sort Field/Order for Showthread per forum
order by date
-can make some forum to showthread order by date-
inside thread lastest post will be on top like
# post 10
# post 9
# post 8
.........
# post 1
--------------
Julio
10-13-2005, 02:56 PM
Any chance someone can tell me how can I remove the date that now shows next to t he thread name? :(
Andreas
10-13-2005, 03:00 PM
Undo the threadbit Template edit.
MoogleCC
10-16-2005, 10:21 AM
is it possible to change the size of the font for the start date ?
to make it smaller then the treattitel
edbri871
11-04-2005, 08:23 PM
Thanks..
InfidelMatt
11-06-2005, 01:36 AM
I would love a minimalist version of this that would just let you call up the thread creation date/time wherever needed in the threadbits.
Note that I effectively have that with the product installed and only the threadbits alternation, so it's not a priority- I just don't like having unused code sitting around. :)
Andreas
11-06-2005, 02:27 AM
Well - just strip what you don't want :)
InfidelMatt
11-06-2005, 03:42 AM
Did :p
dmva83
11-24-2005, 02:55 AM
A++++++++++ Hack, WILL CLICK INSTALL AGAIN!!
uh, ::clicks install::
Dennis B
11-30-2005, 05:50 PM
Andreas,
Thanks for this hack.
Question: I believe the template search_results should be edited as well, replacing "$vbphrase[thread] / $vbphrase[thread_starter]" by "$vbphrase[thread] / $vbphrase[thread_started] / $vbphrase[thread_starter]", but when I did that it nothing showed up. Any hints?
Thanks.
Snatch
12-17-2005, 06:42 PM
Is it possible to show the Thread start date below the Thread title ?
for example:
Threat Titel
Nick (DATE)
ThX and GreeTz
Snatch
LoOnEyToOnZ
12-25-2005, 03:34 PM
Can we specify what forum will be sorted in what way ?
Snatch
01-05-2006, 06:45 PM
Hi,
is it possible to show also the Time how the thread was startet ?
OttawaGolf
01-10-2006, 10:29 AM
INSTALLED - works a charm!
This is just what I needed for articles. Thanks!
KOKS@LN
01-29-2006, 06:37 AM
Thanks Andreas,
Works fine on vB 3.5.3
lazytown
01-29-2006, 07:43 AM
This is sorely needed to be installed here at vbulletin.org.. Of course they are still using 3.0 base I believe.
Quick question: Can this be done on a usergroup basis? Or is it only on a per forum basis?
-vissa
Bad Bunny
02-08-2006, 02:35 AM
When I last upgraded, I did not notice right away, but it seems to behave oddly. I cannot get it to sort by the date of posting anymore.
tribedude
03-03-2006, 04:08 AM
I am looking for a way to sort thread titles that are date-based, for an event listing forum... Like this:
March 03 Event name
May 25 Event name
April 02 Event name
Currently, I have this plugin installed and it sorts the thread titles alphabetically... (so April 02 shows up before the other dates in the above example). Is there a way to chronologically sort the thread title based on a date in the thread title?
photongbic
04-27-2006, 01:29 PM
I am looking for a way to sort thread titles that are date-based, for an event listing forum... Like this:
March 03 Event name
May 25 Event name
April 02 Event name
Currently, I have this plugin installed and it sorts the thread titles alphabetically... (so April 02 shows up before the other dates in the above example). Is there a way to chronologically sort the thread title based on a date in the thread title?
I too am looking for something very similiar! I have one event forum that I want to sort by the event dates and not the title or creation date. I was thinking of a user defined date/time field in the Additional Options section of Post New Thread. And then have the forum sort on that field.
My problem is, how do you make that user defined field only available under one forum and then have only that one forum sort on that field.
Too many questions and not enough time... :tired:
Let me know if you come across anything.
Thanks!
Cedric_FP
05-31-2006, 09:42 PM
INSTALLED - works a charm!
This is just what I needed for articles. Thanks!
Exactly what I needed this for as well.
A wonderful hack. Thank you Andreas!
mano1.com
08-04-2006, 06:35 PM
Click INSTALL!
loving this thanks!
ONE THING: i couldn't find a couple of items in the templates (3.5.4 here):
FORUMDISPLAY: <option value="lastpost" $sort[lastpost]>$vbphrase[last_post_time]</option>
And another one (forgot which one DOH!)
Looks like its working... :)
VitroX
09-22-2006, 11:51 AM
thanks a lot! installed!
working fine on vb 3.6.1
:)
ataraxia
11-03-2006, 03:19 PM
How feasible would it be to add an option for "random" sorting to this marvelous hack?
How would you modify the code? (Or could we get Andreas to do it? Nudge, nudge, wink, wink!)
thanks!
warlockninja
08-18-2007, 04:51 PM
EDIT: nevermind I figured out why I was having this problem.......it was not the mod it was my noob self.........
Spinning Webs
08-20-2007, 03:05 PM
Forgive me if this was asked/covered already, but I have a user suggesting the same type of sorting feature under "New Posts" (search.php?do=getnew)
Is this doable?
tribedude
09-06-2007, 04:36 PM
will this work on 3.68? we are already using it on 3.58 and will soon be upgrading our vb...
warlockninja
09-06-2007, 04:42 PM
works on my 3.68
Dirkt1
08-23-2008, 01:47 PM
Does it works on 3.7.2 ?
DanielGara
07-12-2009, 11:28 PM
i need this mod for 3.8.3
I also need this mod for 3.8.x. While it is a feature in vbulletin, users must set it at the bottom of each forum. I would like them to be able to modify the defaults for themselves via their usercp (for every forum)
I used this with success on 3.5 and 3.6, but now we cannot offer users this functionality on 3.8.
Dimoks
08-06-2010, 09:13 AM
I need this mod for 3.8.6 :(
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.