Update: 11 Apr 2008
- Fixed fatal error when used with Wordpress 2.5.
My main objective with having a website has always been to post photos. My first real attempt at this was with my previous site. It was a static site that had to be recompiled to include new photos. It was ok, but it required adding code for new photos by hand and all the versions of the image (thumbnails, etc.) also had to be hand generated. I played with writing a java application to do some of this for me (java and cpp are what I’m most familiar with) but ultimately felt that the design of my site was also hindering me.
My next step was to look at tools that could do it for me. I looked at various photo gallery applications and started to look at weblogs. I started to realize that what I wanted was to do both. I didn’t want a separate application for each because I felt that a bunch of photos together tell a story. Sometimes that story can be told with just photos, but sometimes the story needs accompanying text. Sometimes I may only want a couple of photos and more text. With these thoughts I decided that I wanted a weblog.
I started looking at photo plugins for Wordpress and even some for other weblogs. Ultimately I concluded that none of them really gave me what I wanted. The closest I found was Exhibit by Owen Winkler. A nice little plugin, however it lacked a few things that I wanted, in particular, I wanted better control over how thumbnails were handled inside a post.
Thus, I decided to write the Copperleaf Photo Log plugin for Wordpress, CPL for short (not to be confused with the Customizable Post Listings plugin.)
Description
Copperleaf Photolog for Wordpress(CPL for short, not to be confused with Customizable Post Listings) is a photo management tool for Wordpress. It allows for easily adding thumbnails and inline images to posts and pages.
Requirements/Restrictions
- Works with Wordpress 2.x.
- Requires Javascript to be enabled and to be a recent browser for the admin pages.
- The only format currently supported in JPEG.
- Requires either GD2 to be compiled into php or imagemagick (convert) to be installed as a command line utility.
- For EXIF support, requires that EXIF be compiled into php.
Files
Installation
Download the zip file above and expand (keeping the directories) into your wp-content/plugins directory and activate it. The database tables wp_cpl and wp_cpl_post will be created.
Configuration
After the plugin is activated, you can configure it by selecting the CPL tab on the Options page. Here is a list of the options:
Default Description – When a photo is added, this is the default description that will be associated with the photo.
Default Photographer – When a photo is added, this is the default photographer that will be associated with the photo.
Default Server Directory – Photos can be ftp’d to a server directory then added which is useful
for large additions. This is the directory on the server where the photos will be retrieved. Make sure it is an absolute path and that you have permissions for the server to delete the files when done.
Storage Directory – This is the relative directory under wp-content where the images will be stored.
JPEG Quality Level – For generated images, thumbnails, etc. this is the JPEG quality to use.
Max Cache Size – Used to improve query performance. The max number of images “per page” to cache. If the number of images on a page exceeds this value, no caching is done. Default is 250. Set to 0 to disable.
Auto Purge – When a photo is no longer associated with a post or page (because the page or post has been deleted), this will delete the abandoned images.
Minimum Admin Level – This is the mimimum user level required to get to the admin page. (I haven’t switched to the user level strings used by Wordpress 2.x yet.)
Convert Path – This is a path to the convert utility which does a better job than gd for resizing images. Leave blank to use gd.
Exif Strip Size – If both sides of an image are smaller than this number, the exif info will be stripped. This only applies when convert is being used as gd already strips the exif info. This can save alot of download space when using alot of thumbnails.
Max Original Size – If an uploaded original has both sides larger than this value, it will be resized to fit.
“Photo of the Day” Category – If you want to have a photo of the day in you sidebar, set a category name here. If a post is in that category, it will be hidden from the main page, but can still be displayed in the sidebar. Leave it blank to disable it. See the CopperleafPlus theme for an example of how to do this with your sidebar.
Hide “Photo of the Day” Posts – By default, posts that are in the photo of the day category above are filtered from the main page. If you would like to display them on the main page too, disable this field.
Usage
Once activated, a section is added to the post and page edit views. For posts, this is in the advanced section. This will appear just below the editor. From this view, you can add photos and insert them into the post or page.NOTE: The current implementation requires that a post/page have an id, thus, a page must be saved one time before photos can be added. There is a messsage that will indicate this.
To add photos, click the “Add Photo(s)” button. A dialog will appear that will let you either 1) upload a photo via the browser, 2) add photos that have already been ftp’d to the server, 3) Add photos that are already part of another post.
Once some photos have been added, they will appear in a table in the center of the view. On the left of the table are buttons that will let you edit the data, delete them, or change their order.
To insert photos into the post or page, you can click the “insert matrix” button which will insert the tag ‘<!--cplmatrix-->‘ into the editor. When displayed, this tag will expand to show a matrix of thumbnails in the post. Additionally, there is a button to the left of each image that will let you insert just that image into the post. When you click it, it will insert a ‘<!--cplinline id="4"-->‘ into the editor (where 4 is the id assigned by cpl for that image).
There is an option that you can manually add the will limit the number of thumbnails that will appear on the index page. Modify the tag to look something like ‘<!--cplmatrix mpmax="8"-->‘. This example will only display 8 thumbnails on the index page.
There is another option that will let you group photos when displaying a matrix. If you specify something like ‘<!--cplmatrix group="1"-->‘, then only photos that match group number 1 in the post will be displayed. By default, photos are added to group 0 which is the default group.
If you want to change the order of images in the post (for the cplmatrix tag), you can move them up and down with the arrows to the left of each image, or you can click the “rearrange photos” button. Clicking this button will bring up a dialog where you can click an image, then click where you want it to go, and it will be moved there. (This is much more efficient than the arrows approach).
For developing different layouts, take a look at the files cpltemplate.js, cpltemplate.php, cpltemplate.css and cplphoto.php in the cpl directory. These pages are used to generate the layout of cplmatrix and cplinline. Basically there are three functions: getCplHead, getCplMatrix and getCplInline. They each return a string of html that is inserted into the header, matrix and inline tagss. They use the CplApi class defined in cplview.php. Another example is in the CopperleafPlus theme which has it’s own slightly modified versions of these files and also supports
a “photo of the day” in the sidebar.
One specific API note that pertains to displaying the “photo of the day”. If you want to use the photo of the day functionality, add CplApi::photoOfTheDay(); to your themes sidebar.php. Without any arguments, it will display the first image of newest post in the photo of the day category. There are two arguments that can be passed. The first is the mode: newest | random | roundrobin | newestrandom | newestroundrobin. The newest is the same as no arguments as stated above. Random mode will grab a photo from any post in the photo of the day category. Roundrobin will iterate through all posts in the photo of the day category. For random and roundrobin modes, this will only change once per day. For random and roundrobin modes, this will only change once per day. The modes newestrandom and newestroundrobin will behave like the newest mode if a new “photo of the day” image has been posted in the last 24 hours, otherwise it behaves like random or roundrobin modes. The second argument is a boolean (true | false) that will display the title of the post containing the photo. True means that the title will be displayed.
Notes
With the progress dialog when adding photos from a server directory, some server configurations may prevent the progress from showing. One situation is if mod_gzip is installed on the server (Apache). If this is the case, the following section should be added to your http.conf or .htaccess:
mod_gzip_item_exclude file cpladmloadstat\.php$
Another is a bug that was introduced in php 4.1 that prevented ob_flush() from truely flushing until an 8k buffer has been filled. This has been fixed in php but there may still be installs with the bug.
Execution time limits can also cause problems with large uploads consider adding/modifying the following lines to to your php.ini:
max_execution_time = 300;
max_input_time = 300;
memory_limit = 16M;
Additionally, you may want to look at the timeout for the webserver. For Apache, look at the following in your http.conf:
Timeout 300

October 29th, 2005 at 8:04 am
Hi,
I’ve just downloaded cpl_poc.zip and tried to install it after installing your Copperleaf Plus Theme. The theme looks great but the plugin does not work for me. I’ve Wordpress 1.5.2.
I don’t understand what the error message means:
“incompatible cpl schema version (1) – must upgrade manually”
How do I unprade?
Thank you.
October 29th, 2005 at 9:01 am
I’ll be glad to help you get it working. Unfortunately I’m swamped this morning. This afternoon/evening I’ll write up a more detailed message of things you can do to get past that error message. The message is from it failing to create the db tables. No biggie. I’ll fix the script and post it. The big issue with CPL is that it lacked some functionality that I found important so I’m working on a redesign. Just an FYI, CPL is still the plugin I’m using for the photos on my site currently.
October 29th, 2005 at 11:19 pm
I’ve updated the plugin to fix the part of the code that checks for a valid schema so that it can create the tables if they don’t exist.
October 30th, 2005 at 2:31 pm
Hi!
I’m not able to enable the plugin since it is not listed in my plugins. I copied the whole directory into /wp-contents/plugins
Do I need another file?
October 30th, 2005 at 2:52 pm
Geez. I left out the root file when I rezipped it. I added the missing file back. Hopefully this will do it. Sorry about that.
October 30th, 2005 at 7:27 pm
that’s it ;) thanx!
October 30th, 2005 at 7:33 pm
hm, I can enable this plugin but I get a mysql-error whenever I want to post an entry:
SELECT p.id, p.postid, w.imagepath, w.imagename, p.imageorder, p.modified, p.added, p.description, p.photographer, p.imageorder, w.taken FROM wp_cpl AS w, wp_cpl_post AS p WHERE w.id = p.id AND p.postid = ORDER BY p.imageorder, p.added;October 30th, 2005 at 9:21 pm
What is the error message you get? Do you have access to the web server error logs? Are you able to add photos to the post?
November 4th, 2005 at 6:31 am
Hello. First I want to tell you thanks for your extraordinary work (sometimes looking simple it takes a lot of work).
Well I tried to install your pluggin for pics, but I don´t know how/where to put the “photo of the day”. Maybe it can be because there are only just one menu running under OPTIONS/CPL. I can´t see the other menus to upload pics,and so. I have no any message errors, and I wrotte the paths to the servers folder, and wp-contents related to the pics, in the correct way. Please try to help me if possible, I know you must be really busy. Thanks, Mario.
November 4th, 2005 at 8:45 am
Can you get photos to appear in a regular post? You get to the photo piece of a post by expanding the “advanced editing” button. (Note: If you start with the advanced section already exposed, the plugin won’t work until you save your post one time. This is because a post id has not yet been assigned.)
From there you can add photos to the post. This doesn’t display them. To display them, you need to click on the plus next to the photo which insert a single photo, or you need to click the insert matrix button which insert all the photos of the post as thumbnails.
To do the photo of the day part, a post has to have one photo associated with it and must be assigned to the same category set in the cpl options.
November 4th, 2005 at 8:53 am
I thought I’d add a general comment. The version of cpl that is available for download was a proof of concept and I am working on complete redesign that I feel will be easier to use and provide more flexibility and will hopefully address some of the problems I had with the current workflow. I really need to post a writeup of features, etc. But I can say that it will have all the functionality of the proof of concept. I can’t say when it will be ready as I’m only able to work on it a little at a time.
November 8th, 2005 at 2:46 pm
Well. I deactivate the photo pluging. Some problems with the data base. I started from the beggining and your nice theme is working right. But here you have a new questions: Where are the pages placed in you theme?. I can´t see a “pages” area… Thanks for your answer.
November 8th, 2005 at 2:49 pm
I couldn’t come up with a way that I liked to display pages directly. The approach I’ve taken (for now anyway) is to create the page, and then create a link to the page in the link section. This allows me to group pages/links/etc together in a more organized fashion.
November 12th, 2005 at 3:23 pm
I’m using your theme and I’m very happy with it. Thanks!
Question:
I’m using the cpl plugin – and it works just fine. I personally like your way of displaying pages (creating them and adding them to the links section).
Only thing I noticed, when I go to create page, I do not have the advanced editing options button, so I’m not able to insert photos using the plugin, but I also noticed that you have that option (you are displaying a gallery on this very page).
Is there a way to turn the advanced editing options on when I create a page?
Thank you very much.
Max
November 13th, 2005 at 3:48 pm
Just to say to you that I reinstall your pluggin and it works perfect. It was just a matter of permissions in my webhosting. Now it is fine and marvellous. Congratulations and thanks a lot for sharing this with us. Regards, Mario.
November 14th, 2005 at 8:16 am
Hi Max,
Currently there is no way to add photos to pages with CPL. That’s because of the way I store the photo info. It’s tied to a post. The ones in my pages were created and added by hand. That’s one of the features at the top of my list of the redesign which I swear I’m making progress on. I really need to write up something.
November 14th, 2005 at 8:17 am
Mario, Thx for the feedback!
November 17th, 2005 at 8:04 am
[...] Copperleaf Photolog for Wordpress [...]
November 18th, 2005 at 12:29 am
Love the idea of this system, but I’m getting an error as follows:
Fatal error: Call to undefined function: exif_imagetype() in /home/alex/public_html/content/plugins/cpl/adm/cpladm.php on line 135
Any idea what’s going on?
November 18th, 2005 at 8:48 am
I suspect that you are running with an older version of php or exif is not enabled. That function was added to php starting with version 4.3.0.
Check out PHP Exif Functions for details.
November 22nd, 2005 at 4:56 pm
Great idea, just the challenge I’m looking for a solution to. Anyway to do this in AX?
December 17th, 2005 at 10:00 am
I got some troubles with permissions in the pic folders, in the server. If permissions are not good setting up, this plugin will not work. This will be a problem of the server but not the plugin wich works perfect. Thanks again for this tool.
Take a look about how the pluggin is working perfect at:
http://www.koordinadora.org
December 18th, 2005 at 3:56 pm
I’m getting this when I go to upload photo
Fatal error: Call to undefined function: exif_imagetype() in /home/.hytek/mls/quest-i-on.com/wp-content/plugins/cpl/adm/cpladm.php on line 135
I saw your reply to Alex about this, but don’t understand php exif functions
December 19th, 2005 at 11:15 am
Miles,
Basically whoever compiled php for the platform you are running on didn’t include the exif functionality. You may want to contact them to see if they can add it. Most providers do. Since the exif info isn’t critical, I may go back and make a change to not require it, but it probably won’t happen until after the holidays.
January 4th, 2006 at 4:43 pm
Hi, this is a fantastic plugin – great work! My only hangup is when adding files from the server directory.
My permissions are all correct, paths are correct, but whenever I try to load the images, the only thing that happens is it posts “added.” along the top of the upload window. But … what then? None of the images are copied / moved to the images directory, nothing is displayed back in the post window … am I missing a step?
Thanks, and thanks for a great plugin!
January 6th, 2006 at 4:34 pm
Hi Ian. The first “added” line is a bug but is harmless. I just tried it out with a single file and it worked on my server. Is there anyway you can get access to your servers error log? If you can, grab the section where you tried to add the photo. That may help me figure out the problem.
January 7th, 2006 at 9:40 am
Ugh. I figured it out – I just kept putting the wrong path in the “default path” box. I insisted on using relative paths, and it never donned on me to just use a full, static path to the directory.
Works like a charm!
January 8th, 2006 at 9:26 pm
Hi Bill,
love the plug-in with your theme. Looks like a great idea but as I’m no PHP wiz – could you maybe write up a little FAQ on how to use it?
First of all, how do you arrange the matrix or post a picture with text wrapping it?
Second, you come up with new folders under /wp-content/images for each and every image you chose. That will eventually lead to a lot of disorder (at least to me it seems like that). Couldn’t you just specify one folder and get the right URIs to the pictures that way?
Third, I have only small pictures in the matrix and when you click on them they are shown much larger than they actually (175*200). If you click it again you’ll get the right pic but it’d be nicer if you could customise the size.
I know you are swamped with redoing it but as I am quite happy with the way it works on WP 1.5 I’d just be delighted to get some general idea how to work with it!
Thx a bundle and keep up the good work!
January 10th, 2006 at 8:40 am
Hi Marcel, Thx for the feedback.
I’ll try and add some example doc for the layout stuff. In the meantime, take a look at the Copperleaf Plus theme. It has support for the CPL plugin and does some playing with layout.
As far as the directories created, it doesn’t actually create a folder for every image. It takes a hash of the name of the image and mods it so that there are a finite number of directories. The default is that it won’t create more than 50 directories in the main folder.
As to your third point, for the default view, that is probably a bug, but if you create your own template, you can customize it any way you want. The files of interest are cpltemplate.php and cplphoto.php that are in the Copperleaf Plus theme.
I’ll take a look at these and see what I can come up with.
Bill
January 18th, 2006 at 8:43 pm
Hi..wondering if anyone had any ideas why I get the following error when trying to activate this?
I actually get this error on a number of plugins…
Warning: main(/usr/web/mslbaseball.com/html/wp-content/plugins/cpl/cplconfig.php): failed to open stream: No such file or directory in /usr/web/mslbaseball.com/html/wp-content/plugins/cpl0.6/cpl.php on line 29
Fatal error: main(): Failed opening required ‘/usr/web/mslbaseball.com/html/wp-content/plugins/cpl/cplconfig.php’ (include_path=”) in /usr/web/mslbaseball.com/html/wp-content/plugins/cpl0.6/cpl.php on line 29
January 18th, 2006 at 10:27 pm
Jason,
The reason for the error is it appears that you modified the directory from plugins/cpl to plugins/cpl0.6. Alot of plugins are wired to their relative path under the plugins directory. Try renaming the directory from cpl0.6 to cpl and that should clear it up.
January 18th, 2006 at 11:33 pm
Thanks. I tried that (by the way, when downloaded, that was what the folder was called), but now I get:
Warning: main(/usr/web/mslbaseball.com/html/wp-content/plugins/cpl/cplconfig.php): failed to open stream: No such file or directory in /usr/web/mslbaseball.com/html/wp-content/plugins/cpl/cpl.php on line 29
Fatal error: main(): Failed opening required ‘/usr/web/mslbaseball.com/html/wp-content/plugins/cpl/cplconfig.php’ (include_path=”) in /usr/web/mslbaseball.com/html/wp-content/plugins/cpl/cpl.php on line 29
What is the directory lay out supposed to be? I’ve been simply uploading in the file structure that is output after unzipping the downloaded file.
January 19th, 2006 at 7:08 am
Hi there, just came across your great plugin and will love to test it out on my Travel report site that’s running wordpress as well…
Since you are already using GD2 I just wondered if you implemented some kind of watermark-feature for your photo post…
thanks for all the work & keep it up,
Christoph C. Cemper
January 19th, 2006 at 8:04 am
Jason, I took a look at the zip file and it appears to be correct. What I suspect is going on is that you expanded the zip into a plugins/cpl directory. What you should be seeing is cpl.php in the plugins directory with a cpl directory in the plugins directory and an adm directory in the cpl directory. Try deleting your current cpl directory and expanding the zip into the plugins directory.
One other thing to check is that it might be your zip tool. There isn’t a cpl0.6 directory in the zip. Your tool may be creating that directory since it is the name of the zip. I think the built in windows xp zip tool does something like that.
January 19th, 2006 at 1:25 pm
That did the trick. And I hate to continue to be a pain, but I feel I’m almost there.
When I try to do an upload I get:
Unable to create directory /usr/web/mslbaseball.com/html/wp-content/uploads. Is its parent directory writable by the server?
I couldn’t find a folder called /uploads in the wp-content folder. Where and how do I setup permissions for this?
January 19th, 2006 at 1:41 pm
Jason, No prob. I’m guessing you are running WP2. The uploads directory is used by the WP2 upload mechanism and the server would need write permission on the wp-content directory for that. CPL, by default, uses a directory in wp-content called cplphoto (unless you changed it in the CPL options) which also will require write permissions on wp-content. The one thing I don’t like about the current CPL implementation is that the post or page must be saved one time before CPL displays. This is because an id for post/page hasn’t been assigned yet.
January 19th, 2006 at 1:45 pm
Christoph, Watermarking is something I’m looking at, but I haven’t done anything with it yet.
January 19th, 2006 at 2:45 pm
Hi
I, like several others, get the following on photo uploads
Fatal error: Call to undefined function: exif_imagetype() in /home/sites//web/blog/wp-content/plugins/cpl/adm/cpladm.php on line 135
I’ve seen your comments but my provider is less than helpful (and I’m tied into them for the foreseeable). You mention you might try and sort this out yourself. Any joy, now we’re “after the holidays” ;-)
Thanks
January 19th, 2006 at 3:55 pm
Chris, I’ve upload a version (0.7) that should fix this. The link is available in the “Files” section above.
January 19th, 2006 at 5:10 pm
Thanks, that fixed the upload, though I then got the dreaded red-cross tag and no pic. Got to figure that out now. Also, it mucked up your (very nice) theme a little, so that only the last post showed on the page.
I can’t go into too much detail as I need to play a little but things didn’t work as expected. Not sure if it’s my fault or not! :-)
January 19th, 2006 at 10:50 pm
Thanks for all the help. I’ve tried implementing the photo of the day, but it keeps only saying No Photo Found. I named the category pod. Here’s the code I’m using:
Daily Photo
getExpander().add(‘pod’);
Any thoughts about the error?
January 19th, 2006 at 11:18 pm
Hmm..not sure why the code didn’t show up. Regardless, I’m using the code straight from the template.
January 20th, 2006 at 8:09 am
Chris, let me know if you can’t figure it out.
Jason, the main call to get the photo of the day to show up is the call
CplApi::photoOfTheDay();. That call will grab the latest one. To have one defined you have to:1) Make sure there is a photo of the day category defined. You can name it anything you want.
2) In the cpl options, enter the photo of the day category name in the corresponding option. Make sure they are identical.
3) Create a post that has a photo added and that photo is in the post (I typically do a cplinline for this) and that the post is in the defined photo of the day category. The post can be in other categories too.
One thing to try is remove whitespace from the category name. I’ve run into small problems with WP changing it a little.
January 20th, 2006 at 2:36 pm
Nope, need help! Can’t figure it out. :-(
The plugin is installed ok, and activated. But then I get issue #1, namely all the posts on my page get truncated to the last post. Clicking on the “Previous” link then takes me back past the missing posts.
Issue #2 I can upload a the file via the browser ok, and the plugin goes through its routine but then presents me with the red-cross tagholder, despite showing the file as present. It will even let me edit it, but even then, afeter “saving” the picture is missing (ie red cross tag)from the picture of the day spot and the post.
Any tips?
January 20th, 2006 at 2:44 pm
Chris, Let’s take this offline and once we get it figured out, I’ll post a summary here. I’ll email you shortly.
January 22nd, 2006 at 6:27 pm
Hi,
I finally setup your great plugin and have 2 separate issues that somehow seem to derive from the conversion logic with im/gd2
I have this on a dedicated server, so I can make ANY changes required, but it seems I don’t get the right error messages
Problem 1:
- the upload of an image of a size of 6meg or so fails, telling me
” is invalid. Only JPEGs are currently supported.”
- the pic is 4200 x 3600 stitched and saved from photoshop CS2
- the uncompressed size of the pic is 42 meg if that’s important
- the compressed size (jpg saved from PS) is 6400 kb
Problem 2:
- the upload of an image coming directly from my ixus 750 (2304 x 3072) fails with the same problem
I also had some issues where some of the mini-thumbs (70×50) were not generated, but for the pics that work, I have them all now, since I switched from imageMagick to GD2
Pretty weird, eh?
I hope you can point me to the right setting for the large image upload problem.
thanks,christoph
January 23rd, 2006 at 8:48 am
Christoph, there are a couple of things that might prevent you from uploading images. There are directives in apache.conf and php.ini that limit the size of uploads. In apache, one is the
LimitRequestBodydirective. In php.ini there is thepost_max_sizedirective. There may be others.Additionally, take a look to see if your timeout is of sufficient length to allow for uploads that will take a while. The directives to look at are
Timeoutin apache.conf andmax_execution_timeandmax_input_timein php.ini.Unfortunately, I don’t know how to check these conditions. (I need to look into it) So the only thing I see is a file that isn’t a valid image because it has only been partially uploaded.
January 23rd, 2006 at 8:51 am
Just an quick update. We resolved Chris’ problems above. The problem with the posts not showing up was due to the fact that when a post is added to the photo of the day category, it is filtered from the main page, regardless of other categories that it is in. Therefore, only put something in the photo of the day category if you don’t want it to show on the main page. I may add an option for this.
The second problem was that images were not being generated after uploading. This was because the convert field in the options wasn’t cleared and he needed to use gd instead of imagemagick convert.
I’ll update the documentation to make these things more clear.
January 26th, 2006 at 6:24 am
Hi again. Unless I’m missing something (which given my track record is possible) it seems that CPL only shows the latest pic in the Photo of the Day box. As this is a good spot to show off pictures on cyclical basis, is there a way of it grabbing any picture from the apporpriate category? This way it would be a true “photo of the day”.
January 26th, 2006 at 8:08 am
Hey Chris,
No, you’re not missing anything. They way it is coded is to only be the last photo one found. Having it be cyclical or random is a good idea. I’ll look into adding an optional argument to the getPhotoOfTheDay method that would allow it to do that.
Bill
January 27th, 2006 at 3:26 pm
Bill not sure if this is a WP/CP Theme or CPL issue but have noticed the following;
If on the home page you click on the Category for photo of the day, then click on a picture in a post with several pictures embedded in a matrix, you don’t always get a new window opened. Instead the browser opens the picture in the existing window, which can cause problems if your viewing more than one pic – it’s hard to get out of the picture viewer! I can force a new window by clicking on the post header first but simply clicking straight into a picture repeatedly fails to open a new window.
Let me know if you want further info.
January 30th, 2006 at 2:13 pm
Hi Chris, That is driven by the theme and was intentional. I didn’t want a bunch of windows popping up. I’ll look at when I get a chance about what it would take to not close the previous window.
January 31st, 2006 at 4:26 am
Bill: I think we may be talking cross purposes, slightly and perhaps I didn’t explain myself very well.
Sometimes, on clicking the first photo, a new window will open as a picture viewer window, through which you can click back and forth between the pictures (using next and previous) which presumaly is what is designed. However, sometimes the picture viewer opens in the existing browser window, which means if you clicked “next” several times, you can’t get back to any web pages without using the back button several times to scroll through all the pictures already seen.
Have I explained this clearly enough? It just seems strange, though as Murphy’s Law has it, I can’t replicate it today on my laptop.
January 31st, 2006 at 8:53 pm
This is very similar to past posts, but when I click activate the plugin by clicking activate on the plugins page I am getting the same error message as Chris (and maybe others) have gotten. The error message propogates itself across the blog and I am forced to use an FTP client to remove the whole CPL folder.
The message is:
Warning: main(/homepages/31/d152327501/htdocs/blog/wp-content/plugins/cpl/cplconfig.php): failed to open stream: No such file or directory in /homepages/31/d152327501/htdocs/blog/wp-content/plugins/cpl/cpl.php on line 29
Fatal error: main(): Failed opening required ‘/homepages/31/d152327501/htdocs/blog/wp-content/plugins/cpl/cplconfig.php’ (include_path=’.:/usr/local/lib/php’) in /homepages/31/d152327501/htdocs/blog/wp-content/plugins/cpl/cpl.php on line 29
The CPL folder I download is called “cpl0″. Within that folder is a document called “cpl.php” and a folder named “cpl.php”. Within that folder are many “.php’s”, two “.txt’s” and a folder named “adm”.
Do I have to make a new MySQL database, or change something with the existing database? Should I not be using a Mac? Any ideas would be very much appreciated
The rest of the blog appears to be working perfectly and the Copperleaf theme is great.
January 31st, 2006 at 9:11 pm
Hi Luke, Sorry to hear that you are having problems. Looking at the error messages you posted, it appears that there is something weird with your unzip tool. The download itself is currently cpl0.7.zip. The contents of the zip is layed out like:
|
+- cpl.php
|
+- cpl
|
+- some php files
|
+- adm
|
+- some more php files
When you expand the zip, the file cpl.php and the directory cpl should be in the plugins directory. It appears you created a cpl directory in the plugins directory and expanded the entire zip into that.
February 1st, 2006 at 8:23 am
Chris, Looking at your last comment, I’m wondering if has to do with javascript being disabled. When javascript is disabled (or nonexistent), instead of a popup, it simply links to the image view which replaces the blog view. Disable javascript one time on your browser and see if that’s the behavior you witnessed.
I’m in the process of modifying the CopperleafPlus theme to add a link back to the referer on the image page if javascript is disabled.
BTW, I haven’t forgotten about the photo-of-the-day issue. I’m working on it. :)
February 1st, 2006 at 9:04 am
Bill, this is a great plugin. You’ve done some really good work here.
I’ve installed the plugin on my webpage, and it works fine creating the thumbnails and the post and all. However, when I click on the image in a post (from a cplmatrix), I get the following error:
The requested URL /wp-content/themes/ShadedGreyRemix/cplphoto.php was not found on this server.
Should I be putting any files in my theme folder?
February 1st, 2006 at 9:58 am
Josh, that appears to be a bug in the default template. I’ll have a fix posted shortly.
February 1st, 2006 at 9:14 pm
Chris and Josh, I’ve released updates to both the Copperleaf Plus theme and the CPL plugin that should address the last set of issues that you found. Check’em out and let me know how it goes.
Bill
February 2nd, 2006 at 2:39 pm
Great Bill but I can’t for the life of me find where to change the options for the new “support for two additional photo of the day modes: random and roundrobin”. There is nothing on my options page under CPL for these.
February 2nd, 2006 at 2:48 pm
Chris, it’s in the call to getPhotoOfThDay() in the sidebar. Since you are using the CopperleafPlus theme, you can either grab it and modify defines.php or just modify sidebar.php directly. I thought about putting it in the options but decided against it since a theme may want to have both random and latest in the sidebar.
I might go back and add an option that would change the default case.
February 2nd, 2006 at 3:33 pm
Thanks Bill. You beat me to it – I’ve just found the explaination in the Readme file!! doh.
February 2nd, 2006 at 4:21 pm
OK, I’ve read that with the optional CplApi::photoOfTheDay arguments set to random or roundrobin the photo will only change once per day but on several different visits to your site today there is a different picture showing. How so?
February 2nd, 2006 at 4:34 pm
They changed on my site because I changed my “photo of the day” category which resulted in a different offset in the query. I also changed from newest to random which also resulted in a change.
One thing I am thinking about on this is to store the id of the image to display and only regenerate if 1) it’s a new day, or 2) if the id of the image is not found. That would improve query speed for page hits where nothing has changed. Right now I store the offset (in sql
LIMIT x,1where x is the offset).If I do that, it will be a couple of days since I think I might make the leap into Wordpress 2 for this site.
February 3rd, 2006 at 4:36 am
Best of luck with the upgrade, though you can now go straight to 2.0.1 and miss most of the bugs :-). That said, your theme and plugin look good and work well on my site under 2.0.
Thanks for the good work.
February 10th, 2006 at 10:47 am
[...] I’ve posted new releases to both the Copperleaf Plus theme and the Copperleaf Photolog Plugin. [...]
February 11th, 2006 at 1:22 pm
I just found your site via Blinklist. This is the sort of Wordpress plugin I’ve been looking for. Thank you! (Also, I almost fell over when I saw your banner and the signature Riverfront towers. Small World).
February 11th, 2006 at 1:28 pm
Oh…you’re THAT “Bill Smith”! 181 Bill Smith! Again, good job on the plugin!
February 15th, 2006 at 3:04 am
First I apologize for my english.
Second: Thanks for this wonderful plugin an the wonderful theme. I worked around the theme a little bit (translation, color, background etc.)
I tried different Gallery Software for Wordpress but this one fits perfectly.
Some Question:
Is it possible to show maybe <!–cplinline id=”4″–> with other dimensions? Something like ?
o crop the pictures
February 16th, 2006 at 10:13 am
Hi, I’m using this great plug for a month now without any problems! The problem started when my provider switched servers. Now it’s impossible to upload photos?! I don’t know what could be the problem.. this is the message i get:
Warning: move_uploaded_file(/home/casaluma/domains/casaluma.net/public_html/blog/wp-content/cplphotos/0/pict1058.jpg): failed to open stream: Permission denied in /home/casaluma/domains/casaluma.net/public_html/blog/wp-content/plugins/cpl/adm/cpladm.php on line 161
Warning: move_uploaded_file(): Unable to move ‘/tmp/phpzHHWVY’ to ‘/home/casaluma/domains/casaluma.net/public_html/blog/wp-content/cplphotos/0/pict1058.jpg’ in /home/casaluma/domains/casaluma.net/public_html/blog/wp-content/plugins/cpl/adm/cpladm.php on line 161
and then it just stops.. I checked all the permissions on the server and they are ok.
I don’t know what to do next…
Can you please help me figure this out?!
Thanks!
February 16th, 2006 at 10:28 am
Hi Bjoern, currently there isn’t any support for changing the image size with the tag. Currently that can only be done with the theme. I’ll add it to the possible features list.
Lucas, unfortunately that error message is being generated from the move_uploaded_file() function which is a php function so there isn’t a way to gather anymore info. It is saying that there is a permissions problem, make sure that the cplphotos directory has read/write and make sure all the existing subdirectories do too. Maybe in the copy, the subdirectory permissions were changed.
February 27th, 2006 at 10:20 am
Hi Bill, just wondering whether there was any way of having an option to change where the image gets framed for the embedded thumbnail. I’m finding that a few of my pics get cropped in the wrong place for the Photo of the Day” section (and also in posts).
February 27th, 2006 at 10:45 am
Hi Chris, it’s a little crude but it works. Go into the post and click on the edit icon next to the photo. If you scroll down on the edit screen, look for the 90×90i image. Click on the croptool icon. That will let you change the part grabbed for the thumbnail. Without modifying code, there isn’t a way to change the default of grabbing the middle.
February 27th, 2006 at 11:20 am
Bill: That sorts it, thanks.
March 6th, 2006 at 5:22 am
Bill, is there a way of having more than one matrix on a page?
I’m trying to create a new page that will act as an index of videos. I want each picture to behave a link to its corresponding video on a separate page (running a javascript viewer). This ndex is off the main WP loop and so I can use an individual post basis. I’ve tried multiple matrixes but they just load all the same pictures.
If not, I guess I’m going to have to learn how to set up a new loop, with each post acting as its own index. I did look into that but the programming looked too scary.
March 10th, 2006 at 6:50 am
Hi Chris. Sorry it’s taken a while to respond. Currently there isn’t a way to do this. It’s a feature I want to use as well. I’m slowly working on a new version that will do this.
March 15th, 2006 at 2:34 pm
Hi !
After updating to WP 2.02 i got a problem with uploading and adding photos from a directory.
I get this message if I try to upload from a directory:
Warning: copy(/xxx/xxx/fontguy.de/htdocs/max/wp-content/cplphotos/22/img_5488.jpg): failed to open stream: Permission denied in /xxx/xxx/fontguy.de/htdocs/max/wp-content/plugins/cpl/adm/cpladm.php on line 349
The Update to 2.02 didnt do anything to the wp-content folder..
March 15th, 2006 at 3:27 pm
Hi Bjoern, the “permission denied” message is being generated by the built in copy command. Take another look at the permissions of the cplphoto directory as well as the source directory.
March 16th, 2006 at 2:19 am
Thanks, I changed permissions to 777. Now its working. Webserver isnt running in userspace, so I had to change it to 777.
March 23rd, 2006 at 11:43 pm
bill,
i can’t upload any image. i get the dreaded “it must be a jpeg file” error … but the image is definately a .jpg file
March 24th, 2006 at 3:50 pm
Bill,
i’ve been thinking about this since i woke up today and i can only think that the problem could be one of two things:
don’t have GD installed – which i don’t know how to check but would find it odd considering the PHP release is up to date – ver. 4.3.9
some permissions problem – but i have pretty much made everything 777, to the point where i’m worrying about security ;)
btw, this is a beautiful you have created here! i think you have accomplished the goal of using both hemispheres of your brain.
March 24th, 2006 at 4:00 pm
Steve, a couple of things to try. To see what is compiled into your php, create a file called phpinfo.php in the root of your site that has the following:
and view that page. That will show the details of your current php installation.
Also, see if you can look at you http error log and see if there are any messages in there.
March 24th, 2006 at 6:15 pm
Bill,
thanks for the php tip. what i know now is that dg is installed and enabled and the version is bundled (2.0.28 comaptible). support for freetype and gif read/create, jpg, png, wbmp and xmb are also enabled.
maybe sometime when you’re bored you can send me an email and i’ll send you some logins and passwords for ftp and wordpress. i can only think now that i must not be doing something simple properly.
April 4th, 2006 at 6:56 am
Hi, Thnks for this work. It is so helpfull! One quick question, is the replace feature works? When i edit a picture and click replace, it says that it is not implemented yet. Is there a way I can make it to work?
April 10th, 2006 at 12:50 am
I’m trying to add photo of the day to my blog. I put CplApi::getPhotoOfTheDay(); into the sidebar.php (using the standard wp theme) and it simply prints out CplApi::getPhotoOfTheDay();. It doesn’t actually give me the photo of the day. When I use your theme, it all works fine, so I know my posts are working and properly categorized. Do I have the syntax wrong?
Thanks so much!
April 10th, 2006 at 10:47 am
The replace feature is one of those things that has slipped through the cracks. I need to go back and fix that, but I’m not sure when I’ll get the chance.
Make sure that “CplApi::getPhotoOfTheDay()” is inside
<?phpand?>.May 7th, 2006 at 3:37 pm
Hi,
your photo-plugin just seems to have everything that i was hoping for! unfortunately i am getting the following message:
[code]
Warning: move_uploaded_file(): SAFE MODE Restriction in effect. The script whose uid is 1187 is not allowed to access /home/www/web65/html/wp-content/cplphotos/3 owned by uid 30 in /home/www/web65/html/wp-content/plugins/cpl/adm/cpladm.php on line 161
[/code]
is there a way to use your script with save-mode restrictions in place?
thanks in advance!
May 9th, 2006 at 8:00 am
I’ve never messed with SAFE MODE. I’ll take a look and see what I can find out about the error.
May 9th, 2006 at 2:45 pm
Bill:
Not sure what’s happening but I seem unable to upload pictures using the “load pictures from server” option. I am getting Fatal error: Maximum execution time of 30 seconds exceeded in /home/sites/xxxx/xxxx/wp-content/plugins/cpl/adm/cpladmloadstat.php on line 13
Any clues as to why this should now be happening, noting it used to work and I wasn’t aware I’d changed anything? To get around it, I’m having to use the individual file upload, which is very tedious :-(
May 17th, 2006 at 2:37 pm
I’m having an issue with uploading from a server as well. But I don’t get any message at all, and nothing happens. I’m using an absolute path. I read the note about add that line to the .htaccess file, but hrm, I can’t seem to locate that file! I’ve also tried only one image to upload from the server, and it still doesn’t work, so I don’t think it’s a timing out issue.
Thanks for your help. This is a great plugin:)
June 7th, 2006 at 11:04 pm
I am having the exact same issue. I was only able to upload a batch of pictures via ftp once. now, everytime i try to do it again, it loads the pictures, but it will not display them anywhere. i can see them in ftp that they have been uploaded, but they are never visible in the browser. can someone please help with this?
June 11th, 2006 at 1:18 am
ok, i have tried many many many things since i posted the last message without any sucess. admin, great plugin, but it doesnt work. to bad, it would have been a great addition to my site
June 11th, 2006 at 7:37 am
Ronnie, Debbie, & Chris,
Sorry for being very bad about replying. Things have been hectic recently and I haven’t been able to give the site the attention it needs. As far as the bulk adding of photos, for me this is a key feature and I’m not happy that it isn’t working for you guys. I’m bugged that there aren’t any error messages so let’s see what we can find out. Double check if there are any messages at all in your server log. Sometimes php will display errors in the log but not as popup. Second, find out what version of php and of wordpress you are running. What I’m looking for is what is different about your environment because this is working fine on my testbed and on my Site5 installation. I’m going to follow up with an email so that we can get into more detail.
June 27th, 2006 at 10:58 am
I cant get the photos to upload. When I add new photos the image shows up as a broken image. What could I be doing wrong?
October 19th, 2006 at 1:08 am
I’ve been using this and loving it for months now. All of a sudden, when I upload images, the thumbnail doesn’t get created correctly but if I click on the filename displayed where the thumb should be, the pic comes up. So it’s something wrong with the thumbnail creation I think. I didn’t change servers or hosts or anything that I can think of and before everything was fine.
Any ideas?
October 22nd, 2006 at 6:55 am
Valerie,
Check the permissions on the cplphoto directory. Make sure the user that the webserver is running as has read/write/execute permissions on that directory. If that doesn’t work get the phpinfo output for your server installation and post it here. Most ISPs have an admin screen that can reveal this.
November 3rd, 2006 at 2:08 pm
[...] It’s been a while since I’ve posted anything. There’s no need to go into details here except to say there has been alot going on. Anyway, with the pending release of Wordpress 2.1, I needed to make a change to the CPL plugin to get it to work with the new release. While I was in there, I added a little feature that allows for photos to be grouped inside a post instead of only large group. Check it out. [...]
November 4th, 2006 at 2:35 am
Hi. It was a permissions problem. Thanks!
Now I’m just looking for upgrade instructions–or should I just unpack and overwrite the old files?
Thanks.
December 9th, 2006 at 9:21 pm
[...] Still with me? Please hang in there a bit longer, as I’ve got a post-postscript regarding inline images within posts. Based on the feedback I received on my post last week (thank you!), I decided to try yet another image gallery solution. This time it’s Copperleaf Photo Log Plugin, and I used it for the pictures in this post. What did you think? Tell me how they worked for you, please. :) So far it seems to have everything I (and others) want, clickable images, the ability to insert a thumbnail or medium-sized photo, and a pop-up fullsize image with optional caption/description. Could this be the winner? (This doesn’t mean I have changed my mind about the other galleries I’ve tried. They all have their strengths and weaknesses… it’s really a matter of finding the one that fits your style and needs.) [...]
December 10th, 2006 at 8:05 am
Last night, I installed the plugin and it worked well. This morning, I had the “bright idea” that I wanted the pictures in a different folder, so I updated the settings. (And the permissions should be correct.) But the images no longer seem to auto-generate the needed copies. Just one image is created, the thumbnail. The original size image isn’t even retained. What happened, and how can I fix this? I’ve tried switching back to the original folder I was using, with no improvement. Thanks!
December 11th, 2006 at 10:14 am
Valerie,
Sorry about the delayed response. Yes, you can just unpack over top of the existing install.
Limedragon,
Unfortunately I didn’t design it with moving in mind. The path is actually stored in the database. If you need to change the directory after the fact, you will probably have to run some kind of query in phpMyAdmin or something to make the change.
I believe something like the following should do the trick. (test first :))
update wp_cpl set imagepath = replace(imagepath, "cplphotos", "photos");
where “cplphotos” is the old path and “photos” is the new path.
If you simply change the path and leave the old photos where they are, then new photos will end up in the new path and the old ones will still work.
Any suggestions that you have for improvements, etc., I’d love to hear them.
Bill
December 11th, 2006 at 6:46 pm
Hi Bill,
I’m sorry, it was very early in the morning when I commented, so I guess I wasn’t very clear. It’s true that I did switch the folder (where CPL is to store the images) in the settings. But I didn’t rename the folder/move things around. I’ve switched back to the original since then, and the 4 originally uploaded images still work. You can see them in this post.
What’s now happening is when I try to upload a photo, either from a Server Directory or individually, the various needed different sized images are not created; only the thumbnail, nothing else. I hope that is clearer.
And, after I left my first comment, I remembered (with the help of some caffeine) that I tried a bulk upload through the Server Directory option. This is when I first noticed the problem. Only 4 out of 28 images came through, and only thumbnails were created. The CPL list/table underneath my post told me there were 28 images, but only 4 were actually displaying.
I thought perhaps I had exceeded some kind of limit on my server, so I’ve also contacted my host about it (they’ll update my php.ini file).
Fingers crossed.
December 13th, 2006 at 6:57 am
Quick update, the php.ini was updated by my host, but it did not help. I have another image plugin I had been using with WordPress before trying this one, and it has also stopped working. I thought it might be something wrong with GD but ZenPhoto works, so I guess it’s not that.
I tried re-uploading the plugin files and emptying out the tables to see if that helped any. No luck. I’m not sure what’s going on. It worked fine on Saturday night, then Sunday morning, it didn’t.
When I upload an image, it generates the thumbnail and saves just that. It does not generate the medium sized images or retain the original. So I get empty boxes/red Xs when I try to use the crop feature or click on the thumbnail to view bigger.
December 13th, 2006 at 9:43 am
Hmm. Sometimes this means a permissions problem. Double check that the directories are being created with write permissions for the user that the web server is using.
Another thing to check. Are you using gd2 or image magick’s convert for generating images? Sometime last year someone had the same problem and it turned out to be that the “convert” option wasn’t blank. It needs to be blank to use the gd library, otherwise it needs to point to a valid convert executable.
December 13th, 2006 at 9:06 pm
Thanks for the reply… Aha! Something’s wonky with the permissions.
The numbered subfolders that CPL creates are not getting the correct permissions anymore. Instead of 644, they’re now 600, and the uploaded images inside these subfolders also are 600.
The four images/subfolders I originally uploaded all have 644 permissions and work correctly. Now, I see why the newer images I tried didn’t work.
Any idea why the folder permissions aren’t working, and how I might fix this? I can manually CHMOD the folders/files, but that doesn’t help when I upload them… they still get assigned 600 and then only the thumbnail is generated and I have to re-CHMOD.
Thanks so much!!
December 14th, 2006 at 9:47 am
Try checking the permissions and ownership of the parent directory for all the photos (cplphotos by default). In my case the owner is the same as the user of the webserver so I don’t need any group or world permissions. It might be that in moving stuff the owner changed.
December 14th, 2006 at 10:39 am
Hmm…. Everything looks OK so far. User/Owner and Group all are listed as my userID, so they match. Based on my first experience with CPL, the files were set to 644 and worked just fine, so that is the setting I need. It isn’t doing that automatically anymore, and I have no idea why or how to fix that.
I’m still in touch with my host and am asking them about this, too. Thanks!
December 14th, 2006 at 11:43 am
Another thing worth checking is your umask (or the umask for the webserver). CPL, when creating a directory, uses
mkdir($dir, 0777);December 14th, 2006 at 4:29 pm
I’ll need a little bit more help on this. Is this in one of the script files? Or something in my host settings? Thanks so much. :)
December 14th, 2006 at 4:43 pm
Telnet into your host (ssh or telnet) and enter
umaskat the command prompt. You should get something like 0022.
Also create a directory and see what permissions you get when you do it by hand.
December 15th, 2006 at 2:04 pm
Unfortunately I can’t ssh/telnet because I don’t have shell access. I contacted my host about having them do this for me and relaying the information.
They didn’t. Instead they told me to try using chmod in the php scripts (from http://ca.php.net/chmod). Is this already utilized? If not, how difficult would it be to implement? Which script should I look at? Thank you
December 16th, 2006 at 7:23 pm
Heya, Good news!
I figured out that if I upload the pictures to the Server Directory and chmod them to 744, they will work when I add them through the Server Directory option. (Yay!)
Funny thing… the pop-up gallery views also suddenly stopped working, but I was able to get them back by chmoding the files to 755. Oh well… whatever works, I guess.
So glad that’s over with and things seem to be sorted out. Thanks so much for your help. Terrific photos of your family, too. Happy Holidays!!
December 18th, 2006 at 4:02 pm
I’ve added a diagnostics test to the options page at the bottom. Click on the diagnostics button and the page will gather some system info and perform a simple test for creating photo directories and files and displays the results on screen. This can help in diagnosing problems.
Limedragon, If you are having to perform extra *manual* steps, I’d like to dig into it more. You shouldn’t have to be doing any of that. If you can, run the diagnostics and post the results. That may help.
Bill
December 18th, 2006 at 4:07 pm
[...] I’ve made another small tweak to the CPL plugin that adds a diagnostics tool to the bottom of options page. [...]
January 4th, 2007 at 6:13 am
Hiya Bill! I’ve just now updated the plugin, so far so good. I’ll copy-paste my diagnostics result below for you.
It’s really just one extra step… When I FTP a batch of pictures to be added, I just select them all and chmod them.
I’ve been using the plugin and rebuilding my album pages when I can (slowly). I love the fact that I can cross-post photos without uploading or copy-pasting links. Overall, I’m really happy with CPL. :)
There’s a problem I’ve come across… I want to categorize my album pages, and the group function comes in handy. However, whenever I rearrange photos, the saved group number disappears, and I have to edit each picture to put it back in. It becomes tedious after a while, because I’m often adding pictures.
Thanks!
Cpl Diagnostics
* PHP Version: 5.0.4
* CPL Version: 0.12
* CPL Schema: 7
* GD Version: bundled (2.0.28 compatible)
* Exif Version: 1.4 $Id: exif.c,v 1.162.2.8 2005/03/17 17:20:35 iliaa Exp $
* MySQL Version: 4.1.14-standard
* Convert Command: convert -version
* Convert Result:
* Photo Directory: /var/www/html/wp-content/gallery1
* Photo Directory Permissions: 0755
* Photo Directory Owner: root
* System Umask: 0022
* Create Directory: passed
* Created Directory Permissions: 0755
* Create File: passed
* Created File Permissions: 0644
January 10th, 2007 at 5:27 pm
I really like this plugin and have been using it one of my blog sites, how ever IM wondering if instead of using JS to pop up the photo that lightbox is used instead. Lightbox as prob we all know is pretty slick looking and would avoid the need to pop up that js box.. thoughts?
January 10th, 2007 at 6:26 pm
ok playing around with the plugin to add lightbox support i did a small tiny hack, this of course only works if you have lightbox set up in wordpress properly..
in cpltemplate.php
I changed line 69:
echo(" <a href='$url' rel="nofollow">\n");
to:
echo(" <a rel='lightbox' class='cplmatrixlink' title='$photo->description' onMouseOver=\"window.status='".$photo->description."'; return true;\">\n");
this adds the call to light box rel=’lightbox’ title tag which is used when viewing the picture in light box, currently I have it set to $photo->description and a mouse over text which is also $photo->description..
this currently works with my single image tests and just a quick look at the code part.
sorry about double post.
January 11th, 2007 at 9:54 am
Limedragon, Sorry it’s take so long to answer. Our family has been quite sick the past 2 weeks. I feel your pain and am looking a t some kind of solution but I’m not sure when that will be.
Steve, thanks for the words and for the addition. An additional comment. Things like cpltemplate.php can be added to your theme so you don’t have to worry about modifying your plugin. If the plugin sees those in your theme directory, it will use it from there instead. It’s explained in more detail in the readme and in the writeup above.
April 26th, 2007 at 12:57 pm
[...] made an update to the CPL plugin that will hopefully help with performance by querying images for all the posts on a page at one [...]
May 11th, 2007 at 2:09 am
I get these errors–any ideas?
Warning: getimagesize(/home/.../public_html/val/wp-content/cplphotos/48/i/de-75x50i.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /home/.../public_html/val/wp-content/plugins/cpl/cplview.php on line 179Warning: Cannot modify header information - headers already sent by (output started at /home/.../public_html/val/wp-content/plugins/cpl/cplview.php:179) in /home/.../public_html/val/wp-content/plugins/cpl/adm/cpladmadd.php on line 30
ERROR: Unable to redirect to cpladmedit.php
Then I tried a different photo in the same directory and saved at the same time and I got the “not a jpg” message. I tried a third photo from that same directory, created along with the others and it uploaded fine. I’m finding that if I fiddle around with the names of the images, then sometimes it’ll work…I’m really confused and about to have to abandon this after using it without trouble for a long time:( so I’m hoping maybe you can help.
Thanks
May 11th, 2007 at 7:27 am
Hi Valerie,
I’m sorry to hear that you are having problems. If you are running the latest version, go to the CPL options page. At the bottom is a diagnostics button that will do some basic interrogation of your system that may shed some light. Copy the output and post it here.
A couple of other things. Is the … (triple-dot) you posted above what is actually shown? That seems odd if it is.
Also, can you provide me with some of the filenames that have been causing you trouble to see if I can repeat it here?
Thx. We’ll figure this out.
Bill
May 11th, 2007 at 9:16 am
Thank-you so much. Here’s the output from the diagnostics. I put the dots in the path instead of my username. It is the latest version even though it says .10. I don’t know if this would be related, but I used the wordpress instantupgrade plugin to upgrade my wordpress installation and it had to have changed the server permissions which I can’t see. I don’t have access to the root.
Cpl Diagnostics
* PHP Version: 4.4.4
* CPL Version: 0.10
* CPL Schema: 7
* GD Version: bundled (2.0.28 compatible)
* Exif Version: 1.4 $Id: exif.c,v 1.118.2.37.2.4 2006/01/01 13:46:52 sniper Exp $
* MySQL Version: 4.1.21-standard
* Convert Command: convert -version
* Convert Result:
Version: ImageMagick 6.0.7 02/16/07 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2004 ImageMagick Studio LLC
* Photo Directory: /home/cazppwja/public_html/val/wp-content/cplphotos
* Photo Directory Permissions: 0777
* Photo Directory Owner: root
* System Umask: 0022
* Create Directory: passed
* Created Directory Permissions: 0755
* Create File: passed
* Created File Permissions: 0644
May 11th, 2007 at 9:29 am
Hmmm. Everything looks ok except the CPL Version. Could you try upgrading to 0.12 or 0.13?
Also, do have some example filenames that were messing up?
Bill
May 11th, 2007 at 3:57 pm
Hi. I downloaded 0.13 twice and it still says 0.10 when I install. I didn’t overwrite the old files, I deleted the whole cpl folder then unpacked the 0.13 folder so I don’t know why it still says the wrong version.
Here’s the error message for one file. Do you need more or the actual file?
den0.jpg is invalid. Only JPEGs are currently supported
May 14th, 2007 at 7:39 pm
Hi Valerie,
Something seems wrong with your setup. I’m not familiar with the instantupgrade plugin and I hope that hasn’t messed something up. When you expand the cpl zip, are you expanding it in the plugins directory? Due to some legacy stuff from *way* back there is the cpl.php file which must reside in the plugins directory above the cpl directory. Can you double check that you don’t have two cpl.php files: one in plugin and one in plugin/cpl? I think we need to figure out why it’s reporting 0.10. Also, is it also reporting 0.10 on the plugins page?
May 21st, 2007 at 12:13 am
Thanks for the response. I think it’s the instantupgrade plugin that did something. I set up a different wp installation on the same server using the same cpl zip and it showed 0.13 on the plugins page and worked on the same images that don’t work in my other blog. The server support person said I should download then reupload all the files in my blog, which will take some time since I’m on a dialup. So I’ll try that then get back to you. The cpl.php files are in the right places.
Also, for a new site install, I got an error when I went to the cpl admin page that I didn’t have permission to edit even though I was the only user and logged in as admin. I had to go to the users page and give myself admin privileges, then go back to the cpl admin and it came up.
June 22nd, 2007 at 12:29 am
[...] I scrolled down to the comments, and found a suggestion for Copperleaf. [...]
July 20th, 2007 at 6:14 am
Hello, thanxs for this great plugin. Unfortunatly I get the following message in the option section: You are not authorized to set CPL options. Do you know why?
July 20th, 2007 at 8:07 am
Hi Martin,
The reason for the the message is the user trying to change the options has to have a level greater than or equal to the value set for CPL (which defaults to 5). This is legacy from before rolls and capabilities were defined. Looking at the code, admin is 10, editor is 7, author is 2, contributor is 1, and subscriber is 0. If you login as an editor or admin, you should be able to change the options.
Bill
August 22nd, 2007 at 3:56 am
Dear Bill,
thx for the CPL Plugin. So far I got no installationproblems. But when it comes to creation of thumbnails the plugin creates thumbnails with correct aspect ratio. (Excuse my english :-)) But I want the plugin to doit like on your homepage (making a 90×90 thumbnail from a 190×120 picture).
August 22nd, 2007 at 4:42 am
me again ;-)
an example: I copied a picture with these original sizes: 750×471
CPL is doin his job an creates pictures and thumbnails:
703208ges1-75×50i.jpg with size: 75×47
703208ges1-90×90i.jpg with size: 89×56
I used convert an gd libary on a ubuntu Linux Distribution.
Bjoern
August 22nd, 2007 at 7:37 am
Hi Bjoern,
Take a look at the file cpltemplate.php. If you created one for your theme, it would be in your theme directory, otherwise look at the default one in the plugins/cpl directory.
In that file there should be a define called CPL_THUMBNAIL_INNERCROP. It’s not the best term for describing what it does, but when set to true, it forces the image to be cropped to the exact dimensions. If false, it simply scales the image down.
If it all appears correct and you are still having a problem, go to the CPL options page and click the diagnostics button at the bottom and post the results here.
Bill
August 23rd, 2007 at 6:44 am
Dear Bill,
thanks for your quick answer.
Ive installed all new (wp 2.2.2 and cpl 1.3) No changes on my problem. Default theme.
CPL_THUMBNAIL_INNERCROP is set true. Testest false (nothing changes)
As you can see on this screenshot something went wrong with the image dimensions.
http://www.grafixs.de/pics/thumbcreation.jpg
Cpl Diagnostics
PHP Version: 5.1.2
CPL Version: 0.13
CPL Schema: 7
GD Version: 2.0 or higher
Exif Version: 1.4 $Id: exif.c,v 1.173.2.4 2006/01/01 12:50:06 sniper Exp $
MySQL Version: 5.0.22-Debian_0ubuntu6.06.3-log
Convert Command: convert -version
Convert Result:
Version: ImageMagick 6.2.4 07/09/07 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2005 ImageMagick Studio LLC
August 23rd, 2007 at 6:48 am
now using only gd libary its working…thx
Bjoern
August 26th, 2007 at 7:06 pm
Just thought I’d point out that the installation instructions on this page still point to cpl0.11.zip.
August 26th, 2007 at 7:59 pm
Thx Josh. Fixed.
September 26th, 2007 at 2:45 am
Updated to WP 2.3.
The Photo_of_the_day issnt working, maybe more isnt:
WordPress database error: [Table 'mydb.wp_categories' doesn't exist]
SELECT DISTINCT cp.postid, cp.id FROM wp_posts AS p, wp_cpl_post AS cp, wp_categories AS c, wp_post2cat AS pc WHERE p.ID = cp.postid AND p.ID = pc.post_id AND c.cat_ID = pc.category_id AND (c.category_nicename = ‘Bilder’ OR c.cat_name = ‘Bilder’) AND p.post_status = ‘publish’ AND p.post_password = ” ORDER BY p.post_date ASC, cp.imageorder ASC LIMIT 0, 1;
September 26th, 2007 at 7:58 am
Yeah. I noticed it too when I upgraded to 2.3. It’s due to the taxonomy changes in 2.3. I should have it fixed today.
September 26th, 2007 at 9:23 am
[...] Copperleaf Photolog Plugin has been updated to support Wordpress 2.3 and I also added a button so you can bulk edit photos [...]
September 26th, 2007 at 9:45 am
Greetings from Germany and thanks for the quick update.
October 20th, 2007 at 6:52 am
Hi there
Your plugin is what I was looking for. Unfortunately, as soon as I activate the plugin, the font size on my whole blog is somehow messed up. It’s actually much larger. When I deactivate the plugin, everything is fine again.
Any idea?
I use WP 2.1 with K2 Beta Theme.
Thanks a lot
Patrick
October 23rd, 2007 at 7:01 pm
Hi Patrick. I suspect it has to do with the default cpltemplate.css file that comes with the plugin. It can be overridden by making a copy and putting it in your theme directory. Then you can modify the css as much as you want. That is what I did to incorporate the plugin with this theme.
I’ll take a look and see if there is something in the default that conflicts with the style tags used by other themes.
January 4th, 2008 at 7:47 pm
Hi,
This plugin doesnt work with Wordpress 2.3
http://wordpress.org/support/topic/150293
January 5th, 2008 at 2:42 pm
I’ve upgraded Wordpress to 2.3.2 and I have a problem with the plugin that shows this message:
Forbidden
You don’t have permission to access /educadores21/wp-content/plugins/cpl/adm/cpladmlist.php on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.7a mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at victorcuevas.es Port 80
Can you help me?
Thanks a lot!
January 6th, 2008 at 8:55 pm
Hi Victor and Francisco,
With the holidays, I wasn’t aware of the 2.3.2 release. I’m using the plugin with 2.3.1. I’ll upgrade to 2.3.2 and see what is going on.
Bill
January 7th, 2008 at 8:27 am
Hi Victor and Francisco,
I’ve upgraded to 2.3.2 both on my test bed and on my host provider and it’s working fine. Of course I still want to figure out what is going on so we can get you guys back on track. For starters, at the bottom of the CPL options page, is a diagnostics button. Can you click that and post the results? Are you seeing problems with any other plugins? Both you are seeing a similar problem.
Bill
January 15th, 2008 at 8:11 am
Victor and Francisco,
The more I look at this, the more I believe it’s a server problem. The fact that it’s telling you that you don’t have permissions to read the file is really outside of my control. Check to make sure that the account that the web server is running as has read permissions in all the cpl directories.
Bill
February 8th, 2008 at 6:06 pm
I can’t seem to get the Photo of the Day feature to act properly. When I make a new post in WordPress with the category as “Photo of the Day” and Publish it, the most current post in that category is not showing up as the Photo of the Day on the main page. It is still referencing the FIRST post, not the NEWEST post.
Also, I was wondering if there was a way to modify the table on the main page so that instead of the Caption/Post Title residing to the RIGHT of the thumbnail, that it could go BELOW it.
Thank you in advance!
Site: http://www.kapachino.info
April 9th, 2008 at 9:44 am
Hi Bill,
New Release of Wordpress 2.5, and i went into trouble.
When I keep cpl 1.5 aktivated no problems occur.
When I deactivate the plugin and start try to activate again I only get:
“…Das Plugin konnte nicht aktiviert werden, da es einen fatalen Fehler verursacht hat…”
“…Plugin could not be activated because it triggered a fatal error…”
No further text in the box. Soneone got the same problems !?
April 9th, 2008 at 9:59 am
David,
Sorry it’s taken so long to reply. I haven’t had much time to mess with any of this. Which version of Wordpress are you running as well as which version of CPL?
Bjoern,
I haven’t downloaded 2.5 yet. I suspect that it has something to do with either a schema or api change. It would be nice if WP gave more info as to *why* it felt it was a fatal error. I’ll take a look.
Bill
April 9th, 2008 at 12:43 pm
Hi Bill,
that would be nice, because Ive used cpl plugin since first offical release. Sry, there is no more Information on “why” the plugin triggered a fatal error…nothing found in apache logs or system logs.
April 11th, 2008 at 12:28 pm
[...] Copperleaf Photolog Plugin has been updated to fix a fatal error when used with Wordpress [...]
April 14th, 2008 at 10:04 am
thx a lot
April 15th, 2008 at 8:23 pm
Hello,
I’d love to try this plugin, but I’m having the same font resize issue as Patrick. I’ve had a look at the cpltemplate.css file but can’t fix the problem…any updates on this issue? Or even a pointer on what I should look for.
Thanks!
May 5th, 2008 at 11:13 am
Hi, I’m trying out your plugin, and it looks great, but I was wondering if there’s any way to just link to the photo itself. I don’t want to have the exif and smaller image. Thanks!
May 29th, 2008 at 1:45 pm
[...] again, I’ve got this thing called Copperleaf Photo Plugin to go with my Copperleaf theme. And maybe I can start using this to display my images. Let’s [...]
May 29th, 2008 at 6:59 pm
Hi, I’m very excited to use CPL!!! I just installed it today w/WordPress v 2.5.1. I can upload images individually. I cannot seem to upload in batches from the server. It just says Processed 0 of 0 and progress shows “done” at the bottom of the browser window If the solution to my problem is already here on this comments page (I didn’t find it), please direct me to it, if possible.
I know you’re very busy (I’m the mom of 2 kids under 4 years old) so when you have a moment, I’d be much obliged. Thanks! And apologies in advance for wasting your time if I am a dummy and missed something really obvious!
Here are my diagnostic details:
Cpl Diagnostics
* PHP Version: 4.4.8
* CPL Version: 0.16
* CPL Schema: 7
* GD Version: bundled (2.0.28 compatible)
* Exif Version: 1.4 $Id: exif.c,v 1.118.2.37.2.8 2007/12/31 07:22:46 sebastian Exp $
* MySQL Version: 5.0.45-community-log
* Convert Command: convert -version
* Convert Result:
Version: ImageMagick 6.0.7 04/19/08 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2004 ImageMagick Studio LLC
* Photo Directory: /home/sevenbor/public_html/wordpress/wp-content/cplphotos
* Photo Directory Permissions: 0777
* Photo Directory Owner: root
* System Umask: 0022
* Create Directory: passed
* Created Directory Permissions: 0755
* Create File: passed
* Created File Permissions: 0644
May 29th, 2008 at 7:51 pm
I’m sorry that I’ve been bad about posting and answering everyones comments.
Pete. I’ve witnessed this too. It’s a bug in the default css. Unfortunately I haven’t chased it down because I ended up creating my own cpltemplate.js, cpltemplate.php, cpltemplate.css and cplphoto.php that matched my theme and I haven’t had a problem since.
Erika, you could create your own cplphoto.php that only displays the image. That would probably be the easiest way.
Morcar, it sounds like it’s not finding your source directory. If you can ssh into your server and do a pwd in the directory that you upload photos, that should be the path that you enter in the dialog.
Again, sorry for the long delays. I hope to get back on track soon.
Let me know how it goes.
Bill
May 29th, 2008 at 8:29 pm
Oh my gosh, Bill, I’m a total dork! ***Absolute path***, Morcar, ***absolute path***. Sorry for wasting your time, but honestly, your response DID make me think harder and consequently I have found my solution. Thank you so much. Again, I’m totally looking forward to playing around with CPL; I think it’s what I have been looking for.
Best,
Morcar
November 16th, 2008 at 1:15 pm
Hi,I just installed a fresh copy of 2.6.3 and your latest version. I get the error message “You are not authorized to set CPL options.”
I am logged in as admin.
November 16th, 2008 at 11:50 pm
I created a new admin and it worked, but when I add a post, save it, upload a photo and hit add to post it doesn’t add the picture to the post. You might want to look into this.
December 5th, 2008 at 3:56 pm
I’m trying to use the photo of the day feature in the side bar. I added this code CplApi::photoOfTheDay() to the theme page sidebar where I want the photo of the day displayed, but its not working. When I go to the home page I’m see the code(above) in the space where the photo should be displayed. What is the problem?
December 5th, 2008 at 4:22 pm
Sam,
You probably need to need to make sure the function call is inside the php scope with <?php and ?>.
Bill
December 5th, 2008 at 4:50 pm
Thank you. This worked fine. Image is displaying but it is a thumbnail I would like the image to display bigger. Where do I set the size?
December 6th, 2008 at 2:33 pm
How can I change the size of my “photo of the Day” in my side bar from 90×90 to a bigger size like 300×250. Also can I remove the photo of the Day link from the right side of the photo to the bottom?
December 6th, 2008 at 9:16 pm
Unfortunately, there isn’t a configurable way to do it, that would be a nice feature. What you can do is modify the file cplpod.php and go to line 352 in the photoOfTheDay method and modify the getImage call from (90, 90, true) to whatever you would like it to be.
December 7th, 2008 at 11:08 am
Thanks the getImage call change worked link a charm. Still trying the figure out the other part, removing the link at the right of the image in the side bar. Would appreciate some advice.
December 17th, 2008 at 7:34 pm
Hello Still haven’t gotten the “photo of the day” link to the right of the photo in the side bar removed. Can you advise how to remove this link, it is hyperlinked to the website home page.
December 17th, 2008 at 8:16 pm
Sam,
Sorry I haven’t replied sooner. The holidays have kept me swamped. Do you have a URL where I can see the problem? Also check that your Photo of the Day category is valid.
Bill
December 18th, 2008 at 9:38 am
here is the url: http://www.ajsxm.net/new
it is under photo of the day in the side bar…to the right of the photo there is a photo of the day hyperlink.
December 18th, 2008 at 9:54 am
Sam,
Unfortunately, I’m not seeing it. In the main column, I’m seeing the Welcome text with a photo and in the column on the right, I’m seeing a Featured Video with sections eNewsletter & Homework, Pages, and Related sites.
Bill
December 18th, 2008 at 3:39 pm
just below enewsletter in the side bar the is the photo of the day. The hyperlink I’m referring to is to the right of the “photo of the day” in blue…please check again.
December 18th, 2008 at 4:24 pm
Sam,
A couple of things.
First, the reason I wasn’t seeing it was that it doesn’t show up in Firefox (at least on my PC). It *does* show up in IE.
Second, looking at the src of your page, the href is being left blank. This is filled by the following call:
$link = get_permalink($pod->photo->postId);
For some reason on your installation, the call to get_permalink is not returning anything.
Third, as to the text being to the right of the image instead of below, I suspect that is a CSS issue with your href or image tags or the adsense class.
Bill
March 27th, 2009 at 12:18 am
In my one website i have same problem: “Unable to create directory /home/username/public_html/wp-content/uploads/2009/01. Is its parent directory writable by the server?”
These type of error you can solve by below steps as per my experience
- First pass 777 permission to WP-content & also too upload folder and its sub folder
- Then moves to your admin section where you can find setting option, in this section check “Miscellaneous’ for uploading path ( This is the main problem please check it again)
- After this please create folder which are mention in your error. as per above mention error i have to create “2009? and also a subfolder with name “01?
- Now try to upload image…
Best Luck!!
December 10th, 2009 at 5:10 am
I really loved this plugin! I customized it for my own needs, but now, it doesn’t work anymore :(
I tested it on multiple servers because i thought it was a GD library or imagemagic problem..
The problem is, it uploads great, but it does not create the thumbnail (in the folder ‘i’).. Is there somebody who likes to help or has the same problem? Running Wordpress 2.8