coppermine-gallery.com/forum

Support => Older/other versions => cpg1.2 PHPnuke/Postnuke Support => Topic started by: Smell on March 15, 2006, 06:04:06 PM

Title: Calling random images
Post by: Smell on March 15, 2006, 06:04:06 PM
Hy there!

I've made a php script that displays random images from a coppermine gallery in another php page in the same server. But i got problems with calling these images names when files use latin characters. In the database, its collation is set as "latin1_swedish_ci". An example:

My script calls (Resulting error 404):
thumb_011%7E18.jpg

Coppermine calls (Image OK):
thumb_011%257E18.jpg

Plz, how can i solve that? i tried applying "utf8_encode" in the image variable and that didn't work...

This is not a standalone coppermine installation, it's into cpgnuke, but i don't believe it's a problem as soon as my script can read images paths from the database.

I know this is not exactly a coppermine related question, but maybe there's someone here that has tried to do the same and experienced this problem before.

Any help is very welcome.  :D

Txs so much!  ;)
Title: Re: Calling random images
Post by: Nibbler on March 15, 2006, 06:07:31 PM
Try urlencode / urldecode
Title: Re: Calling random images
Post by: Smell on March 15, 2006, 06:47:41 PM
Txs brov! "urlencode" seems to have solved some problems, but stresses like "á â ã" are still dead.

Some newest examples:

It calls...
thumb_sem+t%EDtulo20.jpg
thumb_sem+t%EDtulo7.jpg

Rather than...
thumb_sem%20t%EDtulo20.jpg
thumb_sem%20t%EDtulo7.jpg

Txs for the patience!  ;)
Title: Re: Calling random images
Post by: Joachim Müller on March 16, 2006, 09:19:04 AM
cpgnuke goes unsupported
Title: Re: Calling random images
Post by: Smell on March 16, 2006, 11:58:55 AM
Quote from: GauGau on March 16, 2006, 09:19:04 AM
cpgnuke goes unsupported

Sorry brov, but are the cpgnuke coppermine database and standalone coppermine database so different as that? cuz this script just reads the table cms_cpg_pictures.  :(

Well, sorry anyway.  :-[
Title: Re: Calling random images
Post by: Joachim Müller on March 17, 2006, 12:15:58 AM
we have no idea if or how they differ, as we don't know the nuke port. Read the sticky threads on this sub-board.
Title: Re: Calling random images
Post by: Smell on March 17, 2006, 02:47:10 AM
Quote from: GauGau on March 17, 2006, 12:15:58 AM
we have no idea if or how they differ, as we don't know the nuke port. Read the sticky threads on this sub-board.

huuumm hehe i got it now..  :D txs!  ;)