vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 5.x Products & Extensions (https://vborg.vbsupport.ru/forumdisplay.php?f=258)
-   -   BB Code Enhancements - Embed Tweets from Twitter BB Code (https://vborg.vbsupport.ru/showthread.php?t=320191)

BirdOPrey5 09-09-2015 09:00 PM

Embed Tweets from Twitter BB Code
 
1 Attachment(s)
As with most BB Codes this should work on all versions of vBulletin including vBCloud.

Will embed tweets as you see here.

Log into your Admin CP go to Custom BB Codes on the side menu, expand it, and choose Add New Bb Code.

On the next page enter the following:

Title: Tweet
BB Code Tag Name: tweet
Replacement:
Code:

<blockquote class="twitter-tweet" lang="en"><p lang="en" dir="ltr"><a href="https://twitter.com/abc/status/{param}">Embedded Tweet</a></blockquote>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

Example: [tweet]642036152850083841[/tweet]
Description: Embeds a Tweet
Use Option: No
Button Image: (Leave blank or find your own icon image)
Remove Tag If Empty: YES
All remaining Yes/No questions - also YES.

And save the BB Code.

Now in a post you can post something like

[tweet]642036152850083841[/tweet]

to embed a tweet.

You find the number by finding the link to the tweet on twitter and taking the number from the link.

For example the link to a tweet might be:
Code:

https://twitter.com/fox5ny/status/642037356162256896
So in this case use:

[tweet]642037356162256896[/tweet]

To embed the tweet.

friendlymela 10-13-2015 06:11 AM

any screenshot?

BirdOPrey5 10-13-2015 08:56 PM

The demo link is better than a screenshot- http://sedona.vbulletin.net/forum/te...299-test-topic

Madekozu 10-17-2015 06:05 PM

yes ... demo link is much better ;)

another "demo" you can find on my homepage, just - the twitter-code is modified for german language

shimei 11-13-2015 03:41 PM

This is odd. The mod works great, except one bug. When I try to edit a thread's title that has a tweet embedded ..... the pop up asking me if I want to navigate away from the page displays each time I click on the Thread Title input box.

Can someone verify this? I am using VB 5.1.9

BirdOPrey5 11-14-2015 08:47 AM

Quote:

Originally Posted by shimei (Post 2558728)
This is odd. The mod works great, except one bug. When I try to edit a thread's title that has a tweet embedded ..... the pop up asking me if I want to navigate away from the page displays each time I click on the Thread Title input box.

Can someone verify this? I am using VB 5.1.9

I can confirm this does happen. If I click the button to not leave the page I am able to edit the title and re-save without a problem.

Unfortunately not likely I can do anything about it, can't really modify Twitter's code.

It is weird though.

Also only happens when a Tweet is in the first post of a topic.

sylv1 01-31-2016 06:51 PM

hi

great

have you intend to to make automatic import of any tweet of an tweetter account?


:up:

BirdOPrey5 02-02-2016 08:43 AM

No that would be beyond the scope a BB Code. Sorry.

beansbaxter 07-08-2016 10:46 PM

This works great on any threads in forums that are publicly accessible. However, nothing displays when the post is in a forum that's private and can only been seen by specific usergroups. Is there a way to make this work in private forums?

Thanks!

BirdOPrey5 07-09-2016 07:39 AM

This is the replacement code I literally just used on a post on a private site without issue-

Code:

<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr"><a href="https://twitter.com/twt/status/{param}">Embedded Tweet</a></blockquote>
<script src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

Virtually identical, but does that help at all?

Cem01 12-26-2016 12:39 PM

It has worked on vb 4.2.3 too.

Thanks!

dany_danay 05-20-2018 06:54 AM

Works great. Would be perfect a automatically embed code withot BBCode

Drucifer 06-03-2018 08:21 PM

:up: Works great in the forum but if you have to edit the post, it does get tricky.

:down: You must click the stay on page in order to perform an edit function.

:down: Also, the tweet seems reloads itself every few seconds sometimes when posting it in vBShout v6.

Drucifer 06-12-2018 10:28 PM

Quote:

Originally Posted by shimei (Post 2558728)
This is odd. The mod works great, except one bug. When I try to edit a thread's title that has a tweet embedded ..... the pop up asking me if I want to navigate away from the page displays each time I click on the Thread Title input box.

Can someone verify this? I am using VB 5.1.9

Same thing happens when you try to QUOTE the Tweet in a new post.

liishh 06-27-2018 04:21 PM

This does the same thing for me. It loads the tweet but no one can quote the post with the tweet in it.

BirdOPrey5 06-30-2018 12:17 PM

Does the issue happen when using the Standard Editor as opposed to the WYSIWYG (Advanced) Editor?

Josh789 09-06-2018 01:40 AM

Quote:

Originally Posted by BirdOPrey5 (Post 2595343)
Does the issue happen when using the Standard Editor as opposed to the WYSIWYG (Advanced) Editor?

Yes it does.

Anyone's help with this would be great. The mod works very well but the posts cannot be quoted!

charlesr 07-12-2019 04:27 AM

Tried this and it works great for the tweet, but any text after the tweet gets hyperlinked. Any ideas?

Drucifer 07-12-2019 04:56 AM

Quote:

Originally Posted by charlesr (Post 2599817)
Tried this and it works great for the tweet, but any text after the tweet gets hyperlinked. Any ideas?

Have same issue

charlesr 07-16-2019 05:35 PM

Quote:

Originally Posted by Drucifer (Post 2599818)
Have same issue

See post #10 for the solution. The A tag wasn't closed off in the original post for some reason.
https://vborg.vbsupport.ru/showpost....6&postcount=10

WTPB 04-24-2022 06:54 PM

Do you know if the new code has been added to the inicial code of the author?

charlesr 04-25-2022 06:29 AM

Quote:

Originally Posted by WTPB (Post 2608501)
Do you know if the new code has been added to the inicial code of the author?

The initial post has not been updated. Note how the "a href" has not been closed off with an "/a" (it needs to be there).

BirdOPrey5 04-25-2022 10:38 AM

I have updated the first post now. There will be no further updates. I'm sorry if it doesn't work feel free to remove.


All times are GMT. The time now is 06:05 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01367 seconds
  • Memory Usage 1,763KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (23)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete