View Full Version : Embed TikTok
Irishnotsane
04-21-2020, 06:43 PM
Anyone have any idea how I can embed TikTok videos into the forum using BBCode?
I've tried the following 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
PinkMilk
04-21-2020, 11:59 PM
I have it working with:
<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
<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: </head>
Add above:
<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.
Irishnotsane
04-22-2020, 07:30 AM
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
PinkMilk
05-20-2020, 07:43 PM
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:
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
PinkMilk
05-21-2020, 05:04 PM
Delete me :(
Irishnotsane
05-21-2020, 08:04 PM
wow thanks PinkMilk!
Sadly I can't seem to get this to work
I'm just presented with this:
http://puu.sh/FNfND/e5e58eab9c.jpg
Any ideas?
PinkMilk
05-22-2020, 10:44 AM
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?
Irishnotsane
05-22-2020, 12:48 PM
I tested with a random URL I got from TikTok and with the URL you gave me above
PinkMilk
05-22-2020, 01:20 PM
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 :confused:
Else my only thoughts are conflicting mods
PinkMilk
05-30-2020, 04:09 PM
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 (https://vborg.vbsupport.ru/showpost.php?p=2603008&postcount=4) :up:
Prince
06-10-2020, 12:13 AM
Can someone help with install instructions for this please?
PinkMilk
06-12-2020, 08:07 PM
Can someone help with install instructions for this please?
Download xml file from This Post (https://vborg.vbsupport.ru/showpost.php?p=2603008&postcount=4), now from admincp click on each of these from the side menu:
Admincp > Plugins & Products > Download / Upload Plugins
Then under the Import Plugin Definitions XML File section click browse button and upload XML file, thats it, your done :)
(see attachments for visuals).
Now all your members need to do in paste a TikTok url in their post and the plugin will do the rest, no need for bbcode tags.
Prince
06-12-2020, 09:11 PM
Download xml file from This Post (https://vborg.vbsupport.ru/showpost.php?p=2603008&postcount=4), now from admincp click on each of these from the side menu:
Admincp > Plugins & Products > Download / Upload Plugins
Then under the Import Plugin Definitions XML File section click browse button and upload XML file, thats it, your done :)
(see attachments for visuals).
Now all your members need to do in paste a TikTok url in their post and the plugin will do the rest, no need for bbcode tags.
Thank you, that worked perfectly.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.