vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Administrative and Maintenance Tools - Google Analytics Code Plugin (https://vborg.vbsupport.ru/showthread.php?t=177829)

DomainArchitect 05-01-2008 10:00 PM

Google Analytics Code Plugin
 
This is my first plugin mod so its beta. :D

Purpose:
The purpose of this is to make it easy to add or remove your Google Analytics code or similar footer code in your vBulletin 'footer' template. This is helpful when you need to revert your footer template and want to add back your google analytics or similar footer code with ease, or quickly update the extra footer code without having to enter your admin control panel ('ACP').

Steps:
I broke the steps down into 3 easy parts.

Part 1
* - Create a folder titled custom_plugins in your forum folder;
* - In this folder, create a file titled index.html and add some text, like 'Blank' or a period '.' for example;
* - Create a file titled footercode.html and paste your Google Analytics code in it;
* - Login to your vBulletin ACP

Part 2
* - Go into your 'Style Manager' under the 'Styles & Templates' menu;
* - Click the 'Go' button next to your top-level style
* - Scroll down and double-click on the 'footer' template;
* - Scroll to the bottom of the selected 'footer' template and enter '$footercode' as the last piece of code;
* - Repeat Part 2 for all styles whose 'footer' templates have been modified or whose 'footer' template is not inherited by the top-level 'footer' template modified above(most people will only have one top-level 'footer' template inherited by all subsidiary styles);

Part 3
* - Create a new plugin by looking for 'Add New Plugin' under the 'Plugins & Products' menu;
* - Select 'vBulletin' for the Product;
* - Select 'global_start' for the Hook Location;
* - Enter a title. I used 'Footer Code';
* - Insert the following code in the PHP field:

PHP Code:

$footercode implode(''file('/enter/the/path/to/your/file.html')); 

***Be sure to update the above code with the actual path to the footercode.html file you created above***


Feel free to comment or critique. Support will be provided on vBulletin Domain Architects

gwerzal 05-02-2008 09:16 AM

If i hadn't just installed vbseo i would defo be installing this for ease of use.

Barakat 05-02-2008 09:52 AM

i belive i saw a similar hack her somewhere ....

anyway thanks for shareing

projectego 05-02-2008 09:58 AM

[high]* projectego clicks install :D[/high]

Big Boss 05-02-2008 11:50 AM

Nice release, although this comes with vBSEO already for those who are running the product.

COBRAws 05-02-2008 02:40 PM

Quote:

Originally Posted by Big Boss (Post 1505683)
Nice release, although this comes with vBSEO already for those who are running the product.

Not everyone has vBSEO

DomainArchitect 05-02-2008 06:11 PM

Thank you guys. I run vBSEO on one site but I wanted a plugin for my new vB sites that I am too cheap to pay for vBSEO on. This is a free and easy mod :) so I thought I would share it.

Big Boss 05-02-2008 11:49 PM

Quote:

Originally Posted by COBRAws (Post 1505798)
Not everyone has vBSEO

I was just trying to say that it comes with vBSEO already for those who haven't noticed yet. ;)

Jasem 05-02-2008 11:52 PM

Thank you

KURTZ 05-14-2008 11:22 AM

i don't understand one thing, the $footercode must be placed after this (in the footer template)?

PHP Code:

<script type="text/javascript">
<!--
    
// Main vBulletin Javascript Initialization
    
vBulletin_init();
//-->
</script

also i put this code in the php field:

PHP Code:

$footercode implode(''file('/board/custom_plugins/footercode.html')); 

but it doesn't run ... :(


All times are GMT. The time now is 11:42 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.01901 seconds
  • Memory Usage 1,738KB
  • 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_php_printable
  • (2)bbcode_quote_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