vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=168)
-   -   if condition based on thread prefix (https://vborg.vbsupport.ru/showthread.php?t=250718)

Hell Bomb 09-17-2010 06:02 PM

if condition based on thread prefix
 
Does anyone know if vBulletin already has a if condition that will activate based on a single threads prefix?

Hell Bomb 09-21-2010 12:24 AM

-= bump =-

Lynne 09-21-2010 03:13 AM

Probably something like:

HTML Code:

<if condition="$threadinfo[prefixid] == 'xxxx'">
stuff to do if prefixid is xxxx
</if>

Change $threadinfo to be the appropriate variable for template you are using it in.

Hell Bomb 09-24-2010 03:20 PM

Quote:

Originally Posted by Lynne (Post 2101256)
Probably something like:

HTML Code:

<if condition="$threadinfo[prefixid] == 'xxxx'">
stuff to do if prefixid is xxxx
</if>

Change $threadinfo to be the appropriate variable for template you are using it in.

well I am trying to change the information that displays on the forumhome depending on the prefix of a thread in my forum

Lynne 09-24-2010 05:25 PM

What hook location are you using? Go find it in the code and see what variable is appropriate to use in there.

Hell Bomb 09-25-2010 02:13 AM

Quote:

Originally Posted by Lynne (Post 2102784)
What hook location are you using? Go find it in the code and see what variable is appropriate to use in there.

hmm honestly no clue, i have a post lets say www.example.com/forum/showthread.php?view=1 or something and it has the prefix "prefix" and the id of it is 2, on the forum home page if i change the prefix to something else say prefix id1 then i want it to change the display on the forum home page, I will be searching in the vbmanual for the right hook location or w/e you call it but any tips or advice would be much apperciated, sorry for seeming so useless, i am mainly a visual coder sticking to only themes, but this one has been getting me.

Hell Bomb 10-07-2010 05:21 PM

-= Bump =-

cad2go 10-07-2010 05:31 PM

Quote:

Originally Posted by hellbomb (Post 2102920)
hmm honestly no clue, i have a post lets say www.example.com/forum/showthread.php?view=1 or something and it has the prefix "prefix" and the id of it is 2, on the forum home page if i change the prefix to something else say prefix id1 then i want it to change the display on the forum home page, I will be searching in the vbmanual for the right hook location or w/e you call it but any tips or advice would be much apperciated, sorry for seeming so useless, i am mainly a visual coder sticking to only themes, but this one has been getting me.

have you tried rebuilding the counters in maintenace @admincp. vb does ^^^^. Sometimes it takes a while for the preview on forumhome to update to the new prefix is all.

I want to hide threads from guests that have the prefix NWS: (not work safe) so something like Lynne posted would be the direction I'd start with but that's a different case.

Can you show us visually? i.e. a pic of the forum and a pic of forumhome how you'd like it. Maybe we can figure it out.

Hell Bomb 10-18-2010 03:44 PM

The image should give you all the information you need :)
http://img249.imageshack.us/img249/6753/helpoq.jpg

Lynne 10-18-2010 05:17 PM

I have no idea what I am supposed to be looking at in that image and what it is you want to change/add in there.


All times are GMT. The time now is 10:00 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.01061 seconds
  • Memory Usage 1,732KB
  • 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
  • (2)bbcode_html_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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