Adam Howard
Well-known member
I've got an interesting one for you...
PHP:
[img]{vb:stylevar imgdir_misc}/users_online.png[/img]
[img]{vb:stylevar imgdir_misc}/users_online.png[/img]
[user]Adam[/user]
I can do this with ease but...for the replacement to be correct I would need to know the directory info behind (imgdir_misc)I've got an interesting one for you...
PHP:[img]{vb:stylevar imgdir_misc}/users_online.png[/img]
[video]http://www.youtube.com/v/qRuNxHqwazs&hl=en&fs=1&rel=0[/video]
Code:[video]http://www.youtube.com/v/qRuNxHqwazs&hl=en&fs=1&rel=0[/video]
[video
#(?:\[video])http(?:s)?://(?:www\.)?(?:[a-z0-9-]+\.)?youtu(?:be\.com/(?:[a-z]+(?:/api/videos/)?)|\.be)(?:\?v=|/)?([a-z0-9_-]{11})(?:[^\s]+)?(?:\[/video])#siu
[media=youtube]\1[/media]
Quick Find:
Code:[video
Regular expression:
Code:#(?:\[video])http(?:s)?://(?:www\.)?(?:[a-z0-9-]+\.)?youtu(?:be\.com/(?:[a-z]+(?:/api/videos/)?)|\.be)(?:\?v=|/)?([a-z0-9_-]{11})(?:[^\s]+)?(?:\[/video])#siu
Replacement String:
Code:[media=youtube]\1[/media]
http://184.72.239.143/mu/randomnumber.jpg
http://gallery.mac.com/username/
http://idisk.mac.com/username/
http://homepage.mac.com/username/
[ame=www.SomeLongWesbitesiteURL.com(or another extension)]A description of the site[/ame]
[URL='http://www.SomeLongWesbitesiteURLcom(or another extension)']A description of the site[/URL]
urls: http://www.v6mustang.com/threads/137596/&highlight=ankle
urls: http://www.v6mustang.com/threads/137928/&highlight=Johnny ricer
strip the entire &highlight=ankle
replace with: http://www.v6mustang.com/threads/137928/
v6mustang.com/threads
#(\[url(?:]|[^]]+]))(http://www\.v6mustang\.com/threads/[0-9]+/)[^\[]+(\[/url])#siu
[url]\2[/url]
dead image links links
format:
Code:http://184.72.239.143/mu/randomnumber.jpg
find them all and delete them.
184.72.239.143
#(\[img]http://(?:www\.)?184\.72\.239\.143/mu/[a-z0-9-]+\.(?:jpg|jpeg|png|gif|bmp|tif)\[/img])#siu
IMAGE-REMOVED
Those various strings are important and necessary in order to do anything about it.2. broken image links
They are all of the format:
Code:http://gallery.mac.com/username/ http://idisk.mac.com/username/ http://homepage.mac.com/username/
They have various different strings at the ends of their URLs.
3. change domain.com/forum/thread.123 to newdomain.com/forum/thread.123
domain
#domain(\.com/forum/thread\.[0-9]+[^\s]+)#siu
newdomain\1
that's not enough information for me, I refer to what I told the gent above...How would you use this to change all none youtube links. Basically I would like to convert all non youtube links into a URL.
From:
Code:[ame=www.SomeLongWesbitesiteURL.com(or another extension)]A description of the site[/ame]
T0:
Code:[URL='http://www.SomeLongWesbitesiteURLcom(or another extension)']A description of the site[/URL]
Since I dont know the name of site im looking for, I just want to find all site that do not have youtube in the name.
Thanks!
go to one of the posts that has an ame link that is not youtube and follow the above process so that I can get a better picture of what needs to be done.find one of those links in a post, while logged in as an admin/mod edit the post and then click the icon to the right for 'use bbcode editor ' and then copy the contents for one of the links tags and all and then paste them into a code block here.
I edited the post try thatSeems there might be an issue. This is what it returns when I test
https://www.dropbox.com/s/5l47i20f4st48h7/Screenshot 2013-12-11 21.44.45.png
I edited the post try that
that's not enough information for me, I refer to what I told the gent above...
go to one of the posts that has an ame link that is not youtube and follow the above process so that I can get a better picture of what needs to be done.
#\[ame\=http\:\/\/(www\.)?youtube.com\/watch\?([a-z]+\=[^\=\&\]]+\&)*v\=([^\]\&]+)(\&[a-z]+\=[^\=\&\]]+)*\][^\[]+\[\/ame\]#siu
#\[ame\=('|"|)http(s)?\:\/\/[^\.]*(\.)?youtube.com\/watch\?([a-z]+\=[^\=\&\]]+\&)*v\=([^\]\&\"]+)(\&[a-z]+\=[^\=\&\]]+)*('|"|)?\][^\[]+\[\/ame\]#siu
- [ame=http://www.youtube.com/watch?v=XjiwBwBL4Qo]YouTube - Classified - "Oh... Canada" [Official Video][/ame]
- [ame="http://www.youtube.com/watch?v=RboEtvkm4RU"][COLOR=#0000ff]YouTube- ATV's Most Wanted Susan Parker[/COLOR][/ame]
- [ame="http://www.youtube.com/watch?v=SZq8WppNFJY"][COLOR=yellow]http://www.youtube.com/watch?v=SZq8WppNFJY[/COLOR][/ame]
- [ame="http://www.youtube.com/watch?v=sWEKU9fEBno"][/ame]
- [ame="http://www.youtube.com/watch?v=9YAPKlk0pfY&feature=related="]YouTube - le burn a la marocaine[/ame]
Quick Find:
Code:184.72.239.143
Regular expression:
Code:#(\[img]http://(?:www\.)?184\.72\.239\.143/mu/[a-z0-9]+\.(?:jpg|jpeg|png|gif|bmp|tif)\[/img])#siu
Replacement String:
Code:
[IMG]http://184.72.239.143/mu/ad314e39-3ae3-9271.jpg[/IMG]
Those various strings are important and necessary in order to do anything about it.
find one of those links in a post, while logged in as an admin/mod edit the post and then click the icon to the right for 'use bbcode editor ' and then copy the contents for one of the links tags and all and then paste them into a code block here.
[IMG]http://idisk.me.com/scottjf8/Public/Pictures/Skitch/DSC_0002-20090512-151409.jpg[/IMG]
[IMG]http://gallery.mac.com/kings05/100008/photo1231443152669/web.jpg[/IMG][/QUOTE]
[video=youtube;xj0SF_V4C_U]https://www.youtube.com/watch?v=xj0SF_V4C_U[/video]
Quick Find: [video=youtube;
Regular expression: #\[video=youtube\;([a-z0-9]+)\]http.+\/watch.+v=[a-z0-9]+\[\/video\]#siu
Replacement String: [media=youtube]\1[/media]
[video=youtube_share;0yU2sxineQQ]http://youtu.be/0yU2sxineQQ[/video]
Quick Find: [video=youtube_share;
Regular expression: #\[video=youtube_share\;([a-z0-9]+)\]http.+\/watch.+v=[a-z0-9]+\[\/video\]#siu
Replacement String: [media=youtube]\1[/media]
[URL]http://youtu.be/p-h4VVRMj5A[/URL]
This is why I ask for the EXACT examples from the bbcode editor view of a post containing the content copied and pasted here..
above you asked for
http://184.72.239.143/mu/randomnumber.jpg
but it in no way tells me that it will have an alpha numeric string with dashes in it after the last slash.
http://184.72.239.143/mu/ad314e39-3ae3-9271.jpg
I have edited the above post to reflect that, try it now.
I just got out of bed and need coffee, I'll be back later.
I need to convert the following situations:
#1
Code:[video=youtube;xj0SF_V4C_U]https://www.youtube.com/watch?v=xj0SF_V4C_U[/video]
Fix for #1
Code:Quick Find: [video=youtube; Regular expression: #\[video=youtube\;([a-z0-9]+)\]http.+\/watch.+v=[a-z0-9]+\[\/video\]#siu Replacement String: [media=youtube]\1[/media]
[video=youtube;Lalx66vIAl4]http://www.youtube.com/watch?v=Lalx66vIAl4[/video] [video=youtube;JNwnwdAV8wI]http://www.youtube.com/watch?v=JNwnwdAV8wI[/video] [video=youtube;j2-FsaNufL4]http://www.youtube.com/watch?v=j2-FsaNufL4[/video] [video=youtube;UTCJBnhYbnk]http://www.youtube.com/watch?v=UTCJBnhYbnk[/video]
[media=youtube]Lalx66vIAl4[/media]
We use essential cookies to make this site work, and optional cookies to enhance your experience.