pacman, rainbows, and roller s


home»social_button_blog   

Share buttons for Xtblog

This pair of scripts will create embedded Facebook Google+ and twitter share buttons for your blog and individual blog posts
Most of this script is to get the correct url title and description into the facebook button and the correct url into the google+ button
Facebook reads the pages title and the meta description to create the post on the users facebook page
Xtgem prefixes the posts title to the pages title (set in the building tool page options)
The script puts the posts subtitle into the meta description and the posts true url into the buttons
The default page title and meta description (also set in the building tool page options) are used for the post list
The Google+ button will only appear on "smart" phones and pc's
The Twitter button is basically just the code from
Twitter resources
And there are a whole load of options you can add
The buttons are then embedded into the blogs html

html test

link *171975*

paragraph

Share this post
 

Back to posts
This post has no comments - be the first one!

UNDER MAINTENANCE

script part 1

Copy this script to a plain text file named sb1.js
(.js is used because .js files are not parsed by xtgem)
Or upload it by 'remote server' from
http://ggnnww.yn.lt/sb1.js
(Giving the file a .js extension protects the code during upload)
This file needs to be 'included' in the the <head> area of the page or the _headtags file using
<xt:include file="/sb1.js" />
Set the default post description and your blog settings in this script

script part 2

Copy this to a plain text file named sb2.js
Or upload it by 'remote server' from
http://ggnnww.yn.lt/sb2.js
'include' the script into your page where the blog is to appear.
This replaces your normal xtblog function which you should delete from the page
<xt:include file="/sb2.js" />

Editing your blog posts

There will not be a blog function in the building tool for this page.
You will have to use another page to edit and create your blog posts
Or add this code that puts a blog function on the building tool page just for creating and editing posts
settings in this blog function will be ignored and it will not appear on the outputted pages source
Xtgem Tutorial Contact
©2024 3BIAP
ALE tights reversed