Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=2525)
BBC Twitter
Author: Suki (http://missallsunday.com)
DescriptionFor SMF 2.0.x onlyThis mod will add 3 tags:
[tweet]https://twitter.com/#!/MissAllSuki/status/155374727416909828[/tweet]
[twitacc]@MissAllSuki[/twitacc]
[hashtag]#SMF[/hashtag]
Using jquery and the tweetGrab Plugin.
License * This SMF modification is subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this SMF modification except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
jQuery - tweetGrab Plugin copyright Michael Kafka <http://www.makfak.com>
SettingsNo Settings Just install and use.
Languages-English/utf8
Changelog2.0 - Jan 06, 2012,-Compatible with SMF 2.0.x
-Code improved.
QuoteTwitter. The amazing application that took the world by storm.
Great mod, I like the fact that we can add hashtags.
Thanks, please suggest anything you want added, or fixed (if there is something wrong)...
Hashtags can really be used in Twitter, and I do have another Hashtag-type thing to come out as soon as I can get my head around the API for it, but that may not be for a while...
Thanks for liking it, I hope you use it ;)
I'll find a use :)
nice mod
good job Liam
And thanks Vicram for fixing a bug in it ;)
Excellent mod, i will use it ;)
Thanks!
Awesome got this MOD finally approved Liam! :)
BUT... It wasn't working on my forum. I installed sweet, with no errors, but it just doesn't showed up.
SO... I opened the html code and saw there's other mod using jquery (Enotify MOD), and disabled. Now it works GREAT!!!!
T H A N K Y O U L I A M !
Let me know your paypal id for a little donation! :)
Quote from: Sakae on May 16, 2010, 10:48:23 AM
Awesome got this MOD finally approved Liam! :)
BUT... It wasn't working on my forum. I installed sweet, with no errors, but it just doesn't showed up.
SO... I opened the html code and saw there's other mod using jquery (Enotify MOD), and disabled. Now it works GREAT!!!!
T H A N K Y O U L I A M !
Let me know your paypal id for a little donation! :)
eNotify shouldn't have disabled jQuery throughout the whole site, but I suppose if it calls it first in the index.template.php it would...
Thanks for liking the mod and thanks for using it ;)
A donation for a BBCode... Thats a bit... weird ^_^ Oh well, cheers anyway! My PayPal address is:
[email protected]
That's what happens if you have jQuery loaded twice on the page.
Yeah :/ Annoying but pretty unavoidable in most cases...
Only if you don't have the imagination to think outside the box.
I explained not that long ago a method to remove the unread/unreadreplies link from the page without touching the theme code at all. Yup, zero template edits. We do this in SimpleDesk (don't think it's in the currently public version though). Virtually the same technique could be used to check if jQuery is loaded in the page and if not, add it.
Didn't knew you don't wanted :P
Kidding, I will make a very small donation, just for show my thankness for creating such a mod. Have you forgot I opened this thread on MOD requests board? :)
* By small, I say like, half can of soda small :P *
Quote from: Sakae on May 16, 2010, 04:12:42 PM
Didn't knew you don't wanted :P
Kidding, I will make a very small donation, just for show my thankness for creating such a mod. Have you forgot I opened this thread on MOD requests board? :)
* By small, I say like, half can of soda small :P *
Half a can of a very big soda can ;) Thanks though ^_^
Arantor, I know it's possible but I'm not sure on how to go about it, so...
OK, big hint time.
QueryString.php has a function that does a replace on the page after the rest of the page has been constructed - just before it's sent off. It's where SEF URLs are generated, it's where Pretty URLs and SimpleSEF both edit to modify URLs in situ, and it's where we do the same in SimpleDesk.
Apply a liberal regexp to see if a <script> contains jquery, if not, inject it into $buffer, for which a variety of methods exist.
Thanks for the big hint Arantor ;) Makes enough sense, I'll try include it in the next version ^_^
This mod is awesome however it would be AMAZING if this would automatically embed as opposed to putting in the BBC codes in
Quote from: DEK24 on June 04, 2010, 04:40:18 PM
This mod is awesome however it would be AMAZING if this would automatically embed as opposed to putting in the BBC codes in
That'd be pretty hard to do, and I don't particularly plan on doing it, what's wrong with a BBCode? Also, what if someone wants to just link to a Twitter Profile, etc.?
It's like embedding youtube videos. Sure you could BBCode it but when you post the link and video magically appears its even better. Also not everyone posting in forum communities are that computer savvy.
Quote from: DEK24 on June 06, 2010, 10:21:52 AM
It's like embedding youtube videos. Sure you could BBCode it but when you post the link and video magically appears its even better. Also not everyone posting in forum communities are that computer savvy.
Not savvy? Thats why there's a "help" button on the menu ;)
Okay, I'll see about auto-embed.
You could do it on the full URL. Not on the others because it's scary-easy to trip over other things... like email addresses and partial URLs.
Quote from: Liam. on June 06, 2010, 11:59:20 AM
Quote from: DEK24 on June 06, 2010, 10:21:52 AM
It's like embedding youtube videos. Sure you could BBCode it but when you post the link and video magically appears its even better. Also not everyone posting in forum communities are that computer savvy.
Not savvy? Thats why there's a "help" button on the menu ;)
Okay, I'll see about auto-embed.
You try telling that to 60+ year old guys who type with 1 finger lol. I'm just saying some people don't even know what BBC is or how to use it. They do know how to copy and paste though.
Quote from: Arantor on June 06, 2010, 07:15:03 PM
You could do it on the full URL. Not on the others because it's scary-easy to trip over other things... like email addresses and partial URLs.
If you're implying about the hashtags you could simply enter in the full URL for that.
Quote from: DEK24 on June 07, 2010, 07:41:01 PM
If you're implying about the hashtags you could simply enter in the full URL for that.
Not just hashtags but also the @ references. In fact in terms of auto embed, you're pretty much JUST talking the full URL only.
You don't have to know about bbcode explicitly, you can do it through the buttons above the posting area, which does the hard work of bbcode (the actual code) for you.
Quote from: Arantor on June 07, 2010, 07:43:02 PM
Quote from: DEK24 on June 07, 2010, 07:41:01 PM
If you're implying about the hashtags you could simply enter in the full URL for that.
Not just hashtags but also the @ references. In fact in terms of auto embed, you're pretty much JUST talking the full URL only.
You don't have to know about bbcode explicitly, you can do it through the buttons above the posting area, which does the hard work of bbcode (the actual code) for you.
There are no buttons in quick reply and I don't see the difference between bbc'ing it or embeding it. Isn't there some type of code that would automatically wrap the link in the bbc?
There's a world of difference.
If you're doing some kind of auto embedding, you have to have something to search in the code, and since @ and # are both already parts of existing structures which are already searched for and get linked in SMF itself (auto linking hits both email addresses and URLs), you have that to deal with.
Long story short: yes you can write some code to automatically link but it won't be particularly reliable. A carefully crafted regular expression might get you some of the way but that's really not that efficient, unless you drop it into the pre-parse step and store it on saving, which gives you a whole other world of problems to avoid.
Anyway, Liam, why this bbcode doesn't work on second messages (or after)?
It works only on first message (creating a new topic).
Does this might be a conflict with Ajax quick reply mod?
Hmm... Weird. I'll have a look into that. Should have no conflict with AJAX Quick Reply, but I'll see...
Except that it uses AJAX through jQuery does it not?
Yes, but if it's already loading it once on the page, shouldn't stop it loading a second time...
Actually, yes it can. Especially if you're having two separate things messing around with AJAX/general Javascript that were never intended to work together.
I love this mod for its utility, what a great idea. I am currently using the "tweetme" option in my sig and although the tweets update okay, the time on them arent updating. For example, a tweet which was sent 5 mins ago, on the display in my sig it says sent 22 hours ago and has a null link to an undefined page when i click the time. What can be causing this?
Wow! I would like this in conjunction with that twitter site that broadcasts instead of twitter mod. ill install asap!
wow this is just what i am looking for.................but for 1.1.11............. >:(
anything will happen for this mod in 2.0.1 ? interested thanks
I haven't had the chance to update this one, mostly because is not that popular, will do when I finish some other things.
Quote from: Miss All Sunday on October 11, 2011, 10:37:30 AM
I haven't had the chance to update this one, mostly because is not that popular, will do when I finish some other things.
Surprised really... I really have many ideas to use it right now. I'll be keeping my eye out ;) hopefully its not too much trouble.
Put me down on the wait list too. I really like this mod.
Changelog
2.0 - Jan 06, 2012,
-Compatible with SMF 2.0.x
-Code improved.
Can't nobody say Suki never did nothing for the peoples.
Hi,
First of all I'd like to appreciate the work of the developers, the mod is really cool.
However I have a problem. When I'm trying to use the bbcode [tweet] it fails, at the post I can see the box of the tweet but there only appears "loading undefined" and then "error undefined". We tried several times with the same result. On the other hand the other bbcodes are working fine, so I don't have no idea why it isn't working...
This one for example doesn't work:
[tweet]http://twitter.com/#!/Radomiro_Antic/status/157940464476098560[/tweet]
Any suggestions?
Thanks in advance!
The only thing I can think of is the regex in the jquery plugin that fails to recognize the url format.
I'll have to check it, the plugin is old and there is always the chance that twitter may have modified it's urls.
I would appreciate that!
Cheers!
SMF 2.0.2 Simple portal 2.3.4 default theme
Installed the mod with success.
Created a Bbc Block and coded ..
[twitacc]@accountname[/twitacc]
The output is only the text "@accountname" not teh executed one .
What am I doing wrong ? Is it simple portal issue ? or something else ?
I'm with the same issue.
I told Suki and he said that he will check it as you can see two posts above.
Looking forward to the fix because it's a really cool mod ;)
Edit:
I re-read your post and is not the same stuff. It should work, at least in my forum works like that. I have problems with the tweet bbcode.
I'm not a he.
@teos55 url to your forum?
as for the fix, it really depends on the account, on some accounts the mod works fine, on some others don't, if I modify the regex them I will break more things rather than fix them.
@teos55 don't pm me and I'm actually need an url to a topic where the mod is been use.
Dera Suki,
I dont want the url to go public, that was the reason I pm'd you the url.
Actually it is a bbc block from simple portal where I code [twitpic] ....
I see no BBC block... I need to see the code/block in order to help you...
There is not [twitpic] tag, the only tags are:
[tweet]https://twitter.com/#!/MissAllSuki/status/155374727416909828[/tweet]
[twitacc]@MissAllSuki[/twitacc]
[hashtag]#SMF[/hashtag]
Sorry for the typo, it is [twitacc] ...
Here is what is typed in the bbc block of Simple Portal ..
[twitacc]teos55[/twitacc]
it must be
[twitacc]@teos55[/twitacc]
Corrected to :
[twitacc]@teos55[/twitacc]
but the result is the same, only text @teos55 is the output not result of it ...
I still need to see an example live in your forum...
Attached the output ...
I don't need an image.
I can't help you if you cannot provide me with a link to your site, a link to a topic where I can see the mod working live.
Does the mod works in the topics and messages?
Suki,
My site is www.karavanturk.org simple portal is the front page.
"Does the mod works in the topics and messages?" NO ..
Same as bbc block , only the text is typed back.
link to topic : http://karavanturk.org/index.php/topic,1592.0.html
Guest cannot see that topic and in your front page I cannot see any bbc block...
I don't see any of the code from this mod in your source page, make sure you installed correctly the mod.
Make sure other mods do not re-write $context['html_headers'] var as this mod depends on that var.
You can also place this code before the </head> tag in your index.template.php:
<link rel="stylesheet" type="text/css" href="'. $settings['default_theme_url'] .'/tweet/tweetGrab.screen.css" />
<script type="text/javascript">
!window.jQuery && document.write(unescape(\'%3Cscript src="http://code.jquery.com/jquery.min.js"%3E%3C/script%3E\'))
</script>
<script src="'. $settings['default_theme_url'] .'/tweet/jquery.tweetGrab.pack.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(document).ready(function()
{
jQuery(\'.tweetGrab\').tweetGrab({
width:\'500px\',
center: true
});
jQuery(\'#tweetme\').tweetGrab({
width:\'500px\',
tweetCount:\'5\',
center: true
});
jQuery(\'#tweethash\').tweetGrab({
width:\'500px\',
tweetCount:\'3\',
center: true
});
});
</script>
Before modifiying index.template.php,
did the following ...
uninstalled Global Headers and Footers mod.
tested .. result negative
Uninstalled bbc twitter and reinstalled .. no err msg ...
created test user "garip" with the pwd "T1estuser" for you ..
Can you pls have a check with the test user, then I can try to modify the index.template.php
Allt he best
Is that mod the only one you have installed? as far as I know, that mod doesn't use $context['html_headers'] so installing/uninstalling it will achieve nothing.
I have several other mods installed and dont know which one uses that var. Searched through the mods site for the string but
couldnt come up with a clue.
Can you pls login with the test user to my site and check what is wrong ?
All the best
I don't need to log in, the mod settings aren't been displayed, that means $context['html_headers'] isn't working properly, mostly because some other mod author used that var but instead of append their content like they should:
$context['html_headers'] .= 'code here';
they overwrite the entire var:
$context['html_headers'] = 'this will replace everything that was placed before';
it will be more easy ig you just appean the code I gave you directly to your theme's index.template.php
Should I add it with the BBC Twitter mod installed or not ?
No... please re read my previous post:
Quote from: Suki on February 10, 2012, 05:14:39 PM
You can also place this code before the </head> tag in your index.template.php:
<link rel="stylesheet" type="text/css" href="'. $settings['default_theme_url'] .'/tweet/tweetGrab.screen.css" />
<script type="text/javascript">
!window.jQuery && document.write(unescape(\'%3Cscript src="http://code.jquery.com/jquery.min.js"%3E%3C/script%3E\'))
</script>
<script src="'. $settings['default_theme_url'] .'/tweet/jquery.tweetGrab.pack.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(document).ready(function()
{
jQuery(\'.tweetGrab\').tweetGrab({
width:\'500px\',
center: true
});
jQuery(\'#tweetme\').tweetGrab({
width:\'500px\',
tweetCount:\'5\',
center: true
});
jQuery(\'#tweethash\').tweetGrab({
width:\'500px\',
tweetCount:\'3\',
center: true
});
});
</script>
just attach your theme's index.template.php file here...
Attached ..
use this one
clear your forums cache and make sure you have this files:
Themes/default/tweet/tweetGrab.screen.css
Themes/default/tweet/jquery.tweetGrab.pack.js
Worked, great ...
Thanks .
Worked gr8 on my forum, just the bbc [tweet] isn't working. Get's error undefined
If you post the whole error I may be able to help...
Here you have the SC i take:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FnApiz.png&hash=2ceeab23dd092045c9bf9eafc2625ce3100b117a)
I don't need an image...
I need the actual page where I can see the error.
What are you doing?
How are you using the tags?
I used the tags like are supposed i think.
[twitacc]@name_of_the_account[/twitacc]
[hashtag]iPhone[/hashtag]
[tweet]https://twitter.com/#!/untitledmage/status/168827294251630592[/tweet]
If you need access to the forum i can pm you the details of a test account to you to test as the forum is not open to the public.
if I use that link:
https://twitter.com/#!/untitledmage/status/16882729425163059
twitter says it doesn't exists...
thats why you get the undefined error, the mod can't access that status.
on the time the tweet is posted i click with the right button and open link in other window and copy the adress.
https://twitter.com/#!/Lord__stewie/status/169168270597951488
https:// link
It's the same issue other have reported, I still need to figure it out why the regex for the single status is failing, maybe twitter changed the url, I dunno, it depends on the type of url and the actual profile, for some users it display the status just fine.
i'll disable the [tweet] tag atm, until you have that sorted.
Thanks for the help.
I think that Twitter did change the urls. For me, this doesn't work with the mod:
https://twitter.com/#!/Lord__stewie/status/169168270597951488
But this link does:
https://twitter.com/Lord__stewie/status/169168270597951488
Quote from: THE BRA1N on March 10, 2012, 07:08:55 PM
I think that Twitter did change the urls. For me, this doesn't work with the mod:
https://twitter.com/#!/Lord__stewie/status/169168270597951488
But this link does:
https://twitter.com/Lord__stewie/status/169168270597951488
Great! Works for me like that! Thanks dude :D
Useful mod, thanks.
Have encountered a problem though with [tweet][/tweet] code. When I attempt to post a tweet I get a message subject empty error.
The url of the tweet is correct.
Is working fine for [twitacc][/twitacc]
Any clues?
Thanks.
Bob
what's the exact error?
Quote from: Suki on April 25, 2012, 08:10:31 AM
what's the exact error?
I think this is what he's referring to
It shouldn't happen since that tag is just an anchor tag, you can open $sourcedir/Post.php
find: <img> and replace with <img><a> to allow anchor tags
Quote from: Suki on April 25, 2012, 09:56:01 AM
It shouldn't happen since that tag is just an anchor tag, you can open $sourcedir/Post.php
find: <img> and replace with <img><a> to allow anchor tags
That worked like a charm!
FYI, https://twitter.com/#!/alyankovic/status/192633401952571392 doens't work, but https://twitter.com/alyankovic/status/192633401952571392 does.
Yes, I'm aware of the issue, I just haven't had the time to fix it. Haven't had the time to check the regex.
Thank you for this mod, Suki!
If one views a single tweet, under it should be an "Embed this tweet (https://twitter.com/#!/SimpleMachines/status/188279444241264640/embed)" link. From there, we see three tabs -- one of which says "Shortcode".
It gives something like this:
[tweet https://twitter.com/SimpleMachines/status/188279444241264640]
So far I've just been changing the BBCode to work with the add-on:
[tweet]https://twitter.com/SimpleMachines/status/188279444241264640[/tweet]
but, it'd be great if we could just copy-paste the shortcode itself, if at all possible.
Thanks, updated the <img> to <img><a> and dropped the #! and working fine now.
:-)
Quote from: ozbob on April 25, 2012, 01:02:45 AM
Useful mod, thanks.
Have encountered a problem though with [tweet][/tweet] code. When I attempt to post a tweet I get a message subject empty error.
The url of the tweet is correct.
Is working fine for [twitacc][/twitacc]
Any clues?
Thanks.
Bob
Hi there again :)
Until now the trick of removing the #/ from the url of the tweet worked, but right now it isn't working anymore. It only displays the tweet box and then "loading https://twitter.com/............./". But nothing else happens.
I guess that twitter changed again the url links of the tweets, so I would like to ask if there is any other solution or we should wait for an updated of the mod (if it is going to happen)
Thanks in advance ;)
Quote from: Timshel on May 29, 2012, 04:02:41 PM
Until now the trick of removing the #/ from the url of the tweet worked, but right now it isn't working anymore. It only displays the tweet box and then "loading https://twitter.com/............./". But nothing else happens.
Just wanted to confirm what Timshel wrote.
Quote from: eforhan on May 29, 2012, 04:14:24 PM
Quote from: Timshel on May 29, 2012, 04:02:41 PM
Until now the trick of removing the #/ from the url of the tweet worked, but right now it isn't working anymore. It only displays the tweet box and then "loading https://twitter.com/............./". But nothing else happens.
Just wanted to confirm what Timshel wrote.
I'm having the same problem.
Loading.... https://twitter.com/.... indeed :(
Okay, time to come out of the shadows...
Suki, having the same exact issue as the 4 above replies.
Also, I was having issues with the [twitacc]@BearlyDoug[/twitacc] code. Once I dropped the @ symbol, the tweets are loading up, HOWEVER, the background images aren't. I should note that the timestamps on these are off, big time.
FYI, this is in PRODUCTION mode.... on Hogville's forums. So it's in use on an ACTIVE site. :)
/me subscribes to this thread for updates/fixes.
After about 2 hours digging messy twitter documentation for their API, I found nothing other than they changing their APIs so suddenly and a lot of pissed off devs because of that, exactly like facebook.
What they say in their documentation (https://dev.twitter.com/docs/api/1.1/get/statuses/user_timeline) is the correct url for some user time line: https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=twitterapi&count=2
What it shows as response:
{"errors":[{"message":"Bad Authentication data","code":215}]}
This happens because now twitter requires you to create a dev app (which is not something easy to do for the regular admin who just wants things to work) just to access something as simple as some users time line, digging even more I found out lots of angry devs who followed twitter recommendations are all getting the same response from twitter servers.
Even if I managed to change the current mod it won't be long before they decide the current new shiny API is deprecated (at their speed, it can be weeks) and I just don't have the time to keep t up with them.
I had to uninstall this on Hogville. Seems that if you have a lot of embedded tweets, your board slows down. Some forums were loading blazingly quick, while others that were heavy with Twitter embeds (Such as a Basketball Recruiting forum) took almost 30 seconds to load up.
I don't know if it's the BBC Twitter mod, or if Twitter was rate-limiting a high traffic site (Hogville). Regardless, after uninstalling this mod, Hogville's forums (all of them) are running at blazing speeds again.
I don't know if Suki is even developing this anymore or not... but wanted to give everyone a heads up.
Yep, this mod is pretty old and will not work with whatever new shiny API Twitter develops every month :( meaning the JS will keep hanging looking for a response making the page to lag or to become slow. Best I can do is archive it, not really worth open source it as its just a settings page wrapper for a jquery plugin.
I either forgot how to archive it, forgot I can't do that or both...
Anyway, better remove it altogether, if anyone wants to take over it and do a proper update contact me.