vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   How to call the current forum ID in forumdispaly.php inside a template phrase ? (https://vborg.vbsupport.ru/showthread.php?t=259320)

fer_75 02-23-2011 03:03 PM

How to call the current forum ID in forumdispaly.php inside a template phrase ?
 
Hi all

Please help!

This is to add custom text on the “+ Post New Thread” default buttons on forumdisplay.php

I have created some custom phrases:

Boton_1 = Post New Company
Boton_2 = Post New Discussion
Boton_3 = Post New Deal
Etc.

The number are related to the forum ID

So, I im trying to call it from template this way:

{vb:rawphrase boton_{vb:raw foruminfo.forumid}}

But it is not working this way.

How can I add the current forum ID next to {vb:rawphrase boton_ ?

I appreciate any suggestion.

thanks.

Lynne 02-23-2011 04:39 PM

What template are you modifying? And can we see a link to where you are doing this so we can see what is actually happening in the page source?

fer_75 02-23-2011 04:57 PM

Thank you Lynne. I am trying to modify FORUMDISPLAY template, the button text ( "+ Post New Theread")

http://bit.ly/eLa9Yj

As I said I have already created 15 custom phrases witht this structure:
Boton_1 = Post New Company
Boton_2 = Post New Discussion
Boton_3 = Post New Deal

So, now I just need to call {vb:rawphrase boton_FORUMID}

Please help, this would be a great trick to manage what I want.

I tried the logic thing: {vb:rawphrase boton_{vb:raw foruminfo.forumid}} but it does not work :(

Thank you!

Lynne 02-23-2011 05:20 PM

Did you try other things, like:

{vb:rawphrase boton_$foruminfo['forumid']}

ForumsMods 02-23-2011 05:38 PM

Instead you can use plugin system. Example:
Hook: forumdisplay_start
PHP Code:
PHP Code:

$vbphrase['post_new_thread'] = $vbphrase['post_new_company']; 

Create a new phrase called post_new_company
Also you will able to use any PHP condition

Lynne 02-23-2011 05:39 PM

^^ Yeah, that is what I would do. I'd rather use a plugin than edit my template.

fer_75 02-23-2011 07:18 PM

Quote:

Originally Posted by Lynne (Post 2165889)
Did you try other things, like:

{vb:rawphrase boton_$foruminfo['forumid']}

It works like a charm! Thank you so much !!!


All times are GMT. The time now is 10:25 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.01134 seconds
  • Memory Usage 1,726KB
  • 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_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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