It is currently July 5th, 2020, 2:44 am



Post new topic Reply to topic  [ 852 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 57  Next
Author Message
 Post subject: Re: help with regex
PostPosted: January 12th, 2013, 1:52 pm 
Site Admin
User avatar

Joined: March 10th, 2011, 11:14 pm
Posts: 10497
Location: Earth
Search string: \[img\](.*?)\[/img\]
Replace with: [url=$1]][img=$1][/url]

Mark the regex checkbox.

_________________
themaPoster | themaCreator | themaManager | themaLeecher | themaRegister


Top
 Profile  
Reply with quote  
 Post subject: Re: help with regex
PostPosted: January 12th, 2013, 5:57 pm 

Joined: March 31st, 2012, 8:50 am
Posts: 326
not work... i get this code when i post

][img=http://buspic.com/img/filea69a65af561.jpg]

i think is a problem with this forum http://www.tnctr.com


Top
 Profile  
Reply with quote  
 Post subject: Re: help with regex
PostPosted: January 12th, 2013, 6:18 pm 
Site Admin
User avatar

Joined: March 10th, 2011, 11:14 pm
Posts: 10497
Location: Earth
I will need example of you message.

And are you sure you entered "[url=$1][img=$1][/url]" ? Maybe it does not support this bbcode.

_________________
themaPoster | themaCreator | themaManager | themaLeecher | themaRegister


Top
 Profile  
Reply with quote  
 Post subject: Re: help with regex
PostPosted: January 12th, 2013, 6:35 pm 

Joined: March 31st, 2012, 8:50 am
Posts: 326
PM sent... you will see. :) maybe is something with bbcode for images. with other bbcode work good.

P.S i edited my posts there to not be warned. :D


Top
 Profile  
Reply with quote  
 Post subject: Re: help with regex
PostPosted: January 13th, 2013, 9:54 pm 
Site Admin
User avatar

Joined: March 10th, 2011, 11:14 pm
Posts: 10497
Location: Earth
I accidentally put an extra ] in the replace string.

Here are correct ones:

Search string: \[img\](.*?)\[/img\]
Replace with: [url=$1][img=$1][/url]

Mark the regex checkbox.

_________________
themaPoster | themaCreator | themaManager | themaLeecher | themaRegister


Top
 Profile  
Reply with quote  
 Post subject: Re: help with regex
PostPosted: January 14th, 2013, 7:00 am 

Joined: March 31st, 2012, 8:50 am
Posts: 326
i know freddy and i removed from the beginning that ] but not work. i maked screenshots... look

here i posted and the code tags is good but not show the images.
Image

and now, to work images i click this button.
Image

that's why i gave you my account to check this. :) thanks

LE: exactly same problem i have on http://warezfreaks.org

both forums are IPB2/3 and i hope you will fix this problem in v2 freddy.


Top
 Profile  
Reply with quote  
 Post subject: Re: help with regex
PostPosted: January 14th, 2013, 7:07 pm 
Site Admin
User avatar

Joined: March 10th, 2011, 11:14 pm
Posts: 10497
Location: Earth
Took another look.

There was a small bug. Fixed only in upcoming version 2.

_________________
themaPoster | themaCreator | themaManager | themaLeecher | themaRegister


Top
 Profile  
Reply with quote  
 Post subject: Re: help with regex
PostPosted: January 14th, 2013, 7:47 pm 

Joined: March 31st, 2012, 8:50 am
Posts: 326
thank you!


Top
 Profile  
Reply with quote  
 Post subject: Re: Forum replacements problems.
PostPosted: February 21st, 2013, 2:49 pm 

Joined: May 29th, 2011, 10:47 pm
Posts: 289
There is something wrong in this replacemente you show me:

Quote:
You could use something like this for urls.

Search string: http://[^\s\[\]<'\"]+
Replace with: <a href="$0" target="_blank">$0</a>

Mark the regex box.


I want to convert all bbcode in html but I only get a clickable url but no image showed.

I post in thema this:

Code:
[URL=http://pimpandhost.com/image/18557598-original.html][IMG]http://ist1-4.filesor.com/pimpandhost.com/6/8/4/9/68493/1/f/R/G/1fRG6/mosaic6395b3842a90a1dbf0dc0bf52f67898fd87326fb_m.jpg[/IMG][/URL]


But I get this:

Code:
<a href="http://pimpandhost.com/image/18557598-original.html" target="_blank">http://pimpandhost.com/image/18557598-original.html</a><a href="http://ist1-4.filesor.com/pimpandhost.com/6/8/4/9/68493/1/f/R/G/1fRG6/mosaic6395b3842a90a1dbf0dc0bf52f67898fd87326fb_m.jpg" target="_blank">http://ist1-4.filesor.com/pimpandhost.com/6/8/4/9/68493/1/f/R/G/1fRG6/mosaic6395b3842a90a1dbf0dc0bf52f67898fd87326fb_m.jpg</a>



And I want to get this:

Code:
<a href="http://pimpandhost.com/image/18557598-original.html" target="_blank"><img src="http://ist1-4.filesor.com/pimpandhost.com/6/8/4/9/68493/1/f/R/G/1fRG6/mosaic6395b3842a90a1dbf0dc0bf52f67898fd87326fb_m.jpg"></a>



Here some proof posted in this forum: http://poster.freddy.lt/forum/viewtopic.php?p=15471#p15471


Thanks a lot Freddy ;)


Top
 Profile  
Reply with quote  
 Post subject: Re: Forum replacements problems.
PostPosted: February 22nd, 2013, 12:52 am 
Site Admin
User avatar

Joined: March 10th, 2011, 11:14 pm
Posts: 10497
Location: Earth
That replacement was for totally different thing which I don't even remember now.

For the above:

Search string: \[URL=(.*?)\]\[IMG\](.*?)\[/IMG\]\[/URL\]
Replace with: <a href="$1" target="_blank"><img src="$2" /></a>

Tick the regex checkbox.

_________________
themaPoster | themaCreator | themaManager | themaLeecher | themaRegister


Top
 Profile  
Reply with quote  
 Post subject: Re: Forum replacements problems.
PostPosted: February 23rd, 2013, 11:22 am 

Joined: May 29th, 2011, 10:47 pm
Posts: 289
Freddy, works fine! It's awesome! But now I have another problem.

I want to post this:

Code:
[URL=http://pimpandhost.com/image/20314667-original.html][IMG]http://ist2-1.filesor.com/pimpandhost.com/6/8/4/9/68493/1/n/e/L/1neLV/Ami_m.jpg[/IMG][/URL]
[URL=http://pimpandhost.com/image/20314661-original.html][IMG]http://ist2-1.filesor.com/pimpandhost.com/6/8/4/9/68493/1/n/e/L/1neLP/Ami%20%281%29_m.jpg[/IMG][/URL]
[URL=http://pimpandhost.com/image/20314673-original.html][IMG]http://ist2-1.filesor.com/pimpandhost.com/6/8/4/9/68493/1/n/e/M/1neM1/Amy_s_s.jpg[/IMG][/URL]

Uploaded:
[links]http://uploaded.net/file/jan9mlyq/Amy.part1.rar[/links]
[links]http://uploaded.net/file/hd3tqf8j/Amy.part2.rar[/links]
[links]http://uploaded.net/file/24d5w5ib/Amy.part3.rar[/links]


The image is showed correctly but the links not appears as a target blank. Links appears all in one line, not in three. I think that this is easy, but i can't find the solution.

I have an idea! For those people asking the same, If you want I may make a tutorial to convert BBCODE to HTML with all replacements you showed. It will be easy for you and us!


Thanks a lot again Freddy, your help is absolutely good! :)


Top
 Profile  
Reply with quote  
 Post subject: Re: Forum replacements problems.
PostPosted: February 23rd, 2013, 11:50 am 

Joined: February 23rd, 2013, 11:46 am
Posts: 1
Hi Freddy! I'm using some replacements and finally I completed all the replacements. But there is one imposible to me.

Can I replace this:

File: Video260.avi
Size: 129238988 bytes (123.25 MiB), duration: 00:15:11, avg.bitrate: 1135 kb/s
Audio: mp3, 44100 Hz, stereo, 128 kb/s
Video: mpeg4, yuv420p, 320x240, 29.98 fps(r)

For this?

File: Video260.avi
Size: 123.25 MiB
Duration: 00:15:11
Video: 320x240

I actually make it manually wasting a lot of time because some forums requires the complete info. Thanks freddy!


Top
 Profile  
Reply with quote  
 Post subject: Re: Forum replacements problems.
PostPosted: February 23rd, 2013, 2:32 pm 
Site Admin
User avatar

Joined: March 10th, 2011, 11:14 pm
Posts: 10497
Location: Earth
Would separate to few replacements:

For size and duration:

Search string: Size:.*?\((.*?)\), duration: ([^,]+).*
Replace with: Size: $1\nDuration: $2

For video:

Search string: Video:.*?([0-9]+x[0-9]+).*
Replace with: Video: $1

_________________
themaPoster | themaCreator | themaManager | themaLeecher | themaRegister


Top
 Profile  
Reply with quote  
 Post subject: Re: Forum replacements problems.
PostPosted: February 23rd, 2013, 8:50 pm 

Joined: September 19th, 2011, 12:30 am
Posts: 275
I would like to replace the 1fichier.com links by nothing, but i can't.

Because the links are special.

Exemple of links :

http://g3vlcw.1fichier.com/
http://237ez8.1fichier.com/
http://wa5t3.1fichier.com/


Search string : http://g3vlcw.1fichier.com/
Replace with : nothing


Top
 Profile  
Reply with quote  
 Post subject: Re: Forum replacements problems.
PostPosted: February 23rd, 2013, 9:05 pm 
Site Admin
User avatar

Joined: March 10th, 2011, 11:14 pm
Posts: 10497
Location: Earth
Search string : http://.*?.1fichier.com/
Replace with : nothing

Or when 2.00 comes out just add 1fichier.com to banned host of that forum.
There is a bug in 1.44, but in 2.00 it will work fine if you add it to banned hosts.

_________________
themaPoster | themaCreator | themaManager | themaLeecher | themaRegister


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 852 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 57  Next

Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Theme designed by stylerbb.net © 2008
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All times are UTC