PDA

View Full Version : How to call the current forum ID in forumdispaly.php inside a template phrase ?


fer_75
02-23-2011, 03:03 PM
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:
$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
Did you try other things, like:

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

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