Тыксь, немного подумав придумал решение как прикрутить его на 2.0.17
Открываем файл
usercp_viewprofile.php, ищем в нем:
// [begin] CPG User Gallery Link at phpBB profile mod
/* Configuration section */
$cpg_db_host = 'localhost'; // Gallery database host
$cpg_db_name = 'coppermine'; // Gallery database name
$cpg_db_user = 'root'; // Gallery database user
$cpg_db_pass = ''; // Gallery database password
$cpg_table_prefix = 'cpg132_'; // Gallery table prefix
$cpg_path = './../gallery/'; // Gallety path, absolute or relative to phpBB root dir
/* End of configuration section */
// 10000 was taken from CPG (that's FIRST_USER_CAT constant at include/init.inc.php)
$cpg_cat_id = ( intval($profiledata['user_id']) + 10000 );
//
// Database connection
//
$cpg_link = @mysql_connect($cpg_db_host, $cpg_db_user, $cpg_db_pass) or message_die(GENERAL_ERROR, 'Could not connect to Coppermine Photo Gallery database', '', __LINE__, __FILE__);
@mysql_select_db($cpg_db_name) or message_die(GENERAL_ERROR, 'Could not select Coppermine Photo Gallery database', '', __LINE__, __FILE__);
$sql = "SELECT * FROM " . $cpg_table_prefix . "albums WHERE category = $cpg_cat_id";
$res = @mysql_query($sql) or message_die(GENERAL_ERROR, 'Could not get albums info from Coppermine Photo Gallery database', '', __LINE__, __FILE__, $sql);
//
// Is there at least one album for the user?
//
if ( @mysql_num_rows($res) == 0 )
{
$cpg_ug = $lang['CPG_no_ug'];
}
else
{
$cpg_ug = '<a href="' . $cpg_path . 'index.php?cat=' . $cpg_cat_id . '">' . $lang['CPG_goto_ug'] . '</a>';
}
Изменяем на:
// [begin] CPG User Gallery Link at phpBB profile mod
/* Configuration section */
$cpg_db_host = 'localhost'; // Gallery database host
$cpg_db_name = 'coppermine'; // Gallery database name
$cpg_db_user = 'root'; // Gallery database user
$cpg_db_pass = ''; // Gallery database password
$cpg_table_prefix = 'phpbb_'; // Gallery table prefix
// $cpg_path = './../album_personal.php'; // Gallety path, absolute or relative to phpBB root dir
/* End of configuration section */
// 10000 was taken from CPG (that's FIRST_USER_CAT constant at include/init.inc.php)
$cpg_cat_id = ($profiledata['user_id']);
//
// Database connection
//
$cpg_link = @mysql_connect($cpg_db_host, $cpg_db_user, $cpg_db_pass) or message_die(GENERAL_ERROR, 'Could not connect to Coppermine Photo Gallery database', '', __LINE__, __FILE__);
@mysql_select_db($cpg_db_name) or message_die(GENERAL_ERROR, 'Could not select Coppermine Photo Gallery database', '', __LINE__, __FILE__);
$sql = "SELECT * FROM " . $cpg_table_prefix . "album WHERE pic_user_id = $cpg_cat_id";
$res = @mysql_query($sql) or message_die(GENERAL_ERROR, 'Could not get albums info from Coppermine Photo Gallery database', '', __LINE__, __FILE__, $sql);
//
// Is there at least one album for the user?
//
if ( @mysql_num_rows($res) == 0 )
{
$cpg_ug = $lang['CPG_no_ug'];
}
else
{
$cpg_ug = '<a href="' . 'album_personal.php?user_id=' . $cpg_cat_id . '">' . $lang['CPG_goto_ug'] . '</a>';
}
Ошибка в том, что это приращение нафик не нужно, ну и немного по-другому генерируется линка
Хотелось бы узнать про мистический 5й файл. Это описка в кол-ве или?..
Добавлено спустя 23 минуты 13 секунд:
Чуть не забыл, эти изменения сделаны под фотоальбом Photo Album v2.0.53 for phpBB2 2
http://smartor.is-root.com