vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Forum Display Enhancements - Make Prefixes Clickable to Filter forumdisplay by Prefix (https://vborg.vbsupport.ru/showthread.php?t=228695)

Lynne 11-22-2009 10:00 PM

Make Prefixes Clickable to Filter forumdisplay by Prefix
 
I decided to make this as a plugin. That modification is located here - Make Prefixes Clickable to Filter Forumdisplay

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:
HTML Code:

{vb:raw thread.prefix_rich}
.
Change to:
HTML Code:

<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:
HTML Code:

<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:
HTML Code:

<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/attachmen...1&d=1259011984


After Prefix is clicked, now you have the Show All Threads option:
https://vborg.vbsupport.ru/attachmen...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

Quote:

Originally Posted by Dr.osamA (Post 1919914)
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

Quote:

Originally Posted by mgurain (Post 1920606)
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

Quote:

Originally Posted by cloferba (Post 1935078)
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

Quote:

Originally Posted by cloferba (Post 1935558)
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

Quote:

Originally Posted by W!cKeD (Post 1935874)
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

ps2wiz 12-29-2009 06:27 AM

Thanks for the original mod, I am putting it to use.

Quote:

Originally Posted by W!cKeD (Post 1935874)
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

Quote:

Originally Posted by ps2wiz (Post 1941263)
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.


All times are GMT. The time now is 04:59 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01355 seconds
  • Memory Usage 1,779KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_html_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (30)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete