News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

ReTweet Me

Started by DoctorMalboro, May 02, 2010, 02:54:45 AM

Previous topic - Next topic

giveaway365.com

thank you sir,,
there was a slight mistake with the <div align="left
it should have been like this <div align="left"

so the right code is
<div align="left"><a href="', $scripturl ,'?topic=', $context['current_topic'],'" target="_blank" rel="nofollow" class="retweet self">', $context['subject'],': ', $scripturl ,'?topic=', $context['current_topic'],'</a></div>

DoctorMalboro

Quote from: giveaway365.com on May 08, 2010, 01:22:04 PMthank you sir,,
there was a slight mistake with the <div align="left
it should have been like this <div align="left"

so the right code is
<div align="left"><a href="', $scripturl ,'?topic=', $context['current_topic'],'" target="_blank" rel="nofollow" class="retweet self">', $context['subject'],': ', $scripturl ,'?topic=', $context['current_topic'],'</a></div>
Ups, yes, i'm writing faster coz i'm not in my pc, sorry :P

Sudhakar Arjunan

Good Work.

Searching for it, will give a try today.

Thank you Author.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

giveaway365.com

when the posts reaches 2nd page... the retweet button again appears on the top post of 2nd page... can this be shown near (Read 2000 times) ?

Fabiolas

What's the problem? Its not working :S

Liam.

Quote from: Fabiolas on June 08, 2010, 11:51:40 AM
What's the problem? Its not working :S

Well you took a screenshot of the button there; so it's obviously there. WHAT is not working?

giveaway365.com

what does that number 2944 indicate?

hitboy

Do users have to logged in to retweet

aprild

Hi! Tried to install this before I realized that this is only for SMF 2.0 and I've been running 1.11.

Is there any way I could get a Mod like this for 1.11?

Thanks!

DoctorMalboro

Quote from: aprild on July 30, 2010, 02:07:11 PM
Hi! Tried to install this before I realized that this is only for SMF 2.0 and I've been running 1.11.

Is there any way I could get a Mod like this for 1.11?

Thanks!

Not in my plans... because 1) i don't know where to put it. 2) This is a small mod that no-one use. 3) if you tell me where you want this... maybe i can tell you the codes to put it...

aprild

I would love a "Tweet this" button at the bottom right of each post. By clicking on the button you get the direct link to the post (not necessarily pre-shrunk) and text that I can pre-determine or modify, but that people can change themselves before tweeting from their accounts.

Thanks so much. Your help is appreciated!

DoctorMalboro

./Themes/default/Display.template.php
search:
// Maybe they want to report this post to the moderator(s)?
if ($context['can_report_moderator'])
echo '
<a href="', $scripturl, '?action=reporttm;topic=', $context['current_topic'], '.', $message['counter'], ';msg=', $message['id'], '">', $txt['rtm1'], '</a> &nbsp;';
echo '
<img src="', $settings['images_url'], '/ip.gif" alt="" border="0" />';


and add after:

        // ReTweet button...
        echo '&nbsp;<a href="', $scripturl ,'?topic=', $context['current_topic'],'" target="_blank" rel="nofollow" class="retweet self">', $context['subject'],': ', $scripturl ,'?topic=', $context['current_topic'],'</a>';


Then add this:
    // ReTweet javascript files
    echo'<script src="http://ejohn.org/files/retweet.js"></script>';


before </head> in your index.template.php...  ;)

DoctorMalboro

New version of the mod... hope you enjoy it! ;)

~DS~

Quote from: DoctorMalboro on August 12, 2010, 11:03:39 PM
New version of the mod... hope you enjoy it! ;)
Looking hot, thanks.
"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

Exochat

Hi....

Love the mod, however, when I clicked Tweet it brings up the window but the url given is http://www.mysite.com/index.php and no topic ID at the end of it.

After a little play about I realised that deleting the Twitter address out of the mod it then allowed proper linking to the post.

Example: echo'<div align="left"><a href="http://twitter.com/share?url=';, $scripturl ,'?topic=', $context['current_topic'] .........etc

became

echo'<div align="left"><a href="', $scripturl ,'?topic=', $context['current_topic'] ........etc

So now I have the full url to the post working...... however, when i Tweet a post, the number goes up from 0 to 1 but when you return to the post again a few minutes later, it has return from 1 back to 0 again!

Any ideas why its not displaying a correct number of Tweets?

DoctorMalboro

Quote from: Exochat on August 13, 2010, 09:09:34 PMHi....

Love the mod, however, when I clicked Tweet it brings up the window but the url given is http://www.mysite.com/index.php and no topic ID at the end of it.

After a little play about I realised that deleting the Twitter address out of the mod it then allowed proper linking to the post.

Example: echo'<div align="left"><a href="http://twitter.com/share?url=';, $scripturl ,'?topic=', $context['current_topic'] .........etc

became

echo'<div align="left"><a href="', $scripturl ,'?topic=', $context['current_topic'] ........etc

So now I have the full url to the post working...... however, when i Tweet a post, the number goes up from 0 to 1 but when you return to the post again a few minutes later, it has return from 1 back to 0 again!

Any ideas why its not displaying a correct number of Tweets?
API bug... i already report it... because they say it must work in every single tweet... not the group of them... gonna update it as soon as i hear news of them... ;)

Exochat

Ok well now I have noticed that it is working today but have noticed its working if a topic was Tweeted, not neccessarily if the button was pressed.

All my posts get tweeted automatically anyway and as such the Tweet button is displaying a 1 next to every post that gets tweeted by the system.

So clearly the mod is working at displaying the number of times a topic is tweeted. I am just not entirely sure if it is displaying it when you use the Re-Tweet button correctly.

But either way, the main function of Tweeting topics is there and working correctly now and as such it is a great Mod, so well done!!!!

~DS~

#37
Quote from: Exochat on August 13, 2010, 09:09:34 PM
Hi....

Love the mod, however, when I clicked Tweet it brings up the window but the url given is http://www.mysite.com/index.php and no topic ID at the end of it.

After a little play about I realised that deleting the Twitter address out of the mod it then allowed proper linking to the post.

Example: echo'<div align="left"><a href="http://twitter.com/share?url=';, $scripturl ,'?topic=', $context['current_topic'] .........etc

became

echo'<div align="left"><a href="', $scripturl ,'?topic=', $context['current_topic'] ........etc

So now I have the full url to the post working...... however, when i Tweet a post, the number goes up from 0 to 1 but when you return to the post again a few minutes later, it has return from 1 back to 0 again!

Any ideas why its not displaying a correct number of Tweets?
LOL, had the same issue with the url thing which doesn't give the topic id, so deleting this will solved as you mention?

BTW...clicking the counter to bring up the search results didn't work or it gives the wrong search result because it shows the url of the id topic which it was shorten with url  shorten
"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

sinner-rus

Hm... I think, it will be good for view, if the button will place near the guote, modify, remove button... Or you can made settings to choose location to the button)
I am not supported by anyone. And never was. And never will.

DoctorMalboro

oops... my bad :P

I get a response from twitter and say that it wasn't necessary to put that code as the API FAQ say...  ;)

Just search this line:
<a href="http://twitter.com/share?url=', $scripturl ,'?topic=', $context['current_topic'],'&amp;via=twitterapi"

and change it for this one:
<a href="http://twitter.com/share"

Advertisement: