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]   Go Down

Author Topic: C’est possible effacer dans la page des catégories files et numéros des img?  (Read 6514 times)

0 Members and 1 Guest are viewing this topic.

BIIPmoni

  • Coppermine frequent poster
  • ***
  • Country: fr
  • Offline Offline
  • Gender: Female
  • Posts: 100

Bonjour ^__^
Comme le titre du topic , c’est possible ? (en haute à droite)
http://www.photolandimagebank.net/gallery/index.php?cat=3

merci, merci :)

ciao
Moni
Logged
Un homme qui n'est plus capable de s'émerveiller a pratiquement cessé de vivre. Einstein
<> Vivre à Lanslevillard c'est toujours s'émerveiller <>

François Keller

  • Moderator
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9094
  • aka Frantz
    • Ma galerie

oui, il faut modifier la fonction d'affichage des catégories (dans le fichier theme.php du thème ou prendre celle du fichier theme.php du theme sample et la placer dans le fichier theme.php de votre theme avant de la modifier)
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

BIIPmoni

  • Coppermine frequent poster
  • ***
  • Country: fr
  • Offline Offline
  • Gender: Female
  • Posts: 100

oui, il faut modifier la fonction d'affichage des catégories (dans le fichier theme.php du thème ou prendre celle du fichier theme.php du theme sample et la placer dans le fichier theme.php de votre theme avant de la modifier)

Merci :) , et je suis-je désolée pour le dérangement, mais je ne sais pas vraiment où corriger, ceci c’est le fichier du mon theme.php personnalisé, tu pourrais me dire qu'est-ce que je dois faire ? excuses moi , mais du script php je ne connais rien .
Toujours merci
Ciao
moni

Code: [Select]
<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2006 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 as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.
  ********************************************
  Coppermine version: 1.4.5
  $Source: /cvsroot/coppermine/stable/themes/classic/theme.php,v $
  $Revision: 1.16 $
  $Author: gaugau $
  $Date: 2006/03/02 08:25:15 $
**********************************************/

// ------------------------------------------------------------------------- //
// This theme has all CORE items removed                                     //
// ------------------------------------------------------------------------- //
//define('THEME_IS_XHTML10_TRANSITIONAL',1);


// HTML template for the category list
$template_cat_list = <<<EOT
<!-- BEGIN header -->
        <tr>
                <td class="tableh1" width="80%" align="left"><b>{CATEGORY}</b></td>
                <td class="tableh1" width="10%" align="center"><b>{ALBUMS}</b></td>
                <td class="tableh1" width="10%" align="center"><b>{PICTURES}</b></td>
        </tr>
<!-- END header -->
<!-- BEGIN catrow_noalb -->
        <tr>
                <td class="catrow_noalb" colspan="3"><table border="0"><tr><td align="left">{CAT_THUMB}</td><td align="left"><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>
        </tr>
<!-- END catrow_noalb -->
<!-- BEGIN catrow -->
        <tr>
                <td class="catrow" align="left"><table border="0"><tr><td>{CAT_THUMB}</td><td><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>
                <td class="catrow" align="center">{ALB_COUNT}</td>
                <td class="catrow" align="center">{PIC_COUNT}</td>
        </tr>
        <tr>
            <td class="tableb" colspan="3">{CAT_ALBUMS}</td>
        </tr>
<!-- END catrow -->
<!-- BEGIN footer -->
        <tr>
               <!-- <td colspan="3" class="tableh1" align="center"><span class="statlink">{STATISTICS}</span></td>-->
        </tr>
<!-- END footer -->
<!-- BEGIN spacer -->
        <img src="images/spacer.gif" width="1" height="7" border="" alt="" /><br />
<!-- END spacer -->

EOT;






// Added to display flim_strip
function theme_display_film_strip(&$thumb_list$nbThumb$album_name$aid$cat$pos$sort_options$mode 'thumb')
{
    global 
$CONFIG$THEME_DIR;
    global 
$template_film_strip$lang_film_strip;

    static 
$template '';
    static 
$thumb_cell '';
    static 
$empty_cell '';
    static 
$spacer '';

    if ((!
$template)) {
        
$template $template_film_strip;
        
$thumb_cell template_extract_block($template'thumb_cell');
        
$empty_cell template_extract_block($template'empty_cell');
    }

    
$cat_link is_numeric($aid) ? '' '&amp;cat=' $cat;

    
$thumbcols $CONFIG['thumbcols'];
    
$cell_width ceil(100 $CONFIG['max_film_strip_items']) . '%';

    
$i 0;
    
$thumb_strip '';
    foreach(
$thumb_list as $thumb) {
        
//modify $new_size for max dimension of thumbnails in filmstrip
        
$new_size 65;
        
preg_match('/(?<=width=")[0-9]*/',$thumb['image'],$matches,PREG_OFFSET_CAPTURE);
        
$srcWidth=$matches[0][0];
        
preg_match('/(?<=height=")[0-9]*/',$thumb['image'],$matches,PREG_OFFSET_CAPTURE);
        
$srcHeight=$matches[0][0];
        
$ratio max($srcWidth$srcHeight) / $new_size;
        
$ratio max($ratio1.0);
        
$destWidth = (int)($srcWidth $ratio);
        
$destHeight = (int)($srcHeight $ratio);
        
$thumb['image']=preg_replace('/width="[^"]*"/','width="'.$destWidth.'"',$thumb['image']);
        
$thumb['image']=preg_replace('/height="[^"]*"/','height="'.$destHeight.'"',$thumb['image']);
        
$i++;
        if (
$mode == 'thumb') {
            
$params = array('{CELL_WIDTH}' => $cell_width,
                
'{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&amp;pos={$thumb['pos']}",
                
'{THUMB}' => $thumb['image'],
                
'{CAPTION}' => $thumb['caption'],
                
'{ADMIN_MENU}' => ''
                
);
        } else {
            
$params = array('{CELL_WIDTH}' => $cell_width,
                
'{LINK_TGT}' => "index.php?cat={$thumb['cat']}",
                
'{THUMB}' => $thumb['image'],
                
'{CAPTION}' => '',
                
'{ADMIN_MENU}' => ''
                
);
        }
        
$thumb_strip .= template_eval($thumb_cell$params);
    }

    if (
defined('THEME_HAS_FILM_STRIP_GRAPHICS')) {
        
$tile1 $THEME_DIR 'images/tile1.gif';
        
$tile2 $THEME_DIR 'images/tile2.gif';
    } elseif (
defined('THEME_HAS_FILM_STRIP_GRAPHIC')) {
        
$tile1=$tile2=$THEME_DIR 'images/tile.gif';
    } else {
        
$tile1=$tile2'images/tile.gif';
    }

    
$params = array('{THUMB_STRIP}' => $thumb_strip,
        
'{COLS}' => $i,
        
'{TILE1}' => $tile1,
        
'{TILE2}' => $tile2,
        );

    
ob_start();
    
starttable($CONFIG['picture_table_width']);
    echo 
template_eval($template$params);
    
endtable();
    
$film_strip ob_get_contents();
    
ob_end_clean();

    return 
$film_strip;
}

$template_img_navbar = <<<EOT

        <tr>
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="{THUMB_TGT}" class="navmenu_pic" title="{THUMB_TITLE}"><img src="{LOCATION}images/thumbnails.gif" align="middle" border="0" alt="{THUMB_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="48">
                      
<!-- DEBUT lien vers les favorits (ajout FRANTZ) -->
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="{FAV_TGT}" class="navmenu_pic" title="{FAV_TITLE}"><img src="{LOCATION}images/favorites.png" border="0" align="middle" alt="{FAV_TITLE}" /></a>
                </td>
<!-- FIN Lien favorits (ajout FRANTZ) -->
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="{SLIDESHOW_TGT}" class="navmenu_pic" title="{SLIDESHOW_TITLE}"><img src="{LOCATION}images/slideshow.gif" border="0" align="middle" alt="{SLIDESHOW_TITLE}" /></a>
                </td>
                
                <td align="center" valign="middle" class="navmenu" width="100%">
                        {PIC_POS}
                </td>
<!-- BEGIN report_file_button -->
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="{REPORT_TGT}" class="navmenu_pic" title="{REPORT_TITLE}"><img src="{LOCATION}images/report.gif" border="0" align="middle" alt="{REPORT_TITLE}" /></a>
                </td>
<!-- END report_file_button -->
<!-- BEGIN ecard_button -->
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="{ECARD_TGT}" class="navmenu_pic" title="{ECARD_TITLE}"><img src="{LOCATION}images/ecard.gif"  border="0" align="middle" alt="{ECARD_TITLE}" /></a>
                </td>
<!-- END ecard_button -->
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="{PREV_TGT}" class="navmenu_pic" title="{PREV_TITLE}"><img src="{LOCATION}images/prev.gif"  border="0" align="middle" alt="{PREV_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="{NEXT_TGT}" class="navmenu_pic" title="{NEXT_TITLE}"><img src="{LOCATION}images/next.gif"  border="0" align="middle" alt="{NEXT_TITLE}" /></a>
                </td>
        </tr>

EOT;


function 
theme_html_img_nav_menu()
{
    global 
$CONFIG$CURRENT_PIC_DATA$meta_nav$THEME_DIR //$PHP_SELF,
    
global $album$cat$pos$pic_count$lang_img_nav_bar$lang_text_dir$template_img_navbar;
    global 
$lang_picinfo$FAVPICS ;//ajout pour icone favorits

    
$cat_link is_numeric($album) ? '' '&amp;cat=' $cat;
        
$uid_link is_numeric($_GET['uid']) ? '&amp;uid=' $_GET['uid'] : '';

    
$human_pos $pos 1;
    
$page ceil(($pos 1) / ($CONFIG['thumbrows'] * $CONFIG['thumbcols']));
    
$pid $CURRENT_PIC_DATA['pid'];

    
$start 0;
        
$start_tgt "{$_SERVER['PHP_SELF']}?album=$album$cat_link&amp;pos=$start";
        
$start_title $lang_img_nav_bar['go_album_start'];
        
$meta_nav .= "<link rel=\"start\" href=\"$start_tgt\" title=\"$start_title\" />
        "
;
        
$end $pic_count 1;
        
$end_tgt "{$_SERVER['PHP_SELF']}?album=$album$cat_link&amp;pos=$end";
        
$end_title $lang_img_nav_bar['go_album_end'];
        
$meta_nav .= "<link rel=\"last\" href=\"$end_tgt\" title=\"$end_title\" />
        "
;

    if (
$pos 0) {
        
$prev $pos 1;
        
$prev_tgt "{$_SERVER['PHP_SELF']}?album=$album$cat_link&amp;pos=$prev$uid_link";
        
$prev_title $lang_img_nav_bar['prev_title'];
                                
$meta_nav .= "<link rel=\"prev\" href=\"$prev_tgt\" title=\"$prev_title\" />
                                "
;
    } else {
        
$prev_tgt "javascript:;";
        
$prev_title "";
    }

    if (
$pos < ($pic_count -1)) {
        
$next $pos 1;
        
$next_tgt "{$_SERVER['PHP_SELF']}?album=$album$cat_link&amp;pos=$next$uid_link";
        
$next_title $lang_img_nav_bar['next_title'];
                                
$meta_nav .= "<link rel=\"next\" href=\"$next_tgt\" title=\"$next_title\"/>
                                "
;
    } else {
        
$next_tgt "javascript:;";
        
$next_title "";
    }

    if (
USER_CAN_SEND_ECARDS) {
        
$ecard_tgt "ecard.php?album=$album$cat_link&amp;pid=$pid&amp;pos=$pos";
        
$ecard_title $lang_img_nav_bar['ecard_title'];
    } else {
        
template_extract_block($template_img_navbar'ecard_button'); // added to remove button if cannot send ecard
        /*$ecard_tgt = "javascript:alert('" . addslashes($lang_img_nav_bar['ecard_disabled_msg']) . "');";
        $ecard_title = $lang_img_nav_bar['ecard_disabled'];*/
    
}

                
//report to moderator buttons
    
if (($CONFIG['report_post']==1) && (USER_CAN_SEND_ECARDS)) {
        
$report_tgt "report_file.php?album=$album$cat_link&amp;pid=$pid&amp;pos=$pos";
    } else { 
// remove button if report toggle is off
        
template_extract_block($template_img_navbar'report_file_button');

    }

                    
$thumb_tgt "thumbnails.php?album=$album$cat_link&amp;page=$page$uid_link";
        
$meta_nav .= "<link rel=\"up\" href=\"$thumb_tgt\" title=\"".$lang_img_nav_bar['thumb_title']."\"/>
        "
;

    
$slideshow_tgt "{$_SERVER['PHP_SELF']}?album=$album$cat_link$uid_link&amp;pid=$pid&amp;slideshow=".$CONFIG['slideshow_interval'];

    
$pic_pos sprintf($lang_img_nav_bar['pic_pos'], $human_pos$pic_count);

    if (
defined('THEME_HAS_NAVBAR_GRAPHICS')) {
            
$location$THEME_DIR;
        } else {
            
$location'';
        }
//ajout pour lien vers favorits (Frantz)
// Create the add to fav link
        
    
if (!in_array($CURRENT_PIC_DATA['pid'], $FAVPICS)) {
        
$fav_tgt  "addfav.php?album=$album$cat_link&amp;pid=$pid&amp;pos=$pos";
        
$fav_title $lang_picinfo['addFav'];
    } else {
        
$fav_tgt "addfav.php?album=$album$cat_link&amp;pid=$pid&amp;pos=$pos";
        
$fav_title $lang_picinfo['remFav'];
    }
//fin ajout
    
$params = array('{THUMB_TGT}' => $thumb_tgt,
        
'{THUMB_TITLE}' => $lang_img_nav_bar['thumb_title'],
        
'{PIC_INFO_TITLE}' => $lang_img_nav_bar['pic_info_title'],
        
'{SLIDESHOW_TGT}' => $slideshow_tgt,
        
'{SLIDESHOW_TITLE}' => $lang_img_nav_bar['slideshow_title'],
        
'{PIC_POS}' => $pic_pos,
        
'{ECARD_TGT}' => $ecard_tgt,
        
'{ECARD_TITLE}' => $ecard_title,
        
'{PREV_TGT}' => $prev_tgt,
        
'{PREV_TITLE}' => $prev_title,
        
'{NEXT_TGT}' => $next_tgt,
        
'{NEXT_TITLE}' => $next_title,
        
'{PREV_IMAGE}' => ($lang_text_dir=='ltr') ? 'prev' 'next',
        
'{NEXT_IMAGE}' => ($lang_text_dir=='ltr') ? 'next' 'prev',
        
'{REPORT_TGT}' => $report_tgt,
        
'{REPORT_TITLE}' => $lang_img_nav_bar['report_title'],
        
'{LOCATION}' => $location,
        
'{FAV_TGT}' => $fav_tgt,//ajout Frantz
      
'{FAV_TITLE}' => $fav_title,//ajout Frantz
        
);

    return 
template_eval($template_img_navbar$params);
}

// HTML template for the category list
if (!$_GET['cat'] > 0)
$template_cat_list = <<<EOT
<!-- BEGIN header -->
        <tr>
                <td class="tableh1" width="80%" align="left"><b>{CATEGORY}</b></td>
                <!-- <td class="tableh1" width="10%" align="center"><b>{ALBUMS}</b></td>
                <td class="tableh1" width="10%" align="center"><b>{PICTURES}</b></td> -->
        </tr>
<!-- END header -->
<!-- BEGIN catrow_noalb -->
        <tr>
                <td class="catrow_noalb" colspan="3"><table border="0"><tr><td align="left">{CAT_THUMB}</td><td align="left"><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>
        </tr>
<!-- END catrow_noalb -->
<!-- BEGIN catrow -->
        <tr>
                <td class="catrow" align="left"><table border="0"><tr><td>{CAT_THUMB}</td><td><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>
                <!-- <td class="catrow" align="center">{ALB_COUNT}</td>
                <td class="catrow" align="center">{PIC_COUNT}</td> -->
        </tr>
        <tr>
            <td class="tableb" colspan="3">{CAT_ALBUMS}</td>
        </tr>
<!-- END catrow -->
<!-- BEGIN footer -->
        <tr>
               <!-- <td colspan="3" class="tableh1" align="center"><span class="statlink">{STATISTICS}</span></td>-->
        </tr>
<!-- END footer -->
<!-- BEGIN spacer -->
        <img src="images/spacer.gif" width="1" height="7" border="" alt="" /><br />
<!-- END spacer -->
EOT;



?>

« Last Edit: June 20, 2010, 09:48:06 am by François Keller »
Logged
Un homme qui n'est plus capable de s'émerveiller a pratiquement cessé de vivre. Einstein
<> Vivre à Lanslevillard c'est toujours s'émerveiller <>

François Keller

  • Moderator
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9094
  • aka Frantz
    • Ma galerie

dans ton fichier theme.php remplace ce code
Code: [Select]
// HTML template for the category list
$template_cat_list = <<<EOT
<!-- BEGIN header -->
        <tr>
                <td class="tableh1" width="80%" align="left"><b>{CATEGORY}</b></td>
                <td class="tableh1" width="10%" align="center"><b>{ALBUMS}</b></td>
                <td class="tableh1" width="10%" align="center"><b>{PICTURES}</b></td>
        </tr>
<!-- END header -->
<!-- BEGIN catrow_noalb -->
        <tr>
                <td class="catrow_noalb" colspan="3"><table border="0"><tr><td align="left">{CAT_THUMB}</td><td align="left"><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>
        </tr>
<!-- END catrow_noalb -->
<!-- BEGIN catrow -->
        <tr>
                <td class="catrow" align="left"><table border="0"><tr><td>{CAT_THUMB}</td><td><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>
                <td class="catrow" align="center">{ALB_COUNT}</td>
                <td class="catrow" align="center">{PIC_COUNT}</td>
        </tr>
        <tr>
            <td class="tableb" colspan="3">{CAT_ALBUMS}</td>
        </tr>
<!-- END catrow -->
<!-- BEGIN footer -->
        <tr>
               <!-- <td colspan="3" class="tableh1" align="center"><span class="statlink">{STATISTICS}</span></td>-->
        </tr>
<!-- END footer -->
<!-- BEGIN spacer -->
        <img src="images/spacer.gif" width="1" height="7" border="" alt="" /><br />
<!-- END spacer -->

EOT;
par
Code: [Select]
// HTML template for the category list
$template_cat_list = <<<EOT
<!-- BEGIN header -->
        <tr>
                <td class="tableh1" width="80%" align="left"><b>{CATEGORY}</b></td>
                <td class="tableh1" width="10%" align="center"><b>{ALBUMS}</b></td>
                <td class="tableh1" width="10%" align="center"><b>{PICTURES}</b></td>
        </tr>
<!-- END header -->
<!-- BEGIN catrow_noalb -->
        <tr>
                <td class="catrow_noalb" colspan="3"><table border="0"><tr><td align="left">{CAT_THUMB}</td><td align="left"><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>
        </tr>
<!-- END catrow_noalb -->
<!-- BEGIN catrow -->
        <tr>
                <td class="catrow" align="left"><table border="0"><tr><td>{CAT_THUMB}</td><td><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>
            <!--    <td class="catrow" align="center">{ALB_COUNT}</td>
                <td class="catrow" align="center">{PIC_COUNT}</td> -->
        </tr>
        <tr>
            <td class="tableb" colspan="3">{CAT_ALBUMS}</td>
        </tr>
<!-- END catrow -->
<!-- BEGIN footer -->
        <tr>
               <!-- <td colspan="3" class="tableh1" align="center"><span class="statlink">{STATISTICS}</span></td>-->
        </tr>
<!-- END footer -->
<!-- BEGIN spacer -->
        <img src="images/spacer.gif" width="1" height="7" border="" alt="" /><br />
<!-- END spacer -->

EOT;
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

BIIPmoni

  • Coppermine frequent poster
  • ***
  • Country: fr
  • Offline Offline
  • Gender: Female
  • Posts: 100

François tu es Super !  Ça marche très bien ! Merci !!

Après j’ai effacé ça toujours dans le theme.php, et maintenant n’il y a plus aussi écrit Files et Albums :

Quote
<td class="tableh1" width="10%" align="center"><b>{ALBUMS}</b></td>
                <td class="tableh1" width="10%" align="center"><b>{PICTURES}</b></td>

Quote
  <!-- <td class="tableh1" width="10%" align="center"><b>{ALBUMS}</b></td>
                <td class="tableh1" width="10%" align="center"><b>{PICTURES}</b></td> -->

Ah s'il me plaît comme ça !
http://www.photolandimagebank.net/gallery/index.php?cat=8


J’ai écrit ce Mod dans le forum italien qui peut être sera utile aussi à autres personnes :
http://forum.coppermine-gallery.net/index.php/topic,65626.0.html
Bon lundi :)


 Ciao
Moni
Logged
Un homme qui n'est plus capable de s'émerveiller a pratiquement cessé de vivre. Einstein
<> Vivre à Lanslevillard c'est toujours s'émerveiller <>
Pages: [1]   Go Up
 

Page created in 0.053 seconds with 20 queries.