PDA

View Full Version : Forum Display Enhancements - Clickable, Sortable Prefixes


Magnumutz
06 Feb 2008, 23:09
Clickable, Sortable Prefixes


Please mark as "Installed (http://www.vbulletin.org/forum/vborg_miscactions.php?do=installhack&threadid=169832)" if you use this modification, thanks !




Ok guys, some of you might be wondering what this does (most of you are)... so here it is: Instead of having simple text prefixes, this template modification will allow you to click any prefix and sort them.

This is an alternative to the sorting dropdown menus that are under the Forum Display.

So here's what you gotta do.

First of all, go to your AdminCP -> Styles & Templates -> Style Manager -> Select Style -> Edit Templates -> threadbit.

Good now your editing the threadbit template.
Find:

$thread[prefix_rich]
And replace it with:

<if condition="$thread['prefix_rich']"><a href="forumdisplay.php?$session[sessionurl]f=$thread[forumid]&amp;prefixid=$thread[prefixid]">$thread[prefix_rich]</a></if>All done... simple but effective :)

Demo: http://www.psp-media.nl/vraag-aanbod/

Please mark as "Installed (http://www.vbulletin.org/forum/vborg_miscactions.php?do=installhack&threadid=169832)" if you use this modification, thanks !

iogames
08 Feb 2008, 00:57
Is nice to see u making Mods :up:

eNforce
08 Feb 2008, 01:01
Thanks! Very simple, but useful mod!

Demo:
http://www.deathbridge.net/forumdisplay.php?f=5

Forum Lover
08 Feb 2008, 02:54
Thanks! Very simple, but useful mod!

Demo:
http://www.deathbridge.net/forumdisplay.php?f=5

Still got confused mate... I don't get it. I mean what will be the action?

nothing1
08 Feb 2008, 03:56
Really nice and small mod, two thumbs up!

eNforce
08 Feb 2008, 04:18
Still got confused mate... I don't get it. I mean what will be the action?

Click on one of the thread Prefix's such as "Music" or "PC" or "Other", it will take you to other threads that have the same thread Prefix's.

On normal vBulletin installation, the thread Prefix's are not linked at all :)

RvG2
08 Feb 2008, 05:03
thank you so much.... this must be by DEFAULT in vbulletin since it use prefixes already!

Magnumutz
08 Feb 2008, 15:54
Thanks for the demo eNforce.
And for the reviews... it's as simple as that :)

Forum Lover
08 Feb 2008, 17:48
Click on one of the thread Prefix's such as "Music" or "PC" or "Other", it will take you to other threads that have the same thread Prefix's.

On normal vBulletin installation, the thread Prefix's are not linked at all :)

Thanks eNforce and agreed with RvG2.

Magnumutz
08 Feb 2008, 17:50
Then nominate it for MOTM :p
Kidding :D

punchbowl
08 Feb 2008, 17:52
Needs an 'expand' or 'show all' link when threads filtered.

Lovely work though.

Magnumutz
08 Feb 2008, 18:23
And where would that fit?
Cuz it didn't came to my mind yet.

Pottsy
10 Feb 2008, 21:28
And where would that fit?
Cuz it didn't came to my mind yet.

It's going to need a tiny bit of coding, but how about if you click on a prefix in a filtered list, then it produces the unfiltered list again.

Excellent mod, BTW, thank you!

Magnumutz
11 Feb 2008, 12:09
Well, i guess i could make it show a link to show the unsorted list.

M-Tuning
11 Feb 2008, 18:28
Nice, sorry for asking, but does it work with 3.6.8?

no, just saw the code, and prefixes aren't in 3.6.8 yet.

Magnumutz
12 Feb 2008, 05:02
Nope, it doesn't :)

KURTZ
12 Feb 2008, 18:25
that's an interesting mod ... nice job Alex :)

M-Tuning
16 Feb 2008, 17:33
Well, i guess i could make it show a link to show the unsorted list.

Would be nice if you want to do that :D

Pottsy
17 Feb 2008, 20:56
What's really needed is a proper little importable product that:

* Does this clickable prefix job, including the "click the prefix to return to unsorted"
* Option to put prefixes in a column
* Option to apply a format to all prefixes

Anyone up for it? :)

Magnumutz
19 May 2008, 14:42
Added Installation Instructions file.

M-Tuning
21 May 2008, 22:08
Here's a little demo for you on my site:

http://www.psp-media.nl/vraag-aanbod/

Magnumutz
23 May 2008, 16:15
Thanks for the demo, added.

pushedx
25 May 2008, 03:15
Great work! Very nice and easily added.

cavyspirit
03 Jun 2008, 22:43
Thanks! I'm really surprised this capability isn't in 3.7. I just finally installed 3.7 today and that was one of the first things I did after creating a few prefixed posts--click on one to sort/select that prefix. Nothing. OMG. Oh well. This is a major improvement.

Allan
07 Jun 2008, 14:32
Hello :)

It's possible to show all prefixes clickable same the show tags ?

DiSpy
15 Jun 2008, 23:55
Found the instructions for placing the prefixes in their own column here -> http://www.vbulletin.com/forum/showpost.php?p=1570031&postcount=11

(in case anyone else was looking for it)

Alfa1
16 Jun 2008, 15:31
It would be nice if we would be able to add alt tags to prefixes, to describe what a prefix is about. Would be nice for SEO as well.

Magnumutz
17 Jun 2008, 04:39
Alfa, such a description would surely ask for a product or at least a plugin... something that i've yet to make.
But it's a good idea.

rapidphim
23 Jun 2008, 15:48
Thanks much... What a nice tweak!

BeerLuver
24 Jun 2008, 04:12
Very cool mod :). Thanks.

Aclikyano
25 Jun 2008, 17:53
What would it be called to have the prefix after the actual thread title?
Is there anything like this or can it be done with this hack with some modifications

Bellardia
08 Aug 2008, 20:20
You should edit your code to encode the ampersand, or else it comes up as XHTML Invalid.

<if condition="$thread['prefix_rich']"><a href="forumdisplay.php?$session[sessionurl]f=$thread[forumid]&;ampprefixid=$thread[prefixid]"> $thread[prefix_rich]</a></if>

Magnumutz
16 Aug 2008, 21:05
Thanks, i didn't gave much thought to that.

WiBu
17 Aug 2008, 11:25
Any possible way to get the prefix as a title on the page?

Something like "Viewing all threads marked Modifications" at the top of the page when viewing all threads prefixed by Modifications.

(Don't need the html, just the variable if it's at all possible).

Magnumutz
17 Aug 2008, 13:49
Of course it's possible... just that i don't know how and i'm pretty sure it would require some plugins and hooks.

FleaBag
19 Aug 2008, 12:41
Real nice hack! Only thing I see 'missing' so to speak, is a way to remove the prefix filter by clicking a link. Users might get confused and not realise they need to re-browse to the forum to remove the prefix filter.

RCWong
21 Aug 2008, 00:17
Also with the update to the code, seems its not working anymore, when I click the Prefix, it doesn't do anything. Probably something to do with vbseo?

The link location gives me this when I hover over the Prefix:
http://xxxx.com/f18/?;ampprefixid=Prefix

DjEddie
30 Aug 2008, 23:57
Also with the update to the code, seems its not working anymore, when I click the Prefix, it doesn't do anything. Probably something to do with vbseo?

The link location gives me this when I hover over the Prefix:
http://xxxx.com/f18/?;ampprefixid=Prefix

I have the same problem, and similar link to what you have with the vbseo, is there a way to fix this?

Thanks :)

f4vn
01 Sep 2008, 08:35
I have the same problem :(

Magnumutz
02 Sep 2008, 13:52
Try using this guys:
<if condition="$thread['prefix_rich']"><a href="forumdisplay.php?$session[sessionurl]f=$thread[forumid]?prefixid=$thread[prefixid]">$thread[prefix_rich]</a></if>

DjEddie
02 Sep 2008, 14:05
Thanx for that Magnumutz..

I re-edited it and put what you suggested, it now shows, when u click on a prefix, No posts in this forum, when clearly there is.

hmm any other suggestions ?

Thanks for your help :)

Magnumutz
02 Sep 2008, 14:28
I'm gonna try it again and give you an answer by tonight.

DjEddie
02 Sep 2008, 16:00
ok mate ... thanx for this :)

R-D
02 Sep 2008, 17:35
Here's the fix you need:
<if condition="$thread['prefix_rich']"><a href="forumdisplay.php?$session[sessionurl]f=$thread[forumid]&amp;prefixid=$thread[prefixid]">$thread[prefix_rich]</a></if>

It's &amp; rather than &;amp :)

JJ the Fox
02 Sep 2008, 23:24
Love the mod, can anyone tell me how to remove the link border around the prefix?

DjEddie
03 Sep 2008, 02:57
Try using this guys:
<if condition="$thread['prefix_rich']"><a href="forumdisplay.php?$session[sessionurl]f=$thread[forumid]?prefixid=$thread[prefixid]">$thread[prefix_rich]</a></if>


Here's the fix you need:
<if condition="$thread['prefix_rich']"><a href="forumdisplay.php?$session[sessionurl]f=$thread[forumid]&amp;prefixid=$thread[prefixid]">$thread[prefix_rich]</a></if>

It's &amp; rather than &;amp :)

Thanks you 2, works perfectly now ... big help cheers :D

Magnumutz
05 Sep 2008, 18:22
LOL R-D... what a childish typo of mine -_-"
Thanks for noticing it.

rapidphim
17 Sep 2008, 15:53
after add this hack, the prefix has the same color as thread title. How can I make it different color?

vbob
27 Oct 2008, 02:37
Very nice mod...!!! This should exist in vbulletin as a default option. :-)
(Nominated as the mod of the month too) :-)
(you should make the corrections mentioned above to the "Clickable Prefixes Install Instructions.txt" and upload it again because the typo error still exists there I think) :-) ;-)

Brandon Sheley
27 Oct 2008, 04:15
Is nice to see u making Mods :up:

I agree, good to see Hacks by you :) :up:

nando99
01 Nov 2008, 03:33
Wondering if there's a way to make a link to show multiple prefixes only... like 2 prefixes or 3...

Magnumutz
01 Nov 2008, 12:57
Not really... cuz it's based on prefix id's...
So not really.

marianoblesa
25 Nov 2008, 05:15
Hello, In the attachment is different to the code posted on the topic and the deputy will not only be a warning to the author

Magnumutz
26 Nov 2008, 07:39
Yeah, your right... i had a typo there too :p
Anyways, i've fixed it.
Thanks for letting me know.

Sarthek
23 Dec 2008, 04:55
cool

Alfa1
18 Jan 2009, 01:37
It would be very nice for SEO to add an alt text to the prefix. i.e. alt="[forum title] [prefix title]"
How can I add this? Would this work:
alt="$thread[prefix] $thread[forumname]"

Magnumutz
23 Jan 2009, 08:32
This should work Alfa... sorry for the LATE reply.
<if condition="$thread['prefix_rich']"><a href="forumdisplay.php?$session[sessionurl]f=$thread[forumid]&amp;prefixid=$thread[prefixid]" title="$thread['prefix'] $thread[threadtitle]" />$thread[prefix_rich]</a></if>

Alfa1
24 Jan 2009, 03:06
I am getting an error:The following error occurred when attempting to evaluate this template:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/mysite/domains/mysite/public_html/forum/includes/adminfunctions_template.php(3772) : eval()'d code on line 29

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

Magnumutz
25 Jan 2009, 19:59
Ok, this one's going to work... i had some ' characters mistakenly added.

<if condition="$thread['prefix_rich']"><a href="forumdisplay.php?$session[sessionurl]f=$thread[forumid]&amp;prefixid=$thread[prefixid]" title="$thread[prefix] $thread[threadtitle]" />$thread[prefix_rich]</a></if>

Alfa1
26 Jan 2009, 01:03
Prefixes now shows the thread title as title text. It does not show the prefix title. $thread[prefix] does not seem to work.
As I would like to show the forum title, I have changed it to:
title="$thread[forumtitle]"

I would like the title to be forumtitle followed by prefixtitle. How do I add the prefix title?

Magnumutz
26 Jan 2009, 07:13
Change title="$thread[prefix] $thread[threadtitle]" to title="$thread[prefix_rich] $thread[threadtitle]".

Sarthek
26 Jan 2009, 11:09
Aldo I like idea very much and get it work, I have a little problem:

we use pics for prefixes and I get border around pic now. ?

Magnumutz
26 Jan 2009, 16:23
In the src tag add border="0" like this: <img src="link here" border="0" />

Shamil.
17 Feb 2009, 16:18
There are so many features of vBulletin which are not utilised by default or even in the options. Why isn't this in vB? Its so brilliantly simple.

Arkham
21 Mar 2009, 18:59
Thanks! I was looking for a way to do this. It was so simple to install. I'm sure I'll have some questions after it's put into general use, but for now, it's perfect!

Much appreciated, and, obviously, marked as installed. ;)

Arkham
22 Mar 2009, 17:01
I have a doozy of a suggestion for you.

...add the same functionality for PREFIX SETS. ;)

Sounds pointless? For instance, using books as an example, I have two prefix sets: Fiction and Non-Fiction. Within each I have separate prefixes, eg. mystery, fantasy under Fiction, and biography, nature in Non-Fiction.

If I could add the Prefix set, users could view all Fiction or Non-Fiction threads regardless of the actual prefix.

What do you think?

TaMpE
04 Apr 2009, 06:36
I have installed the TfSEO mod and when I click on the prefixes I get

"Oops! This link appears to be broken"

in URL

http://www.mysite.com/f8/&prefixid=18plus

any idea how I can fix this?

EDIT: I have another question. If I have more than 2 prefixes in a forum let's say it's like this

PREFIX 1
PREFIX 2
PREFIX 3
PREFIX 4

and is there a way to view just some of it? like see only PREFIX 2 and 4 etc. (I am not asking for integration of this feature but it there a trick I can do in the URL? I tried adding + but didn't work.

billy126
06 Dec 2009, 13:06
Very nice mod :)

I added it to threadbit_deleted as well since in my forums we delete applications but decline them or keep on file so the mods can go back to them later.

BRotondi
24 Jan 2010, 10:50
vB4: <vb:if condition="$thread['prefix_rich']"><a href="forumdisplay.php?{vb:raw session.sessionurl}f={vb:raw thread.forumid}&amp;prefixid={vb:raw thread.prefixid}"><span style="color: black;">{vb:raw thread.prefix_rich}</span></a></vb:if>Greetings
Bruno

Cerbero1000
31 Mar 2010, 11:58
Hi... is there a variable I can add in forumdisplay template to have prefix name in page title?
I tried with $thread[prefix_rich] but it doesn't works.
Thanks

Coleccromos
31 Mar 2010, 12:39
He did not know this modification is wonderful for my forum.

Thanks for the work

hiker
26 Apr 2010, 21:20
Does anybody know if this will work for 4.0.2?

EDIT - oops, nevermind, I found it. Thanks.

muratcan25
11 Jul 2011, 10:01
Thank You