Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Show Thread Plain/Rich Prefix Sideblock Details »»
Show Thread Plain/Rich Prefix Sideblock
Version: 1.00, by mokujin mokujin is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: vBulletin Forum Sideblocks - Version: 4.2.2 Rating:
Released: 07-03-2014 Last Update: Never Installs: 11
Template Edits
 
No support by the author.

Description

This small template edit shows Plain or Rich Thread Prefix in Sideblock.


Block: Forum Threads


Edit template: block_threads
________________________
Find:
PHP Code:
    <h5 class="widget_post_header"><a href="{vb:raw thread.url}" class="title">{vb:raw thread.title}</a></h5


----------------------------------
To show Plain text, replace by:

PHP Code:
    <h5 class="widget_post_header"><vb:if condition="$thread['prefixid']">{vb:rawphrase prefix_$thread[prefixid]_title_plain} </vb:if><a href="{vb:raw thread.url}" class="title" style="display: inline;">{vb:raw thread.title}</a></h5


---------------------------------
To show Rich text, replace by:

PHP Code:
    <h5 class="widget_post_header"><vb:if condition="$thread['prefixid']">{vb:rawphrase prefix_$thread[prefixid]_title_rich} </vb:if><a href="{vb:raw thread.url}" class="title" style="display: inline;">{vb:raw thread.title}</a></h5



Block: New Forum Posts

Edit template: block_newposts
___________________________
Find:
PHP Code:
    <h5 class="widget_post_header"><a href="{vb:raw post.url}" class="title">{vb:raw post.title}</a></h5


----------------------------------
To show Plain text, replace by:
PHP Code:
    <h5 class="widget_post_header"><vb:if condition="$post['prefixid']">{vb:rawphrase prefix_$post[prefixid]_title_plain}  </vb:if><a href="{vb:raw post.url}" class="title" style="display: inline;">{vb:raw post.title}</a></h5


---------------------------------
To show Rich text, replace by:
PHP Code:
    <h5 class="widget_post_header"><vb:if condition="$post['prefixid']">{vb:rawphrase prefix_$post[prefixid]_title_rich}  </vb:if><a href="{vb:raw post.url}" class="title" style="display: inline;">{vb:raw post.title}</a></h5



=====
Done

Show Your Support

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

Comments
  #2  
Old 07-04-2014, 02:43 PM
Justinphx Justinphx is offline
 
Join Date: Jan 2012
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried both and get a nesting error on the code. Can you please double check the coding? Thanks. I am running 4.2.2
Reply With Quote
  #3  
Old 07-04-2014, 02:51 PM
mokujin's Avatar
mokujin mokujin is offline
 
Join Date: Oct 2005
Location: Czech
Posts: 345
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I checked and tried again with no error, could you post a screenshot?
Reply With Quote
  #4  
Old 07-04-2014, 04:47 PM
Justinphx Justinphx is offline
 
Join Date: Jan 2012
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The following error occurred when attempting to evaluate this template:
Invalid Tag Nesting
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.

That is the message.

Code is attached:
Reply With Quote
  #5  
Old 07-04-2014, 05:02 PM
mokujin's Avatar
mokujin mokujin is offline
 
Join Date: Oct 2005
Location: Czech
Posts: 345
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You missed something, this is your code
PHP Code:
<vb:if condition="$thread['prefixid']"
it should be

PHP Code:
                    <h5 class="widget_post_header"><vb:if condition="$thread['prefixid']">{vb:rawphrase prefix_$thread[prefixid]_title_rich} </vb:if><a href="{vb:raw thread.url}" class="title">{vb:raw thread.title}</a></h5
Reply With Quote
  #6  
Old 07-07-2014, 08:01 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you want the prefix inline with the title, and for the link to take you to the latest post rather than the first, use:

HTML Code:
<a href="{vb:raw thread.newposturl}" class="title" style="display: inline">{vb:raw thread.title}</a>
Reply With Quote
  #7  
Old 07-08-2014, 08:25 AM
tanzeelniazi tanzeelniazi is offline
 
Join Date: Apr 2012
Posts: 375
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

snapshot please or any demo ?
Reply With Quote
  #8  
Old 07-08-2014, 10:53 AM
mitch84 mitch84 is offline
 
Join Date: Mar 2008
Location: france
Posts: 516
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

prefix appear only in block forum threads and not in block new forum posts, can you fix that? thx
Reply With Quote
  #9  
Old 07-08-2014, 11:50 AM
mokujin's Avatar
mokujin mokujin is offline
 
Join Date: Oct 2005
Location: Czech
Posts: 345
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tanzeelniazi View Post
snapshot please or any demo ?
No need for this, but I'll take some pic

Quote:
Originally Posted by mitch84 View Post
prefix appear only in block forum threads and not in block new forum posts, can you fix that? thx
Updated for New Forum Posts ...
Reply With Quote
Благодарность от:
mitch84
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 01:40 PM.


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.04858 seconds
  • Memory Usage 2,331KB
  • Queries Executed 23 (?)
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
  • (1)bbcode_html
  • (8)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (1)post_thanks_box_bit
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete