News:

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

Main Menu

Tweet Embed

Started by Antes, April 03, 2014, 12:59:47 PM

Previous topic - Next topic

Paracelsus

Perfect fix @margarett, thanks.  ;)

Paracelsus

Some of our users have noticed that after autoembedding a tweet the smilies that come afterwards don't parse anymore as they supposed to. Even enclosing the tweet around another bbcode tag doesn't work because it doesn't recognize the closing tag after the autoembedded tweet.

Douglas

Antes, if I can make a tiny suggestion... I'd love to use this Mod package, but only if two other methods were also available for the tweet BBC code.

Currently, you only allow for status ID to be used. Most people are not going to be savvy enough or want to strip out just the ID code.

If you could also build in support for:
[tweet]https://twitter.com/BearlyDoug/status/626549963024146433[/tweet]
[tweet]http://twitter.com/BearlyDoug/status/626549963024146433[/tweet]

(with and without the WWW), that would make this feature absolutely PERFECT.
Doug Hazard
* Full Stack (Web) Developer for The Catholic Diocese of Richmond
(20+ Diocesan sites, 130+ Church sites & 24 School sites)
* Sports Photographer and Media Personality
* CFB Historian
* Tech Admin for one 1M+ post, one 2M+ post and one 10M+ post sites (last two are powered by multiple servers)
* WordPress Developer (Junkie / Guru / Maven / whatever)

Antes

Modification has auto-embed option, just paste the link :)

Douglas

I did... got an invalid tweet ID warning for some reason. Let me re-install it.

EDIT: Attached two screenshots.

https://twitter.com/BadPhotoshopHog/status/626936027542867968 is the source URL used
Doug Hazard
* Full Stack (Web) Developer for The Catholic Diocese of Richmond
(20+ Diocesan sites, 130+ Church sites & 24 School sites)
* Sports Photographer and Media Personality
* CFB Historian
* Tech Admin for one 1M+ post, one 2M+ post and one 10M+ post sites (last two are powered by multiple servers)
* WordPress Developer (Junkie / Guru / Maven / whatever)

Antes

You don't need to use tweet tag with auto-embed option just paste the link.

Douglas

* Douglas facepalms himself

Can't believe it was *that* simple. I am sorry for wasting your time, Antes. :(

Let me say that I absolutely LOVE this Mod package. And many Hogvillians will, as well!
Doug Hazard
* Full Stack (Web) Developer for The Catholic Diocese of Richmond
(20+ Diocesan sites, 130+ Church sites & 24 School sites)
* Sports Photographer and Media Personality
* CFB Historian
* Tech Admin for one 1M+ post, one 2M+ post and one 10M+ post sites (last two are powered by multiple servers)
* WordPress Developer (Junkie / Guru / Maven / whatever)

Antes

Quote from: Douglas on July 31, 2015, 08:14:36 AM
* Douglas facepalms himself

Can't believe it was *that* simple. I am sorry for wasting your time, Antes. :(

Let me say that I absolutely LOVE this Mod package. And many Hogvillians will, as well!

nah np :P, I should rewrite the readme thingy.

Douglas

#28
Okay, legit bug report this time. :)

Quotehttp://www.hogville.net/yabbse/index.php?action=post;msg=9797708;topic=595789.50
8: Undefined index: twithash
Apply Filter: Only show the errors from this file
File: /XX/XX/XX/yabbse/Sources/BBCTwitter.php
Line: 89

Line 89 is noted below:
$buttons[count($buttons) - 1][] = array(
'image' => 'twithash',
'code' => 'hashtag',
'before' => '[hashtag]',
'after' => '[/hashtag]',
'description' => $txt['twithash']              // <----- LINE 89
);


It appears you're missing $txt['twithash'] from Modifications.english.php (and any other language file).

I added this to the file:
$txt['twithash'] = 'Twitter Hashtag';

Same issue for $txt['twitacc']

$buttons[count($buttons) - 1][] = array(
'image' => 'twitacc',
'code' => 'twitacc',
'before' => '[twitacc]',
'after' => '[/twitacc]',
'description' => $txt['twitacc']
);


Added this to Modifications.english.php:
$txt['twitacc'] = 'Twitter Account';

Same for this one...
$buttons[count($buttons) - 1][] = array(
'image' => 'twitmessage',
'code' => 'tweet',
'before' => '[tweet]',
'after' => '[/tweet]',
'description' => $txt['twitmessage']
);


Added $txt['twitmessage'] to Modifications.english.php

// Tweet Embed
$txt['invalid_tweet'] = 'Invalid Tweet ID';
$txt['twithash'] = 'Twitter Hashtag';
$txt['twitacc'] = 'Twitter Account';
$txt['twitmessage'] = 'Twitter Message';
Doug Hazard
* Full Stack (Web) Developer for The Catholic Diocese of Richmond
(20+ Diocesan sites, 130+ Church sites & 24 School sites)
* Sports Photographer and Media Personality
* CFB Historian
* Tech Admin for one 1M+ post, one 2M+ post and one 10M+ post sites (last two are powered by multiple servers)
* WordPress Developer (Junkie / Guru / Maven / whatever)

Antes

Are you sure you are using this modification :D :D this mod doesn't have BBCTwitter.php file.

* Antes confused bit...

Douglas

Hmph... weird. Guess I need to track down where I'm seeing that. Might be another mod that didn't get cleaned up properly upon removal
Doug Hazard
* Full Stack (Web) Developer for The Catholic Diocese of Richmond
(20+ Diocesan sites, 130+ Church sites & 24 School sites)
* Sports Photographer and Media Personality
* CFB Historian
* Tech Admin for one 1M+ post, one 2M+ post and one 10M+ post sites (last two are powered by multiple servers)
* WordPress Developer (Junkie / Guru / Maven / whatever)

JTVaughn

Quote from: Paracelsus on July 01, 2015, 07:41:29 PM
Some of our users have noticed that after autoembedding a tweet the smilies that come afterwards don't parse anymore as they supposed to. Even enclosing the tweet around another bbcode tag doesn't work because it doesn't recognize the closing tag after the autoembedded tweet.

I'm having this issue too, is there a fix?

Gluz

I have this installed in two forums + 2 test forums copy of the 2 main forums, and in one of my test forums it works well, no problems with smilies after the embed tweet, and the live version have same everything except one MOD in the test site, and that MOD added a fix for AutoLinkURLs conflict with their MOD, and surprisingly that fix this bug as well.

It seems that somehow after the positive validate/fetch tweet data, the smilies doesn't get parsed when the tweets are odd number, if you put a pair number of tweets the smilies get parsed well, and from there I can't follow the huge parse_bbc() function to understand what can be done there.

The MOD Hide Content have a fix in the last update that fixes this bug too, and after strip some code to test the exact code that do the trick I see that a dirty hack can be used but is not the best way to solve this:

This doesn't parse the smilies after an Embed Tweet
$message['body'] = parse_bbc($message['body'], $message['smileys_enabled'], $message['id_msg']);

This does
$message['body'] = parse_bbc($message['body'], $message['smileys_enabled'], $message['id_msg'], array('non_existent_BBC_tag'));
$message['body'] = parse_bbc($message['body'], $message['smileys_enabled'], $message['id_msg']);


Specifying a non existent BBC tag to the BBC parser it only parses the smilies and do it well, and the next will parse all the tags.

Maybe the team can find a way to modify the parse_bbc() function to save some cycles and fix the bug instead of that hack, because that hack need to be done in every call to parse_bbc() function, and as far as I see there are 15 places where need to put something similar to get it work in every place where a post can be showed.

stefan357965

Quote from: luuuciano on March 03, 2015, 11:53:13 AM
Very nice mod! simple and efective
Tried the other one, finally we are using yours

KUDOS



And the picture wins! :D

JTVaughn

Bump for help with above issues

TLMB

Thank you for this mod. :)

Count

It appears that the automatic twitter link parser breaks stuff if someone has linked with url bbcode. Something like [ url=https://www.twitter.com/whatever ] whatever [ /url ] shows the url with a hanging [/tweet] tag and looks really ugly. Tested on 2.0.11, when using 1.0 without the automatic parser everything works fine.

CreativeITWorld.com

Centering Tweets

Find
[tweet]$2[/tweet]

Replace with
[center][tweet]$2[/tweet][/center]

Dwev

I was happily using the mod in my forum, when today I noticed that it always embeds the parent tweet as well.

That's quite a problem when you want to include multiple tweets from a Twitter-thread, because you get every tweet double (once on it's own, and once in the next tweet as the parent tweet).

Is there maybe a way do disable the showing of the prent tweet?

pocttopus

This mod is not working properly.  :-[
Is there any way to configure this!?


Advertisement: