Page 1 of 1

"content_image" directory path when default "uploads" not used [Solved]

Posted: Sun Aug 22, 2010 7:42 pm
by lunarpig
Hi. I'm running CMS Made Simple 1.8.2. I'm using PHP 5.2.11, and MySQL 5.0.77. This is all working with Apache Apache/2.2.3 (CentOS) on Linux.

In my config.php file, I typically change the default "uploads" folder to "media". Unfortunately, I'm having an issue when trying to use the "content_image" tag when not using the default "uploads" directory.

Although the system retrieves the list of images in my folder correctly in the page editor, it always renders on the page using the default "uploads" prefix.

Code: Select all

{content_image block='Page Photo' dir='images/photos'}
I've tried several variations of the path, and have even tried to update the "function.content_image.php" file directly, but to no avail. I've also searched the forums and couldn't find a solution.

Any help or advice would be greatly appreciated!

Re: "content_image" directory path when default "uploads" not used in config.php

Posted: Wed Sep 08, 2010 1:19 pm
by alexbuckland
The dir is relative to the uploads folder so the easiest way to do it to copy your "media" folder into uploads then the dir path would be

Code: Select all

dir='media/images/photos'
Hope that helps

Re: "content_image" directory path when default "uploads" not used in config.php

Posted: Wed Sep 08, 2010 3:46 pm
by lunarpig
Thanks for your input, Alex. Copying files over would definitely work, but unfortunately that it isn't a solution to provide to a client.

All media (images, documents, video, etc.) needs to be placed in a more meaningful location for URL posting purposes, which is why we're using "media" instead of "uploads".

As an alternative, I'm using a basic content tag for them to use to place the image file. Still, it would be best if the content_image tag worked with the config.php file correctly.

Re: "content_image" directory path when default "uploads" not used in config.php

Posted: Wed Sep 08, 2010 11:23 pm
by alexbuckland
Have you tried putting something like dir='../media/images/photos'

Or maybe its just a bug in your version of php, maybe try upgrading to 5.2.12?
Are you getting any specific errors in your debug window?

Re: "content_image" directory path when default "uploads" not used in config.php

Posted: Wed Sep 15, 2010 4:16 pm
by lunarpig
Alex,

Adding the '../media/' worked. I thought I had tried that option, but apparently I didn't. Thanks for pointing that out and the time addressing my issue...much appreciated.

Re: "content_image" directory path when default "uploads" not used [Solved]

Posted: Thu Sep 23, 2010 1:34 pm
by alexbuckland
Your welcome