вот баннер
//
// BEGIN BANNER EXCHANGE
//
################################################################################
# Choose a random banner from the database
$sql = "SELECT * FROM phpbb2_banners ORDER BY RAND();";
(из за этого ошибка..)
# Run the above Query
$result = mysql_query($sql);
# End of querying
################################################################################
# Give the variables the data if the SQL query worked
if ($result){
$row = mysql_fetch_array($result);
$imglink = $row["banner_link"];
$imgwww = $row["banner_www"];
$imagedesc = $row["banner_description"];}
# If it failed give it some default values so it doesnt display a broken picture
else{
$imglink = ("
http://www.phpbb.com/images/mainlogo.gif");
$imgwww = ("
http://www.phpbb.com");
$imagedesc = ("phpBB Official Web Site");}
# End of variable setting
################################################################################
# Put all the data into one variable to be used by the board (make life easy ;-)
$banner = "<a title='".$imagedesc."' href='".$imgwww."' target='_blank'><img src='".$imglink."' border='0'></a>";
# End of variable setting!
################################################################################
//
// END BANNER EXCHANGE
//
--------------------------------------------------------------------------------
ссылка
// [begin] CPG User Gallery Link at phpBB profile mod
/* Configuration section */
$cpg_db_host = 'localhost'; // Gallery database host
$cpg_db_name = '---'; // Gallery database name
$cpg_db_user = '---'; // Gallery database user
$cpg_db_pass = '---'; // Gallery database password
$cpg_table_prefix = 'cpg_'; // Gallery table prefix
$cpg_path = '/photos/'; // 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>';
}
$template->assign_vars(array(
'L_CPG_UG' => $lang['CPG_ug'],
'CPG_UG' => $cpg_ug)
);
//
// Let's finish our dirty work
//
@mysql_free_result($res);
@mysql_close($cpg_link);
// [end] CPG User Gallery Link at phpBB profile mod