Simple Machines Community Forum

General Community => Scripting Help => Topic started by: SolidSnake2003 on May 27, 2014, 03:50:31 AM

Title: Replacing an Image
Post by: SolidSnake2003 on May 27, 2014, 03:50:31 AM
Is it possible with PHP or Javascript to have one image if loaded to change to a different image?
Title: Re: Replacing an Image
Post by: kat on May 27, 2014, 06:34:09 AM
You want an image to change to a different one... when?
Title: Re: Replacing an Image
Post by: SolidSnake2003 on May 27, 2014, 07:22:00 PM
when its loaded
Title: Re: Replacing an Image
Post by: SolidSnake2003 on June 17, 2014, 03:20:15 AM
Is it possible to do what I want?
Title: Re: Replacing an Image
Post by: kat on June 17, 2014, 07:47:08 AM
I'm afraid I must be a bit dense, coz I'm not getting what you want, with this.

An image loads. But, when it's loaded, you want a different image.

Sorry an' all that... But, that just doesn't make sense, to me. :(
Title: Re: Replacing an Image
Post by: SolidSnake2003 on June 17, 2014, 09:38:44 AM
This is gonna be a modification for coppermine photo gallery

Im basically wanting if one image url is there, replace it with another one

sorry if Im not being specific enough
Title: Re: Replacing an Image
Post by: kat on June 17, 2014, 10:23:07 AM
If this image is posted, say...

http://www.katzy.dsl.pipex.com/Smileys/c002.gif (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.katzy.dsl.pipex.com%2FSmileys%2Fc002.gif&hash=abd8a0cbce803442ca632a1c2588485aae400e20)

you want it to be automatically replaced, say, with this one

http://www.katzy.dsl.pipex.com/Smileys/cowsleep.gif (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.katzy.dsl.pipex.com%2FSmileys%2Fcowsleep.gif&hash=ddd4d2a7f41ded720d4a4f2c806d4ac43d610d90)

Am I right? If so, could the Word Censor feature do that?
Title: Re: Replacing an Image
Post by: SolidSnake2003 on June 17, 2014, 10:47:01 AM
Is the word censor a plugin for coppermine, or SMF?  Im wanting this for coppermine
Title: Re: Replacing an Image
Post by: kat on June 17, 2014, 11:18:32 AM
No idea, if truth be known.

This help? http://www.phpkode.com/source/p/coppermine-photo-gallery/cpg15x/lang/english.php
Title: Re: Replacing an Image
Post by: SolidSnake2003 on June 18, 2014, 02:27:44 AM
so its not possible to use a replace string code?
Title: Re: Replacing an Image
Post by: kat on June 18, 2014, 04:58:13 AM
I'm afraid that I'm not familiar with coppermine. Maybe it'd be best to ask the coppermine support people?
Title: Re: Replacing an Image
Post by: SolidSnake2003 on June 18, 2014, 08:09:59 PM
Alrighty marking as solved, can't do it the way I want to do it.