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

No translation available

# 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

- I don't want to show the last uploads and/or random pictures on the start page. How do I edit what's shown on the start page of coppermine?
- How do I create an album that anyone can add photos to?
- How can I backup my coppermine database?
- The fullsize-pic doesn't pop up when clicking on the intermediate size pic. What's wrong?
- How can I prevent other sites linking directly to the pictures in my gallery instead of the gallery page?
- How do I let guests, not only registered users to put comments on pictures?
- I can't upload big pics. What's wrong?
- I can't login to Coppermine. What's wrong?
- How can I change the sorting order of the albums?
- I don't use the intermediate pictures anymore. How can I delete them to gain disk space?
- How do albums and folders work in coppermine?
- How can I move albums from one category to another?
- How do I move a gallery?
- How do I show the same file in multiple albums?

- Add-ons / Modifications / Hacks

- How can I send a user directly to his private album once he logs in?
- How do I enable clickable links in custom user fields?
- How can I add some output directly before the line "Powered by Coppermine"?
- Common PHP errors (and how to get rid of them...)
- Can I rename template.html to template.php to include PHP code in my template?
- How can I prevent users from saving (stealing) my pictures?

- Coppermine Support board

- I don't know PHP/mySQL...
- I've posted my question a while ago, but nobody answers. What the...?
- How should I write my question?
- 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?
- May I email/pm/im you for support?
- Who are you anyway?

### How can I backup my coppermine database?

Currently, there are no built-in backup solutions for coppermine available, yet. To backup your directory/file structure, you must use the good old ftp method and a tool like phpMyAdmin to backup your database (Many webhosts that offer mySQL also offer a pre-installed version of phpMyAdmin - if so, use that!). PhpMyAdmin is easy to install: just download the distribution, unzip it to your harddrive, edit one config file and upload it to your server. (NOTE: Some webhosts offer backup services. You should check if this service is available to you, first.)
Here's a quick "how to backup a database with phpMyAdmin" primer:

- Download the software if it's not available to you, install it (remember to password-protect it).
- Point your browser to the location you installed it on.
- Select the database you want to back up from the dropdown list in the left frame.
- In "View dump (schema) of database" select the table(s) you want to back up (press CTRL to select more than one table).
- Mark "Structure and data"
- Check "Save as file"
- Check "zipped"
- DON'T check "Add 'drop table'" - your database will be erased, if you do.
- Press "go"
- Save the file on your harddisk (depending on the speed of your connection this could take a while).

### 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?

- log in as admin
- admin controls enabled
- groups
- "Anonymous" - "Can post comments" - "yes"
- Apply modifications

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

- Log in as admin
- Confirm that you have admin controls enabled
- In Category view, click on the album of choice
- Select "Properties"
- Set"Permissions for this album" - "Visitors can post comments" - "Yes"
- "Update album"

### I can't upload big pics or files. What's wrong?

The max. size of uploadable pics and/or files is limited by various settings - to find out why you can't upload big picks, check the following:

- Make sure you have enough webspace left (remember that you need space for the full size pic, the intermediate size pic and the thumbnail!)
- When logged in as admin check your "Group" settings: the groups (even the admin group!) have quota limits that can be configured there
- Browser time-out: the commonly-used Internet Explorer has a time-out function: if your upload isn't finished within a certain period, the browser will time-out (this applies especially to dial-up connections)
- There'are a maximum limits set in the PHP config of your server or webhosting server. If you're with a webhost there's very little you can do about it except ask them if they could help you out. If you're running your own server, check php.ini and look for `LimitRequestBody` - this value (in bytes) in the max upload allowed by php/html

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

This is most likely a cookie issue:

- If you're running Internet Explorer 6, you'll have to enable the acceptance of cookies. Click on "Tools" - "Internet Options" - "Privacy" and add your site to the list of sites that are trusted, or set the slider to a lower level.
- Sometimes IE will not handle Cookies properly. Close your browser, try deleting all local cookies manually and start your browser again
- Check if you're running a software that interferes with acceptance of cookies like personal firewalls (ZoneAlarm, Tiny, Cookie Washer etc.) and turn them off to see if cookies are accepted then
- Try using another browser (like Opera, which is rather small to download and can be removed easily). It's a generally a good idea to have some different browsers on your local machine to check if your site is displayed correctly not only in your favourite browser
- If you're using subdomains and the dev version of coppermine or some mod on a different subdomain (like gallery.yoursite.com and board.yoursite.com) this could also cause problems: a subdomain is a different domain (in fact foo.com and bar.com are subdomains of the tld ".com", so regarding cookies they are as different domains as bbs.yoursite.com and comics.yoursite.com). Of course you can "hack some sense" into the scripts, but usually bbs are hard to trick to make them more hack-proof.

### 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:

- Log in as admin;
- select "Albums" from the admin menu strip;
- choose the category whose albums you want to sort from the dropdown list;
- highlight an album by clicking on it once;
- then use the up and down buttons to change the position.
- Click "apply modifications".
- Confirm the message "Are you sure you want to make these modifications ?" with "OK"

### 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, search the mods and hacks board in the coppermine forum to learn how.

### How can I move my gallery to another host?

- Backup your files: FTP-download your complete coppermine-folder to your hard drive
- use a tool like phpMyAdmin to get a dump (backup) of your mySQL database entries.
- verify your backup is working: check if the mySQL-dump contains all data (open the zipped dump file and use a text editor to view it)
- on the new server: FTP-upload your coppermine-folder to the new server
- CHMOD the folder /albums to 755 or 777 (depending on your server config]
- restore the mySQL table by running the queries of the dump files you created in step 2
- test-drive your coppermine gallery - you should be done

[top of page]

### 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:

- Add a watermark to your images before you upload them
- Apply the built-in watermark. Please note that applying online-watermarks will result in a high server load.
- Prevent Internet Explorer to show the image toolbar when a user hovers over a pic with the mouse. Edit themes/yourtheme/template.html, find `<meta http-equiv="Pragma" content="no-cache" />` and add after it `<meta http-equiv="imagetoolbar" content="no" />`
- Use one of the many "no right-click" scripts that are available. Be adviced though that those scripts are silly in the first place, as they will only keep unexperienced users away from stealing your pics. The dev team doesn't recommend applying no-right-click scripts.

[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:

- make sure you have given us enough time to react (days, not hours!)
- maybe nobody knows the answer to your problem
- maybe your question has been asked very often
- maybe your posting has been rude or impolite and you're ignored for that reason
- maybe you requested a feature that requires a lot of coding, and none of those who are able to do it have a need for the feature

### How should I write my question?

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

- a link to your gallery, with a test account ID and test account password, is most often the only way to help - provide it with your question, or even better: edit your profile on the support board and enter the url of your page there!
- when addressing server issues, make sure to provide information on your server (OS, server, PHP version, mySQL version, gd lib version, safe mode on/off?). Most information can be retrieved by phpinfo()
- if it's a client issue, give us information at least to your client's OS and browser
- Give us a screenshot, if necessary
- use a proper subject line: state in the subject line what your question is actually about! Most supporters are reluctant to answer to a posting that has a silly subject line like "I have a question" or "Install problem" or "feature request" or "help me pleeeeaaaase"

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

- read the readme that comes with the coppermine distribution
- read the documentation
- read this FAQ
- Search the support board
- enable debug mode (log in as admin, config, debug mode)
- choose the right support board: if you're running the phpnuke-port of coppermine, don't post in the support board for the standalone version and vice versa

### 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!