Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: 1 [2] 3   Go Down

Author Topic: Modificare o aggiungere links nella home page  (Read 29598 times)

0 Members and 1 Guest are viewing this topic.

Ludo

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 706
    • E+GiElle
Re: Modificare o aggiungere links nella home page
« Reply #20 on: January 30, 2009, 09:21:35 am »

per capire questi tokens dovrei fare una cosa del genere?
Più o meno... :P
Code: [Select]
'{BLOG_TGT}' => "http://www.sito.it/pagina.html",
'{BLOG_TITLE}' => $lang_main_menu['blog_title'],
'{BLOG_LNK}' => $lang_main_menu['blog_lnk'],

Quote
poi nel file della lingua alla fine dopo search inserisco

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

VEGA

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 323
    • maranimage
Re: Modificare o aggiungere links nella home page
« Reply #21 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
Code: [Select]
'blog_title' => 'fai click per vedere il blog',
'blog_lnk' => 'il_blog',


Code: [Select]
<?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;
}
?>

Logged

Ludo

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 706
    • E+GiElle
Re: Modificare o aggiungere links nella home page
« Reply #22 on: January 30, 2009, 12:13:03 pm »

Quindi il theme.php dovrebbe essere questo... :'(.....e nel file della lingua, sotto al token search :P , metto
Code: [Select]
'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
Code: [Select]
    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
Code: [Select]
'{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
Logged

VEGA

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 323
    • maranimage
Re: Modificare o aggiungere links nella home page
« Reply #23 on: January 30, 2009, 12:35:26 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!
Logged

VEGA

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 323
    • maranimage
Re: Modificare o aggiungere links nella home page
« Reply #24 on: January 30, 2009, 01:01:56 pm »

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

Ludo

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 706
    • E+GiElle
Re: Modificare o aggiungere links nella home page
« Reply #25 on: January 30, 2009, 02:53:57 pm »

Ti 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...
Logged

VEGA

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 323
    • maranimage
Re: Modificare o aggiungere links nella home page
« Reply #26 on: January 30, 2009, 03:45:49 pm »

dopo aver inserito il theme.php modificato ho questo:

Code: [Select]
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:

Code: [Select]
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:

Code: [Select]
/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

Logged

Ludo

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 706
    • E+GiElle
Re: Modificare o aggiungere links nella home page
« Reply #27 on: January 30, 2009, 03:50:52 pm »

la linea 39 e 40:
Code: [Select]
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...
Logged

VEGA

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 323
    • maranimage
Re: Modificare o aggiungere links nella home page
« Reply #28 on: January 30, 2009, 05:03:18 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

Code: [Select]
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','');
Logged

Ludo

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 706
    • E+GiElle
Re: Modificare o aggiungere links nella home page
« Reply #29 on: January 30, 2009, 06:52:54 pm »

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

VEGA

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 323
    • maranimage
Re: Modificare o aggiungere links nella home page
« Reply #30 on: January 30, 2009, 07:51:59 pm »

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!
Logged

Ludo

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 706
    • E+GiElle
Re: Modificare o aggiungere links nella home page
« Reply #31 on: January 31, 2009, 09:51:55 am »

intendevi dire copiare la stringa search dal theme sample al mio theme, esatto?
No, la funzione abbutton!

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

VEGA

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 323
    • maranimage
Re: Modificare o aggiungere links nella home page
« Reply #32 on: February 02, 2009, 10:36:10 pm »

No, la funzione abbutton!

dici questa? ed in caso positivo in quale punto andrebbe inserita?
Code: [Select]
function addbutton(&$menu,$href_lnk,$href_title,$href_tgt,$block_id,$spacer) {
$menu[]=array($href_lnk,$href_title,$href_tgt,$block_id,$spacer);
}

grazie
Logged

Ludo

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 706
    • E+GiElle
Re: Modificare o aggiungere links nella home page
« Reply #33 on: February 03, 2009, 09:03:19 am »

In qualsiasi punto prima che venga richiamata!
Logged

VEGA

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 323
    • maranimage
Re: Modificare o aggiungere links nella home page
« Reply #34 on: February 03, 2009, 09:23:14 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 :'(

Code: [Select]
<?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;
}
?>

Logged

Ludo

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 706
    • E+GiElle
Re: Modificare o aggiungere links nella home page
« Reply #35 on: February 03, 2009, 11:24:53 pm »

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

VEGA

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 323
    • maranimage
Re: Modificare o aggiungere links nella home page
« Reply #36 on: February 03, 2009, 11:47:49 pm »


questo messo dopo

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

Code: [Select]
// 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;

Logged

VEGA

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 323
    • maranimage
Re: Modificare o aggiungere links nella home page
« Reply #37 on: February 03, 2009, 11:54:44 pm »

Code: [Select]
<?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;
}

?>

Logged

Ludo

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 706
    • E+GiElle
Re: Modificare o aggiungere links nella home page
« Reply #38 on: February 04, 2009, 09:48:00 am »

Mi sembra tutto ok...
Logged

VEGA

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 323
    • maranimage
Re: Modificare o aggiungere links nella home page
« Reply #39 on: February 04, 2009, 12:10:08 pm »

Mi sembra tutto ok...
bhè visto il casino che combino è già un successo! ;D

però ...orca paletta si vede sempre pagina bianca! :'(
Logged
Pages: 1 [2] 3   Go Up
 

Page created in 0.041 seconds with 19 queries.