Advertisement:

Author Topic: Tweet Embed  (Read 13565 times)

Offline Paracelsus

  • Sr. Member
  • ****
  • Posts: 874
  • Gender: Male
Re: Tweet Embed
« Reply #20 on: March 05, 2015, 03:34:58 AM »
Perfect fix @margarett, thanks.  ;)

Offline Paracelsus

  • Sr. Member
  • ****
  • Posts: 874
  • Gender: Male
Re: Tweet Embed
« Reply #21 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.

Offline Douglas

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,082
  • Gender: Male
  • Non sibi sed patriae
    • @BearlyDoug on Twitter
    • TwoCentsRadio.net
Re: Tweet Embed
« Reply #22 on: July 30, 2015, 11:12:33 PM »
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
* Web Developer / Operations Analyst for Richweb.com
* Sports Media Personality covering Collegiate Football and Basketball
* CFB Historian (GridironHistory.com)
* Tech Admin for one 1M+ post, one 2M+ post and one 8M+ post sites (last two are powered by 10+ servers)
* SMF Fanatic

Online Antes

  • Evil Black Cat
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,722
  • Gender: Male
  • Black cat rulz!
    • Antes on GitHub
    • merta on LinkedIn
    • @XinYenFon on Twitter
    • Lunarfall
Re: Tweet Embed
« Reply #23 on: July 31, 2015, 03:51:22 AM »
Modification has auto-embed option, just paste the link :)
Past Project(s): [ ezPortal ]

Offline Douglas

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,082
  • Gender: Male
  • Non sibi sed patriae
    • @BearlyDoug on Twitter
    • TwoCentsRadio.net
Re: Tweet Embed
« Reply #24 on: July 31, 2015, 07:35:06 AM »
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
* Web Developer / Operations Analyst for Richweb.com
* Sports Media Personality covering Collegiate Football and Basketball
* CFB Historian (GridironHistory.com)
* Tech Admin for one 1M+ post, one 2M+ post and one 8M+ post sites (last two are powered by 10+ servers)
* SMF Fanatic

Online Antes

  • Evil Black Cat
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,722
  • Gender: Male
  • Black cat rulz!
    • Antes on GitHub
    • merta on LinkedIn
    • @XinYenFon on Twitter
    • Lunarfall
Re: Tweet Embed
« Reply #25 on: July 31, 2015, 08:09:27 AM »
You don't need to use tweet tag with auto-embed option just paste the link.
Past Project(s): [ ezPortal ]

Offline Douglas

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,082
  • Gender: Male
  • Non sibi sed patriae
    • @BearlyDoug on Twitter
    • TwoCentsRadio.net
Re: Tweet Embed
« Reply #26 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!
Doug Hazard
* Web Developer / Operations Analyst for Richweb.com
* Sports Media Personality covering Collegiate Football and Basketball
* CFB Historian (GridironHistory.com)
* Tech Admin for one 1M+ post, one 2M+ post and one 8M+ post sites (last two are powered by 10+ servers)
* SMF Fanatic

Online Antes

  • Evil Black Cat
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,722
  • Gender: Male
  • Black cat rulz!
    • Antes on GitHub
    • merta on LinkedIn
    • @XinYenFon on Twitter
    • Lunarfall
Re: Tweet Embed
« Reply #27 on: July 31, 2015, 08:47:52 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.
Past Project(s): [ ezPortal ]

Offline Douglas

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,082
  • Gender: Male
  • Non sibi sed patriae
    • @BearlyDoug on Twitter
    • TwoCentsRadio.net
Re: Tweet Embed
« Reply #28 on: July 31, 2015, 10:55:50 AM »
Okay, legit bug report this time. :)

Quote
http://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:
Code: [Select]
$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']

Code: [Select]
$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...
Code: [Select]
$buttons[count($buttons) - 1][] = array(
'image' => 'twitmessage',
'code' => 'tweet',
'before' => '[tweet]',
'after' => '[/tweet]',
'description' => $txt['twitmessage']
);

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

Code: [Select]
// Tweet Embed
$txt['invalid_tweet'] = 'Invalid Tweet ID';
$txt['twithash'] = 'Twitter Hashtag';
$txt['twitacc'] = 'Twitter Account';
$txt['twitmessage'] = 'Twitter Message';
« Last Edit: July 31, 2015, 11:07:17 AM by Douglas »
Doug Hazard
* Web Developer / Operations Analyst for Richweb.com
* Sports Media Personality covering Collegiate Football and Basketball
* CFB Historian (GridironHistory.com)
* Tech Admin for one 1M+ post, one 2M+ post and one 8M+ post sites (last two are powered by 10+ servers)
* SMF Fanatic

Online Antes

  • Evil Black Cat
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,722
  • Gender: Male
  • Black cat rulz!
    • Antes on GitHub
    • merta on LinkedIn
    • @XinYenFon on Twitter
    • Lunarfall
Re: Tweet Embed
« Reply #29 on: July 31, 2015, 01:47:33 PM »
Are you sure you are using this modification :D :D this mod doesn't have BBCTwitter.php file.

* Antes confused bit...
Past Project(s): [ ezPortal ]

Offline Douglas

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,082
  • Gender: Male
  • Non sibi sed patriae
    • @BearlyDoug on Twitter
    • TwoCentsRadio.net
Re: Tweet Embed
« Reply #30 on: July 31, 2015, 04:12:42 PM »
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
* Web Developer / Operations Analyst for Richweb.com
* Sports Media Personality covering Collegiate Football and Basketball
* CFB Historian (GridironHistory.com)
* Tech Admin for one 1M+ post, one 2M+ post and one 8M+ post sites (last two are powered by 10+ servers)
* SMF Fanatic

Offline JTVaughn

  • Jr. Member
  • **
  • Posts: 177
Re: Tweet Embed
« Reply #31 on: September 11, 2015, 07:06:17 AM »
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?

Offline Gluz

  • Native Language Support Specialist
  • Sr. Member
  • *
  • Posts: 985
  • Gender: Male
Re: Tweet Embed
« Reply #32 on: September 12, 2015, 07:04:53 AM »
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
Code: [Select]
$message['body'] = parse_bbc($message['body'], $message['smileys_enabled'], $message['id_msg']);
This does
Code: [Select]
$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.
Need help with PHP, HTML, CSS, Themes or MODs?

Quote
Think in spanish, habla en ingl├ęs.

Offline stefan357965

  • Semi-Newbie
  • *
  • Posts: 37
    • CHEGI i Braca Bluz Bend
Re: Tweet Embed
« Reply #33 on: September 13, 2015, 06:20:59 PM »
Very nice mod! simple and efective
Tried the other one, finally we are using yours

KUDOS



And the picture wins! :D
Agencija muzickih bendova
bend za svadbe i vencanja Beograd

Offline JTVaughn

  • Jr. Member
  • **
  • Posts: 177
Re: Tweet Embed
« Reply #34 on: September 17, 2015, 03:00:15 PM »
Bump for help with above issues

Offline TLMB

  • Semi-Newbie
  • *
  • Posts: 23
Re: Tweet Embed
« Reply #35 on: September 18, 2015, 04:52:39 PM »
Thank you for this mod. :)

Offline Count

  • Semi-Newbie
  • *
  • Posts: 35
  • Gender: Male
Re: Tweet Embed
« Reply #36 on: February 27, 2016, 04:44:03 AM »
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.

Offline CreativeITWorld.com

  • Semi-Newbie
  • *
  • Posts: 28
Re: Tweet Embed
« Reply #37 on: July 26, 2016, 03:30:18 PM »
Centering Tweets

Find
Code: [Select]
[tweet]$2[/tweet]
Replace with
Code: [Select]
[center][tweet]$2[/tweet][/center]

Offline Dwev

  • Jr. Member
  • **
  • Posts: 212
Re: Tweet Embed
« Reply #38 on: February 27, 2018, 10:58:57 AM »
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?

Offline pocttopus

  • Jr. Member
  • **
  • Posts: 248
    • @pocttopus on Twitter
Re: Tweet Embed
« Reply #39 on: Today at 12:23:39 PM »
This mod is not working properly.  :-[
Is there any way to configure this!?