vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Hook for $vboptions[copyrighttext] (https://vborg.vbsupport.ru/showthread.php?t=194339)

Dan_UPC 10-23-2008 11:35 AM

Hook for $vboptions[copyrighttext]
 
I'm creating a product and one of the plugins needs to alter $vboptions[copyrighttext] at runtime before it gets displayed in the footer ... Which hook location would allow me to access $vboptions[copyrighttext]? I tried global_start and global_complete but neither of them worked for this.

Dan_UPC 10-27-2008 02:06 PM

Any clues?

Lynne 10-27-2008 02:28 PM

What is the exact code you are using in your plugin?

Dan_UPC 10-27-2008 02:45 PM

I've tried a number of things just to see if the variable is being changed but even something simple like

Code:

$vboptions[copyrighttext]="test";
Does nothing in all the hook locations I've tried.

--------------- Added [DATE]1225126687[/DATE] at [TIME]1225126687[/TIME] ---------------

Ok I have it working now.

Code:

$vboptions['copyrighttext'] = "test";
Does nothing.

Code:

$vbulletin->options['copyrighttext'] = "test";
Correctly changes it when placed in global_start. Annoying since the 2 are supposed to be equivalent and $vboptions['copyrighttext'] is what is called in the footer template.

Lynne 10-27-2008 03:59 PM

You can't do it like that. I do it like this (well, it's modified for copyrighttext here, but I use it for other things):

PHP Code:

$vbulletin->options['copyrighttext'] = 'test'


Dan_UPC 10-27-2008 04:12 PM

Thanks, I came to the same conclusion a few minutes ago. Just annoying since the template and code sent me on a wild goose chase. The template reference $vboptions['copyrighttext'] and the code indicates $vboptions == $vbulletin->options ... Any way it's all good now. Thanks for your help.

Paul M 10-27-2008 04:25 PM

$vboptions is ONLY available in templates.

Dan_UPC 10-27-2008 04:27 PM

Thanks. Would be nice if there was some documentation to tell us things like that.


All times are GMT. The time now is 11:40 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.01520 seconds
  • Memory Usage 1,721KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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