are you going to post your hacks for things that are "done"/"fixed"?
sure, here are a few:
1) They want personalized urls for their albums (done!)
OK this one has a long thread on the coppermine 1.0 board. First, you will have to make an .htaccess file:
RewriteEngine On
RewriteRule ^([a-z0-9&=]+)$ index.php?username=$1
Second, make an ALBUM.PHP:
<?php
require('include/init.inc.php')
if (isset($HTTP_GET_;VARS['username'])) {
$username = $HTTP_GET_VARS['username'];
$results = mysql_query("SELECT user_id FROM cpg11d_users WHERE user_name = '$username'");
list($row) = mysql_fetch_row($results);
if (!$row) {
$row = -10000;
}
$idnum=$row+10000;
$catid = $idnum;
$cat = $catid;
$HTTP_GET_VARS['cat'] = $cat;
}
?>
Lastly, in INDEX.PHP, replace
require('include/init.inc.php');
with
require('album.php');
Your user's albums will be accessible with the url:
http://yourdomain.com/path/to/coppermine/usernameIf you own your domain, you can give them a really short url, such as
http://www.album.com/username(note, no trailing slash)
2) They want to go directly to their own albums when they log in (done!)
Actually, there's an entry on this in the FAQ.
edit login.php and search for
pageheader($lang_login_php['login'],"<META http-equiv=\"refresh\" content=\"3;url=$referer\">");
and add before it
$referer = 'index.php?cat='.(FIRST_USER_CAT+$USER_DATA['user_id']);
9) The album creation process is confusing at first (fixed)
I moved the Create and Delete buttons above the album list, made the album list shorter (so that the "apply changes" button would be visible without scrolling), and added the words "New Name" next to the input box.
I forgot what file this was in but i suppose it should be albmgr.php.
11) Chinese filenames won't show up (fixed)
In db_input.inc.php, search for
$picture_name = $matches[1] . '.' . $matches[2];
and replace it with
$picture_name = time() . '.' . $matches[2];
I think xp_publish.php also has to be modified if you wish to change the filenames when using web publishing wizard.
This will change the filename into the unix timecode for the time of the upload. If there is more than one upload per second, it will add a ~1 to the filename. This will also mean that the order of the pictures will be according to the upload order, since the newest uploads will always have filenames with numbers bigger than older ones.
1) The photo info shows the album, but not the user. (fixed)
There is also an entry in the FAQ which I just found now.
Edit displayimage.php and search for:
$info[$lang_picinfo['Filename']] = htmlspecialchars($CURRENT_PIC_DATA['filename']);
add after it:
$info[$lang_picinfo['Username']] = htmlspecialchars($CURRENT_PIC_DATA['user_name']);.
Then open /include/functions.inc.php and search for following in function
get_pic_data():
if($select_columns != '*') $select_columns .= ', title, caption';
and replace it with:
if($select_columns != '*') $select_columns .= ', title, caption, user_name';
After that search for:
$result = db_query("SELECT $select_columns from {$CONFIG['TABLE_PICTURES']} WHERE aid='$album' $approved $ALBUM_SET ORDER BY $sort_order $limit");
and replace it with:
$result = db_query("SELECT $select_columns from {$CONFIG['TABLE_PICTURES']} AS p LEFT JOIN {$CONFIG['TABLE_USERS']} AS u ON u.user_id = p.owner_id WHERE p.aid='$album' $approved $ALBUM_SET ORDER BY $sort_order $limit");
Then you have to add the language string for the username. Open /lang/yourlang.php and search for:
$lang_picinfo = array(
and add after that:
'Username' => 'Username in your language',
Also you need to execute this query in MySQL (with a tool like phpMyAdmin):
ALTER TABLE `cpg11d_pictures` ADD INDEX ( `owner_id` );
(If your table_prefix is not cpg11d_ then you need to change it in the query)
You might want to note that if you applied the user album url mod, you can have the username link to the user's album. All you have to do is:
In the first step, instead of adding
$info[$lang_picinfo['Username']] = htmlspecialchars($CURRENT_PIC_DATA['user_name']);.
add
<span class="alblink"><a href="' . $CURRENT_PIC_DATA['user_name'] . '">' . $CURRENT_PIC_DATA['user_name'].'</a></span>';
THIS IS ONLY IF YOU HAVE DONE THE SHORT ALBUM URL MOD!
As for the rest, I hope some people can give some contributions! Thanks