PDA

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


Magnumutz
02-05-2008, 10:00 PM
Clickable, Sortable Prefixes


Please mark as "Installed (https://vborg.vbsupport.ru/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 (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=169832)" if you use this modification, thanks !

iogames
02-07-2008, 10:57 PM
Is nice to see u making Mods :up:

eNforce
02-07-2008, 11:01 PM
Thanks! Very simple, but useful mod!

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

Forum Lover
02-08-2008, 12:54 AM
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
02-08-2008, 01:56 AM
Really nice and small mod, two thumbs up!

eNforce
02-08-2008, 02:18 AM
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
02-08-2008, 03:03 AM
thank you so much.... this must be by DEFAULT in vbulletin since it use prefixes already!

Magnumutz
02-08-2008, 01:54 PM
Thanks for the demo eNforce.
And for the reviews... it's as simple as that :)

Forum Lover
02-08-2008, 03:48 PM
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
02-08-2008, 03:50 PM
Then nominate it for MOTM :p
Kidding :D

punchbowl
02-08-2008, 03:52 PM
Needs an 'expand' or 'show all' link when threads filtered.

Lovely work though.

Magnumutz
02-08-2008, 04:23 PM
And where would that fit?
Cuz it didn't came to my mind yet.

Pottsy
02-10-2008, 07:28 PM
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
02-11-2008, 10:09 AM
Well, i guess i could make it show a link to show the unsorted list.

M-Tuning
02-11-2008, 04:28 PM
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
02-12-2008, 03:02 AM
Nope, it doesn't :)

KURTZ
02-12-2008, 04:25 PM
that's an interesting mod ... nice job Alex :)

M-Tuning
02-16-2008, 03:33 PM
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
02-17-2008, 06:56 PM
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
05-19-2008, 12:42 PM
Added Installation Instructions file.

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

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

Magnumutz
05-23-2008, 02:15 PM
Thanks for the demo, added.

pushedx
05-25-2008, 01:15 AM
Great work! Very nice and easily added.

cavyspirit
06-03-2008, 08:43 PM
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
06-07-2008, 12:32 PM
Hello :)

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

DiSpy
06-15-2008, 09:55 PM
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
06-16-2008, 01:31 PM
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
06-17-2008, 02:39 AM
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
06-23-2008, 01:48 PM
Thanks much... What a nice tweak!

BeerLuver
06-24-2008, 02:12 AM
Very cool mod :). Thanks.

Aclikyano
06-25-2008, 03:53 PM
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-08-2008, 06:20 PM
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
08-16-2008, 07:05 PM
Thanks, i didn't gave much thought to that.

WiBu
08-17-2008, 09:25 AM
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
08-17-2008, 11:49 AM
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
08-19-2008, 10:41 AM
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
08-20-2008, 10:17 PM
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
08-30-2008, 09:57 PM
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
09-01-2008, 06:35 AM
I have the same problem :(

Magnumutz
09-02-2008, 11:52 AM
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
09-02-2008, 12:05 PM
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
09-02-2008, 12:28 PM
I'm gonna try it again and give you an answer by tonight.

DjEddie
09-02-2008, 02:00 PM
ok mate ... thanx for this :)

R-D
09-02-2008, 03:35 PM
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
09-02-2008, 09:24 PM
Love the mod, can anyone tell me how to remove the link border around the prefix?

DjEddie
09-03-2008, 12:57 AM
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
09-05-2008, 04:22 PM
LOL R-D... what a childish typo of mine -_-"
Thanks for noticing it.

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

vbob
10-27-2008, 12:37 AM
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
10-27-2008, 02:15 AM
Is nice to see u making Mods :up:

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

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

Magnumutz
11-01-2008, 10:57 AM
Not really... cuz it's based on prefix id's...
So not really.

marianoblesa
11-25-2008, 03:15 AM
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
11-26-2008, 05:39 AM
Yeah, your right... i had a typo there too :p
Anyways, i've fixed it.
Thanks for letting me know.

Sarthek
12-23-2008, 02:55 AM
cool

Alfa1
01-17-2009, 11:37 PM
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
01-23-2009, 06:32 AM
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
01-24-2009, 01:06 AM
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
01-25-2009, 05:59 PM
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
01-25-2009, 11:03 PM
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
01-26-2009, 05:13 AM
Change title="$thread[prefix] $thread[threadtitle]" to title="$thread[prefix_rich] $thread[threadtitle]".

Sarthek
01-26-2009, 09:09 AM
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
01-26-2009, 02:23 PM
In the src tag add border="0" like this: <img src="link here" border="0" />

Shamil.
02-17-2009, 02:18 PM
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
03-21-2009, 04:59 PM
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
03-22-2009, 03:01 PM
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-04-2009, 04:36 AM
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
12-06-2009, 11:06 AM
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
01-24-2010, 08:50 AM
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
03-31-2010, 09:58 AM
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
03-31-2010, 10:39 AM
He did not know this modification is wonderful for my forum.

Thanks for the work

hiker
04-26-2010, 07:20 PM
Does anybody know if this will work for 4.0.2?

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

muratcan25
07-11-2011, 08:01 AM
Thank You