Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Clickable, Sortable Prefixes Details »»
Clickable, Sortable Prefixes
Version: 1.00, by Magnumutz Magnumutz is offline
Developer Last Online: Jun 2014 Show Printable Version Email this Page

Category: Forum Display Enhancements - Version: 3.7.x Rating:
Released: 02-05-2008 Last Update: 11-25-2008 Installs: 142
Template Edits
Re-useable Code  
No support by the author.

Clickable, Sortable Prefixes


Please mark as "Installed" 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:
PHP Code:
$thread[prefix_rich
And replace it with:
PHP Code:
<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" if you use this modification, thanks !

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #52  
Old 11-01-2008, 01:33 AM
nando99 nando99 is offline
 
Join Date: Dec 2005
Location: South Florida
Posts: 218
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wondering if there's a way to make a link to show multiple prefixes only... like 2 prefixes or 3...
Reply With Quote
  #53  
Old 11-01-2008, 10:57 AM
Magnumutz's Avatar
Magnumutz Magnumutz is offline
 
Join Date: Feb 2006
Location: Romania
Posts: 731
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not really... cuz it's based on prefix id's...
So not really.
Reply With Quote
  #54  
Old 11-25-2008, 03:15 AM
marianoblesa marianoblesa is offline
 
Join Date: Jan 2006
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #55  
Old 11-26-2008, 05:39 AM
Magnumutz's Avatar
Magnumutz Magnumutz is offline
 
Join Date: Feb 2006
Location: Romania
Posts: 731
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah, your right... i had a typo there too
Anyways, i've fixed it.
Thanks for letting me know.
Reply With Quote
  #56  
Old 12-23-2008, 02:55 AM
Sarthek Sarthek is offline
 
Join Date: May 2006
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

cool
Reply With Quote
  #57  
Old 01-17-2009, 11:37 PM
Alfa1's Avatar
Alfa1 Alfa1 is offline
 
Join Date: Dec 2005
Location: Netherlands
Posts: 3,537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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]"
Reply With Quote
  #58  
Old 01-23-2009, 06:32 AM
Magnumutz's Avatar
Magnumutz Magnumutz is offline
 
Join Date: Feb 2006
Location: Romania
Posts: 731
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This should work Alfa... sorry for the LATE reply.
Code:
<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>
Reply With Quote
  #59  
Old 01-24-2009, 01:06 AM
Alfa1's Avatar
Alfa1 Alfa1 is offline
 
Join Date: Dec 2005
Location: Netherlands
Posts: 3,537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am getting an error:
Code:
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.
Reply With Quote
  #60  
Old 01-25-2009, 05:59 PM
Magnumutz's Avatar
Magnumutz Magnumutz is offline
 
Join Date: Feb 2006
Location: Romania
Posts: 731
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, this one's going to work... i had some ' characters mistakenly added.
Code:
<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>
Reply With Quote
  #61  
Old 01-25-2009, 11:03 PM
Alfa1's Avatar
Alfa1 Alfa1 is offline
 
Join Date: Dec 2005
Location: Netherlands
Posts: 3,537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:40 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05164 seconds
  • Memory Usage 2,312KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete