vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Insert content on footer (https://vborg.vbsupport.ru/showthread.php?t=228128)

testebr 11-16-2009 08:06 PM

Insert content on footer
 
hook: parse_templates

code: $vbulletin->templatecache['footer'] .= 'content added to footer';

Work fine on 3.x, how to I can do same on 4.x?

Thanks

Lynne 11-16-2009 09:37 PM

Cellarius wrote a really good article that you may be interested in - [vB4] Rendering templates and registering variables - a short guide

You could do a str_replace for whatever is at the bottom of the footer. (You know there is an ad_location there, right? You could just use that, I think.)

testebr 11-17-2009 09:37 AM

I tried...

$ad_location[ad_footer_end] .= 'this insert text fail';

And the article is about fech template to insert in other or add var manually. Sorry if I'm wrong, but it still a little hard for me yet.

TalkVirginia 03-01-2010 09:52 AM

I'm trying to do this too. For the life of me, I can't understand why it is so hard to do. Or why it's so hard to get a straight answer. If someone knows how to do this, then there should be a specific and to the point article on how to append text to the footer without using a template.

BirdOPrey5 01-04-2011 02:12 AM

Quote:

Originally Posted by testebr (Post 1915496)
hook: parse_templates

code: $vbulletin->templatecache['footer'] .= 'content added to footer';

Work fine on 3.x, how to I can do same on 4.x?

Thanks

Bumping this because I know I've googled/searched for this a bunch of times and always see this unanswered question.

Follow the instructions the op mentions but use the hook: cache_templates instead and it's working for me. On parse_templates I'd get an error.


All times are GMT. The time now is 02:06 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.02325 seconds
  • Memory Usage 1,716KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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