This topic is locked
[SOLVED]

 Twitter / Facebook - Tweet/Like button hyperlink

9/23/2010 12:42:03 PM
PHPRunner General questions
C
crhys author

Hi Guys and Girls,
I would like to add a hyperlink or a Like/Tweet button as the Facebook generation like to say to one of my tables, I can do this already with insert HTML but I would like to add some variable from that record to the Tweet/Like.
Something like "Hey friends, look at me I scored 98% at some website or other, arnt I great @MySite".
Any Ideas appreciated.
C Rhys

C
crhys author 9/23/2010

I am getting somewhere with this problem, only had a short while this evening to look at it though.
Just by inserting HTML into the table and adding a variable I can place a value from the database into the twitter link.
CODE:-
A class=twitter-share-button

href="http://twitter.com/share";

data-url="http://www.xxxxxxxxxxxxxxxx.co.uk/league.html";

data-text=''

data-count="none"

data-via="xxxxxxxxxxxx">Tweet</A>
<script type=text/javascript src="http://platform.twitter.com/widgets.js"></SCRIPT>;

The output has the figure from the database but also some other info :-
&lt;span id="edit10_AStat8" &gt;[color="#FF0000"]66.75&lt;/span&gt; http://t.co/xxxxxx via @xxxxxxxxxxx
Anybody got ideas where this other info is coming from ?

C
crhys author 9/23/2010

Looks like this problem has been resolved in the past.
in the Data-Text bit just needed to use a custom link like this - data-text="{$custom_link}"
Then on the Events, List Page, List page:After record processed - $record["custom_link"]=$data["A(Stat8)"];

C
crhys author 9/24/2010

Just incase somebody might find this useful.
If you would like to place a facebook like button onto a table (one for each record) you will need to make each URL unique otherwise when you click on one, they will all be liked.
I created a custom link for Field Data 1 in Events page and linked it to the url like this :-
<IFRAME style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; WIDTH: 150px; HEIGHT: 21px; OVERFLOW: hidden; BORDER-TOP: medium none; BORDER-RIGHT: medium none"
src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.xxxxxxxxx.co.uk%2Fleague.html?{$custom_name}{$custom_link}&amp;layout=button_count&amp;show_faces=true&amp;width=150&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=21"; frameBorder=0 allowTransparency scrolling=no></IFRAME>
And it works <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=52922&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />