Topic RSS
its detailed quite well in this thread… you have to make it a program hook… details on program hooks are on our wiki… then my thread tells you which hook to use and the exact code (minus your twitter id) to use…
Ok, so ive implementet the FB like and Tweet .. and it works … however, the FB like function seems to span the entire forum and not just one topic .. so if i click "like" i one topic, no matter what topic i then read "i like" … so the topic like count is actually an entire fourm like, instead of just the one topic.
But im still facing a problem with adding a Facebok Share button .. or not so much adding the button, cause that is pretty simple, but getting it to work right is a bit of a bother.
Ive place the FB share button in the: function sf_render_topic_printicon($topicid), replacing the printer icon. Ive tested placing the share button different places on the topic page, and also tried placing the post permalink directly in facebook .. the results are the same.
What happends is, the FB share cant seem to resolve the topic title, instead it display the url to the post. Also it doesnt interpet the content text as exerpts, but merely writes "Forum" as a link.. The thumbnail function works ok…
I reckon the best way to see this for your self is to go to this page and try and click the big Facebok button in the sfheading
http://www.kiteboarding.dk/for…..11-hadlow/
Also do you guys think its possible to automate the tweet function, so that each new topics gets tweeted automaticly when posted?
it wont matter 'where' you locate it – it isnt location dependent as long as forum data is set up…
but you are not doing a 'like' there, so not sure what you are doing… assuming you found the js somewhere and properly passed the info…
but in the 'like' example I have clearly is topic based and not forum based… so would suspect your code, but you would have to post it for me to look at…
you certainly could make it tweet every post using our program hooks… there is one fired when a post is saved… you would just need to access the twitter api with the data (which is made available to the hook)…
This is the code i use for the LIKE and the TWEET. Its placed in the file sf-hook-template.php in line 389.
function sf_hook_post_topic_top_pagelinks($forumid, $topicid)
{
$topicname = sf_get_topic_name_from_id($topicid);
$tweetme = '<a href="http://twitter.com/share" class="twitter-share-button" data-text="'.$topicname.'" data-count="horizontal" data-via="kiteboardingdk">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>';
$url = urlencode(sf_permalink_from_forumid_and_topicid($forumid, $topicid));
$likeme = '<iframe src="http://www.facebook.com/plugins/like.php?href='.$url.'&layout=button_count&show_faces=false&width=450&action=like&font=tahoma&colorscheme=light&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:80px; height:20px;" allowTransparency="true"></iframe>';
$out = '<div class="sfalignright">';
$out.= $likeme;
$out.= $tweetme;
$out.= '</div>';
return $out;
}
something else must be at play here too… because when I click on the FB link on your site, I dont get a 'like' action, I get a 'share' action…
DOH! wrong link…
but it seems working???
you do have a bunch of js errors on that page… OA_SHow is not defined… maybe a dozen times
Please advice, on what page do you get Js errors, im using web developer to scan for errors, and it only locates CSS errors on that page … not to say there arent any errors, cause im not that skilled in the JS department ^^
Yikes, ok i see a lot of FB and Stat JS errors ..
I was seeing them on the forum topic you linked to above… I like to use firefox with firebug as I think its much better… js errors show up in the console…
5:40 am
Hi I would like to use the second example but whre should i drop the code?
Inside the two () or inside the return ''?
Do I need to replace the entire sf_hook_post_topic_top_pagelinks() hook string or just add the code starting with:
| function sf_hook_post_topic_top_pagelinks($forumid, $topicid) { $topicname = sf_get_topic_name_from_id($topicid); |
|
|
I am stuck.
Thank you |
Most Users Ever Online: 444
Currently Online: wazina
66 Guest(s)
Currently Browsing this Page:
2 Guest(s)
Top Posters:
-Radio-: 1251
Lee H: 606
Luffer: 535
Conrad_Farlow: 504
jim: 478
neon: 263
ovizii: 240
Tal: 240
Member Stats:
Guest Posters: 2626
Members: 7364
Moderators: 1
Admins: 2
Forum Stats:
Groups: 5
Forums: 16
Topics: 10905
Posts: 79605
Newest Members: Onuora Amobi, Rick Thomas, joelrob, ndc, MacBravO, irlandes1, triphop, betokan, Jonathan Yovani Muñoz, somosguatemala
Moderators: Brandon C (162)
Administrators: Yellow Swordfish (22240), Mr Papa (23698)
Log In
Register
Home
Add Reply
Add Topic
Offline




Quote
Visit

Visit

Privacy Policy



