PDA

View Full Version : Show a phrase in a page it was not meant for


BBR-APBT
12-01-2009, 04:37 PM
Ok I wanted to show the following phrase in a postbit but it came from the member profile.


$vbphrase[show_all_albums]


This will not show on postbit it comes up blank.

Any help would be appreciated.

Lynne
12-01-2009, 04:43 PM
You probably need to include the phrase group in the $phrasegroups array at the top of the page.

BBR-APBT
12-01-2009, 04:46 PM
Anyway to do it with in the plugin its self?

Lynne
12-01-2009, 05:08 PM
Probably. Try using the init_startup hook location with:

if(THIS_SCRIPT == 'whatever')
{
$GLOBALS['phrasegroups'][] = 'phrasegroup_you_want_to_add';
}

BBR-APBT
12-01-2009, 05:24 PM
I was looking at the phrase for this in the AdminCP and I think this would be allowed to be user anywhere?

Here is what I have but the phrase doesn't show up.

if ($vbulletin->options['new_enable_albums'])
{
if(THIS_SCRIPT == 'forumdisplay')
{
$GLOBALS['phrasegroups'][] = 'user';
}
$template_hook['postbit_user_popup'] .= '<li><a href="album.php?'.$session[sessionurl].'u='.$post[userid].'" rel="nofollow">'. $vbphrase[show_all_albums] .'</a></li>';
}

The box shows but with no phrase.

Lynne
12-01-2009, 05:55 PM
What hook location are you using? I think the phrasegroups has to be added at init_startup (as I said in my original post). But, the template_hook part needs to be added using another hook location.

BBR-APBT
12-01-2009, 05:59 PM
Ahh I see. Thanks again, I'll try that when I get back from pciking my son up from school.

--------------- Added 1259698752 at 1259698752 ---------------

That didn't seem to work either so I will just make this all easier and not use the phrase.

Lynne
12-01-2009, 06:55 PM
Post exactly what you used. Also, if you are using this on the showthread page, then you want to use 'showthread' in the THIS_SCRIP condition, not 'forumdisplay'.

BBR-APBT
12-01-2009, 07:14 PM
When all else fails make your own phrase.

It works now.

https://vborg.vbsupport.ru/showthread.php?t=229275


Thanks for all your help Lynn.

Lynne
12-01-2009, 07:18 PM
Glad you got it working. :)

BBR-APBT
12-01-2009, 07:22 PM
Mostly with your help.