vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Show a phrase in a page it was not meant for (https://vborg.vbsupport.ru/showthread.php?t=229265)

BBR-APBT 12-01-2009 04:37 PM

Show a phrase in a page it was not meant for
 
Ok I wanted to show the following phrase in a postbit but it came from the member profile.

Code:

$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:

PHP Code:

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



BBR-APBT 12-01-2009 05:24 PM

1 Attachment(s)
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.
Code:

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 [DATE]1259698752[/DATE] at [TIME]1259698752[/TIME] ---------------

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. :)


All times are GMT. The time now is 01:07 AM.

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.00980 seconds
  • Memory Usage 1,729KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete