vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Where to place hook for a hack that changes a $vboptions variable? (https://vborg.vbsupport.ru/showthread.php?t=180423)

jwocky 05-25-2008 12:28 AM

Where to place hook for a hack that changes a $vboptions variable?
 
Hey everyone, hope all is well tonight.

I wrote a hack that will change the text of the $vboptions['bbtitle'] variable, but I have no idea which hook to use it on th make it take effect. Everywhere i place it, the forum still uses the default info for vboptions[bbtitle].

Any help is appreciated!

Lynne 05-25-2008 03:02 AM

I wrote a plugin which changes an option and I used the global_start hook.

Opserty 05-25-2008 03:54 PM

If $vboptions doesn't work, try changing $vbulletin->options['bbtitle']. See if that has any effect.

jwocky 05-30-2008 02:10 AM

I tried using the global start hook and tried editing the variable using the $vbulletin->options['bbtitle'] variable, and neither worked..

Doh.

Any other tips or ideas are definitly appreciated!

Regards

Dismounted 05-30-2008 06:50 AM

Find where the variable is set, and find the closest hook.

jwocky 05-30-2008 12:08 PM

Quote:

Originally Posted by Dismounted (Post 1535961)
Find where the variable is set, and find the closest hook.


Thats what I'm trying to figure out :) I'm holding out hope that someone here already knows the answer?

Opserty 05-30-2008 12:23 PM

global_start seemed to work for me, what is the code you are using? Have you tried using the init_startup hook?

Lynne 05-30-2008 03:01 PM

Maybe your plugin code is wrong. What exactly did you put in the plugin?

jwocky 05-30-2008 04:56 PM

Quote:

Originally Posted by Opserty (Post 1536174)
global_start seemed to work for me, what is the code you are using? Have you tried using the init_startup hook?

When I get home tonight i'll try changing the hook to init_start as per your suggestion, I hope that works :)

Quote:

Originally Posted by Lynne (Post 1536295)
Maybe your plugin code is wrong. What exactly did you put in the plugin?

Well, for now its just a test plugin so what I did was make the hook as global_start and then its simply the following command:

$vboptions['bbtitle'] = "Hi";

Thats the entire plugin code. However when I load the page and look down at areas such as the breadcrumb which uses $vboptions['bbtitle'] to display the title of the forum in the breadcrumb, it still displays the forum set variable instead of "Hi".

Lynne 05-30-2008 05:42 PM

As Opserty suggesting in Post 3, try:

$vbulletin->options['bbtitle'] = "Hi";

That works on my forum. Make sure you turn the plugin On since it is Off by default.

jwocky 05-31-2008 07:04 PM

Quote:

Originally Posted by Lynne (Post 1536434)
As Opserty suggesting in Post 3, try:

$vbulletin->options['bbtitle'] = "Hi";

That works on my forum. Make sure you turn the plugin On since it is Off by default.

Aha, now it works, perfect! Thanks for the help to both of you. You know what my mistake was. I used $vbulletin->options[bbtitle] instead of $vbulletin->options['bbtitle'] the first time around, but now its perfect.

Whew!

Thanks again, much appreciated!


All times are GMT. The time now is 04:57 PM.

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.01444 seconds
  • Memory Usage 1,732KB
  • 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
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (11)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