Advanced search  

News:

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

Pages: [1]   Go Down

Author Topic: Modifier la balise "title" dans les albums  (Read 2446 times)

0 Members and 1 Guest are viewing this topic.

jessy1991

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Modifier la balise "title" dans les albums
« on: March 08, 2011, 05:03:27 pm »

Bonjour à tous ! :)

J'aimerai que dans tout mes albums, pouvoir rajouter dans la balise "title" Le mot "Photo :" sans avoir à le rajouter moi même sur TOUT les albums, de façon à avoir tout en haut de l'écran : Photo : {Nom_de_l_album}

Une idée ? Merci beaucoup ! :)
Logged

François Keller

  • Moderator
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9094
  • aka Frantz
    • Ma galerie
Re: Modifier la balise "title" dans les albums
« Reply #1 on: March 08, 2011, 09:44:33 pm »

Bonjour,

dans le fichier theme.php de votre theme, ajoutez la section ci-dessous si elle n'y est pas encore
Code: [Select]
/******************************************************************************
** Section <<<theme_page_title>>> - START
******************************************************************************/
// Creates the title tag for each page
// For the sake of search engine friendliness, the dynamic part $section should come first
function theme_page_title($section)
{
    global $CONFIG;
    $return = strip_tags(bb_decode($section)) . ' - ' . $CONFIG['gallery_name'];
    return $return;
}
/******************************************************************************
** Section <<<theme_page_title>>> - END
******************************************************************************/
Modifiez la en fonction de vos besoins, par exemple comme ceci
Code: [Select]
/******************************************************************************
** Section <<<theme_page_title>>> - START
******************************************************************************/
// Creates the title tag for each page
// For the sake of search engine friendliness, the dynamic part $section should come first
function theme_page_title($section)
{
    global $CONFIG;
    $return = "Photo: ".strip_tags(bb_decode($section)) . ' - ' . $CONFIG['gallery_name'];
    return $return;
}
/******************************************************************************
** Section <<<theme_page_title>>> - END
******************************************************************************/
mais dans cet exemple, le mot photos est ajouté à tous les titres, si vous ne voulez le mot photos que lorsque les albums sont affichés, il faut mettre une boucle de condition dans la fonction
Logged
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog
Pages: [1]   Go Up
 

Page created in 0.032 seconds with 19 queries.