vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   vBulletin Forum Sideblocks - Show Thread Plain/Rich Prefix Sideblock (https://vborg.vbsupport.ru/showthread.php?t=312674)

mokujin 07-03-2014 10:00 PM

Show Thread Plain/Rich Prefix Sideblock
 
1 Attachment(s)
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 :D

Justinphx 07-04-2014 02:43 PM

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

mokujin 07-04-2014 02:51 PM

I checked and tried again with no error, could you post a screenshot?

Justinphx 07-04-2014 04:47 PM

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:
https://vborg.vbsupport.ru/external/.../1.php?di=uzdh

mokujin 07-04-2014 05:02 PM

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


MarkFL 07-07-2014 08:01 PM

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>

tanzeelniazi 07-08-2014 08:25 AM

snapshot please or any demo ?

mitch84 07-08-2014 10:53 AM

prefix appear only in block forum threads and not in block new forum posts, can you fix that? thx

mokujin 07-08-2014 11:50 AM

Quote:

Originally Posted by tanzeelniazi (Post 2505851)
snapshot please or any demo ?

No need for this, but I'll take some pic :D

Quote:

Originally Posted by mitch84 (Post 2505879)
prefix appear only in block forum threads and not in block new forum posts, can you fix that? thx

Updated for New Forum Posts ...


All times are GMT. The time now is 11:18 PM.

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.01209 seconds
  • Memory Usage 1,759KB
  • 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
  • (1)bbcode_html_printable
  • (8)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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