including file managed images

Post custom hacks and enhancements for phpwcms here only. Maybe some of these things will be included in official release later.
Post Reply
Ishryal
Posts: 2
Joined: Mon 3. May 2004, 05:11

including file managed images

Post 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
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Re: including file managed images

Post 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:
http://www.studmed.dk Portal for doctors and medical students in Denmark
User avatar
Paradroid
Posts: 176
Joined: Fri 19. Mar 2004, 13:14
Location: Wuppertal
Contact:

Post 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
ParaDroid

knquadrat edv + marketing
http://www.knquadrat.de

phpWCMS Dokumentation | Deutsch | English
Ishryal
Posts: 2
Joined: Mon 3. May 2004, 05:11

UPDATE

Post 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
frjones
Posts: 5
Joined: Sun 9. May 2004, 18:30

Post by frjones »

that hack is great.
works without a problem.

thanks
User avatar
Paradroid
Posts: 176
Joined: Fri 19. Mar 2004, 13:14
Location: Wuppertal
Contact:

Post by Paradroid »

Hi,

I will try it out

cu

Achim
ParaDroid

knquadrat edv + marketing
http://www.knquadrat.de

phpWCMS Dokumentation | Deutsch | English
kaju74
Posts: 68
Joined: Fri 5. Mar 2004, 11:24

Post 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?
frjones
Posts: 5
Joined: Sun 9. May 2004, 18:30

Post 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.
kaju74
Posts: 68
Joined: Fri 5. Mar 2004, 11:24

Post 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!
Harpo
Posts: 9
Joined: Mon 19. Apr 2004, 20:18
Location: The Netherlands

Wrong reference in installation guide for this MOD

Post 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!
frjones
Posts: 5
Joined: Sun 9. May 2004, 18:30

Post 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"
enhbat
Posts: 1
Joined: Mon 30. Aug 2004, 08:54
Location: Mongolia
Contact:

Alignment

Post 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}.
Post Reply