The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Google Plus Badge in a Widget
I am trying to get a Google+ badge in a widget using the code generated here: https://developers.google.com/+/plugins/badge/config
This generates two pieces of code: Code:
<!-- Place this tag in the <head> of your document --> <link href="https://plus.google.com/PAGEID" rel="publisher" /><script type="text/javascript"> (function() {var po = document.createElement("script"); po.type = "text/javascript"; po.async = true;po.src = "https://apis.google.com/js/plusone.js"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(po, s); })();</script> Code:
<!-- Place this tag where you want the badge to render --> <g:plus href="https://plus.google.com/PAGEID" size="badge"></g:plus> I copied the first snippet of code to the end of the headinclude template and am trying to figure out how to get the second piece of code into a widget and have it actually work. The only thing I've tried that even resulted in a blank widget appearing was to use a static_html widget and enter the code in static html using the Configure link for the widget. I have also tried several versions of entering the code directly into a new template. Assuming the first snippet belongs in the headinclude template, I just need to figure out how to configure a widget for the second piece. I'm not really experienced with javascript and am new to editing templates as well, can someone please help me get this working? --------------- Added [DATE]1327356745[/DATE] at [TIME]1327356745[/TIME] --------------- Here's the site I'm trying to get the widget working on: http://www.base113.com It should be appearing between the first two widgets on the left side. |
#2
|
||||
|
||||
Create a new widget. Static HTML and give it a title/description.
Then configure it and place all the given code in the textbox and change the two instances of PAGEID, so it is something like this (I used Android as an example) Code:
<link href="https://plus.google.com/104629412415657030658" rel="publisher" /><script type="text/javascript"> (function() {var po = document.createElement("script"); po.type = "text/javascript"; po.async = true;po.src = "https://apis.google.com/js/plusone.js"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(po, s); })();</script> <center> <g:plus href="https://plus.google.com/104629412415657030658" size="badge"></g:plus></center> |
#3
|
|||
|
|||
Awesome!
I'd swear that was one of the things I tried, but it's working now. Thanks |
#4
|
|||
|
|||
Thanks. tried this too.. but it works not on FireFox..
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|