PDA

View Full Version : Forum Display Enhancements - Display Options Above Threads - as seen on vbulletin.org


kira
10 May 2008, 18:52
This template mod, updated from my 3.6.x version (http://www.vbulletin.org/forum/showthread.php?t=152343), will streamline and relocate the "Display Options" dropdown menus to the top of your threads list on forumdisplay, as seen here at vbulletn.org in the modification areas.

As part of this move, we'll also change the look of the "Active Users"/Moderators panel remaining at the bottom of the page. ('Before' and 'after' screenshots are below.)

Note: In the 3.6.x version, there were two different versions of this mod -- the extra one being for those forums using the excellent Thread Prefixes (http://www.vbulletin.org/forum/showthread.php?t=123033) mod by Mystics. Now that vB 3.7.0 has prefixes on its own, those extra set of instructions are no longer necessary.

Important: If you've installed or applied other mods that have altered the forumdisplay template, you may need to adjust the instructions accordingly.

I hope this mod is helpful! As always, many thanks to vbulletin.org for the inspiration, not to mention years of providing an amazingly helpful community.

veenuisthebest
10 May 2008, 19:13
reserved !! :)

cafenetland
10 May 2008, 19:28
lets try it.

thx for ur effort

rooban12
10 May 2008, 19:28
thanks!!!
nice hack

arena
10 May 2008, 19:43
Kira vey thaks nice.

Mike-D
10 May 2008, 20:15
Thanks Mike! But I'm afraid those aren't quite correct. Couple of problems:

1. They seem to have been based on the instructions I included for people without Mystics prefix mod. But vb 3.7.0 has prefix code built in now. If you look at your examples -- and I just tested this on my test installation to verify -- the prefix dropdown is missing.

2. They break the "inline thread title editing" feature. This happened to me too, originally, but I uploaded a fix for this. The problem relates to the "announcebits" portion of the instructions and accidentally duplicating the table id "threadslist." In my fix, I first delete the ID in the table code right above announcebits.

So you might want to withdraw that file for now until that stuff is fixed. But thank you for working on this so quickly! Yep you're right. I didn't see that. Now it works. You'll notice that I've deleted two small things inside the modification which are really not necessary. So then it looks now we'd like to have ;)

kira
10 May 2008, 20:41
Yep you're right. I didn't see that. Now it works. You'll notice that I've deleted two small things inside the modification which are really not necessary. So then it looks now we'd like to have ;)

Thanks again, but it's still not quite right I'm afraid! What do you think wasn't necessary?
Because unless I'm reading your XML wrong, your replacements eliminate the announcebits section completely, which means announcements won't show up. Plus, you still didn't take away the extra ID = threadslist from the table code above the announcebits section, which means the thread editing will still not work.

Here's the section I'm talking about:


<searchstr><![CDATA[$announcebits]]></searchstr>
<replacestr><![CDATA[<!-- Modified Thread Search Layout -->
</tbody>
</table>

The searchstr must include this:

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" id="threadslist">
<tbody>
$announcebits

And the replacestr should start with this:

<!-- Modified Thread Search Layout -->

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tbody>
$announcebits

(Obviously this isn't the whole replacement code.) Note the removed id="threadslist' in the replacement stuff, and the inclusion of $announcebits. These are necessary otherwise announcements and inline thread title editing won't work.

I really do appreciate the help, Mike! I wish I could create TMS files on my own but I'm no php coder by any stretch. Plus I don't use TMS yet! However, I know the above stuff is important for the modification to work correctly.

Mike-D
10 May 2008, 21:19
Damn, seems to be not being my day :( I never would have guessed. Probaby I have mixed somethings. Never try to make some changes when your Editor does have 12 Template codes next to each other working. Yes you're absolutely right because I forgot the most important. Now I have fiixed it and it works. Gee, what a terrible day. Thank you, Kira :) You just made my day :D

BTW: I just saw your BDay. That's almost the same like mine of just 1 day difference :)

ThreeD
10 May 2008, 22:36
thanks for this updated release. The 3.6.x version wasn't working with 3.7!

cyberbob73
11 May 2008, 09:14
Thanks for the TMS File ===> Mike-D (alter Freund:D)

TCB
14 May 2008, 16:53
Now I'm not sure what version to use. Your first post still says version 1.0, although there is talking about changes afterwards? Is it now an xml-product import, or do I still have to edit templates?

kira
14 May 2008, 17:08
Hi TCB. Sorry, the changes mentioned in my OP are comparing this to the original 3.6.x version. This new 3.7.0 version is unchanged and the instructions are in the text file attached to the OP.

This is indeed a Template Modification, so yes, you need to manually edit a template (forumdisplay in this case). The instructions are pretty easy though! Shouldn't take you more than five - ten minutes, tops. :)

However, if you use the Template Modification System product addon, you can use the xml link up in Mike D (http://www.vbulletin.org/forum/showpost.php?p=1515225&postcount=6)'s post. Please note that I can't verify that this works because I don't personally have TMS installed. (I'm weird in that I kinda enjoy modifiying the templates myself, since I think it helps me understand what changes are being made to the system.)

Let me know if you have any problems. Thanks and good luck!

TCB
14 May 2008, 18:15
Oh, great.. thanks a lot. The option to put this 'filter' and 'sort' option on top (like yours) or at the bottom of your forum (default) should be standard in vbulletin. In the meantime, me and my members will enjoy this modification :D

Hostboard
14 May 2008, 18:37
One thing I notied betweenthe before and after was the label "Display Options" Is there a way to slip that back in there?

kira
14 May 2008, 19:01
Thanks TCB! Glad it's useful, and I agree, this placement seems much more logical than the default -- especially when there are lots of threads within a forum, which means the filtering options are easily missed since they're all the way at the bottom of the screen.

Hostboard: Absolutely! In step #3 of my instructions, you'd just place the following:

$vbphrase[display_options]:

Into the code wherever you want. (By default this phrase is "Display Options".)

For example, in the "after" sample image, you can see the area that says "Showing threads 1 of 2." To change this to "Display Options: Showing threads 1 of 2" you'd go to Step #3 of my instructions and look for:

<td class="thead"><phrase 1="$limitlower" 2="$limitupper" 3="$totalthreads">$vbphrase[showing_threads_x_to_y_of_z]</phrase></td>

and change this to:

<td class="thead">$vbphrase[display_options]: <phrase 1="$limitlower" 2="$limitupper" 3="$totalthreads">$vbphrase[showing_threads_x_to_y_of_z]</phrase></td>

Does this make sense? Another option might be to place the "Display Options:" text to the left of all the dropdown filter/sort menus. To do this, again using the third step of my instructions (or if you've already installed the template mod you can just search in your edited template):

Search for:

<table cellpadding="3" cellspacing="0" border="0" align="center">
<tr>
<if condition="$prefix_options">

Replace with:

<table cellpadding="3" cellspacing="0" border="0" align="center">
<tr>
<td><strong>$vbphrase[display_options]:</strong></td>
<if condition="$prefix_options">

(You might want to surround the display options phrase with <span class="smallfont"> and </span> if the text looks too big.)

Let me know if this works for you, or if I'm not clear enough.

Hostboard
14 May 2008, 19:54
Tried Mikes pluggin but I get "Invalid File Specified" when I try to upload it.

YLP1
14 May 2008, 22:03
Thank you so much for this!!! Did I miss the announcebits in the mod template changes because I didn't see that added back with the mod changes.

Also is there a way to search for both date AND poster at the same time with this mod?

kira
15 May 2008, 04:45
Tried Mikes pluggin but I get "Invalid File Specified" when I try to upload it.

Hi Hostboard. The file Mike-D attached isn't a plugin, per se. It works only if you have the Template Modification System (http://www.vbulletin.org/forum/showthread.php?t=152931) addon installed. So if you don't have that installed yet, you should try that first! Or you can just use my instructions to do this manually. I promise it's really really simple! :)

Thank you so much for this!!! Did I miss the announcebits in the mod template changes because I didn't see that added back with the mod changes.

You're welcome, YLP1! Do you mean in the original instructions attached in my OP? Sure, it's in there -- right at the start of the replacement code in Step #3, in the third line or so. You should see:

<!-- Modified Thread Search Layout -->

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tbody>
$announcebits
</tbody>
</table>

(That's only the start of the replacement code, not the whole thing. Cut for brevity's sake!)

Also is there a way to search for both date AND poster at the same time with this mod?

Hm, well, except for the prefix filters, these are really just sorting options, not searches exactly. I'm pretty sure you can only sort by one thing at a time.

Basically whatever you can do with the standard vBulletin "Display Options" is available here -- it's just the layout that's changed.

Ascor
25 May 2008, 20:22
Installed, thank you :)

rapidphim
26 May 2008, 22:58
for some reasons, after I installed this mod, everytime I start a new thread, the cursor is already in center position and all the texts are also center as I typed. But after hit submit new thread, all the texts are aligned left as normal.

Can someone please help me fix this?

kira
26 May 2008, 23:59
for some reasons, after I installed this mod, everytime I start a new thread, the cursor is already in center position and all the texts are also center as I typed. But after hit submit new thread, all the texts are aligned left as normal.

Can someone please help me fix this?

Whoa, you've stumped me. I can't begin to fathom why or how a few template changes solely in the FORUMDISPLAY template could affect anything on newthread.php.

Did you make the changes manually (via my instructions) or did you use the TMS file?

Also, can you show me an example forum (assuming it's public)? I'll have to sign up for your forum and give it a try.

Sorry about this. The only thing I can guess is that this is conflicting with some other mod, although again I'll be darned if I can imagine how.

rapidphim
27 May 2008, 00:59
sorry kira... I think it's the style, not your hack. I installed another style and didn't see that happened. So, I uninstalled the buged style. It's all good. Thanks for this.

tspore
27 May 2008, 05:16
Love this mod, But here is a question, would it be possible to include at the top "forum Jump" after the prefix search.

rapidphim
28 May 2008, 20:23
how can we have the prefix sort in alphabetical order? Thanks.

pureturk
02 Jun 2008, 05:30
anyway to move currently active users and moderators column on top as well?

edongski
02 Jun 2008, 14:16
Can we make this appear only in certain forum/subforum? This is a cool hack!!

RaZor Edge
09 Jun 2008, 01:36
Really cool hack! Thanks! (http://forum.fnnation.com/forumdisplay.php?f=58)

It would be cool if we can also show a list of clickable prefixes just below, something like:
prefix1 (http://prefix1) - prefix2 (http://prefix2) - prefix3 (http://prefix3) - prefix4 (http://prefix4)

Raptor
21 Jun 2008, 00:17
superb - thanks

PoetJA-1975
25 Jun 2008, 06:36
Thanx for the share.

Jacquii.

Captain Tycoon
30 Jun 2008, 11:38
Installed and Marked! Thanks!

voter
19 Jul 2008, 19:35
I like when somebody writes his codes accurate with all tabs.

Great job kira. Keep going.

ErrorLog
24 Jul 2008, 19:28
Thank You ..

yingzhou
10 Aug 2008, 09:36
thanks for this simple but useful mod!

ReQueM
14 Nov 2008, 00:49
thanks :)

Crashh
16 Nov 2008, 15:00
Maybe author of this hack want to upgrade it?:))

The upgrade is: Add option in forum edit page to enable hack on up or down of the page?

WebmasterSimds
30 Dec 2008, 21:18
I want to thank the author for this wonderful addition. its a great help when you have a ton of junk in your topic area, and only wish to see the past few days or so.

Again thank you very much!!

maybepost
11 Jan 2009, 09:26
Did anyone try it on 3.8? Any issues?

maybepost
11 Jan 2009, 09:51
To answer my own post, followed the instructions and works fine. No issues so far.

mhackl
31 Jan 2009, 19:42
I receive: "Invalid File Specified" when I attempt to install the XML

KevinL
31 Jan 2009, 21:12
There is no XML to install :confused:

Mike-D
01 Feb 2009, 08:20
There is no XML to install :confused:You should read the above info and the Text File "displayoptions_to_top3.7_0". It contains all infos you need ;)

KevinL
01 Feb 2009, 14:02
You should read the above info and the Text File "displayoptions_to_top3.7_0". It contains all infos you need ;)

I was talking to the person above me hahah

I guess thats what happens when you don't use the quote...

Mike-D
01 Feb 2009, 17:11
I was talking to the person above me hahahUps, sorry Kevin but I didn't see that :o

I guess thats what happens when you don't use the quote...Yep that's always a popular misunderstanding in postings without quoting it :D

Scalemotorcars
05 Feb 2009, 23:19
Works perfectly. Super clean instructions with all the correct tags. Thanks.. :up:

sundarmobiles
07 Feb 2009, 12:51
after add this modification i got 2 announcement section here is the screen shot pls help me..................

sundarmobiles
11 Feb 2009, 13:35
any one help me to solve this one please

yingzhou
12 Feb 2009, 00:52
you should try delete $announcebits.

sundarmobiles
12 Feb 2009, 04:53
s problem solved thanks mr.yingzhou

JohorBahru
25 Feb 2009, 16:21
could this works for 3.7.5?? :)

Raptor
01 Mar 2009, 11:07
Works great for vb 3.8.1

Tourmeister
17 Mar 2009, 21:59
Works great for vb 3.8.1

Are you still able to edit thread titles just by double clicking to the right of them?

Tourmeister
18 Mar 2009, 03:37
Are you still able to edit thread titles just by double clicking to the right of them?

Nevermind... I found the bit in one of the posts about the ID=Threadlist. I had done this mod by myself without realizing someone else had already figured it out. However, I missed that bit about the threadlist thing and my inline editing wasn't working. Works perfect now!

Arkham
21 Mar 2009, 23:05
Thanks so much. After discovering that you had updated the last one (the hard way, oops), this is working perfectly. It's a mod that's saved me a lot of time as what you've done here I was trying to do on my own, minus the prefix drop down.

Marked enthusiastically as installed, and nominated. Dude, thanks.

doa24uk
05 May 2009, 16:56
Here's how to make the box collapsible.

Instead of point 3 in the instructions - use this code instead

<!-- Modified Thread Search Layout -->

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tbody>
$announcebits
</tbody>
</table>

<form action="forumdisplay.php" method="get">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="f" value="$forumid" />
<input type="hidden" name="page" value="$pagenumber" />
<input type="hidden" name="pp" value="$perpage" />

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead"> <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('filter')"><img id="collapseimg_filter" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_activeusers].gif" alt="" border="0" /></a><phrase 1="$limitlower" 2="$limitupper" 3="$totalthreads">$vbphrase[showing_threads_x_to_y_of_z]</phrase></td>
</tr>
<tbody id="collapseobj_filter" style="$vbcollapse[collapseobj_filter]">
<tr valign="top">
<td class="alt1">
<table cellpadding="3" cellspacing="0" border="0" align="center">
<tr>
<if condition="$prefix_options">
<td><select name="prefixid" id="sel_prefixid">
<option value=""$prefix_selected[any]>$vbphrase[any_prefix_meta]</option>
<option value="-1"$prefix_selected[none]>$vbphrase[no_prefix_meta]</option>
$prefix_options
</select></td>
</if>
<td><select name="sort" id="sel_sort">
<option value="title" $sort[title]>$vbphrase[thread_title]</option>
<option value="lastpost" $sort[lastpost]>$vbphrase[last_post_time]</option>
<option value="dateline" $sort[dateline]>$vbphrase[thread_start_time]</option>
<option value="replycount" $sort[replycount]>$vbphrase[number_of_replies]</option>
<option value="views" $sort[views]>$vbphrase[number_of_views]</option>
<option value="postusername" $sort[postusername]>$vbphrase[thread_starter]</option>
<if condition="$show['threadratings']"><option value="voteavg" $sort[voteavg]>$vbphrase[thread_rating]</option></if>
</select></td>
<td><select name="order" id="sel_order">
<option value="asc" $order[asc]>$vbphrase[ascending]</option>
<option value="desc" $order[desc]>$vbphrase[descending]</option>
</select></td>
<td><select name="daysprune" id="sel_daysprune">
<option value="1" $daysprunesel[1]>$vbphrase[last_day]</option>
<option value="2" $daysprunesel[2]>$vbphrase[last_2_days]</option>
<option value="7" $daysprunesel[7]>$vbphrase[last_week]</option>
<option value="10" $daysprunesel[10]>$vbphrase[last_10_days]</option>
<option value="14" $daysprunesel[14]>$vbphrase[last_2_weeks]</option>
<option value="30" $daysprunesel[30]>$vbphrase[last_month]</option>
<option value="45" $daysprunesel[45]>$vbphrase[last_45_days]</option>
<option value="60" $daysprunesel[60]>$vbphrase[last_2_months]</option>
<option value="75" $daysprunesel[75]>$vbphrase[last_75_days]</option>
<option value="100" $daysprunesel[100]>$vbphrase[last_100_days]</option>
<option value="365" $daysprunesel[365]>$vbphrase[last_year]</option>
<option value="-1" $daysprunesel[all]>$vbphrase[beginning]</option>
</select></td>
<td class="smallfont" align="$stylevar[right]" style="padding-top:$stylevar[cellpadding]px">
<input type="submit" class="button" value="$vbphrase[show_threads]" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>

<form action="inlinemod.php?forumid=$forumid" method="post" id="inlinemodform">
<input type="hidden" name="url" value="$url" />
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="forumid" value="$forumid" />
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" id="threadslist">
<tbody>
<!-- / Modified Thread Search Layout -->

Milez
06 May 2009, 20:50
I love this hack but am desperate to get it to work for just one of my forums rather than all of them. Could anyone lend some insight into how to do this with an if forum ='x' if statement?

Milez
06 May 2009, 21:48
I tried it with this but it breaks the table:

<if condition="$forum[forumid] != X">
...
</if>

Can anyone help please?

cynthetiq
15 May 2009, 00:47
marked installed!

thanks! I'd like to make this just like here, where you can't see what the prefixes are for the threads, but you can sort by them.

what do I need to remove from which template?

Oblivion Knight
22 May 2009, 12:32
This is brilliant, makes logical sense for the display options to be up there!

Installed, thanks.

cellarius
17 Jul 2009, 16:06
The code in step No. 3 did not validate against xhtml for me. Instead I used the following:
<!-- Modified Thread Search Layout -->

<form action="forumdisplay.php" method="get">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="f" value="$forumid" />
<input type="hidden" name="page" value="$pagenumber" />
<input type="hidden" name="pp" value="$perpage" />

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead"><phrase 1="$limitlower" 2="$limitupper" 3="$totalthreads">$vbphrase[showing_threads_x_to_y_of_z]</phrase></td>
</tr>
<tr valign="top">
<td class="alt1">
<table cellpadding="3" cellspacing="0" border="0" align="center">
<tr>
<if condition="$prefix_options">
<td><select name="prefixid" id="sel_prefixid">
<option value=""$prefix_selected[any]>$vbphrase[any_prefix_meta]</option>
<option value="-1"$prefix_selected[none]>$vbphrase[no_prefix_meta]</option>
$prefix_options
</select></td>
</if>
<td><select name="sort" id="sel_sort">
<option value="title" $sort[title]>$vbphrase[thread_title]</option>
<option value="lastpost" $sort[lastpost]>$vbphrase[last_post_time]</option>
<option value="dateline" $sort[dateline]>$vbphrase[thread_start_time]</option>
<option value="replycount" $sort[replycount]>$vbphrase[number_of_replies]</option>
<option value="views" $sort[views]>$vbphrase[number_of_views]</option>
<option value="postusername" $sort[postusername]>$vbphrase[thread_starter]</option>
<if condition="$show['threadratings']"><option value="voteavg" $sort[voteavg]>$vbphrase[thread_rating]</option></if>
</select></td>
<td><select name="order" id="sel_order">
<option value="asc" $order[asc]>$vbphrase[ascending]</option>
<option value="desc" $order[desc]>$vbphrase[descending]</option>
</select></td>
<td><select name="daysprune" id="sel_daysprune">
<option value="1" $daysprunesel[1]>$vbphrase[last_day]</option>
<option value="2" $daysprunesel[2]>$vbphrase[last_2_days]</option>
<option value="7" $daysprunesel[7]>$vbphrase[last_week]</option>
<option value="10" $daysprunesel[10]>$vbphrase[last_10_days]</option>
<option value="14" $daysprunesel[14]>$vbphrase[last_2_weeks]</option>
<option value="30" $daysprunesel[30]>$vbphrase[last_month]</option>
<option value="45" $daysprunesel[45]>$vbphrase[last_45_days]</option>
<option value="60" $daysprunesel[60]>$vbphrase[last_2_months]</option>
<option value="75" $daysprunesel[75]>$vbphrase[last_75_days]</option>
<option value="100" $daysprunesel[100]>$vbphrase[last_100_days]</option>
<option value="365" $daysprunesel[365]>$vbphrase[last_year]</option>
<option value="-1" $daysprunesel[all]>$vbphrase[beginning]</option>
</select></td>
<td class="smallfont" align="$stylevar[right]" style="padding-top:$stylevar[cellpadding]px">
<input type="submit" class="button" value="$vbphrase[show_threads]" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>

<form action="inlinemod.php?forumid=$forumid" method="post" id="inlinemodform">
<input type="hidden" name="url" value="$url" />
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="forumid" value="$forumid" />
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" id="threadslist">
<tbody>
$announcebits
<!-- / Modified Thread Search Layout -->

Wird0
01 Oct 2009, 12:13
Does this work on vBulletin Version 3.8.4 with prefix on?

hollosch
24 Feb 2010, 09:27
Will there be a version for vB 4.0.x ?

henrikhansen
01 Jan 2011, 15:45
Thanks, working fine on 3.8.4.

nit233
25 Feb 2012, 19:38
for vbulletin 4 please...do update this mod

www.nofal
17 Sep 2012, 14:32
Good Work