![]() |
Convert [IMG] to [URL] in quoted text
OK, another quick one I made 'cause someone requested something like this and I didn't find it while looking for it :)
So, forgive me if something like this already exists.... :nervous: (Point of reference) This one replaces all [IMG] tags in quoted text with [URL] tags. So, you and your users don't have to see the same image over and over again, and if you really forgot what the image was, just click the link :D Installation: Import the product .XML -> DONE :) Like I said, a quick one. Update 1.20 By request, this now also adds an option to the UserCP where users can choose if quoted images should be converted to URLs or left as images. UserCP -> Edit Options -> At the bottom of the page :) |
Very needed, thanks.
|
Indeed! Thanks.
|
Another nice feature to have :)
[high]* Omega Prime clicks install[/high] |
Still in beta?
I did a quick test of a pic and quoted it and got this... PHP Code:
|
Quote:
Because there is no way this one could double it since all it does is replacing "IMG" by "URL".... |
Not that I'm aware of? What else might alter img tags?
|
Maybe this was just some kind of fluke?? Someone on my sight just quoted a pic and it worked fine.
Update: I'm not sure this is going to make any sense at all but it appears to only be happening when you are quoting a pic hosted from imageshack or photobucket?? Other sources of pics from other servers work fine? |
gosh this is neat !!! i need it !!
|
yoooooooooooooooooooooooooooooo
I missed the fisrt post here... Hellcat rockz like hell..haha Thnx a Lot [high]* Zia Kliks Install... is there any way i kliked hundreads of time :D[/high] |
I was patiently waiting for this to be ported to 3.5 :)
Installed. But it only seems to work on NEW quotes. Excisting quotes with images in it are unaffected. Well, it's better than nothing, but it would be cool if this could be made. |
Indeed, this only affects new quotes.
The old ones will vanish quite soon on the mysterious "page 2" anyway ;) |
Page 2? Who the f*ck reads page 2? :D
You're right. Thanks for your reply. |
Double thanks!
|
I just imported this product .XML, and tried it on my board (running 3.5.3.) Tried quoting an IMG and nothing changed, it kept it as an IMG and didn't convert it to a URL. Any ideas?
|
Quote:
I went in and edited both locations in the plug-in manager as a test and copied the code and duplicated it, replacing only the [img] with [IMG] (all caps) and it's now working perfectly. I'm no coder and I'm sure theres a cleaner way to do this but as a quick test to determine the issue this worked rather nicely. PHP Code:
|
Whoops, you're right....
I'll post an updated version laster today that is not case sensitive! |
thanks clic install
|
this is a great idea, will be using this thanks!
|
a new upgrade is comming very soon...
that will works with [IMG] , [img] , [iMG] , [Img] any way ..new release will work with all.. Thnx |
OK,here comes the update :)
I replaced the "plain search and replace" by a regular expression - resulting in case INsesitive replace :up: So, [img], [IMG], [imG].... whatever, should be propperly replaced by [url] now. To update, just re-import the new product .XML with the "allow overwrite" option enabled and you're set. |
/me installs
|
Thanks for the update, Hellcat :)
|
Quote:
|
I sure am, and it's working fine :)
|
hey if you are up for challenges hellcat, I have a good one for ya :p
It would be similar to this mod, but with a more general application. On my board there's lots of people that link to pictures from other sites. This is ok for awhile, but soon the original picture is deleted leaving the post with the signature x. I was wondering if you could add to this hack or start a new one which would let the admin run a scheduled task every so often which would search all new posts for images and add when it finds posts with images it would find out if it was hosted at a remote site or not, and if it was then it would convert it to a forum attachment in that post or copy/host the image in a folder specified by the admin and relink the img tag to the new location. And if the admin can add exempt urls that'd be beneficial too I'm sure. Anyways, just something I've had on my mind for awhile :p |
Nice little thing, which is very much needed indeed! Thank you! :)
|
|
Curious for feedback on this. Does installing this actually decrease load on the forum's server in any way, or is it more of an "aesthetic" decision?
(I realize it could speed things up for the user side rendering and display of image-heavy threads, but I'm of the mindset that it wouldn't have any effect, really, on the forum server itself. Am I wrong?) That said, some users really don't like this. At all. Any chance it could be made a user-selectable option? That would please everyone, one would think. |
This has no affect on the forum's server, except when most of the images are hosted on the forum server itself, wich usually isn't the case.
Adding an user option would be possible, yes. |
Quote:
Quote:
/subscribes to thread |
Great [ Installed ]
|
Quote:
[/high] OK, you sold me :D Here you go -> Update 1.20 now adds the user option :) |
Mod installed, beer money sent.
Thanks, Hellcat! |
To make it the default behaviour to display the images in quoted text and only convert them to URLs if so choosen, in the Plugin-Manager find the Plugin:
"Replace [IMG] with in quotes (Apply Userchoice)http://"<br /> <br /> Open it and ...</div> </div> PHP Code:
IMPORTANT: Please remove the "*" from the "[*URL]" in the IF clause. I had to put that in there, or else the threaddisplay would mess up this post ;) |
Nice.....we r implimenting it
|
Quote:
*updates* |
Can you make it change to thumb instead of url?
|
Quote:
|
Quote:
|
All times are GMT. The time now is 05:22 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:
|