PDA

View Full Version : Disable [IMG] In [QUOTE] Tags


Zero Tolerance
02-27-2005, 10:00 PM
Modification made by request, this modification will disable all tags within quote tags, leaving them as URL's instead.

Example:
This:
This is my avatar: [img]http://gzevolution.net/pic/sk_avy.jpg
Would Be Changed To:
This is my avatar: http://gzevolution.net/pic/sk_avy.jpg

Only 1 file to edit, real easy :)

Enjoy,

- Zero Tolerance

Protoman
02-28-2005, 01:38 AM
very simple. 30 second install. thanks!

nexialys
02-28-2005, 01:41 AM
/me likes filters !!!

Oblivion Knight
02-28-2005, 06:38 AM
You're on a roll again ZT, another excellent little mod.. :)

Works perfectly.

Phalynx
02-28-2005, 09:05 AM
Great, thanks!

hollyboy
02-28-2005, 11:19 AM
nice hack, I've installed it thanks ;)

reteep
02-28-2005, 11:52 AM
Cool, installed!

S@NL - BlackBik
02-28-2005, 08:29 PM
Just what I was looking for :)

Thanks a lot ZT/

Crapaddict
03-02-2005, 02:49 PM
on my board I have created an imgthumb custombbcode , wich displays all images with the width="100" parameter.
I assume i could easily replace the url tag in this hack with my own img4 tag?
Or should i rename my img4 tag, since img4 also contains the plain img tag (when you drop the number 4), which is exactly what this hack searches for....
If this would work, all images inside quotes would be displayed as thumbnails :)

edit:
hmz... it doesn't :P
Might be nice if anyone could [I]make it work, though :rolleyes:

PIKenPIK
03-12-2005, 02:58 PM
Thanks ... installed :D

Acers
03-18-2005, 01:35 PM
Just what i needed.... this is super stuff

Mosh
04-09-2005, 05:05 PM
Hey ZT, thanks for this, less than 30 sec to do and upload :)

akanevsky
04-16-2005, 12:06 PM
Good job! Installed.

PIKenPIK
04-22-2005, 05:13 PM
Excellent .... /me clicks Install !!

again :squareeyed: after a reinstall of 3.07

MP3
04-29-2005, 05:51 AM
Cool, installed!

Casperddc
05-14-2005, 06:38 PM
Thanks man - just installed it. Wanted this for awhile now!

akanevsky
10-22-2005, 06:21 PM
Come on dude, please port it tyvm

J82980BA3E43
11-10-2005, 07:55 AM
Can someone help me please where i put this script to Vbulletin 3.5 gold please :disappointed:

almqdad
11-16-2005, 11:28 AM
hh

does it work with

vBulletin Version 3.0.8

hollyboy
11-22-2005, 02:37 PM
this dont work for vb 3.5 :(

dmark101
12-14-2005, 05:54 PM
this dont work for vb 3.5 :(

can someone PM the guy who made the hack and see if it can be done for vB 3.5.x?

:)

Scootro
03-13-2006, 08:46 PM
Thanks. Installed.

The Fathom
06-28-2006, 04:12 PM
Will this work in 3.5 too?

Protonus
08-19-2006, 07:52 AM
I would love to see this ported to 3.6!

masalaman
09-01-2006, 03:14 AM
We have to do this a bit different in 3.6.0.

1). Open "includes/class_bbcode.php"

2). Find function handle_bbcode_quote

3). Within function "handle_bbcode_quote" find the line below. This line is there at several places so make sure you found the right one.

eval('$html = "' . fetch_template($template) . '";');

4). Add the code below right after the above line.


//### HACK BEGIN - Turn [img] to [url]
if ($this->contains_bbcode_img_tags($html))
{
$html = preg_replace('#\[img\]\s*(https?://([^<>*"]+|[a-z0-9/\\._\- !]+))\[/img\]#iUe', "\$this->handle_bbcode_url(str_replace('\\\"', '\"', '\\1'), '')", $html);
}
//### HACK END

Protonus
09-07-2006, 06:50 AM
Masalaman: Thank you so much for taking the time to work on this. I tried your above steps and unfortunatly cannot get it to work. It seems to do nothing difference to new or existing quotes containing [img] tags :-( Nothing seems broke, just doesn't work. I made sure that I added the code you list right after the existing command you mention, while in the correct function. It all looks good. I see no other mentions of the quote function elsewhere in this file either...

Is there something I have to do to "activate" this per se? I would think it would work on th fly... Let me know if I'm missing something, thanks!

Protonus
09-20-2006, 06:53 PM
bump? Anyone know how to get this to work in 3.6.0? The above hack didnt' work when I tried it.

indiancinema
10-21-2006, 12:38 AM
any updates

masalaman
10-25-2006, 03:29 AM
It works fine for me. Images in quote are shown as just hyperlinks on my forum. Protonus, have you copied the code multiple times? It must be copied after every instance of the line below.

eval('$html = "' . fetch_template($template) . '";');

indiancinema
10-25-2006, 11:11 PM
working thank u

Protonus
11-07-2006, 06:26 AM
It works fine for me. Images in quote are shown as just hyperlinks on my forum. Protonus, have you copied the code multiple times? It must be copied after every instance of the line below.

eval('$html = "' . fetch_template($template) . '";');

Well your first set of instructions makes it sound like you should only copy it once? But I went a head now and copied it after all lines specified (I found 4 instances of that line.). It doesn't seem to have had any effect... Does it matter that I use the legacy postbit? I'm grasping at straws here. Any other ideas? Things I can check? Something? :D

dmark101
11-09-2006, 10:31 PM
It works fine for me. Images in quote are shown as just hyperlinks on my forum. Protonus, have you copied the code multiple times? It must be copied after every instance of the line below.

eval('$html = "' . fetch_template($template) . '";');
thank you. the code worked perfectly. :)

Protonus
11-20-2006, 07:31 PM
dmark and anyone else getitng this working.. are you using the legacy postbit? I'm still baffled why this doesn't work for me.

Protonus
12-01-2006, 05:19 PM
Still don't have this working... Any thoughts?

Protonus
12-16-2006, 07:30 PM
Updated the board to 3.6.4 today, tried to do this hack again STILL cant' get it to work. I'm at a loss, I don't get why it's not working?! I pasted in the code after every instance of the above noted line. I can post up my file if someone wants to take a look at it, I tried to post it here but it's too long...

Raptor
01-11-2007, 01:25 AM
We have to do this a bit different in 3.6.0.

1). Open "includes/class_bbcode.php"

2). Find function handle_bbcode_quote

3). Within function "handle_bbcode_quote" find the line below. This line is there at several places so make sure you found the right one.

eval('$html = "' . fetch_template($template) . '";');

4). Add the code below right after the above line.


//### HACK BEGIN - Turn [img] to [url]
if ($this->contains_bbcode_img_tags($html))
{
$html = preg_replace('#\[img\]\s*(https?://([^<>*"]+|[a-z0-9/\\._\- !]+))\[/img\]#iUe', "\$this->handle_bbcode_url(str_replace('\\\"', '\"', '\\1'), '')", $html);
}
//### HACK END


100% works perfect with 3.6.4 - thanks !

tankaya61
01-14-2007, 04:29 PM
100% works perfect with 3.6.4 - thanks !


how use 3.6.4
can you say us?
it doesn't work 3.6.4 !

Zia
02-25-2007, 03:15 AM
any one describe the total process for use at vb3.6.4 ?

TIA

Zia
03-04-2007, 04:46 PM
helo any one...can say the process for
vb3.6.5 ?

Zia
03-13-2007, 01:07 PM
found it in 3 places

$template = $this->printable ? 'bbcode_quote_printable' : 'bbcode_quote';
eval('$html = "' . fetch_template($template) . '";');
return $html;


------
$code = preg_replace('/&amp;#([0-9]+);/', '&#$1;', $code); // allow unicode entities back through
$code = str_replace(array('[', ']'), array('[', ']'), $code);
$template = $this->printable ? 'bbcode_php_printable' : 'bbcode_php';
eval('$html = "' . fetch_template($template) . '";');
return $html;
--------
eval('$html = "' . fetch_template($template) . '";');
return $html;

actually where it needed to put or every palces?

cunder
03-13-2007, 01:37 PM
helo any one...can say the process for
vb3.6.5 ?


I use these at vb3.6.5 :)

Zia
03-30-2007, 04:30 PM
Helo cunder
do u install it on 3.6.5

or u got that b4 upgrade to 3.6 ?

amcd
01-10-2008, 06:18 AM
I use these at vb3.6.5 :)http://srv.xboard.us/images/smilies/adore.gif

stwilson
02-18-2008, 02:18 AM
I tried this on 3.7 but no go. Anyone know of a more current version of this MOD???

dmark101
05-24-2008, 03:07 AM
the plugin attached above gave my board all kinds of fits, so if someone came up with a simple code for this to work, that would be awesome.

thaigan
07-27-2008, 01:43 AM
You should only need to do this after the one line. Make sure that when you copied it in, it didn't end up with linebreaks in the wrong places. I'm not sure it will automatically work on posts that have been already made, though, it should work on new quoted replies.

Videx
10-19-2008, 02:37 AM
Any chance we could see this mod as a Product? I mean, I really hate the thought of having to do these edits every time I update.

kingMOB
02-18-2009, 09:10 AM
We have to do this a bit different in 3.6.0.

1). Open "includes/class_bbcode.php"

2). Find function handle_bbcode_quote

3). Within function "handle_bbcode_quote" find the line below. This line is there at several places so make sure you found the right one.

eval('$html = "' . fetch_template($template) . '";');

4). Add the code below right after the above line.


//### HACK BEGIN - Turn [img] to [url]
if ($this->contains_bbcode_img_tags($html))
{
$html = preg_replace('#\[img\]\s*(https?://([^<>*"]+|[a-z0-9/\\._\- !]+))\[/img\]#iUe', "\$this->handle_bbcode_url(str_replace('\\\"', '\"', '\\1'), '')", $html);
}
//### HACK END


Thanks masalaman, works perfectly.

Now, is there a way to just put a spoiler tag around the images in a quoted post? Not replace the image with the link, just a spoiler tag around it.