PDA

View Full Version : Forum Display Enhancements - Make Prefixes Clickable to Filter forumdisplay by Prefix


Lynne
11-22-2009, 10:00 PM
I decided to make this as a plugin. That modification is located here - Make Prefixes Clickable to Filter Forumdisplay (https://vborg.vbsupport.ru/showthread.php?t=230906)

This is another modification which should be standard vbulletin. This template modification will make your thread prefixes clickable. If you click on the prefix, then the forumdisplay will only show threads with that prefix in that forum.


Version History:
1.0 2009-11-23: - initial release by Lynne at vbulletin.org

What to Do
This is a template modification. Open the threadbit template and Find:
{vb:raw thread.prefix_rich}.
Change to:
<a href="{vb:link forum, {vb:raw thread}, {vb:raw foruminfo}}&prefixid={vb:raw thread.prefixid}" rel="nofollow">{vb:raw thread.prefix_rich}</a>That's it! If you then want to add a "Show All Threads" link next to the "Thread Starter" header, then you may edit the FORUMDISPLAY template also.

Find:
<a href="{vb:link forum, {vb:raw foruminfo}, {vb:raw pageinfo_postusername}}" rel="nofollow">{vb:rawphrase thread_starter}{vb:raw sortarrow.postusername}</a>.
Add beneath:
<vb:if condition="$_GET['prefixid']"> / <a href="{vb:link forum, {vb:raw foruminfo}}" rel="nofollow">Show All Threads</a>&nbsp;&nbsp;</vb:if>To install:

1. Make the above changes to the threadbit template and optionally the FORUMDISPLAY template.

To uninstall:

1. Undo the above changes to the threadbit template and optionally the FORUMDISPLAY template.


Screenshots
Clickable Prefixes
https://vborg.vbsupport.ru/attachment.php?attachmentid=106656&stc=1&d=1259011984


After Prefix is clicked, now you have the Show All Threads option:
https://vborg.vbsupport.ru/attachment.php?attachmentid=106658&stc=1&d=1259012314

MikesSite
11-23-2009, 07:21 PM
Any screen shots?

Lynne
11-23-2009, 07:36 PM
I added a couple of screenshots. It just makes your thread prefixes clickable to filter all the threads with that one particular prefix.

Dr.osamA
11-24-2009, 03:34 AM
try to apply the explanation, but it is nothing changed :confused:
Can you help me

Sayid
11-24-2009, 06:25 AM
Very nice mod. I have seen it in 38 and now I understand how to do it.

tagged

Lynne
11-24-2009, 02:05 PM
try to apply the explanation, but it is nothing changed :confused:
Can you help me
Did you modify the correct template for your style? Are you using admin defined prefixes on your site? What is in the source code after adding this change?

steve1966
11-24-2009, 06:49 PM
Thank you Lynne

Sarthek
11-24-2009, 06:52 PM
Tagged for future use. Thanks.

kmohamed
11-24-2009, 07:04 PM
Tagged for future use. Thanks.

SİMAR
11-24-2009, 09:25 PM
Thanks.

mgurain
11-25-2009, 08:02 AM
could it be in a single xml product instead of manually changing template ?

Lynne
11-25-2009, 01:59 PM
could it be in a single xml product instead of manually changing template ?
If you want to write that, feel free to post it. I took a quick stab at writing it as a plugin, and couldn't get the syntax right, but if you have the time, then go for it.

Sarthek
11-25-2009, 02:06 PM
One question: can it be arranged that clickable prefixes with images on hover change background. Can this be arranged with CSS

Like for example reply buttons in vB4.0

Lynne
11-25-2009, 02:15 PM
You can do that with css, yes. You're going to have to play with it a bit and remember that if you use an id, you'll need to make it unique (so append the thread id to the end of it, or something like that).

dacho
12-06-2009, 01:22 PM
Thanks Lymme nice one
Tagged for future use

cloferba
12-22-2009, 01:19 AM
this is great!

and...how to search all threads with an specific prefix?
i mean..i want to add a button wich says "all threads with xx prefix"..the user clicks there and then he will be able to see all threads with that prefix on all forums/subforums

mgurain
12-22-2009, 02:41 AM
This should be a standard feature .

Lynne
12-22-2009, 02:49 AM
this is great!

and...how to search all threads with an specific prefix?
i mean..i want to add a button wich says "all threads with xx prefix"..the user clicks there and then he will be able to see all threads with that prefix on all forums/subforums
I think you would have to make the links not include the forumid in them if you wanted threads in any forum that have that prefixid.

cloferba
12-22-2009, 02:52 AM
so how should be the code? :s

sorry, im very bad to understand programming :(

Lynne
12-22-2009, 03:16 AM
Sorry, I was wrong. I just tried this without a forumid and it gives me an error (invalid forum specified). I guess you need to specify a forumid.

cloferba
12-22-2009, 04:10 PM
ho..thats really bad :|

vb4 should have this function to search by prefix in all forums

...................

and..well..instead of that, how can be the code to search on forumid1,forumid2 and forumid3?

Lynne
12-22-2009, 06:33 PM
and..well..instead of that, how can be the code to search on forumid1,forumid2 and forumid3?
That sounds like a search function and this is just a mod to search this specific forum for all threads with that prefix. I think you'll have to look at the search.php page and look at the forumchoice[] and prefixchoice fields.

willy888
12-22-2009, 10:38 PM
thanks ...very helphull

W!cKeD
12-22-2009, 10:59 PM
Hello Lynne,

thank you very much for this mod but is it possible the prefixes becomes a own column?

See the attach its from vB3.7/3.8.

I know it need template modification in FORUMDISPLAY, threadbit and search_results..

Lynne
12-22-2009, 11:12 PM
Hello Lynne,

thank you very much for this mod but is it possible the prefixes becomes a own column?

See the attach its from vB3.7/3.8.

I know it need template modification in FORUMDISPLAY, threadbit and search_results..
Yeah, I'm sure you could put them in their own column, but that isn't really what this mod is about. If you don't know how to do it, you should post in the vB4 forums for help.

W!cKeD
12-22-2009, 11:35 PM
Thanks, i would to combinate it with your mod, thats reason why i ask :P

Lynne
12-23-2009, 02:24 AM
I ended up writing this as a plugin. That mod is located here - Make Prefixes Clickable to Filter Forumdisplay (https://vborg.vbsupport.ru/showthread.php?t=230906)

ps2wiz
12-29-2009, 06:27 AM
Thanks for the original mod, I am putting it to use.

Hello Lynne,

thank you very much for this mod but is it possible the prefixes becomes a own column?

See the attach its from vB3.7/3.8.

I know it need template modification in FORUMDISPLAY, threadbit and search_results..

I am interested in finding a way to do this, anyone?

Lynne
12-29-2009, 03:05 PM
I am interested in finding a way to do this, anyone?
I saw the request but it's easier to help if you guys post the code you have tried and then let us see the results. So far, no code has been posted so I can't really help with it.

SpankMe
01-04-2010, 09:02 PM
I had to change the & to a ? before the prefixid to get it to work. With the & it just returned to the forum URL. I'm using "Advanced Friendly URLs" if that had anything to do with. No time to test.