Ok, I need to include a file (stats.php) so I can show stats of my visits, counter, etc. on my Coppermine Gallery, I've managed to do it, yeah, the stats.php file gets included.. but NOT where I want it to be!!!!... look:
www.cemete.ifobos.com/albumit appears AT THE VERY TOP, when it should be included on the left menu, where it says '{STATS}', like
here... so how to fix it??? here are the changes I did to the theme.php file:
function theme_main_menu()
{
global $AUTHORIZED, $CONFIG, $album, $actual_cat, $cat, $REFERER, $HTTP_SERVER_VARS;
global $lang_main_menu, $template_main_menu;
static $main_menu = '';
if ($main_menu != '') return $main_menu;
$album_l = isset($album) ? "?album=$album" : '';
$cat_l = (isset($actual_cat))? "?cat=$actual_cat" : (isset($cat) ? "?cat=$cat" : '');
$cat_l2 = isset($cat) ? "&cat=$cat" : '';
$my_gallery_id = FIRST_USER_CAT + USER_ID;
if (USER_ID) {
template_extract_block($template_main_menu, 'login');
} else {
template_extract_block($template_main_menu, 'logout');
template_extract_block($template_main_menu, 'my_profile');
}
if (GALLERY_ADMIN_MODE || USER_ADMIN_MODE) {
template_extract_block($template_main_menu, 'enter_admin_mode');
} elseif (USER_CAN_CREATE_ALBUMS || USER_IS_ADMIN) {
template_extract_block($template_main_menu, 'leave_admin_mode');
}
if (!USER_CAN_CREATE_ALBUMS && !USER_IS_ADMIN) {
template_extract_block($template_main_menu, 'enter_admin_mode');
template_extract_block($template_main_menu, 'leave_admin_mode');
}
if (!USER_CAN_CREATE_ALBUMS) {
template_extract_block($template_main_menu, 'my_gallery');
}
if (USER_CAN_CREATE_ALBUMS) {
template_extract_block($template_main_menu, 'my_profile');
}
if (!USER_CAN_UPLOAD_PICTURES) {
template_extract_block($template_main_menu, 'upload_pic');
}
if (USER_ID || !$CONFIG['allow_user_registration']) {
template_extract_block($template_main_menu, 'register');
}
if (!USER_ID || !$CONFIG['allow_memberlist']) {
template_extract_block($template_main_menu, 'allow_memberlist');
}
if (!$CONFIG['display_faq']) {
template_extract_block($template_main_menu, 'faq');
}
if(!$stats){
include('../stats.php');
}
$param = array('{ALB_LIST_TGT}' => "index.php$cat_l",
'{ALB_LIST_TITLE}' => $lang_main_menu['alb_list_title'],
'{ALB_LIST_LNK}' => $lang_main_menu['alb_list_lnk'],
'{MY_GAL_TGT}' => "index.php?cat=$my_gallery_id",
'{MY_GAL_TITLE}' => $lang_main_menu['my_gal_title'],
'{MY_GAL_LNK}' => $lang_main_menu['my_gal_lnk'],
'{MEMBERLIST_TGT}' => "usermgr.php",
'{MEMBERLIST_TITLE}' => $lang_main_menu['memberlist_title'],
'{MEMBERLIST_LNK}' => $lang_main_menu['memberlist_lnk'],
'{MY_PROF_TGT}' => "profile.php?op=edit_profile",
'{MY_PROF_LNK}' => $lang_main_menu['my_prof_lnk'],
'{FAQ_TGT}' => "faq.php",
'{FAQ_TITLE}' => $lang_main_menu['faq_title'],
'{FAQ_LNK}' => $lang_main_menu['faq_lnk'],
'{ADM_MODE_TGT}' => "admin.php?admin_mode=1&referer=$REFERER",
'{ADM_MODE_TITLE}' => $lang_main_menu['adm_mode_title'],
'{ADM_MODE_LNK}' => $lang_main_menu['adm_mode_lnk'],
'{USR_MODE_TGT}' => "admin.php?admin_mode=0&referer=$REFERER",
'{USR_MODE_TITLE}' => $lang_main_menu['usr_mode_title'],
'{USR_MODE_LNK}' => $lang_main_menu['usr_mode_lnk'],
'{UPL_PIC_TGT}' => "upload.php",
'{UPL_PIC_TITLE}' => $lang_main_menu['upload_pic_title'],
'{UPL_PIC_LNK}' => $lang_main_menu['upload_pic_lnk'],
'{REGISTER_TGT}' => "register.php",
'{STATS}' => $stats,
'{REGISTER_TITLE}' => $lang_main_menu['register_title'],
'{REGISTER_LNK}' => $lang_main_menu['register_lnk'],
'{LOGIN_TGT}' => "login.php?referer=$REFERER",
'{LOGIN_LNK}' => $lang_main_menu['login_lnk'],
'{LOGOUT_TGT}' => "logout.php?referer=$REFERER",
'{LOGOUT_LNK}' => $lang_main_menu['logout_lnk'] . " [" . USER_NAME . "]",
'{LASTUP_TGT}' => "thumbnails.php?album=lastup$cat_l2",
'{LASTUP_LNK}' => $lang_main_menu['lastup_lnk'],
'{LASTCOM_TGT}' => "thumbnails.php?album=lastcom$cat_l2",
'{LASTCOM_LNK}' => $lang_main_menu['lastcom_lnk'],
'{TOPN_TGT}' => "thumbnails.php?album=topn$cat_l2",
'{TOPN_LNK}' => $lang_main_menu['topn_lnk'],
'{TOPRATED_TGT}' => "thumbnails.php?album=toprated$cat_l2",
'{TOPRATED_LNK}' => $lang_main_menu['toprated_lnk'],
'{FAV_TGT}' => "thumbnails.php?album=favpics",
'{FAV_LNK}' => $lang_main_menu['fav_lnk'],
'{SEARCH_TGT}' => "search.php",
'{SEARCH_LNK}' => $lang_main_menu['search_lnk'],
);
I added the if stats bla bla bla part and then a '{STATS}' value.. still, no result.. plz help T_T.. (YES; I've searched, but I could just find headers faqs..... )