Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 04-21-2020, 06:43 PM
Irishnotsane Irishnotsane is offline
 
Join Date: Apr 2012
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Embed TikTok

Anyone have any idea how I can embed TikTok videos into the forum using BBCode?

I've tried the following code

Code:
<blockquote class="tiktok-embed" cite="https://www.tiktok.com/{param}" style="max-width: 605px;min-width: 325px;" ></blockquote> <script async src="https://www.tiktok.com/embed.js"></script>
However it doesn't work.. Can't figure it out to save my life
Not sure if this will help you, but might as well be a different language to me
https://developers.tiktok.com/doc/Embed

Thanks
Reply With Quote
  #2  
Old 04-21-2020, 11:59 PM
PinkMilk PinkMilk is offline
 
Join Date: May 2010
Location: Earth
Posts: 193
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have it working with:
Code:
<blockquote class="tiktok-embed" data-video-id="{param}" style="max-width: 605px;" > <section></section> </blockquote> <script async src="https://www.tiktok.com/embed.js"></script>

Use {option}
No

Remove Tag If Empty
Yes

Disable BB Code Within This BB Code
Yes

Disable Smilies Within This BB Code
Yes

Disable Word Wrapping Within This BB Code
Yes

Disable Automatic Link Parsing Within This BB Code
Yes

Helpful Tip:

If you have a few TikTok videos embedded on a page/post it loads the embed code
Code:
<script async src="https://www.tiktok.com/embed.js"></script>
for each video which is a waste of time and resources, to load it only once remove it from bbcode replacement and manually add it to SHOWTHREAD template:

Find:
Code:
</head>
Add above:
Code:
<script async src="https://www.tiktok.com/embed.js"></script>
Other Notes:
  • If you do this it won't show in Admincp BB Code Manager page (see attachment) but works fine in posts.
  • Whether you keep script with bbcode or manually add to template videos take a while to load after posting or editing, refreshing page (f5) seems to fix that.
Attached Images
File Type: jpg tiktok.jpg (49.0 KB, 0 views)
Reply With Quote
3 благодарности(ей) от:
formentera, Irishnotsane, puertoblack2003
  #3  
Old 04-22-2020, 07:30 AM
Irishnotsane Irishnotsane is offline
 
Join Date: Apr 2012
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is brillaint thanks!!

I don't suppose there is ANYWAY a user would be able to just post in the whole URL instead of the long number?

Probably a long-shot.
But either way, thanks! i did think it was something to do with that data video id, as I was playing around with it for ages after I had posted this, feel like I came close a few times lol
Reply With Quote
  #4  
Old 05-20-2020, 07:43 PM
PinkMilk PinkMilk is offline
 
Join Date: May 2010
Location: Earth
Posts: 193
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Irishnotsane View Post
This is brillaint thanks!!

I don't suppose there is ANYWAY a user would be able to just post in the whole URL instead of the long number?

Probably a long-shot.
But either way, thanks! i did think it was something to do with that data video id, as I was playing around with it for ages after I had posted this, feel like I came close a few times lol
***** This is seperate to the bbcode above. You do not need to wrap in bbcode tags or even create the bbcode replacement in admincp, just add the tiktok url to your post like you would any other link. *****


This will add video from full URL.
Example:
Code:
https://www.tiktok.com/@simbathewhitegsd/video/6828187262400924933
Note: This is a plugin NOT product!

Admincp > Plugins & Products > Download / Upload Plugins > Import Plugin Definitions XML File
Attached Files
File Type: xml TikTok_Embed.xml (644 Bytes, 41 views)
Reply With Quote
Благодарность от:
puertoblack2003
  #5  
Old 05-21-2020, 05:04 PM
PinkMilk PinkMilk is offline
 
Join Date: May 2010
Location: Earth
Posts: 193
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Delete me
Reply With Quote
  #6  
Old 05-21-2020, 08:04 PM
Irishnotsane Irishnotsane is offline
 
Join Date: Apr 2012
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wow thanks PinkMilk!

Sadly I can't seem to get this to work
I'm just presented with this:



Any ideas?
Reply With Quote
  #7  
Old 05-22-2020, 10:44 AM
PinkMilk PinkMilk is offline
 
Join Date: May 2010
Location: Earth
Posts: 193
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Irishnotsane View Post
wow thanks PinkMilk!

Sadly I can't seem to get this to work
I'm just presented with this:

Any ideas?
Whats the url you used?
Reply With Quote
  #8  
Old 05-22-2020, 12:48 PM
Irishnotsane Irishnotsane is offline
 
Join Date: Apr 2012
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tested with a random URL I got from TikTok and with the URL you gave me above
Reply With Quote
  #9  
Old 05-22-2020, 01:20 PM
PinkMilk PinkMilk is offline
 
Join Date: May 2010
Location: Earth
Posts: 193
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Irishnotsane View Post
I tested with a random URL I got from TikTok and with the URL you gave me above
I'm not sure everythings working fine here, tested on vb3 (which tbh thought this was for) and vb4, FF and Chrome, php 5.6 and 7+

Give this one ago, I've only changed the regex to be more specific but it might make a difference

Else my only thoughts are conflicting mods
Attached Files
File Type: xml TikTok_Embed_plugin.xml (687 Bytes, 17 views)
Reply With Quote
  #10  
Old 05-30-2020, 04:09 PM
PinkMilk PinkMilk is offline
 
Join Date: May 2010
Location: Earth
Posts: 193
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by formentera View Post
That's happens when you enter the entire url (https://tiktok.com/etc). For other hand, when you enter just the ID of the video, works correctly.
Problem was fixed, it was human error, they used bbcode when not needed, see added notice in post #4 :up:
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05740 seconds
  • Memory Usage 2,293KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (6)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (4)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (3)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete