![]() |
If URL [SUCH SUCH ] , then change to URL [SUCH SUCH]
Hello,
I hope you guys understand what I'm looking for.. I'm looking for a mod which will change a URL to another URL if posted . let say if a user posts a youtube URL like http://www.youtube.com/watch?v=PB5YQpCpY7M I've a script which should change the youtube URL to my website URL automatically http://mydesi.tv/youtube.php?id=PB5YQpCpY7M I really need this mod.. help pleaseeee vBulleting already has a feature that's a little bit like this.. like Censopship ? I tried that but that didn't work it puts so many mydesi.tv instead of one youtube.com Any help would be really appreciated.. it's a script like .. i <if youtube.com then, change to mydesi.tv> something like that , i don't know coding :( |
You have posted your request in the wrong forum. This is a mod release forum.
|
Quote:
|
Create a New Plugin
Plugin Hook: postbit_display_complete Add these codes PHP Code:
|
Hey I tried that , It didn't work..
http://img17.imageshack.us/img17/6350/postreplace.png --------------- Added [DATE]1310268619[/DATE] at [TIME]1310268619[/TIME] --------------- Quote:
http://img17.imageshack.us/img17/6350/postreplace.png |
try this
PHP Code:
|
I get the following error when I hit save or save an reload
Fatal error: Using $this when not in object context in /home/mydesitv/public_html/includes/adminfunctions_template.php(3717) : eval()'d code on line 1 BTW I`m saving this under the current style , not the default vB style |
1 Attachment(s)
no, don't use a template, put the code in a new plugin. It won't save as a template due to the synthax. See image.
|
Mate, I gave u code after testing.
You need to create plugin to make it work Plugin Hook: postbit_display_complete Product: Vbulletin Title: Video Domain Changer Code Code:
$post['message'] = preg_replace('/http:\/\/(.*?)youtube.com\/watch\?v\=/', 'http://mydesi.tv/youtube.php?id=', $post['message']); |
Quote:
http://img17.imageshack.us/img17/6350/postreplace.png If not please tell me how to create a plugin.. can you create one for me with that code and send so I can just import plugin and products ? thanks , really appreciate all the replies |
All times are GMT. The time now is 01:01 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|