Google +1
Collapse
X
-
-
Comment
-
Well... I use jQuery for things on my site (including this), so it's not going to work unless you also use jQuery, even if you don't you get the general idea...
Code:$(document).ready(function() { $('body').append('<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>'); });
Comment
-
Nope... just used in a couple places (like the custom profile editor).Sphinx Search for vBulletin 4: https://marketplace.digitalpoint.com...tin-4.870/item
Someone send me a message on Twitter when this site is usable again. https://twitter.com/digitalpointComment
-
Well... I use jQuery for things on my site (including this), so it's not going to work unless you also use jQuery, even if you don't you get the general idea...
Code:$(document).ready(function() { $('body').append('<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>'); });
Comment
-
Not what i meant with my post i really need to be more clear with this, the jQuery thats included with vBulletin can be used any where in the software or is it only active in lets say the custom profile editor and other places its used.Comment
-
It can be active as long as you include it. It's not loaded normally.Sphinx Search for vBulletin 4: https://marketplace.digitalpoint.com...tin-4.870/item
Someone send me a message on Twitter when this site is usable again. https://twitter.com/digitalpointComment
-
Comment
-
It's really not worth it to load the entire jQuery framework just to do it like that though. I only do it that way because I already have the jQuery framework loaded for other things.
If you don't already have a framework loaded for other purposes, I would just do something like this (not tested, off the top of my head... but it should work)... Then you don't have to load an extra JavaScript file.
Code:(function() { var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = 'http://platform.twitter.com/widgets.js'; document.getElementsByTagName('head')[0].appendChild(s); s.src = 'https://apis.google.com/js/plusone.js'; document.getElementsByTagName('head')[0].appendChild(s); })();
Sphinx Search for vBulletin 4: https://marketplace.digitalpoint.com...tin-4.870/item
Someone send me a message on Twitter when this site is usable again. https://twitter.com/digitalpointComment
-
It's really not worth it to load the entire jQuery framework just to do it like that though. I only do it that way because I already have the jQuery framework loaded for other things.
If you don't already have a framework loaded for other purposes, I would just do something like this (not tested, off the top of my head... but it should work)... Then you don't have to load an extra JavaScript file.
Code:(function() { var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = 'http://platform.twitter.com/widgets.js'; document.getElementsByTagName('head')[0].appendChild(s); s.src = 'https://apis.google.com/js/plusone.js'; document.getElementsByTagName('head')[0].appendChild(s); })();
EDIT: Would it be possible to that for facebook too?For custom designed Windows 7 Visual Styles/Themes, please visit CreativX!Comment
-
The Facebook stuff is already more or less loading after the page loads with the default vBulletin implementation. If you look at the source of a vBulletin page, the clientscript/vbulletin_facebook.js and http://connect.facebook.net/en_US/all.js files are already at the end of the document, and the vBfb object isn't created until after the page has loaded via a YAHOO.util.Event.onDOMReady call. That's why I didn't bother changing it.Sphinx Search for vBulletin 4: https://marketplace.digitalpoint.com...tin-4.870/item
Someone send me a message on Twitter when this site is usable again. https://twitter.com/digitalpointComment
-
It's really not worth it to load the entire jQuery framework just to do it like that though. I only do it that way because I already have the jQuery framework loaded for other things.
If you don't already have a framework loaded for other purposes, I would just do something like this (not tested, off the top of my head... but it should work)... Then you don't have to load an extra JavaScript file.
Code:(function() { var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = 'http://platform.twitter.com/widgets.js'; document.getElementsByTagName('head')[0].appendChild(s); s.src = 'https://apis.google.com/js/plusone.js'; document.getElementsByTagName('head')[0].appendChild(s); })();
For custom designed Windows 7 Visual Styles/Themes, please visit CreativX!Comment
-
It's JavaScript... so maybe header template within <script> tags or something like that.Sphinx Search for vBulletin 4: https://marketplace.digitalpoint.com...tin-4.870/item
Someone send me a message on Twitter when this site is usable again. https://twitter.com/digitalpointComment
-
-
Comment
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Comment