vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=253)
-   -   Change "Prefix" to "Cities" but only for certain forums (https://vborg.vbsupport.ru/showthread.php?t=234147)

skor 01-25-2010 05:21 PM

Change "Prefix" to "Cities" but only for certain forums
 
I am using the thread prefix as a way for posters to specify the city but only for specific categories, is there a way to change the word "Prefix" above the drop down menu for selecting prefix when making a post to "Select City" and have it show as "Select City" in specific categories?

I'm sure I will have to edit a template and add some sort of conditional for the desired categories...something like...

if category 2,4,6 show "Select City"
else show "Prefix"

Just dont know how to go about coding this into the right template.

Any help is greatly appreciated!

Lynne 01-25-2010 09:56 PM

To find the template to modify, do this - vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of the template called around your part of the code. (Sometimes the template is the one mentioned at the very top of the page source.)

Then just find the phrase ({vb:rawphrase prefix}) and put a condition around it:
HTML Code:

<vb:if condition="in_array($forumid , array(2,4,6))">Select City<vb:else />{vb:rawphrase prefix}</vb:if>

skor 01-26-2010 04:21 AM

Thank you. That worked perfectly.


All times are GMT. The time now is 12:30 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.02104 seconds
  • Memory Usage 1,710KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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