Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Google Analytics Code Plugin Details »»
Google Analytics Code Plugin
Version: 1.00, by DomainArchitect DomainArchitect is offline
Developer Last Online: May 2008 Show Printable Version Email this Page

Category: Administrative and Maintenance Tools - Version: 3.7.x Rating:
Released: 05-01-2008 Last Update: Never Installs: 12
Uses Plugins Template Edits
Re-useable Code  
No support by the author.

This is my first plugin mod so its beta.

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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 05-02-2008, 09:16 AM
gwerzal's Avatar
gwerzal gwerzal is offline
 
Join Date: Oct 2007
Posts: 317
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If i hadn't just installed vbseo i would defo be installing this for ease of use.
Reply With Quote
  #3  
Old 05-02-2008, 09:52 AM
Barakat's Avatar
Barakat Barakat is offline
 
Join Date: Nov 2004
Location: Jerusalem
Posts: 571
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

anyway thanks for shareing
Reply With Quote
  #4  
Old 05-02-2008, 09:58 AM
projectego's Avatar
projectego projectego is offline
 
Join Date: Feb 2006
Location: UK
Posts: 724
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[high]* projectego clicks install [/high]
Reply With Quote
  #5  
Old 05-02-2008, 11:50 AM
Big Boss's Avatar
Big Boss Big Boss is offline
 
Join Date: Jan 2008
Location: Cleveland, OH
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice release, although this comes with vBSEO already for those who are running the product.
Reply With Quote
  #6  
Old 05-02-2008, 02:40 PM
COBRAws's Avatar
COBRAws COBRAws is offline
 
Join Date: Oct 2002
Location: Buenos Aires
Posts: 864
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Big Boss View Post
Nice release, although this comes with vBSEO already for those who are running the product.
Not everyone has vBSEO
Reply With Quote
  #7  
Old 05-02-2008, 06:11 PM
DomainArchitect DomainArchitect is offline
 
Join Date: May 2008
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #8  
Old 05-02-2008, 11:49 PM
Big Boss's Avatar
Big Boss Big Boss is offline
 
Join Date: Jan 2008
Location: Cleveland, OH
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by COBRAws View Post
Not everyone has vBSEO
I was just trying to say that it comes with vBSEO already for those who haven't noticed yet.
Reply With Quote
  #9  
Old 05-02-2008, 11:52 PM
Jasem's Avatar
Jasem Jasem is offline
 
Join Date: Feb 2006
Location: www.menokia.com
Posts: 594
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you
Reply With Quote
  #10  
Old 05-14-2008, 11:22 AM
KURTZ KURTZ is offline
 
Join Date: Nov 2006
Location: Italy
Posts: 2,257
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 ...
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:15 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06091 seconds
  • Memory Usage 2,299KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete