![]() |
Extract information from URL to use in bbcode.
Dear vBulletin users,
For a while, I've been using a twitter mod on my forum (3.8), it is a mod to embed a tweet by using the following syntax: Code:
[tweet]twitterstatusid[/tweet] Is there anyone who would like to help me out? It would be greatly appreciated. Kind regards, Nick |
May I know what BBCODE mod you're using for this?
As I got a PHP code ready which I tested works perfectly and replaces for example: https://twitter.com/exelaguilar/stat...24693311152129 To.. [tweet]355224693311152129[/tweet] But of course, I can't actually test the [tweet] bbcode as I don't have it. |
I'm using the following mod:
https://vborg.vbsupport.ru/showthread.php?t=287342 It states that it is for vB4, but it works on vB3 as well |
Make a plguin for postdata_presave and threadfpdata_presave
And add the following code to both: PHP Code:
See: http://elite-source.com/testthis.php |
Interesting piece of code. Thanks @exel. :)
|
Thank you very much Exel, it works pretty well, except for the fact that vBulletin automatically adds
Code:
[url] |
Here you go:
PHP Code:
Only issue with that is it will also strip out [url] for anything else. BUT it will ONLY do that if the post has a twitter link on it. So if your post has http://twitter.com/exel/status/123 and http://google.com it will do [tweet]123[/tweet] google.com But if it doesn't have twitter in the post, it will use the default vbulletin system. --------------- Added [DATE]1373865987[/DATE] at [TIME]1373865987[/TIME] --------------- Can confirm it works: https://vborg.vbsupport.ru/external/2013/07/36.png |
Wow, thanks alot mate. Works perfectly!
|
Glad to hear. :)
|
All times are GMT. The time now is 07:09 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|