Page 1 of 1

including file managed images

Posted: Mon 3. May 2004, 06:24
by Ishryal
The reason for this mod was that I figured that the whole point of having a great file manager like phpwcms is to be able to use the images you uploaded when and whereever you like without being limited to using the content types. Not to mention that not everyone has access to a ftp program to be able to upload into the "picture" directory. So here's the first of my MODS to phpwcms.

Download Now!
It's fairly simple. Read the readme file to install.

Once installed all you have to do is use the {PICTURE: img.jpg} tag to include any images you have uploaded. Currently it returns a img tag with the width and height attributes. You'll need to modify the code inorder to get a bordered image as I have set the image border to 0. Maybe I'll update it to be more flexible, but it wont be for a while.


Keep watching this space as I have also setup a MOD so that all the menus generated can be turned into dhtml menus with rollover images, unlimited sub menus and so forth. Will let you know when it's ready.

Ishy

Re: including file managed images

Posted: Mon 3. May 2004, 09:16
by frold
Ishryal wrote: Keep watching this space as I have also setup a MOD so that all the menus generated can be turned into dhtml menus with rollover images, unlimited sub menus and so forth. Will let you know when it's ready.

Ishy
:shock: wow!!!!!!!! :wink:

Posted: Mon 3. May 2004, 10:23
by Paradroid
Hi Ishy,

First of all, a great Idea, that was really missing in phpWCMS !

I installed your mod but the replacemente tag returns the wrong path.
I'll get the following error :

Code: Select all

Warning: getimagesize(phpwcms_filestorage/1/1_2.gif): failed to open stream: No such file or directory in /xxxxx/domain.de/kunden/name.de/include/inc_php/extra.functions.php on line 39
The picture itself is placed in phpwcms_filestorage/2/2_2.gif, as I am the 2nd administrator. The picture is uploaded properly.

It would be nice , if you follow the MOD coding guidelines from Jerome, found here http://www.phpwcms.de/forum/viewtopic.php?t=1759 to keep the upgrading and development straight and clean :wink:

cu

Achim

UPDATE

Posted: Wed 12. May 2004, 09:16
by Ishryal
Hi,

thanks for the comments.

Paradroid, you're right, I should have followed the MOD guidelines however I read that post after I had already uploaded. However, I have uploaded a new phpwcms picture MOD that fixes, hopefully, the problem you encountered and has a MUCH better install instruction, following the MOD guidelines.

For anybody who already has the MOD setup, all you need to do is replace the include/inc_php/extra.functions.php with the one in the zip file.

Download the MOD

Posted: Wed 12. May 2004, 11:02
by frjones
that hack is great.
works without a problem.

thanks

Posted: Wed 12. May 2004, 12:45
by Paradroid
Hi,

I will try it out

cu

Achim

Posted: Thu 13. May 2004, 11:45
by kaju74
Hi...I've installed that mod, but I got the following error:
Warning: getimagesize(phpwcms_filestorage/1/1_19.jpg): failed to open stream: Permission denied in /var/www/web1/html/subdomains/isfd3/include/inc_php/extra.functions.php on line 38

Warning: session_register(): Cannot send session cookie - headers already sent by (output started at /var/www/web1/html/subdomains/isfd3/include/inc_php/extra.functions.php:38) in /var/www/web1/html/subdomains/isfd3/include/inc_ext/phpOpenTracker/phpOpenTracker/Container.php on line 66

Warning: session_register(): Cannot send session cache limiter - headers already sent (output started at /var/www/web1/html/subdomains/isfd3/include/inc_php/extra.functions.php:38) in /var/www/web1/html/subdomains/isfd3/include/inc_ext/phpOpenTracker/phpOpenTracker/Container.php on line 66
What's wrong here?

Posted: Thu 13. May 2004, 14:01
by frjones
didnt had that problem when install the hack.

but you could check the permissions of the file 'phpwcms_filestorage/1/1_19.jpg' seems something is wrong with that.

Posted: Thu 13. May 2004, 14:13
by kaju74
check the permissions of the file 'phpwcms_filestorage/1/1_19.jpg'
This file (as well as all others) has a chmod: 666 (Owner Read/Write)

Is this maybe the problem? If yes, how do I modify fileupload inside phpwcms??? BTW: All images are public/active!

Wrong reference in installation guide for this MOD

Posted: Thu 13. May 2004, 20:35
by Harpo
Thanks for making this mod: easy to install and very conveniant. :D

Small issue: the installation guide has this info:
## For Security Purposes, Please Check http://www.phpwcms.de/forum/viewtopic.php?p=8957
## for the latest version of this MOD.
This should however be:
## For Security Purposes, Please Check http://www.phpwcms.de/forum/viewtopic.php?t=1790
## for the latest version of this MOD.
Makes it easier to find the article, especially after some weeks!

Posted: Thu 13. May 2004, 20:50
by frjones
if the right are 666 (owner,group,all)! then it should work. it only should be read and writeable by the user running apache.

perhaps you could check if the files in your file_path (i think default is phpwcms_filestorage) have the owner of your apache is running with, depends on your linux distribution (should be something like apache, wwwrun, ...)

you can change that with "chown user imagefile"

Alignment

Posted: Mon 30. Aug 2004, 08:57
by enhbat
Very nice mod. But is it possible to use the image paramters such as align, width etc?

Like original tag {IMAGE} 's {IMAGE_RIGHT} and {IMAGE_LEFT}.