Coppermine Photo Gallery v1.5.x: Documentation and Manual

Table of Contents

Frequently Asked Questions (FAQ)

With thousands of users, it's not surprising that so many of the same questions are asked on the support forums for Coppermine Photo Gallery. So, to help facilitate your website development, we've included this basic FAQ file on common issues. Please be sure to refer to this FAQ first before posting questions on the forum. Failure to do so will, could, well ... , reflect unkindly on you and could result in some negative "karma."

This FAQ page is the second best resource to understand Coppermine - it's mandatory that you read the entire documentation first that comes with your Coppermine package before asking questions.

Table of contents:

Setup / Configuration

The fullsize-pic doesn't pop up when clicking on the intermediate size pic. What's wrong?

If you are certain that your original file is larger in dimensions than the settings you selected for intermediate sized pictures, there's a good chance that you over-edited your theme's template.html file: make sure that the line {JAVASCRIPT} inside /themes/yourtheme/template.html is still there to make the pop-up window work...
The <head>-part of your template file should look like this:

<head>
<title>{TITLE}</title>
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
{META}
<link rel="stylesheet" href="themes/your_theme_name/style.css" />
{JAVASCRIPT}
</head>
- If you're still unsure about this, just compare your theme's template.html with the default theme that comes with coppermine .


How can I prevent other sites from linking directly to the pictures in my gallery instead of the gallery page?

If your webhost supports the use of .htaccess files (you will need to ask them), you can prevent "hotlinking" by creating an .htaccess file in the albums folder.
Open your text editor and add the following lines, then save the file as .htaccess :

SetEnvIfNoCase Referer "^http://www.yourdomian.com/" locally_linked=1
SetEnvIfNoCase Referer "^http://yourdomain.com/" locally_linked=1
SetEnvIf Referer "^$" locally_linked=1
<FilesMatch "\.(gif|png|jpe?g)$">
  Order Allow,Deny
  Allow from env=locally_linked
</FilesMatch>
This will only work on linux/unix and apache servers AND only if you're allowed to use .htaccess files by your webhost or if you run your own server and "mod_rewrite" is enabled on your server .


How do I allow all guests, not just registered users, to add comments to pictures?

To change the settings on a per album basis, first, complete the above steps, then:


I can't login to Coppermine. What's wrong?

This is most likely a cookie issue:


How can I change the sorting order of the albums?

By default the albums appear in the order they were created. If you want to adjust the sorting order, do the following:


I don't use the intermediate pictures anymore. How can I delete them to gain disk space?

Why would you want to do that? Deleting the intermediate pics would disable many of the great features that make coppermine what is today. The option to send ecards, to add comments to pics, to rate pics, to display exif information, just to name a few. If you really want to save space, opt to delete your original files using the Admin Tools menu option. Doing this will allow your users to enjoy all of coppermine's features with the exception of viewing full-sized images. In the end, it will probably save you more space as well. Just be sure to set your intermediate sized picture settings in CONFIG to a size that you can live with.

If you really must remove the intermediate sized pics, take a look at the section "Allow full-size pop-ups with maximum space saving".


How do I show the same file in multiple albums?

The Album Keyword in Album Properties is used to link images from one album into another. Using this method, files/images can be displayed in various albums while the file itself need only exists in one album on your webserver. You simply upload a file to one album as you would normally do, then assign one or more keywords to the file. The keyword function reads blank spaces between words as a 'break' and assumes that these words are separate words. If you must use phrases for your keywords, connect them with an underscore or by using the ascii space holder ctrl+Alt+0160 (NOTE: the latter option only works with latin based character sets.) Each album can only have ONE (1) keyword or keyword phrase. All pictures residing in different albums that you would like to be displayed in this album must have the same keyword or keyword phrase in their respective keyword fields. Pictures, unlike albums, can have multiple keywords or keyword phrases separated by spaces. This provides you with the option to display pictures in many albums. For the visitor of these albums, it will appear as if the file/image had been uploaded to each.

If you use album keywords to display images/files in more than one album, enabling the Config option, Show number of linked files, will display additional information for the album stats. That is, if an album doesn't only contain "regular" files, but files linked via the "album keyword" option as well, the number of linked files will be displayed separately like this "3 files, last one added on Oct 07, 2004, 3 linked files, 6 files total".


[top of page]

Add-ons / Modifications / Hacks

How can I send a user directly to his private album once he logs in?

Edit
login.php
and change
$redirect = ($CPG_REFERER && (strpos($CPG_REFERER, 'login.php') === false)) ? $CPG_REFERER : 'index.php';
into
$redirect = 'index.php?cat='.(FIRST_USER_CAT+$USER_DATA['user_id']);


How do I enable clickable links in custom user fields?

Edit displayimage.php and change
$info[$CONFIG['user_field'.$i.'_name']] = make_clickable($CURRENT_PIC_DATA['user'.$i]);
into
$info[$CONFIG['user_field'.$i.'_name']] = bb_decode($CURRENT_PIC_DATA['user'.$i]);
 
This will allow you to use BBCodes in the custom fields: you can then have something like
[url]http://www.somesite.com/foo/bar.php?whatever=42[/url]
or
[url=http://www.somesite.com/foo/bar.php?whatever=42]link to some site![/url]
in your custom user fields (the display of which, of course, has to be enabled in the config page, begin with).


How can I add some output directly before the line "Powered by Coppermine"?

Edit /themes/yourtheme/theme.php, look for echo $template_footer and add the stuff you want to output in a line before it, like echo '<span class="footer"><a href="http://www.mylink.com/foo.htm">My Link</a></span>';

Alternatively, edit template.html or even edit the credits tag itself.


Can I rename template.html to template.php to include PHP code in my template?

No, this is simply not the way coppermine works; for "normal" pages the name of the extension tells the webserver whether the file should be parsed by the PHP interpreter. The template files within the themes folder are not being parsed this way - the extension .html was just chosen to make editing easier. You can not have PHP code in the template file, no matter how you name it - that's all there is to it!


How can I prevent users from saving (stealing) my pictures?

You can not completely prevent users from stealing your pics - that's the way the www works: if a picture is being displayed in the browser, the user already has a copy of it on his hard drive. There are however some methods to make it harder for newbie users to steal your pics:



[top of page]


 

Coppermine Support board

These are (alas) not-so-frequently-asked-questions on the support board. Before posting on the Support board (or, in fact, any board), please read this section:

I don't know PHP/mySQL...

No problem with that, everyone stars as a newbie. Just don't start each and every posting by stating "I'm a newbie", "I don't know anything about PHP" etc.
Usually, one can acertain that from your question itself. There's no need to apologize. Most of us can still remember when we were in your shoes.


I've posted my question a while ago, but nobody answers. What the...?

The support board is not a hotline. Although there are many visitors to the site, only a few do actually support - on a unpaid, voluntary basis. Yes, we don't receive remuneratio for our contributions and we each have a life, a job, family and more. We are away sometimes, as well. So, please, be patient, read the docs and search the boards while you are waiting.
If you don't get an answer to your question:


How should I write my question?

If you have a question, make sure you provide as much information as possible:


I've run into trouble. What should I do first (before posting on the board)?


Hey, by looking at your profile I can see you're German/French/Whatever. Can I post a question in that language?

If you are posting in the English support boards, please do not post in some other language - in this way, others may benefit from your question (and the answers you receive ), too. Don't be afraid to write "poor english" - no one will laugh at you, and most of our visitor's first language isn't english to begin with!

We have language-specific support boards for Chinese, French, German, Italian,Persian and Spanish.


May I email/pm/im you for support?

No you mustn't! Post your question on the Coppermine support board (publicly) - if we (the community) don't find a solution and and individual supporter has the time and the individual supporter wants to do so, the supporter willll email/pm/im you!


Who are you anyway?

We are a group of people who decided to form a team to develop Coppermine further - check the team page for details...



 

This FAQ is a work in progress, please contribute in the Coppermine Photo Gallery Support Board (don't contact dev team members or supporters to ask for fixes of your Coppermine install). Please report any bugs, typos etc.
Check the online-version of this document for updates!
Have fun!