vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   What function in vB 3.7.0 can I hack right before the page is output? (https://vborg.vbsupport.ru/showthread.php?t=178490)

StephenKay 05-08-2008 01:11 AM

What function in vB 3.7.0 can I hack right before the page is output?
 
I recently upgraded an old 2.3.0 board to the latest 3.7.0.

I am now trying to recreate some of my old hacks.

In the old code, there was a function named dooutput(...) (in admin/functions.php) that essentially was the last thing called before the php-prepared HTML was spit out to the browser page. I was using a hack inside this function to parse the finished HTML and substitute some words for other words for a specific purpose.

Can anyone tell me where the corresponding function would be in 3.7? I'm not having much success in finding it, everything is so different now....

Kirk Y 05-08-2008 01:14 AM

Use one of the global hook locations in a plugin.

StephenKay 05-08-2008 03:11 AM

Quote:

Originally Posted by Kirk Y (Post 1512253)
Use one of the global hook locations in a plugin.

Thanks for the reply, but that doesn't really mean anything to me. I'm coming from having programmed and hacked 2.3. Where would I find the info that would let me understand your answer?

Dismounted 05-08-2008 04:53 AM

I'd suggest you have a look at this.

StephenKay 05-08-2008 11:00 PM

Quote:

Originally Posted by Dismounted (Post 1512373)
I'd suggest you have a look at this.

OK, I read about plug-ins and products - that looks cool and well thought out - congrats. ;-) Much better than hacking around with the code.

So how do I find out where the hooks are - is there a list of where they appear? Do I just manually browse all of the source files (that could be quite time-consuming), and try to figure out what the functions they appear in are doing, or is there some more organized approach, like a list? As I mentioned, I'd like to find one that will allow me to search and replace the formatted HTML before it is spit out to the browser page and displayed - something sort of at the end of the whole procedure of displaying a forum page. Thanks!

Kirk Y 05-08-2008 11:46 PM

Most hooks are logically named, so its relatively easy to guess at where they're located. ie. newpost_process, forumhome_start, global_complete, etc.

In answer to your question, I would look at the global_complete hook to run your function.


All times are GMT. The time now is 08:10 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.01458 seconds
  • Memory Usage 1,717KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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