Template Error on multiple themes on new site - help please Template Error on multiple themes on new site - help please
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Template Error on multiple themes on new site - help please

Started by taratara, December 12, 2012, 05:16:27 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

taratara

Hello, can anyone please help me to resolve this problem?
I uploaded new theme made by my friend that previously used on my other sites. At first when I first installed coopermine on this site, everything works fine until a week ago, it keeps giving me this :

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fthumbnails108.imagebam.com%2F22465%2F56e890224649635.jpg&hash=4bcd4b694494af7eb8bea9ccc60d30862bb0609c)

I used myphpadmin to change theme to curve, and then go to config to change it back again to the new theme after I reuploaded the new theme. It worked fine again for like 2-3 days and then those template error showing again.

I tried to find the error on theme.php and from what I could find about my_profile are

Quoteaddbutton($sys_menu_buttons,'{MY_PROF_LNK}','{MY_PROF_TITLE}','{MY_PROF_TGT}','my_profile',$template_sys_menu_spacer);
    addbutton($sys_menu_buttons,'{ADM_MODE_LNK}','{ADM_MODE_TITLE}','{ADM_MODE_TGT}','enter_admin_mode',$template_sys_menu_spacer);
    addbutton($sys_menu_buttons,'{USR_MODE_LNK}','{USR_MODE_TITLE}','{USR_MODE_TGT}','leave_admin_mode',$template_sys_menu_spacer);
    addbutton($sys_menu_buttons,'{SIDEBAR_LNK}','{SIDEBAR_TITLE}','{SIDEBAR_TGT}','sidebar',$template_sys_menu_spacer);
    addbutton($sys_menu_buttons,'{UPL_PIC_LNK}','{UPL_PIC_TITLE}','{UPL_PIC_TGT}','upload_pic',$template_sys_menu_spacer);
    addbutton($sys_menu_buttons,'{REGISTER_LNK}','{REGISTER_TITLE}','{REGISTER_TGT}','register',$template_sys_menu_spacer);
    addbutton($sys_menu_buttons,'{LOGIN_LNK}','{LOGIN_TITLE}','{LOGIN_TGT}','login','');
    addbutton($sys_menu_buttons,'{LOGOUT_LNK}','{LOGOUT_TITLE}','{LOGOUT_TGT}','logout','');
    // Login and Logout don't have a spacer as only one is shown, and either would be the last option.

Quote} else { // visitor is not logged in
        if ($CONFIG['contact_form_guest_enable'] == 0) {
          template_extract_block($template_sys_menu, 'contact');
        }
        if ($CONFIG['display_sidebar_guest'] != 2) {
          template_extract_block($template_sys_menu, 'sidebar');
        }
        template_extract_block($template_sys_menu, 'logout');
        template_extract_block($template_sys_menu, 'my_profile');
       
        $timestamp = $form_token = '';
    }

Quote}

    if (USER_CAN_CREATE_ALBUMS) {
        template_extract_block($template_sys_menu, 'my_profile');

Quote$param = array(
        '{HOME_TGT}' => $CONFIG['home_target'],
        '{HOME_ICO}' => cpg_fetch_icon('home', 1),
        '{HOME_TITLE}' => $lang_main_menu['home_title'],
        '{HOME_LNK}' => $lang_main_menu['home_lnk'],
        '{CONTACT_TGT}' => "contact.php",
        '{CONTACT_ICO}' => cpg_fetch_icon('contact', 1),
        '{CONTACT_TITLE}' => sprintf($lang_main_menu['contact_title'], $CONFIG['gallery_name']),
        '{CONTACT_LNK}' => $lang_main_menu['contact_lnk'],
        '{MY_GAL_TGT}' => "index.php?cat=$my_gallery_id",
        '{MY_GAL_ICO}' => cpg_fetch_icon('my_gallery', 1),
        '{MY_GAL_TITLE}' => $lang_main_menu['my_gal_title'],
        '{MY_GAL_LNK}' => $lang_main_menu['my_gal_lnk'],
        '{MEMBERLIST_TGT}' => "usermgr.php",
        '{MEMBERLIST_ICO}' => cpg_fetch_icon('memberlist', 1),
        '{MEMBERLIST_TITLE}' => $lang_main_menu['memberlist_title'],
        '{MEMBERLIST_LNK}' => $lang_main_menu['memberlist_lnk'],
        '{MY_PROF_TGT}' => "profile.php?op=edit_profile",
        '{MY_PROF_ICO}' => cpg_fetch_icon('my_profile', 1),
        '{MY_PROF_TITLE}' => $lang_main_menu['my_prof_title'],
        '{MY_PROF_LNK}' => $lang_main_menu['my_prof_lnk'],
        '{ADM_MODE_TGT}' => "mode.php?admin_mode=1&referer=$REFERER",
        '{ADM_MODE_ICO}' => cpg_fetch_icon('admin_mode_on', 1),
        '{ADM_MODE_TITLE}' => $lang_main_menu['adm_mode_title'],
        '{ADM_MODE_LNK}' => $lang_main_menu['adm_mode_lnk'],
        '{USR_MODE_TGT}' => "mode.php?admin_mode=0&referer=$REFERER",
        '{USR_MODE_ICO}' => cpg_fetch_icon('admin_mode_off', 1),
        '{USR_MODE_TITLE}' => $lang_main_menu['usr_mode_title'],
        '{USR_MODE_LNK}' => $lang_main_menu['usr_mode_lnk'],
        '{SIDEBAR_TGT}' => "sidebar.php?action=install",
        '{SIDEBAR_TITLE}' => $lang_main_menu['sidebar_title'],
        '{SIDEBAR_LNK}' => $lang_main_menu['sidebar_lnk'],
        '{SIDEBAR_ICO}' => cpg_fetch_icon('sidebar', 1),
        '{UPL_PIC_TGT}' => "upload.php$album_12",
        '{UPL_PIC_TITLE}' => $lang_main_menu['upload_pic_title'],
        '{UPL_PIC_LNK}' => $lang_main_menu['upload_pic_lnk'],
        '{UPL_PIC_ICO}' => cpg_fetch_icon('upload', 1),
        '{REGISTER_TGT}' => "register.php",
        '{REGISTER_TITLE}' => $lang_main_menu['register_title'],
        '{REGISTER_LNK}' => $lang_main_menu['register_lnk'],
        '{REGISTER_ICO}' => cpg_fetch_icon('add_user', 1),
        '{LOGIN_TGT}' => "login.php",
        '{LOGIN_TITLE}' => $lang_main_menu['login_title'],
        '{LOGIN_LNK}' => $lang_main_menu['login_lnk'],
        '{LOGIN_ICO}' => cpg_fetch_icon('login', 1),
        '{LOGOUT_TGT}' => "logout.php?form_token=$form_token&timestamp=$timestamp&referer=$REFERER",
        '{LOGOUT_TITLE}' => $lang_main_menu['logout_title'],
        '{LOGOUT_LNK}' => $lang_main_menu['logout_lnk'] . " [" . stripslashes(USER_NAME) . "]",
        '{LOGOUT_ICO}' => cpg_fetch_icon('logout', 1),
        '{UPL_APP_LNK}' => $lang_gallery_admin_menu['upl_app_lnk'],
        '{UPL_APP_TGT}' => "editpics.php?mode=upload_approval",
        '{UPL_APP_TITLE}' => $lang_gallery_admin_menu['upl_app_lnk'],
        '{UPL_APP_ICO}' => cpg_fetch_icon('file_approval', 1),
        );

Quote$param = array('{CATL}' => $cat_l,
                '{UPL_APP_TITLE}' => $lang_gallery_admin_menu['upl_app_title'],
                '{UPL_APP_LNK}' => $lang_gallery_admin_menu['upl_app_lnk'],
                '{UPL_APP_ICO}' => cpg_fetch_icon('file_approval', 1),
                '{ADMIN_TITLE}' => $lang_gallery_admin_menu['admin_title'],
                '{ADMIN_LNK}' => $lang_gallery_admin_menu['admin_lnk'],
                '{ADMIN_ICO}' => cpg_fetch_icon('config', 1),
                '{ALBUMS_TITLE}' => $lang_gallery_admin_menu['albums_title'],
                '{ALBUMS_LNK}' => $lang_gallery_admin_menu['albums_lnk'],
                '{ALBUMS_ICO}' => cpg_fetch_icon('alb_mgr', 1),
                '{CATEGORIES_TITLE}' => $lang_gallery_admin_menu['categories_title'],
                '{CATEGORIES_LNK}' => $lang_gallery_admin_menu['categories_lnk'],
                '{CATEGORIES_ICO}' => cpg_fetch_icon('cat_mgr', 1),
                '{USERS_TITLE}' => $lang_gallery_admin_menu['users_title'],
                '{USERS_LNK}' => $lang_gallery_admin_menu['users_lnk'],
                '{USERS_ICO}' => cpg_fetch_icon('user_mgr', 1),
                '{GROUPS_TITLE}' => $lang_gallery_admin_menu['groups_title'],
                '{GROUPS_LNK}' => $lang_gallery_admin_menu['groups_lnk'],
                '{GROUPS_ICO}' => cpg_fetch_icon('groups_mgr', 1),
                '{COMMENTS_TITLE}' => $lang_gallery_admin_menu['comments_title'],
                '{COMMENTS_LNK}' => $lang_gallery_admin_menu['comments_lnk'],
                '{COMMENTS_ICO}' => cpg_fetch_icon('comment_approval', 1),
                '{SEARCHNEW_TITLE}' => $lang_gallery_admin_menu['searchnew_title'],
                '{SEARCHNEW_LNK}' => $lang_gallery_admin_menu['searchnew_lnk'],
                '{SEARCHNEW_ICO}' => cpg_fetch_icon('searchnew', 1),
                '{FILES_TITLE}' => $lang_cat_list['pictures'],
                '{FILES_LNK}' => $lang_cat_list['pictures'],
                '{FILES_ICO}' => cpg_fetch_icon('searchnew', 1),
                '{INFO_TITLE}' => $lang_common['information'],
                '{INFO_LNK}' => $lang_common['information'],
                '{INFO_ICO}' => cpg_fetch_icon('info', 1),
                '{MY_PROF_TITLE}' => $lang_user_admin_menu['my_prof_title'],
                '{MY_PROF_LNK}' => $lang_user_admin_menu['my_prof_lnk'],
                '{MY_PROF_ICO}' => cpg_fetch_icon('my_profile', 1),
                '{UTIL_TITLE}' => $lang_gallery_admin_menu['util_title'],
                '{UTIL_LNK}' => $lang_gallery_admin_menu['util_lnk'],
                '{UTIL_ICO}' => cpg_fetch_icon('util', 1),
                '{BAN_TITLE}' => $lang_gallery_admin_menu['ban_title'],
                '{BAN_LNK}' => $lang_gallery_admin_menu['ban_lnk'],
                '{BAN_ICO}' => cpg_fetch_icon('ban_user', 1),
                '{DB_ECARD_TITLE}' => $lang_gallery_admin_menu['db_ecard_title'],
                '{DB_ECARD_LNK}' => $lang_gallery_admin_menu['db_ecard_lnk'],
                '{DB_ECARD_ICO}' => cpg_fetch_icon('ecard_review', 1),
                '{PICTURES_TITLE}' => $lang_gallery_admin_menu['pictures_title'],
                '{PICTURES_LNK}' => $lang_gallery_admin_menu['pictures_lnk'],
                '{PICTURES_ICO}' => cpg_fetch_icon('picture_sort', 1),
                '{DOCUMENTATION_HREF}' => $documentation_href,
                '{DOCUMENTATION_TITLE}' => $lang_gallery_admin_menu['documentation_title'],
                '{DOCUMENTATION_LNK}' => $lang_gallery_admin_menu['documentation_lnk'],
                '{DOCUMENTATION_ICO}' => cpg_fetch_icon('documentation', 1),
                '{PLUGINMGR_TITLE}' => $lang_gallery_admin_menu['pluginmgr_title'],
                '{PLUGINMGR_LNK}' => $lang_gallery_admin_menu['pluginmgr_lnk'],
                '{PLUGINMGR_ICO}' => cpg_fetch_icon('plugin_mgr', 1),
                '{BRIDGEMGR_TITLE}' => $lang_gallery_admin_menu['bridgemgr_title'],
                '{BRIDGEMGR_LNK}' => $lang_gallery_admin_menu['bridgemgr_lnk'],
                '{BRIDGEMGR_ICO}' => cpg_fetch_icon('bridge_mgr', 1),
                '{PHPINFO_TITLE}' => $lang_gallery_admin_menu['phpinfo_title'],
                '{PHPINFO_LNK}' => $lang_gallery_admin_menu['phpinfo_lnk'],
                '{PHPINFO_ICO}' => cpg_fetch_icon('phpinfo', 1),
                '{UPDATE_DATABASE_TITLE}' => $lang_gallery_admin_menu['update_database_title'],
                '{UPDATE_DATABASE_LNK}' => $lang_gallery_admin_menu['update_database_lnk'],
                '{UPDATE_DATABASE_ICO}' => cpg_fetch_icon('update_database', 1),
                '{VIEW_LOG_FILES_TITLE}' => $lang_gallery_admin_menu['view_log_files_title'],
                '{VIEW_LOG_FILES_LNK}' => $lang_gallery_admin_menu['view_log_files_lnk'],
                '{VIEW_LOG_FILES_ICO}' => cpg_fetch_icon('view_logs', 1),
                '{CHECK_VERSIONS_TITLE}' => $lang_gallery_admin_menu['check_versions_title'],
                '{CHECK_VERSIONS_LNK}' => $lang_gallery_admin_menu['check_versions_lnk'],
                '{CHECK_VERSIONS_ICO}' => cpg_fetch_icon('check_versions', 1),
                '{OVERALL_STATS_TITLE}' => $lang_gallery_admin_menu['overall_stats_title'],
                '{OVERALL_STATS_LNK}' => $lang_gallery_admin_menu['overall_stats_lnk'],
                '{OVERALL_STATS_ICO}' => cpg_fetch_icon('stats', 1),
                '{KEYWORDMGR_TITLE}' => $lang_gallery_admin_menu['keywordmgr_title'],
                '{KEYWORDMGR_LNK}' => $lang_gallery_admin_menu['keywordmgr_lnk'],
                '{KEYWORDMGR_ICO}' => cpg_fetch_icon('keyword_mgr', 1),
                '{EXIFMGR_TITLE}' => $lang_gallery_admin_menu['exifmgr_title'],
                '{EXIFMGR_LNK}' => $lang_gallery_admin_menu['exifmgr_lnk'],
                '{EXIFMGR_ICO}' => cpg_fetch_icon('exif_mgr', 1),
                '{SHOWNEWS_TITLE}' => $lang_gallery_admin_menu['shownews_title'],
                '{SHOWNEWS_LNK}' => $lang_gallery_admin_menu['shownews_lnk'],
                '{SHOWNEWS_ICO}' => cpg_fetch_icon('news_show', 1),
                '{TIME_STAMP}' => date('His').trim(floor(rand(0, 1000))),
                );

Quote$html = template_eval($template_gallery_admin_menu, $param);
            // $html.= cpg_alert_dev_version();
        } elseif (USER_ADMIN_MODE) {
            $param = array('{ALBMGR_TITLE}' => $lang_user_admin_menu['albmgr_title'],
                '{ALBMGR_LNK}' => $lang_user_admin_menu['albmgr_lnk'],
                '{ALBUMS_ICO}' => cpg_fetch_icon('alb_mgr', 1),
                '{MODIFYALB_TITLE}' => $lang_user_admin_menu['modifyalb_title'],
                '{MODIFYALB_LNK}' => $lang_user_admin_menu['modifyalb_lnk'],
                '{MODIFYALB_ICO}' => cpg_fetch_icon('modifyalb', 1),
                '{MY_PROF_TITLE}' => $lang_user_admin_menu['my_prof_title'],
                '{MY_PROF_LNK}' => $lang_user_admin_menu['my_prof_lnk'],
                '{MY_PROF_ICO}' => cpg_fetch_icon('my_profile', 1),
                '{PICTURES_TITLE}' => $lang_gallery_admin_menu['pictures_title'],
                '{PICTURES_LNK}' => $lang_gallery_admin_menu['pictures_lnk'],
                '{PICTURES_ICO}' => cpg_fetch_icon('picture_sort', 1),
                );

I'm sorry for asking thing that might be answered before, I've checked this thread http://forum.coppermine-gallery.net/index.php?topic=26897.0 and it said about changing parameter, I've tried to do it but it keeps giving me template error, can anyone please help me figuring this out? Because this is the first time I'm having problem with using coopermine. Thank you so much in advance.

phill104

Can we have a link to your site please?

Also, try to attach images rather than hotlink them.
It is a mistake to think you can solve any major problems just with potatoes.

ΑndrĂ©

Additionally, please attach your whole theme to your next reply.

taratara

it's a new site : http://skarsgardcentral.org/photogallery

it keeps switching from shown normally and template error, I don't know what happened or how could that happened because my friend said the theme supposed to be working fine, so I changed the theme back to curve for now.

I attached theme.php as in theme.txt, and I'm sorry about the previous hotlink thumbnail.

thank you so much in advance (:

phill104

Maybe you missunderstood. We need the whole theme, not just the theme.php file. Zip up your custom theme and attach it so we can take a look.

Additionally, you do not need to use phpmyadmin to switch themes as you can simply do it through the browser.

For instance http://skarsgardcentral.org/photogallery/index.php?theme=curve would switch to the curve theme. Just add ?theme=your_theme_name to the end of your url and you cna switch. To clear the cookie when you are finished testing use ?theme=xxx
It is a mistake to think you can solve any major problems just with potatoes.