Modificare o aggiungere links nella home page - Page 2 Modificare o aggiungere links nella home page - Page 2
 

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

Modificare o aggiungere links nella home page

Started by bingo, July 19, 2008, 07:16:57 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ludo

Quote from: VEGA on January 29, 2009, 07:14:14 PM
per capire questi tokens dovrei fare una cosa del genere?
Più o meno... :P
'{BLOG_TGT}' => "http://www.sito.it/pagina.html",
'{BLOG_TITLE}' => $lang_main_menu['blog_title'],
'{BLOG_LNK}' => $lang_main_menu['blog_lnk'],


Quotepoi nel file della lingua alla fine dopo search inserisco


'blog_title' => 'il_blog',
'blog_lnk' => 'fai click per vedere il blog',
Più o meno... :-P

'blog_title' => 'fai click per vedere il blog',
'blog_lnk' => 'il_blog',

VEGA

Quindi il theme.php dovrebbe essere questo... :'(.....e nel file della lingua, sotto al token search :P , metto

'blog_title' => 'fai click per vedere il blog',
'blog_lnk' => 'il_blog',




<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2007 Coppermine Dev Team
  v1.1 originally written by Gregory DEMAR

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License version 3
  as published by the Free Software Foundation.
  
  ********************************************
  Coppermine version: 1.4.13
  $Source$
  $Revision: 3837 $
  $Author: gaugau $
  $Date: 2007-08-16 18:56:06 +0200 (Do, 16 Aug 2007) $
**********************************************/

// ------------------------------------------------------------------------- //
// This theme has had all redundant CORE items removed                           //
// ------------------------------------------------------------------------- //

define('THEME_HAS_RATING_GRAPHICS'1);
define('THEME_IS_XHTML10_TRANSITIONAL',1);


if (!
defined('THEME_HAS_NO_SUB_MENU_BUTTONS')) {

  
// HTML template for template sub_menu spacer
  
$template_sub_menu_spacer $template_sys_menu_spacer;
 
  
// HTML template for template sub_menu buttons
  
$template_sub_menu_button$template_sys_menu_button;

  
// HTML template for template sub_menu buttons
    // {HREF_LNK}{HREF_TITLE}{HREF_TGT}{BLOCK_ID}{SPACER}
    
addbutton($sub_menu_buttons,'{SEARCH_LNK}','{SEARCH_TITLE}','{SEARCH_TGT}','search','');
addbutton($sub_menu_buttons,'{BLOG_LNK}','{BLOG_TITLE}','{BLOG_TGT}','blog',$template_sub_menu_spacer);

  
$params = array('{BUTTONS}' => assemble_template_buttons($template_sub_menu_button,$sub_menu_buttons));
  
$template_sub_menu template_eval($template_sub_menu,$params);
}
// Function for creating a main menu (SYS_MENU or SUB_MENU)
function theme_main_menu($which)
{
    global 
$AUTHORIZED$CONFIG$album$actual_cat$cat$REFERER;
    global 
$lang_main_menu$template_sys_menu$template_sub_menu;


    static 
$sys_menu ''$sub_menu '';
    if ($
$which != '') {
        return $
$which;
    }

    
$album_l = isset($album) ? "?album=$album'';
    
$cat_l = (isset($actual_cat))? "?cat=$actual_cat: (isset($cat) ? "?cat=$cat'');
    
$cat_l2 = isset($cat) ? "&amp;cat=$cat'';
    
$my_gallery_id FIRST_USER_CAT USER_ID;



  if (
$which == 'sys_menu' ) {
    if (
USER_ID) {
        
template_extract_block($template_sys_menu'login');
    } else {
        
template_extract_block($template_sys_menu'logout');
        
template_extract_block($template_sys_menu'my_profile');
    }

    if (!
USER_IS_ADMIN) {
        
template_extract_block($template_sys_menu'enter_admin_mode');
        
template_extract_block($template_sys_menu'leave_admin_mode');
    } else {
        if (
GALLERY_ADMIN_MODE) {
            
template_extract_block($template_sys_menu'enter_admin_mode');
        } else {
            
template_extract_block($template_sys_menu'leave_admin_mode');
        }
    }

    if (!
USER_CAN_CREATE_ALBUMS) {
        
template_extract_block($template_sys_menu'my_gallery');
    }

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

    if (!
USER_CAN_UPLOAD_PICTURES && !USER_CAN_CREATE_ALBUMS) {
        
template_extract_block($template_sys_menu'upload_pic');
    }

    if (
USER_ID || !$CONFIG['allow_user_registration']) {
        
template_extract_block($template_sys_menu'register');
    }

    if (!
USER_ID || !$CONFIG['allow_memberlist']) {
        
template_extract_block($template_sys_menu'allow_memberlist');
    }

    if (!
$CONFIG['display_faq']) {
        
template_extract_block($template_sys_menu'faq');
    }

    
$param = array(
        
'{HOME_TGT}' => $CONFIG['home_target'],
        
'{HOME_TITLE}' => $lang_main_menu['home_title'],
        
'{HOME_LNK}' => $lang_main_menu['home_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_TITLE}' => $lang_main_menu['my_prof_title'],
        
'{MY_PROF_LNK}' => $lang_main_menu['my_prof_lnk'],
        
'{ADM_MODE_TGT}' => "mode.php?admin_mode=1&amp;referer=$REFERER",
        
'{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&amp;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",
        
'{REGISTER_TITLE}' => $lang_main_menu['register_title'],
        
'{REGISTER_LNK}' => $lang_main_menu['register_lnk'],
        
'{LOGIN_TGT}' => "login.php?referer=$REFERER",
        
'{LOGIN_TITLE}' => $lang_main_menu['login_title'],
        
'{LOGIN_LNK}' => $lang_main_menu['login_lnk'],
        
'{LOGOUT_TGT}' => "logout.php?referer=$REFERER",
        
'{LOGOUT_TITLE}' => $lang_main_menu['logout_title'],
        
'{LOGOUT_LNK}' => $lang_main_menu['logout_lnk'] . " [" stripslashes(USER_NAME) . "]",
        
'{FAQ_TGT}' => "faq.php",
        
'{FAQ_TITLE}' => $lang_main_menu['faq_title'],
        
'{FAQ_LNK}' => $lang_main_menu['faq_lnk'],
        );

        
$sys_menu template_eval($template_sys_menu$param);
  } else {

    if (!
$CONFIG['custom_lnk_url']) {
        
template_extract_block($template_sub_menu'custom_link');
    }

    
$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'],
        
'{CUSTOM_LNK_TGT}' => $CONFIG['custom_lnk_url'],
        
'{CUSTOM_LNK_TITLE}' => $CONFIG['custom_lnk_name'],
        
'{CUSTOM_LNK_LNK}' => $CONFIG['custom_lnk_name'],
        
'{LASTUP_TGT}' => "thumbnails.php?album=lastup$cat_l2",
        
'{LASTUP_TITLE}' => $lang_main_menu['lastup_title'],
        
'{LASTUP_LNK}' => $lang_main_menu['lastup_lnk'],
        
'{LASTCOM_TGT}' => "thumbnails.php?album=lastcom$cat_l2",
        
'{LASTCOM_TITLE}' => $lang_main_menu['lastcom_title'],
        
'{LASTCOM_LNK}' => $lang_main_menu['lastcom_lnk'],
        
'{TOPN_TGT}' => "thumbnails.php?album=topn$cat_l2",
        
'{TOPN_TITLE}' => $lang_main_menu['topn_title'],
        
'{TOPN_LNK}' => $lang_main_menu['topn_lnk'],
        
'{TOPRATED_TGT}' => "thumbnails.php?album=toprated$cat_l2",
        
'{TOPRATED_TITLE}' => $lang_main_menu['toprated_title'],
        
'{TOPRATED_LNK}' => $lang_main_menu['toprated_lnk'],
        
'{FAV_TGT}' => "thumbnails.php?album=favpics",
        
'{FAV_TITLE}' => $lang_main_menu['fav_title'],
        
'{FAV_LNK}' => $lang_main_menu['fav_lnk'],
        
'{SEARCH_TGT}' => "search.php",
        
'{SEARCH_TITLE}' => $lang_main_menu['search_title'],
        
'{SEARCH_LNK}' => $lang_main_menu['search_lnk'],
'{BLOG_TGT}' => "http://coppermine-gallery.net/" target="_blank",
        
'{BLOG_TITLE}' => $lang_main_menu['blog_title'],
        
'{BLOG_LNK}' => $lang_main_menu['blog_lnk'],
 );
    
$sub_menu template_eval($template_sub_menu$param);
  }

    return $
$which;
}
?>


Ludo

Quote from: VEGA on January 30, 2009, 10:29:30 AM
Quindi il theme.php dovrebbe essere questo... :'(.....e nel file della lingua, sotto al token search :P , metto

'blog_title' => 'fai click per vedere il blog',
'blog_lnk' => 'il_blog',
Io come titolo del link metterei una breve descrizione del blog, altrimenti meglio una stringa vuota...


Quote
    addbutton($sub_menu_buttons,'{SEARCH_LNK}','{SEARCH_TITLE}','{SEARCH_TGT}','search','');
    addbutton($sub_menu_buttons,'{BLOG_LNK}','{BLOG_TITLE}','{BLOG_TGT}','blog',$template_sub_menu_spacer);
Se il blog è l'ultimo pulsante a destra, lo spaziatore $template_sub_menu_spacer va nel pulsante search (in pratica, scambialo con la stringa vuota attuale).

Quote
'{BLOG_TGT}' => "http://coppermine-gallery.net/" target="_blank",
Aridaje con 'sto target...e non mi pare che l'URL sia quello del tuo blog :P

VEGA

Quote from: Ludo on January 30, 2009, 12:13:03 PM
Io come titolo del link metterei una breve descrizione del blog, altrimenti meglio una stringa vuota...

ok.

Quote
Se il blog è l'ultimo pulsante a destra, lo spaziatore $template_sub_menu_spacer va nel pulsante search (in pratica, scambialo con la stringa vuota attuale).

Ti riferisici all'attuale pulsante presente nella home? no quello va bene. Devo aggiungere un altro vicino, quello per il blog

Quote
Aridaje con 'sto target...e non mi pare che l'URL sia quello del tuo blog :P

:) Se non metto il target la pagina non si apre in un'altra finestra ...il link era per metterne uno a caso!

VEGA

dimenticavo... il theme messo su così mi da pagina bianca.  :'(  . Sono un incubo eh Ludo? ;D ;D

Ludo

Quote from: VEGA on January 30, 2009, 12:35:26 PMTi riferisici all'attuale pulsante presente nella home? no quello va bene. Devo aggiungere un altro vicino, quello per il blog
Appunto: tutti i pulsanti tranne l'ultimo (partendo da sinistra) devono avere $template_sub_menu_spacer come ultimo valore dell'array, l'ultimo una stringa vuota.

Quote:) Se non metto il target la pagina non si apre in un'altra finestra
Ma i pulsanti di menu in Coppermine non supportano l'attributo target...

Per correggere gli errori nel theme.php abilita il debug mode con la visualizzazione degli errori PHP e provvedi di conseguenza...

VEGA

dopo aver inserito il theme.php modificato ho questo:


Parse error: syntax error, unexpected ';' in /var/www/vhosts/maranimage.it/httpdocs/themes/rainy_day/theme.php on line 39


la linea 39 e 40:


addbutto($sub_menu_buttons,'{SEARCH_LNK}','{SEARCH_TITLE}','{SEARCH_TGT}','search',$template_sub_menu_spacer);
addbutton($sub_menu_buttons,'{BLOG_LNK}','{BLOG_TITLE}','{BLOG_TGT}','blog',;


in coppermine prima di inserire il theme modificato quando ho abilitato il debug ho notato questi:


/bridge/udb_base.inc.php

Notice line 114: Undefined variable: row

/include/themes.inc.php

Notice line 231: Undefined variable: USER_ID
Notice line 828: Undefined variable: pm_link

/plugins/final_extract/include/init2.inc.php

Warning line 30: mysql_free_result(): supplied argument is not a valid MySQL result resource

/include/functions.inc.php

Notice line 88: Undefined variable: cpg_show_private_album
Notice line 916: Undefined variable: caption2
Notice line 916: Undefined variable: caption2
Notice line 916: Undefined variable: caption2
Notice line 916: Undefined variable: caption2
Notice line 1765: Undefined index: system_icon
Notice line 1765: Undefined index: system_icon
Notice line 1765: Undefined index: system_icon
Notice line 1765: Undefined index: system_icon

/index.php

Notice line 771: Undefined index: system_icon
Notice line 771: Undefined index: system_icon
Notice line 771: Undefined index: system_icon
Notice line 771: Undefined index: system_icon
Notice line 771: Undefined index: system_icon
Notice line 771: Undefined index: system_icon
Notice line 771: Undefined index: system_icon
Notice line 771: Undefined index: system_icon
Notice line 771: Undefined index: system_icon
Notice line 771: Undefined index: system_icon
Notice line 771: Undefined index: system_icon
Notice line 771: Undefined index: system_icon
Notice line 771: Undefined index: system_icon
Notice line 771: Undefined index: system_icon
Notice line 771: Undefined index: system_icon
Notice line 771: Undefined index: system_icon
Notice line 771: Undefined index: system_icon
Notice line 771: Undefined index: system_icon
Notice line 771: Undefined index: system_icon
Notice line 771: Undefined index: system_icon
Notice line 604: Undefined index: system_icon
Notice line 604: Undefined index: system_icon
Notice line 604: Undefined index: system_icon
Notice line 604: Undefined index: system_icon
Notice line 604: Undefined index: system_icon


Ludo

Quote from: VEGA on January 30, 2009, 03:45:49 PM
la linea 39 e 40:

addbutto($sub_menu_buttons,'{SEARCH_LNK}','{SEARCH_TITLE}','{SEARCH_TGT}','search',$template_sub_menu_spacer);
addbutton($sub_menu_buttons,'{BLOG_LNK}','{BLOG_TITLE}','{BLOG_TGT}','blog',;

Ci son 3 errori macroscopici, infatti...

VEGA

Quote from: Ludo on January 30, 2009, 03:50:52 PM
Ci son 3 errori macroscopici, infatti...


allora, ho invertito le posizioni, il search è l'utimo e tra li apici '' è vuoto,stringa vuota ok? e mo il debug dice: Call to undefined function addbutton() . Che vuol dire che se rotto e mi fa un...così (  ) ;D


addbutton($sub_menu_buttons,'{BLOG_LNK}','{BLOG_TITLE}','{BLOG_TGT}','blog',$template_sub_menu_spacer);
addbutton($sub_menu_buttons,'{SEARCH_LNK}','{SEARCH_TITLE}','{SEARCH_TGT}','search','');

Ludo

Strano, dovrebbe utilizzare quella presente in include/themes.inc.php
Copiala ed incollala (prima di richiamarla) da themes/sample/theme.php

VEGA

intendevi dire copiare la stringa search dal theme sample al mio theme, esatto?

nel file della lingua avevo scritto

'blog_title' => 'Fotorisorse, utility','
anzichè
'blog_title' => 'Fotorisorse utility',

e mandava in casino!?

corretto questo, di nuovo pagina bianca e con il debug attivato nessun messaggio visualizzato!

Ludo

Quote from: VEGA on January 30, 2009, 07:51:59 PM
intendevi dire copiare la stringa search dal theme sample al mio theme, esatto?
No, la funzione abbutton!

Quotecorretto questo, di nuovo pagina bianca e con il debug attivato nessun messaggio visualizzato!
Non saprei...qui entriamo nel campo del debug degli script PHP.

VEGA

Quote from: Ludo on January 31, 2009, 09:51:55 AM
No, la funzione abbutton!

dici questa? ed in caso positivo in quale punto andrebbe inserita?

function addbutton(&$menu,$href_lnk,$href_title,$href_tgt,$block_id,$spacer) {
$menu[]=array($href_lnk,$href_title,$href_tgt,$block_id,$spacer);
}


grazie

Ludo

In qualsiasi punto prima che venga richiamata!

VEGA

Quote from: Ludo on February 03, 2009, 09:03:19 AM
In qualsiasi punto prima che venga richiamata!


questo sarebbe il codice del theme.php. Ti sembra tutto regolare?....mi da pagina bianca e nessun messaggio con il debug mode attivato con la visualizzazione degli errori :'(


<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2007 Coppermine Dev Team
  v1.1 originally written by Gregory DEMAR

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License version 3
  as published by the Free Software Foundation.
  
  ********************************************
  Coppermine version: 1.4.13
  $Source$
  $Revision: 3837 $
  $Author: gaugau $
  $Date: 2007-08-16 18:56:06 +0200 (Do, 16 Aug 2007) $
**********************************************/

// ------------------------------------------------------------------------- //
// This theme has had all redundant CORE items removed                           //
// ------------------------------------------------------------------------- //

define('THEME_HAS_RATING_GRAPHICS'1);
define('THEME_IS_XHTML10_TRANSITIONAL',1);

function 
addbutton(&$menu,$href_lnk,$href_title,$href_tgt,$block_id,$spacer
{
$menu[]=array($href_lnk,$href_title,$href_tgt,$block_id,$spacer);
}


if (!
defined('THEME_HAS_NO_SUB_MENU_BUTTONS')) {

  
// HTML template for template sub_menu spacer
  
$template_sub_menu_spacer $template_sys_menu_spacer;
 
  
// HTML template for template sub_menu buttons
  
$template_sub_menu_button$template_sys_menu_button;

  
// HTML template for template sub_menu buttons
    // {HREF_LNK}{HREF_TITLE}{HREF_TGT}{BLOCK_ID}{SPACER}
    
addbutton($sub_menu_buttons,'{BLOG_LNK}','{BLOG_TITLE}','{BLOG_TGT}','blog',$template_sub_menu_spacer);
    
addbutton($sub_menu_buttons,'{SEARCH_LNK}','{SEARCH_TITLE}','{SEARCH_TGT}','search','');
  
  
$params = array('{BUTTONS}' => assemble_template_buttons($template_sub_menu_button,$sub_menu_buttons));
  
$template_sub_menu template_eval($template_sub_menu,$params);
}
// Function for creating a main menu (SYS_MENU or SUB_MENU)
function theme_main_menu($which)
{
    global 
$AUTHORIZED$CONFIG$album$actual_cat$cat$REFERER;
    global 
$lang_main_menu$template_sys_menu$template_sub_menu;


    static 
$sys_menu ''$sub_menu '';
    if ($
$which != '') {
        return $
$which;
    }

    
$album_l = isset($album) ? "?album=$album'';
    
$cat_l = (isset($actual_cat))? "?cat=$actual_cat: (isset($cat) ? "?cat=$cat'');
    
$cat_l2 = isset($cat) ? "&amp;cat=$cat'';
    
$my_gallery_id FIRST_USER_CAT USER_ID;



  if (
$which == 'sys_menu' ) {
    if (
USER_ID) {
        
template_extract_block($template_sys_menu'login');
    } else {
        
template_extract_block($template_sys_menu'logout');
        
template_extract_block($template_sys_menu'my_profile');
    }

    if (!
USER_IS_ADMIN) {
        
template_extract_block($template_sys_menu'enter_admin_mode');
        
template_extract_block($template_sys_menu'leave_admin_mode');
    } else {
        if (
GALLERY_ADMIN_MODE) {
            
template_extract_block($template_sys_menu'enter_admin_mode');
        } else {
            
template_extract_block($template_sys_menu'leave_admin_mode');
        }
    }

    if (!
USER_CAN_CREATE_ALBUMS) {
        
template_extract_block($template_sys_menu'my_gallery');
    }

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

    if (!
USER_CAN_UPLOAD_PICTURES && !USER_CAN_CREATE_ALBUMS) {
        
template_extract_block($template_sys_menu'upload_pic');
    }

    if (
USER_ID || !$CONFIG['allow_user_registration']) {
        
template_extract_block($template_sys_menu'register');
    }

    if (!
USER_ID || !$CONFIG['allow_memberlist']) {
        
template_extract_block($template_sys_menu'allow_memberlist');
    }

    if (!
$CONFIG['display_faq']) {
        
template_extract_block($template_sys_menu'faq');
    }

    
$param = array(
        
'{HOME_TGT}' => $CONFIG['home_target'],
        
'{HOME_TITLE}' => $lang_main_menu['home_title'],
        
'{HOME_LNK}' => $lang_main_menu['home_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_TITLE}' => $lang_main_menu['my_prof_title'],
        
'{MY_PROF_LNK}' => $lang_main_menu['my_prof_lnk'],
        
'{ADM_MODE_TGT}' => "mode.php?admin_mode=1&amp;referer=$REFERER",
        
'{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&amp;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",
        
'{REGISTER_TITLE}' => $lang_main_menu['register_title'],
        
'{REGISTER_LNK}' => $lang_main_menu['register_lnk'],
        
'{LOGIN_TGT}' => "login.php?referer=$REFERER",
        
'{LOGIN_TITLE}' => $lang_main_menu['login_title'],
        
'{LOGIN_LNK}' => $lang_main_menu['login_lnk'],
        
'{LOGOUT_TGT}' => "logout.php?referer=$REFERER",
        
'{LOGOUT_TITLE}' => $lang_main_menu['logout_title'],
        
'{LOGOUT_LNK}' => $lang_main_menu['logout_lnk'] . " [" stripslashes(USER_NAME) . "]",
        
'{FAQ_TGT}' => "faq.php",
        
'{FAQ_TITLE}' => $lang_main_menu['faq_title'],
        
'{FAQ_LNK}' => $lang_main_menu['faq_lnk'],
        );

        
$sys_menu template_eval($template_sys_menu$param);
  } else {

    if (!
$CONFIG['custom_lnk_url']) {
        
template_extract_block($template_sub_menu'custom_link');
    }

    
$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'],
        
'{CUSTOM_LNK_TGT}' => $CONFIG['custom_lnk_url'],
        
'{CUSTOM_LNK_TITLE}' => $CONFIG['custom_lnk_name'],
        
'{CUSTOM_LNK_LNK}' => $CONFIG['custom_lnk_name'],
        
'{LASTUP_TGT}' => "thumbnails.php?album=lastup$cat_l2",
        
'{LASTUP_TITLE}' => $lang_main_menu['lastup_title'],
        
'{LASTUP_LNK}' => $lang_main_menu['lastup_lnk'],
        
'{LASTCOM_TGT}' => "thumbnails.php?album=lastcom$cat_l2",
        
'{LASTCOM_TITLE}' => $lang_main_menu['lastcom_title'],
        
'{LASTCOM_LNK}' => $lang_main_menu['lastcom_lnk'],
        
'{TOPN_TGT}' => "thumbnails.php?album=topn$cat_l2",
        
'{TOPN_TITLE}' => $lang_main_menu['topn_title'],
        
'{TOPN_LNK}' => $lang_main_menu['topn_lnk'],
        
'{TOPRATED_TGT}' => "thumbnails.php?album=toprated$cat_l2",
        
'{TOPRATED_TITLE}' => $lang_main_menu['toprated_title'],
        
'{TOPRATED_LNK}' => $lang_main_menu['toprated_lnk'],
        
'{FAV_TGT}' => "thumbnails.php?album=favpics",
        
'{FAV_TITLE}' => $lang_main_menu['fav_title'],
        
'{FAV_LNK}' => $lang_main_menu['fav_lnk'],
        
'{SEARCH_TGT}' => "search.php",
        
'{SEARCH_TITLE}' => $lang_main_menu['search_title'],
        
'{SEARCH_LNK}' => $lang_main_menu['search_lnk'],
'{BLOG_TGT}' => "http://www.fotorisorse.com",
        
'{BLOG_TITLE}' => $lang_main_menu['blog_title'],
        
'{BLOG_LNK}' => $lang_main_menu['blog_lnk'],
 );
    
$sub_menu template_eval($template_sub_menu$param);
  }

    return $
$which;
}
?>


Ludo

Perchè hai eliminato il contenuto originario del file?  ::)
Inizia col rimetterlo al suo posto...

VEGA


questo messo dopo

define('THEME_HAS_RATING_GRAPHICS', 1);
define('THEME_IS_XHTML10_TRANSITIONAL',1);


// HTML template for sys_menu
$template_sys_menu = <<<EOT
  <div class="topmenu">
          <table border="0" cellpadding="0" cellspacing="0">
                  <tr>
  {BUTTONS}
                  </tr>
          </table>
  </div>
EOT;

// HTML template for template sys_menu buttons
$template_sys_menu_button = <<<EOT
<!-- BEGIN {BLOCK_ID} -->
  <td><img src="images/spacer.gif" width="5" height="25" border="0" alt="" /></td>
  <td><img src="themes/rainy_day/images/button1_r1_c1.gif" width="5" height="25" border="0" alt="" /></td>
  <td style="background-image:url(themes/rainy_day/images/button1_r1_c2.gif)">
          <a href="{HREF_TGT}" title="{HREF_TITLE}">{HREF_LNK}</a>
  </td>
  <td><img src="themes/rainy_day/images/button1_r1_c3.gif" width="5" height="25" border="0" alt="" /></td>
<!-- END {BLOCK_ID} -->
EOT;


VEGA


<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2007 Coppermine Dev Team
  v1.1 originally written by Gregory DEMAR

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License version 3
  as published by the Free Software Foundation.
  
  ********************************************
  Coppermine version: 1.4.13
  $Source$
  $Revision: 3837 $
  $Author: gaugau $
  $Date: 2007-08-16 18:56:06 +0200 (Do, 16 Aug 2007) $
**********************************************/

// ------------------------------------------------------------------------- //
// This theme has had all redundant CORE items removed                               //
// ------------------------------------------------------------------------- //

define('THEME_HAS_RATING_GRAPHICS'1);
define('THEME_IS_XHTML10_TRANSITIONAL',1);

// HTML template for sys_menu
$template_sys_menu = <<<EOT
  <div class="topmenu">
          <table border="0" cellpadding="0" cellspacing="0">
                  <tr>
  {BUTTONS}
                  </tr>
          </table>
  </div>
EOT;

// HTML template for template sys_menu buttons
$template_sys_menu_button = <<<EOT
<!-- BEGIN {BLOCK_ID} -->
  <td><img src="images/spacer.gif" width="5" height="25" border="0" alt="" /></td>
  <td><img src="themes/rainy_day/images/button1_r1_c1.gif" width="5" height="25" border="0" alt="" /></td>
  <td style="background-image:url(themes/rainy_day/images/button1_r1_c2.gif)">
          <a href="{HREF_TGT}" title="{HREF_TITLE}">{HREF_LNK}</a>
  </td>
  <td><img src="themes/rainy_day/images/button1_r1_c3.gif" width="5" height="25" border="0" alt="" /></td>
<!-- END {BLOCK_ID} -->
EOT;


function 
addbutton(&$menu,$href_lnk,$href_title,$href_tgt,$block_id,$spacer
{
$menu[]=array($href_lnk,$href_title,$href_tgt,$block_id,$spacer);
}


if (!
defined('THEME_HAS_NO_SUB_MENU_BUTTONS')) {

  
// HTML template for template sub_menu spacer
  
$template_sub_menu_spacer $template_sys_menu_spacer;
 
  
// HTML template for template sub_menu buttons
  
$template_sub_menu_button$template_sys_menu_button;

  
// HTML template for template sub_menu buttons
    // {HREF_LNK}{HREF_TITLE}{HREF_TGT}{BLOCK_ID}{SPACER}
    
addbutton($sub_menu_buttons,'{BLOG_LNK}','{BLOG_TITLE}','{BLOG_TGT}','blog',$template_sub_menu_spacer);
    
addbutton($sub_menu_buttons,'{SEARCH_LNK}','{SEARCH_TITLE}','{SEARCH_TGT}','search','');
  
  
$params = array('{BUTTONS}' => assemble_template_buttons($template_sub_menu_button,$sub_menu_buttons));
  
$template_sub_menu template_eval($template_sub_menu,$params);
}
// Function for creating a main menu (SYS_MENU or SUB_MENU)
function theme_main_menu($which)
{
    global 
$AUTHORIZED$CONFIG$album$actual_cat$cat$REFERER;
    global 
$lang_main_menu$template_sys_menu$template_sub_menu;


    static 
$sys_menu ''$sub_menu '';
    if ($
$which != '') {
        return $
$which;
    }

    
$album_l = isset($album) ? "?album=$album'';
    
$cat_l = (isset($actual_cat))? "?cat=$actual_cat: (isset($cat) ? "?cat=$cat'');
    
$cat_l2 = isset($cat) ? "&amp;cat=$cat'';
    
$my_gallery_id FIRST_USER_CAT USER_ID;



  if (
$which == 'sys_menu' ) {
    if (
USER_ID) {
        
template_extract_block($template_sys_menu'login');
    } else {
        
template_extract_block($template_sys_menu'logout');
        
template_extract_block($template_sys_menu'my_profile');
    }

    if (!
USER_IS_ADMIN) {
        
template_extract_block($template_sys_menu'enter_admin_mode');
        
template_extract_block($template_sys_menu'leave_admin_mode');
    } else {
        if (
GALLERY_ADMIN_MODE) {
            
template_extract_block($template_sys_menu'enter_admin_mode');
        } else {
            
template_extract_block($template_sys_menu'leave_admin_mode');
        }
    }

    if (!
USER_CAN_CREATE_ALBUMS) {
        
template_extract_block($template_sys_menu'my_gallery');
    }

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

    if (!
USER_CAN_UPLOAD_PICTURES && !USER_CAN_CREATE_ALBUMS) {
        
template_extract_block($template_sys_menu'upload_pic');
    }

    if (
USER_ID || !$CONFIG['allow_user_registration']) {
        
template_extract_block($template_sys_menu'register');
    }

    if (!
USER_ID || !$CONFIG['allow_memberlist']) {
        
template_extract_block($template_sys_menu'allow_memberlist');
    }

    if (!
$CONFIG['display_faq']) {
        
template_extract_block($template_sys_menu'faq');
    }

    
$param = array(
        
'{HOME_TGT}' => $CONFIG['home_target'],
        
'{HOME_TITLE}' => $lang_main_menu['home_title'],
        
'{HOME_LNK}' => $lang_main_menu['home_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_TITLE}' => $lang_main_menu['my_prof_title'],
        
'{MY_PROF_LNK}' => $lang_main_menu['my_prof_lnk'],
        
'{ADM_MODE_TGT}' => "mode.php?admin_mode=1&amp;referer=$REFERER",
        
'{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&amp;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",
        
'{REGISTER_TITLE}' => $lang_main_menu['register_title'],
        
'{REGISTER_LNK}' => $lang_main_menu['register_lnk'],
        
'{LOGIN_TGT}' => "login.php?referer=$REFERER",
        
'{LOGIN_TITLE}' => $lang_main_menu['login_title'],
        
'{LOGIN_LNK}' => $lang_main_menu['login_lnk'],
        
'{LOGOUT_TGT}' => "logout.php?referer=$REFERER",
        
'{LOGOUT_TITLE}' => $lang_main_menu['logout_title'],
        
'{LOGOUT_LNK}' => $lang_main_menu['logout_lnk'] . " [" stripslashes(USER_NAME) . "]",
        
'{FAQ_TGT}' => "faq.php",
        
'{FAQ_TITLE}' => $lang_main_menu['faq_title'],
        
'{FAQ_LNK}' => $lang_main_menu['faq_lnk'],
        );

        
$sys_menu template_eval($template_sys_menu$param);
  } else {

    if (!
$CONFIG['custom_lnk_url']) {
        
template_extract_block($template_sub_menu'custom_link');
    }

    
$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'],
        
'{CUSTOM_LNK_TGT}' => $CONFIG['custom_lnk_url'],
        
'{CUSTOM_LNK_TITLE}' => $CONFIG['custom_lnk_name'],
        
'{CUSTOM_LNK_LNK}' => $CONFIG['custom_lnk_name'],
        
'{LASTUP_TGT}' => "thumbnails.php?album=lastup$cat_l2",
        
'{LASTUP_TITLE}' => $lang_main_menu['lastup_title'],
        
'{LASTUP_LNK}' => $lang_main_menu['lastup_lnk'],
        
'{LASTCOM_TGT}' => "thumbnails.php?album=lastcom$cat_l2",
        
'{LASTCOM_TITLE}' => $lang_main_menu['lastcom_title'],
        
'{LASTCOM_LNK}' => $lang_main_menu['lastcom_lnk'],
        
'{TOPN_TGT}' => "thumbnails.php?album=topn$cat_l2",
        
'{TOPN_TITLE}' => $lang_main_menu['topn_title'],
        
'{TOPN_LNK}' => $lang_main_menu['topn_lnk'],
        
'{TOPRATED_TGT}' => "thumbnails.php?album=toprated$cat_l2",
        
'{TOPRATED_TITLE}' => $lang_main_menu['toprated_title'],
        
'{TOPRATED_LNK}' => $lang_main_menu['toprated_lnk'],
        
'{FAV_TGT}' => "thumbnails.php?album=favpics",
        
'{FAV_TITLE}' => $lang_main_menu['fav_title'],
        
'{FAV_LNK}' => $lang_main_menu['fav_lnk'],
        
'{SEARCH_TGT}' => "search.php",
        
'{SEARCH_TITLE}' => $lang_main_menu['search_title'],
        
'{SEARCH_LNK}' => $lang_main_menu['search_lnk'],
'{BLOG_TGT}' => "http://www.fotorisorse.com",
        
'{BLOG_TITLE}' => $lang_main_menu['blog_title'],
        
'{BLOG_LNK}' => $lang_main_menu['blog_lnk'],
 );
    
$sub_menu template_eval($template_sub_menu$param);
  }

    return $
$which;
}

?>


Ludo


VEGA

Quote from: Ludo on February 04, 2009, 09:48:00 AM
Mi sembra tutto ok...
bhè visto il casino che combino è già un successo! ;D

però ...orca paletta si vede sempre pagina bianca! :'(