forum.coppermine-gallery.net

Support => Italian (Italiano) => Closed boards => Language Specific Support => cpg1.4.x Italian (Italiano) => Topic started by: bingo on July 19, 2008, 07:16:57 am

Title: Modificare o aggiungere links nella home page
Post by: bingo on July 19, 2008, 07:16:57 am
Un saluto a tutti, sono nuovo, anche se la nostra Galleria di Acta Plantarum (http://actanaturae.actafungorum.org/cpg1414/) vi è già stata segnalata dall'amico "principiante" e abbiamo utilizzato più volte i vostri consigli (vedi slider e aggiustamenti vari).
Ora avrei bisogno di una informazione: se sia possibile e dove intervenire per modificare o aggiungere dei links a quelli previsti per default nella home della Galleria. So che esiste la possibilità di inserire un link nella testata ma solamente uno e noi avremmo bisogno di aggiungerne altri.
Grazie

Approfitto per segnalarvi una pagina in php che "estrae" i dati della Galleria in base a precise richieste e visualizza le le relative Foto e i dati associati.
Nata con lo scopo di controllare il contenuto della Galleria la PAGINA (http://actanaturae.actafungorum.org/botanica/albums.php?title=A) mi sembra sia una buona alternativa di visualizzazione.

Un cordiale saluto

Gianni
Title: Re: Modificare o aggiungere links nella home page
Post by: Ludo on July 19, 2008, 10:20:08 am
Un saluto a tutti, sono nuovo,
Benvenuto. Il benemerito Gianni Dose?  ;D

Quote
Ora avrei bisogno di una informazione: se sia possibile e dove intervenire per modificare o aggiungere dei links a quelli previsti per default nella home della Galleria.
Il SUB_MENU, intendi?
Il nuovo link si aggiunge modificando 4 variabili/funzioni nel file themes/tuo tema/theme.php (se non presenti, van copiate e incollate da themes/sample/theme.php):

1) Se non già presente in theme.php, si copia ed incolla dal sample theme questa funzione:
Code: [Select]
// 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) ? "&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&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&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'],
        );
    $sub_menu = template_eval($template_sub_menu, $param);
  }

    return $$which;
}

2) A questo punto, si definiscono i nuovi token (segnaposti, rispettivamente per gli attributi "href" e "title" del tag <a>, e il testo del link) aggiungendoli nella funzione sopra citata, dopo
Code: [Select]
        '{SEARCH_LNK}' => $lang_main_menu['search_lnk'],Lo schema è questo (sostituire TOPNALB con un segnaposto a propria scelta):
Code: [Select]
        '{TOPNALB_TGT}' => "thumbnails.php?album=topnalb$cat_l2",  // indirizzo link     
        '{TOPNALB_TITLE}' => $lang_main_menu['topnalb_title'], // titolo del link (per il popup sul mouseover)
        '{TOPNALB_LNK}' => $lang_main_menu['topnalb_lnk'], // testo del link

3) Solo se il tema prevede pulsanti e non semplici link nel SUB_MENU (vale a dire se non è attiva la definizione
Code: [Select]
define('THEME_HAS_NO_SUB_MENU_BUTTONS', 1);), si aggiunge il link vero e proprio inserendo, nella posizione in cui si vuole appaia il pulsante, un nuovo comando addbutton() in questo costrutto, da copiare ed incollare se non presente (nel mio caso, le righe aggiunte sono quelle 'lasthits' e 'topnalb'):
Code: [Select]
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,'{CUSTOM_LNK_LNK}','{CUSTOM_LNK_TITLE}','{CUSTOM_LNK_TGT}','custom_link',$template_sub_menu_spacer);
    addbutton($sub_menu_buttons,'{ALB_LIST_LNK}','{ALB_LIST_TITLE}','{ALB_LIST_TGT}','album_list',$template_sub_menu_spacer);
    addbutton($sub_menu_buttons,'{LASTUP_LNK}','{LASTUP_TITLE}','{LASTUP_TGT}','lastup',$template_sub_menu_spacer);
    addbutton($sub_menu_buttons,'{LASTCOM_LNK}','{LASTCOM_TITLE}','{LASTCOM_TGT}','lastcom',$template_sub_menu_spacer);
    addbutton($sub_menu_buttons,'{LASTHITS_LNK}', '{LASTHITS_TITLE}', '{LASTHITS_TGT}', 'lasthits', $template_sub_menu_spacer);       
    addbutton($sub_menu_buttons,'{TOPN_LNK}','{TOPN_TITLE}','{TOPN_TGT}','topn',$template_sub_menu_spacer);
    addbutton($sub_menu_buttons,'{TOPRATED_LNK}','{TOPRATED_TITLE}','{TOPRATED_TGT}','toprated',$template_sub_menu_spacer);
    addbutton($sub_menu_buttons,'{TOPNALB_LNK}', '{TOPNALB_TITLE}', '{TOPNALB_TGT}', 'topnalb', $template_sub_menu_spacer);       
    addbutton($sub_menu_buttons,'{FAV_LNK}','{FAV_TITLE}','{FAV_TGT}','favpics',$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);
}


4) Solo se il tema prevede semplici link anzichè pulsanti nel SUB_MENU (vale a dire se è attiva la definizione
Code: [Select]
define('THEME_HAS_NO_SUB_MENU_BUTTONS', 1);
) si aggiunge una riga, nella posizione in cui si vuole che appaia il link rispetto agli altri, alla variabile $template_sub_menu, ad es. - sempre per link di cui sopra - nel tema Connections:
Code: [Select]
                                            <li><a href="{TOPNALB_TGT}" title="{TOPNALB_TITLE}">{TOPNALB_LNK}</a></li>                 
5) Ovviamente, vanno anche create le voci di lingua (2) per il nuovo link, aggiungendole all'array $lang_main_menu in lang/tua_lingua.php. Ad es.
Code: [Select]
  'topnalb_title' => 'Mostra gli album più visitati',
  'topnalb_lnk' => 'Album più visitati',

Se servono altre dritte, chiedi pure.

Quote
Approfitto per segnalarvi una pagina in php che "estrae" i dati della Galleria in base a precise richieste e visualizza le le relative Foto e i dati associati.
Nata con lo scopo di controllare il contenuto della Galleria la PAGINA (http://actanaturae.actafungorum.org/botanica/albums.php?title=A) mi sembra sia una buona alternativa di visualizzazione.
Utile!
Title: Re: Modificare o aggiungere links nella home page
Post by: bingo on July 19, 2008, 12:22:39 pm
Grazie Ludo, proverò

Gianni
Title: Re: Modificare o aggiungere links nella home page
Post by: bingo on July 19, 2008, 11:20:55 pm
Mi spiace ma i file theme.php dei due stili che abbiamo (classic e rainy_day) hanno solamente una riga di codice e cioè:
 
define('THEME_IS_XHTML10_TRANSITIONAL',1);  e nient'altro.

Non c'è nemmeno la cartella sample, può darsi sia stata eliminata quando abbiamo tolto gli altri Temi.

Ho visto che nel file template.html ci sono i collegamenti ai link sotto forma di variabili del tipo

<td width="100%" align="center">
<h1>{GAL_NAME}</h1>
<h3>{GAL_DESCRIPTION}</h3><br />
{SYS_MENU} <br /> {SUB_MENU}
</td>

ed è presente anche il link personalizzato previsto dal programma.

...ma non so dove prenda questi valori, visto che il file theme.php è vuoto

Grazie per le dritte

Gianni

Title: Re: Modificare o aggiungere links nella home page
Post by: Ludo on July 21, 2008, 02:26:09 pm
Se non trovi la cartella themes/sample nella tua installazione locale, scaricati nuovamente l'intero pacchetto della Galleria...cosa che tra l'altro dovreste fare comunque con una certa urgenza, dovendo effettuare l'upgrade all'ultima versione (1.4.18).
Title: Re: Modificare o aggiungere links nella home page
Post by: gionda on July 21, 2008, 07:16:52 pm
Ciao bingo, la pagina per estrarre i titoli come funziona? è simile al "photo summary" come quello che puoi vedere [http://www.gardennauta.com]quì[/url]?
Title: Re: Modificare o aggiungere links nella home page
Post by: Ludo on July 21, 2008, 07:38:38 pm
Non è basata su Coppermine...
Title: Re: Modificare o aggiungere links nella home page
Post by: bingo on July 21, 2008, 11:31:16 pm
Ciao bingo, la pagina per estrarre i titoli come funziona? è simile al "photo summary" come quello che puoi vedere quì (http://www.gardennauta.com)?
In effetti è una pagina in PHP che sfrutta la connessione al database della galleria per estrarre alcuni dati come i nomi degli Albums ed i links alle foto associate.

bingo
Title: Re: Modificare o aggiungere links nella home page
Post by: Gabbo on September 16, 2008, 07:05:24 pm
Salve a tutti,mi aggrego a questo argomento per chiedervi come posso far "sparire" agli ospiti i links: Login - Lista Album - Ultimi Commenti - Più votati - Preferiti.
Cioè,questi link devono essere visibili solo agli Administrators.  ;)
Vi ringrazio anticipatamente per le risposte.  ;D
Title: Re: Modificare o aggiungere links nella home page
Post by: Davide Renda on September 17, 2008, 09:22:24 pm
http://forum.coppermine-gallery.net/index.php/topic,36605.0.html
Title: Re: Modificare o aggiungere links nella home page
Post by: Gabbo on September 18, 2008, 01:26:31 pm
Ciao e grazie per il link proposto. Quale plugin devo scaricare? quello in inglese della prima pagina? In Italiano quindi non c'è questo plugin?
Grazie ancora.
http://forum.coppermine-gallery.net/index.php/topic,36605.0.html
Title: Re: Modificare o aggiungere links nella home page
Post by: VEGA on January 28, 2009, 01:26:50 pm
Scusa ma sono impedito con il php :'( :-\. Ho letto di inserire 4 funzioni che devono essere prese dal thema sample, ma non capisco quali sono le parti di codice da inserire. Nel mio thema ho il codice che inserisco sotto e non ho capito se devo cancellare tutto tra i tag <?php e <? per inserire il codice necessario. Ho inserito tutto il codice che hai scritto tu per prova e mi appare la home page bianca :'(. Potresti essere un poco più alla mano nella spiegazione. Voglio imparare come si fa.Grazie


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

?
Title: Re: Modificare o aggiungere links nella home page
Post by: Ludo on January 28, 2009, 03:20:34 pm
I punti 3-5 mi sembrano chiari, no? Quel che non c'è si copia ed incolla da themes/sample/theme.php, poi si modifica eventualmente come indicato.
Lo stesso vale anche per quanto riguarda i primi 2 punti: prima di applicare le modifiche indicate dovrai copiare ed incollare da themes/sample/theme.php la funzione theme_main_menu e la variabile $template_sub_menu, che non sono comprese nel tuo theme.php
Per maggiore chiarezza vado a specificarlo nel messaggio.

P.S. per i moderatori: non sarebbe il caso di rendere questo topic una FAQ?
Title: Re: Modificare o aggiungere links nella home page
Post by: VEGA on January 28, 2009, 07:24:54 pm
non sono ancora riuscito completamente, però mi sembra di notare che il pulsante venga aggiunto nel menù superiore dove c'è home - registrati - login mentre io avrei necessità di inserirlo nel menù più in basso dove è presente lista album-cerca-arrivi recenti-commenti recenti ecc. (al momento non visibili perchè ho applicato il plugin final extract)
Title: Re: Modificare o aggiungere links nella home page
Post by: VEGA on January 29, 2009, 11:53:01 am
Nel mio caso ho un tema che prevede i pulsanti (rainy_day). Per inserirne altri sono intervenuto sul file

include/theme.inc.php


nella parte del codice:

Code: [Select]
// HTML template for template sub_menu buttons
  if (!isset($sub_menu_buttons)) { //{THEMES}
    // {HREF_LNK}{HREF_TITLE}{HREF_TGT}{BLOCK_ID}{SPACER}
   

addbutton($sub_menu_buttons,'{CUSTOM_LNK_LNK}','{CUSTOM_LNK_TITLE}','{CUSTOM_LNK_TGT}','custom_link',$template_sub_menu_space

r);
addbutton($sub_menu_buttons,'{ALB_LIST_LNK}','{ALB_LIST_TITLE}','{ALB_LIST_TGT}','album_list',$template_sub_menu_spacer);
addbutton($sub_menu_buttons,'{LASTUP_LNK}','{LASTUP_TITLE}','{LASTUP_TGT}','lastup',$template_sub_menu_spacer);
addbutton($sub_menu_buttons,'{SEARCH_LNK}','{SEARCH_TITLE}','{SEARCH_TGT}','search','');
addbutton($sub_menu_buttons,'{LASTCOM_LNK}','{LASTCOM_TITLE}','{LASTCOM_TGT}','lastcom',$template_sub_menu_spacer);
addbutton($sub_menu_buttons,'{TOPN_LNK}','{TOPN_TITLE}','{TOPN_TGT}','topn',$template_sub_menu_spacer);
addbutton($sub_menu_buttons,'{TOPRATED_LNK}','{TOPRATED_TITLE}','{TOPRATED_TGT}','toprated',$template_sub_menu_spacer);
addbutton($sub_menu_buttons,'{FAV_LNK}','{FAV_TITLE}','{FAV_TGT}','favpics',$template_sub_menu_spacer);

Quì ho copiato ed incollato una stringa qualunque e poi modificati i token nel seguente modo:

addbutton($sub_menu_buttons,'Contatti','inviami una

email
','http://www.sito.it/pagina.html"target=_blank','email',$template_sub_menu_spacer);


questo è il risultato:


Code: [Select]

addbutton($sub_menu_buttons,'{CUSTOM_LNK_LNK}','{CUSTOM_LNK_TITLE}','{CUSTOM_LNK_TGT}','custom_link',$template_sub_menu_spacer);
addbutton($sub_menu_buttons,'{ALB_LIST_LNK}','{ALB_LIST_TITLE}','{ALB_LIST_TGT}','album_list',$template_sub_menu_spacer);
addbutton($sub_menu_buttons,'Contatti','Inviami una email','http://www.sito.it/pagina.html"target=_blank','email',$template_sub_menu_spacer);
addbutton($sub_menu_buttons,'{LASTUP_LNK}','{LASTUP_TITLE}','{LASTUP_TGT}','lastup',$template_sub_menu_spacer);
addbutton($sub_menu_buttons,'{SEARCH_LNK}','{SEARCH_TITLE}','{SEARCH_TGT}','search','');
addbutton($sub_menu_buttons,'{LASTCOM_LNK}','{LASTCOM_TITLE}','{LASTCOM_TGT}','lastcom',$template_sub_menu_spacer);
addbutton($sub_menu_buttons,'{TOPN_LNK}','{TOPN_TITLE}','{TOPN_TGT}','topn',$template_sub_menu_spacer);
addbutton($sub_menu_buttons,'{TOPRATED_LNK}','{TOPRATED_TITLE}','{TOPRATED_TGT}','toprated',$template_sub_menu_spacer);
addbutton($sub_menu_buttons,'{FAV_LNK}','{FAV_TITLE}','{FAV_TGT}','favpics',$template_sub_menu_spacer);



- da notare che a seconda della posizione della stringa il pulsante verrà creato in una posizione diversa rispetto agli altri

- ho aggiunto il target=_blank perchè ho voluto che il collegamento aprisse la pagina in un'altra finestra



è la mia prima spiegazione, scusate se può risultare non chiara! :-[
Title: Re: Modificare o aggiungere links nella home page
Post by: Ludo on January 29, 2009, 03:51:33 pm
Per inserirne altri sono intervenuto sul file

include/theme.inc.php
Male, così le modifiche verranno sovrascritte dai futuri aggiornamenti!
Avresti dovuto copiare dal sample theme nel tuo theme.php l'intero costrutto indicato al punto 4) sopra, e poi aggiungervi il tuo pulsante.

Quote
Quì ho copiato ed incollato una stringa qualunque e poi modificati i token nel seguente modo:

addbutton($sub_menu_buttons,'Contatti','inviami una

email
','http://www.sito.it/pagina.html"target=_blank','email',$template_sub_menu_spacer);
Così è impossibile che funzioni, mancando una virgola ed essendo scambiate le posizioni dei valori corrispondenti ai vari segnaposto (token)!
Ad ogni modo, come indicato sopra, per ragioni di conformità di codice e - soprattutto - di localizzazione è sempre consigliabile utilizzare i token.
Title: Re: Modificare o aggiungere links nella home page
Post by: VEGA on January 29, 2009, 06:12:58 pm


forse intendi il punto 3 ed il file theme.php diventerebbe così?

<?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,'{CUSTOM_LNK_LNK}','{CUSTOM_LNK_TITLE}','{CUSTOM_LNK_TGT}','custom_link',$template_sub_menu_spacer);
    addbutton($sub_menu_buttons,'{ALB_LIST_LNK}','{ALB_LIST_TITLE}','{ALB_LIST_TGT}','album_list',$template_sub_menu_spacer);
    addbutton($sub_menu_buttons,'{LASTUP_LNK}','{LASTUP_TITLE}','{LASTUP_TGT}','lastup',$template_sub_menu_spacer);
    addbutton($sub_menu_buttons,'{LASTCOM_LNK}','{LASTCOM_TITLE}','{LASTCOM_TGT}','lastcom',$template_sub_menu_spacer);
    addbutton($sub_menu_buttons,'{LASTHITS_LNK}', '{LASTHITS_TITLE}', '{LASTHITS_TGT}', 'lasthits', $template_sub_menu_spacer);       
    addbutton($sub_menu_buttons,'{TOPN_LNK}','{TOPN_TITLE}','{TOPN_TGT}','topn',$template_sub_menu_spacer);
    addbutton($sub_menu_buttons,'{TOPRATED_LNK}','{TOPRATED_TITLE}','{TOPRATED_TGT}','toprated',$template_sub_menu_spacer);
    addbutton($sub_menu_buttons,'{TOPNALB_LNK}', '{TOPNALB_TITLE}', '{TOPNALB_TGT}', 'topnalb', $template_sub_menu_spacer);       
    addbutton($sub_menu_buttons,'{FAV_LNK}','{FAV_TITLE}','{FAV_TGT}','favpics',$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);

?>
Title: Re: Modificare o aggiungere links nella home page
Post by: Ludo on January 29, 2009, 07:06:15 pm
Esatto, manca solo la graffa finale } di chiusura dell'if
Poi rimuovi le righe corrispondenti ai pulsanti che non ti servono e ne aggiungi una
Code: [Select]
addbutton($sub_menu_buttons,'{BLOG_LNK}','{BLOG_TITLE}','{BLOG_TGT}','blog',$template_sub_menu_spacer);Poi copi ed incolli la funzione theme_main_menu dal sample theme e ci aggiungi le righe per i nuovi tokens come descritto ai punti 1-2
Infine inserisci le definizioni nei file di lingua come descritto al punto 5
Title: Re: Modificare o aggiungere links nella home page
Post by: VEGA on January 29, 2009, 07:14:14 pm
per capire questi tokens dovrei fare una cosa del genere?

Code: [Select]
'{blog_TGT}' => "http://www.sito.it/pagina.html"target=_blank",  // indirizzo link     
'{blog_TITLE}' => $lang_main_menu['Il_blog'], // titolo del link (per il popup sul

mouseover)
'{blog_LNK}' => $lang_main_menu['fai_click_per_vedere_il_blog'], // testo del link
poi nel file della lingua alla fine dopo search inserisco

Code: [Select]
'blog_title' => 'il_blog',
'blog_lnk' => 'fai click per vedere il blog',



ps scusate per il precedente post, perchè non l'ho inserito tra i tag code :-[
Title: Re: Modificare o aggiungere links nella home page
Post by: VEGA on January 29, 2009, 10:59:34 pm
e non è chiaro dove inserisco un link ad una pagina esterna tipo http://www.sito.it/pagina.html

grazie
Title: Re: Modificare o aggiungere links nella home page
Post by: Ludo 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',
Title: Re: Modificare o aggiungere links nella home page
Post by: 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
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;
}
?>

Title: Re: Modificare o aggiungere links nella home page
Post by: Ludo 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
Title: Re: Modificare o aggiungere links nella home page
Post by: VEGA 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!
Title: Re: Modificare o aggiungere links nella home page
Post by: VEGA 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
Title: Re: Modificare o aggiungere links nella home page
Post by: Ludo 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...
Title: Re: Modificare o aggiungere links nella home page
Post by: VEGA 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

Title: Re: Modificare o aggiungere links nella home page
Post by: Ludo 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...
Title: Re: Modificare o aggiungere links nella home page
Post by: VEGA 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','');
Title: Re: Modificare o aggiungere links nella home page
Post by: Ludo 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
Title: Re: Modificare o aggiungere links nella home page
Post by: VEGA 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!
Title: Re: Modificare o aggiungere links nella home page
Post by: Ludo 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.
Title: Re: Modificare o aggiungere links nella home page
Post by: VEGA 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
Title: Re: Modificare o aggiungere links nella home page
Post by: Ludo on February 03, 2009, 09:03:19 am
In qualsiasi punto prima che venga richiamata!
Title: Re: Modificare o aggiungere links nella home page
Post by: VEGA 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;
}
?>

Title: Re: Modificare o aggiungere links nella home page
Post by: Ludo on February 03, 2009, 11:24:53 pm
Perchè hai eliminato il contenuto originario del file?  ::)
Inizia col rimetterlo al suo posto...
Title: Re: Modificare o aggiungere links nella home page
Post by: VEGA 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;

Title: Re: Modificare o aggiungere links nella home page
Post by: VEGA 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;
}

?>

Title: Re: Modificare o aggiungere links nella home page
Post by: Ludo on February 04, 2009, 09:48:00 am
Mi sembra tutto ok...
Title: Re: Modificare o aggiungere links nella home page
Post by: VEGA 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! :'(
Title: Re: Modificare o aggiungere links nella home page
Post by: Ludo on February 04, 2009, 01:49:24 pm
Forse l'errore è nel lang/italian.php...prova con un'altra lingua.
Title: Re: Modificare o aggiungere links nella home page
Post by: VEGA on February 04, 2009, 02:58:20 pm
nella sezione // File theme.php del file della lingua blog_title e  blog_ink sono posizionati diversamente rispetto a quelli nel file theme.php. Potrebbe essere una causa?!

Code: [Select]
// File theme.php


$lang_main_menu = array(
  'home_title' => 'Vai alla pagina principale',
  'home_lnk' => 'Pagina Principale',
  'alb_list_title' => 'Vai alla lista album',
  'alb_list_lnk' => 'Lista Album',
  'my_gal_title' => 'Vai alla galleria personale',
  'my_gal_lnk' => 'Galleria Personale',
  'my_prof_title' => 'Vai al mio profilo personale', //cpg1.4
  'my_prof_lnk' => 'Profilo Personale',
  'adm_mode_title' => 'Passa a modo amministratore',
  'adm_mode_lnk' => 'Modo Amministratore',
  'usr_mode_title' => 'Passa a modo utente',
  'usr_mode_lnk' => 'Modo Utente',
  'upload_pic_title' => 'Carica file in un album',
  'upload_pic_lnk' => 'Carica File',
  'register_title' => 'Crea un account',
  'register_lnk' => 'Registrati',
  'login_title' => 'Login', //cpg1.4
  'login_lnk' => 'Login',
  'logout_title' => 'Logout', //cpg1.4
  'logout_lnk' => 'Logout',
  'lastup_title' => 'Mostra arrivi recenti', //cpg1.4
  'lastup_lnk' => 'Arrivi Recenti',
  'lastcom_title' => 'Mostra commenti recenti', //cpg1.4
  'lastcom_lnk' => 'Commenti Recenti',
  'topn_title' => 'Mostra files più visti', //cpg1.4
  'topn_lnk' => 'Più Visti',
  'toprated_title' => 'Mostra files più votati', //cpg1.4
  'toprated_lnk' => 'Più Votati',
  'search_title' => 'Cerca immagini', //cpg1.4
  'search_lnk' => 'Cerca nella Galleria',
  'fav_title' => 'Vai ai miei preferiti', //cpg1.4
  'fav_lnk' => 'Preferiti',
  'memberlist_title' => 'Mostra lista utenti',
  'memberlist_lnk' => 'Lista Utenti',
  'faq_title' => 'FAQ galleria &quot;Coppermine&quot;',
  'faq_lnk' => 'FAQ',
  'my_buddy_lnk' => 'Amici',
  'my_buddy_title' => 'Gestisci Amici',
 'blog_title' => 'Fotorisorse utility',
  'blog_lnk' => 'il blog',


theme.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'],
        '{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'],