Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Suki on May 16, 2010, 05:09:23 AM

Title: [BBCode] Twitter
Post by: Suki on May 16, 2010, 05:09:23 AM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=2525)

BBC Twitter
Author: Suki (http://missallsunday.com)


Description

For SMF 2.0.x only

This 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>




Settings
No Settings Just install and use.


Languages
-English/utf8


Changelog

2.0 - Jan 06, 2012,
-Compatible with SMF 2.0.x
-Code improved.

Title: Re: [BBCode] Twitter
Post by: rd on May 16, 2010, 06:01:30 AM
QuoteTwitter. The amazing application that took the world by storm.

Great mod, I like the fact that we can add hashtags.

Title: Re: [BBCode] Twitter
Post by: Liam. on May 16, 2010, 06:16:25 AM
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 ;)
Title: Re: [BBCode] Twitter
Post by: rd on May 16, 2010, 06:31:14 AM
I'll find a use :)
Title: Re: [BBCode] Twitter
Post by: vicram10 on May 16, 2010, 08:12:00 AM
nice mod
good job Liam
Title: Re: [BBCode] Twitter
Post by: Liam. on May 16, 2010, 08:38:00 AM
And thanks Vicram for fixing a bug in it ;)
Title: Re: [BBCode] Twitter
Post by: DoctorMalboro on May 16, 2010, 09:23:36 AM
Excellent mod, i will use it ;)

Thanks!
Title: Re: [BBCode] Twitter
Post by: 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! :)
Title: Re: [BBCode] Twitter
Post by: Liam. on May 16, 2010, 12:45:54 PM
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]
Title: Re: [BBCode] Twitter
Post by: Arantor on May 16, 2010, 03:22:24 PM
That's what happens if you have jQuery loaded twice on the page.
Title: Re: [BBCode] Twitter
Post by: Liam. on May 16, 2010, 03:35:12 PM
Yeah :/ Annoying but pretty unavoidable in most cases...
Title: Re: [BBCode] Twitter
Post by: Arantor on May 16, 2010, 04:00:51 PM
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.
Title: Re: [BBCode] Twitter
Post by: 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 *
Title: Re: [BBCode] Twitter
Post by: Liam. on May 16, 2010, 04:28:12 PM
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...
Title: Re: [BBCode] Twitter
Post by: Arantor on May 16, 2010, 04:30:33 PM
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.
Title: Re: [BBCode] Twitter
Post by: Liam. on May 16, 2010, 04:42:11 PM
Thanks for the big hint Arantor ;) Makes enough sense, I'll try include it in the next version ^_^
Title: Re: [BBCode] Twitter
Post by: 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
Title: Re: [BBCode] Twitter
Post by: Liam. on June 04, 2010, 06:40:43 PM
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.?
Title: Re: [BBCode] Twitter
Post by: 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.
Title: Re: [BBCode] Twitter
Post by: 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.
Title: Re: [BBCode] Twitter
Post by: 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.
Title: Re: [BBCode] Twitter
Post by: DEK24 on June 07, 2010, 07:39:25 PM
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.
Title: Re: [BBCode] Twitter
Post by: DEK24 on June 07, 2010, 07:41:01 PM
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.
Title: Re: [BBCode] Twitter
Post by: 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.
Title: Re: [BBCode] Twitter
Post by: DEK24 on June 07, 2010, 11:39:09 PM
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?
Title: Re: [BBCode] Twitter
Post by: Arantor on June 08, 2010, 03:12:09 AM
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.
Title: Re: [BBCode] Twitter
Post by: Sakae on June 08, 2010, 03:14:09 PM
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?
Title: Re: [BBCode] Twitter
Post by: Liam. on June 08, 2010, 03:19:24 PM
Hmm... Weird. I'll have a look into that. Should have no conflict with AJAX Quick Reply, but I'll see...
Title: Re: [BBCode] Twitter
Post by: Arantor on June 08, 2010, 03:35:32 PM
Except that it uses AJAX through jQuery does it not?
Title: Re: [BBCode] Twitter
Post by: Liam. on June 08, 2010, 03:56:56 PM
Yes, but if it's already loading it once on the page, shouldn't stop it loading a second time...
Title: Re: [BBCode] Twitter
Post by: Arantor on June 08, 2010, 04:00:14 PM
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.
Title: Re: [BBCode] Twitter
Post by: THE BRA1N on September 05, 2010, 03:54:31 PM
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?

Title: Re: [BBCode] Twitter
Post by: KensonPlays on September 05, 2010, 05:51:58 PM
Wow! I would like this in conjunction with that twitter site that broadcasts instead of twitter mod. ill install asap!
Title: Re: [BBCode] Twitter
Post by: crustybum on November 24, 2010, 12:05:23 PM
wow this is just what i am looking for.................but for 1.1.11............. >:(
Title: Re: [BBCode] Twitter
Post by: BPLive on October 10, 2011, 11:58:29 PM
anything will happen for this mod in 2.0.1  ?   interested thanks
Title: Re: [BBCode] Twitter
Post by: Suki 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.
Title: Re: [BBCode] Twitter
Post by: BPLive on October 20, 2011, 01:14:12 PM
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.
Title: Re: [BBCode] Twitter
Post by: THE BRA1N on November 20, 2011, 07:58:29 PM
Put me down on the wait list too. I really like this mod.

Title: Re: [BBCode] Twitter
Post by: Suki on January 06, 2012, 05:29:27 PM
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.
Title: Re: [BBCode] Twitter
Post by: Timshel on January 14, 2012, 08:15:09 AM
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!
Title: Re: [BBCode] Twitter
Post by: Suki on January 14, 2012, 09:53:04 AM
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.
Title: Re: [BBCode] Twitter
Post by: Timshel on January 14, 2012, 04:30:14 PM
I would appreciate that!

Cheers!
Title: Re: [BBCode] Twitter
Post by: teos55 on February 02, 2012, 04:18:29 PM
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 ?
Title: Re: [BBCode] Twitter
Post by: Timshel on February 02, 2012, 06:50:50 PM
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.
Title: Re: [BBCode] Twitter
Post by: Suki on February 07, 2012, 10:44:44 AM
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.
Title: Re: [BBCode] Twitter
Post by: Suki on February 07, 2012, 01:49:11 PM
@teos55 don't pm me and I'm actually need an url to a topic where the mod is been use.
Title: Re: [BBCode] Twitter
Post by: teos55 on February 07, 2012, 04:22:19 PM
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] ....
Title: Re: [BBCode] Twitter
Post by: Suki on February 08, 2012, 08:59:36 AM
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]
Title: Re: [BBCode] Twitter
Post by: teos55 on February 09, 2012, 01:32:43 PM
Sorry for the typo,  it is [twitacc] ...

Here is what is typed in the bbc block of Simple Portal ..

[twitacc]teos55[/twitacc]
Title: Re: [BBCode] Twitter
Post by: Suki on February 10, 2012, 04:50:43 PM
it must be

[twitacc]@teos55[/twitacc]
Title: Re: [BBCode] Twitter
Post by: teos55 on February 10, 2012, 04:54:16 PM
Corrected to :

[twitacc]@teos55[/twitacc]

but the result is the same, only  text  @teos55 is the output not result of it ...
Title: Re: [BBCode] Twitter
Post by: Suki on February 10, 2012, 04:55:51 PM
I still need to see an example live in your forum...
Title: Re: [BBCode] Twitter
Post by: teos55 on February 10, 2012, 04:58:07 PM
Attached the output ...
Title: Re: [BBCode] Twitter
Post by: Suki on February 10, 2012, 05:01:14 PM
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?
Title: Re: [BBCode] Twitter
Post by: teos55 on February 10, 2012, 05:07:40 PM
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
Title: Re: [BBCode] Twitter
Post by: Suki on February 10, 2012, 05:14:39 PM
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>

Title: Re: [BBCode] Twitter
Post by: teos55 on February 10, 2012, 05:38:00 PM
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 
Title: Re: [BBCode] Twitter
Post by: Suki on February 11, 2012, 09:55:34 AM
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.
Title: Re: [BBCode] Twitter
Post by: teos55 on February 11, 2012, 10:13:57 AM
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
Title: Re: [BBCode] Twitter
Post by: Suki on February 11, 2012, 10:16:40 AM
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
Title: Re: [BBCode] Twitter
Post by: teos55 on February 11, 2012, 10:19:13 AM
  Should I add it with the BBC Twitter mod installed or not ?
Title: Re: [BBCode] Twitter
Post by: Suki on February 11, 2012, 10:20:41 AM
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...
Title: Re: [BBCode] Twitter
Post by: teos55 on February 11, 2012, 10:24:18 AM
Attached ..
Title: Re: [BBCode] Twitter
Post by: Suki on February 11, 2012, 10:30:42 AM
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
Title: Re: [BBCode] Twitter
Post by: teos55 on February 11, 2012, 10:34:23 AM
 Worked,  great ...
Thanks .
Title: Re: [BBCode] Twitter
Post by: iMaNiac on February 12, 2012, 10:29:26 AM
Worked gr8 on my forum, just the bbc [tweet] isn't working. Get's error undefined
Title: Re: [BBCode] Twitter
Post by: Suki on February 12, 2012, 11:33:11 AM
If you post the whole error I may be able to help...
Title: Re: [BBCode] Twitter
Post by: iMaNiac on February 12, 2012, 05:50:48 PM
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)
Title: Re: [BBCode] Twitter
Post by: Suki on February 12, 2012, 08:18:39 PM
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?
Title: Re: [BBCode] Twitter
Post by: iMaNiac on February 13, 2012, 04:03:52 PM
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.
Title: Re: [BBCode] Twitter
Post by: Suki on February 13, 2012, 04:07:39 PM
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.
Title: Re: [BBCode] Twitter
Post by: iMaNiac on February 13, 2012, 04:22:13 PM
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
Title: Re: [BBCode] Twitter
Post by: Suki on February 13, 2012, 04:27:04 PM
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.
Title: Re: [BBCode] Twitter
Post by: iMaNiac on February 13, 2012, 04:34:59 PM
i'll disable the [tweet] tag atm, until you have that sorted.

Thanks for the help.
Title: Re: [BBCode] Twitter
Post by: 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
Title: Re: [BBCode] Twitter
Post by: Timshel on March 14, 2012, 11:49:27 AM
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
Title: Re: [BBCode] Twitter
Post by: 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
Title: Re: [BBCode] Twitter
Post by: Suki on April 25, 2012, 08:10:31 AM
what's the exact error?
Title: Re: [BBCode] Twitter
Post by: shazoo! on April 25, 2012, 09:27:11 AM
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
Title: Re: [BBCode] Twitter
Post by: 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
Title: Re: [BBCode] Twitter
Post by: shazoo! on April 25, 2012, 10:01:05 AM
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.
Title: Re: [BBCode] Twitter
Post by: Suki on April 25, 2012, 10:05:16 AM
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.
Title: Re: [BBCode] Twitter
Post by: shazoo! on April 25, 2012, 10:10:45 AM
Thank you for this mod, Suki!
Title: Re: [BBCode] Twitter
Post by: eforhan on April 26, 2012, 02:53:58 PM
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.
Title: Re: [BBCode] Twitter
Post by: ozbob on April 26, 2012, 06:25:40 PM
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
Title: Re: [BBCode] Twitter
Post by: Timshel on May 29, 2012, 04:02:41 PM
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 ;)

Title: Re: [BBCode] Twitter
Post by: 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. 

Title: Re: [BBCode] Twitter
Post by: The Silver Monkey on August 05, 2012, 12:05:16 AM
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.
Title: Re: [BBCode] Twitter
Post by: Rain Forest on October 23, 2012, 03:29:23 PM
Loading.... https://twitter.com/.... indeed :(
Title: Re: [BBCode] Twitter
Post by: Douglas on December 04, 2012, 07:00:54 PM
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.
Title: Re: [BBCode] Twitter
Post by: Suki on December 05, 2012, 11:20:42 AM
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.
Title: Re: [BBCode] Twitter
Post by: Douglas on August 04, 2017, 08:45:29 PM
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.
Title: Re: [BBCode] Twitter
Post by: Suki on August 10, 2017, 12:28:04 PM
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.
Title: Re: [BBCode] Twitter
Post by: Suki on August 10, 2017, 12:34:19 PM
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.