PDA

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


BBR-APBT
01 Dec 2009, 18:37
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
01 Dec 2009, 18:43
You probably need to include the phrase group in the $phrasegroups array at the top of the page.

BBR-APBT
01 Dec 2009, 18:46
Anyway to do it with in the plugin its self?

Lynne
01 Dec 2009, 19:08
Probably. Try using the init_startup hook location with:

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

BBR-APBT
01 Dec 2009, 19:24
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
01 Dec 2009, 19:55
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
01 Dec 2009, 19:59
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
01 Dec 2009, 20:55
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
01 Dec 2009, 21:14
When all else fails make your own phrase.

It works now.

http://www.vbulletin.org/forum/showthread.php?t=229275


Thanks for all your help Lynn.

Lynne
01 Dec 2009, 21:18
Glad you got it working. :)

BBR-APBT
01 Dec 2009, 21:22
Mostly with your help.