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: Stats and table layout on mainpage  (Read 5955 times)

0 Members and 1 Guest are viewing this topic.

redwax

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
    • Buy Images @ www.redwax.co.uk
Stats and table layout on mainpage
« on: July 27, 2006, 04:05:28 pm »

Hi

I want to remove the statistics from the main and sub pages.  You know, the bit at that top that says 'x files in x albums with x comments viewed x times' and at the bottom that says 'x albums on x page(s)'.  I have had a look about and seen http://forum.coppermine-gallery.net/index.php?topic=25375.0.  madeinhawaii's post didnt seem to help me and zac's did get rid of the text at the bottom but obviously leaves the table cell in tact (as could be seen by the remaining background color).

What I would like to do in not render this cell, or the one at the very top at all.  From looking at the css and messing with that I see that there are classes .maintable and tableh1 and assume these can be found somewhere and the relevant cell deleted.

Any help would be appreciated.  you might find it helpfull to see exactly which bits i mean by looking at the site http://redwax.co.uk/test
Logged
Buy photographs online at www.redwax.co.uk

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Stats and table layout on mainpage
« Reply #1 on: July 27, 2006, 04:26:05 pm »

- if you want to remove {STATISTICS} from end of category list you should edit $template_cat_list variable of your theme.php and remove
Code: [Select]
                <td colspan="3" class="tableh1" align="center"><span class="statlink"><b>{STATISTICS}</b></span></td>
- if you don't have the $template_cat_list variable on your theme copy it from sample/theme.php
Logged
‍I don't answer to PM with support question
Please post your issue to related board

redwax

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
    • Buy Images @ www.redwax.co.uk
Re: Stats and table layout on mainpage
« Reply #2 on: July 27, 2006, 05:50:06 pm »

Yeah, I have seen this also but it doesn't seem to work for me.  My theme.php didnt have the $template_cat_list variable so i added it as you suggested from the sample/theme.php, removed the line.   My theme.php now looks like this:

Code: [Select]
<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2005 Coppermine Dev Team
  v1.1 originaly 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.2
  $Source: /cvsroot/coppermine/devel/themes/classic/theme.php,v $
  $Revision: 1.71 $
  $Author: gaugau $
  $Date: 2005/10/25 01:16:24 $
**********************************************/

// ------------------------------------------------------------------------- //
// 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>
                
        </tr>
<!-- END footer -->
<!-- BEGIN spacer -->
        <img src="images/spacer.gif" width="1" height="7" border="" alt="" /><br />
<!-- END spacer -->

EOT;

// HTML template for gallery admin menu
$template_gallery_admin_menu = <<<EOT

                <div align="center">
                <table cellpadding="0" cellspacing="1">
                        <tr>
<!-- BEGIN admin_approval -->
                                <td class="admin_menu" id="admin_menu_anim"><a href="editpics.php?mode=upload_approval" title="{UPL_APP_TITLE}">{UPL_APP_LNK}</a></td>
<!-- END admin_approval -->
                                <td class="admin_menu"><a href="admin.php" title="{ADMIN_TITLE}">{ADMIN_LNK}</a></td>
                                <td class="admin_menu"><a href="shop.php" title="Shop">Shop Admin</a></td>
<td class="admin_menu"><a href="catmgr.php" title="{CATEGORIES_TITLE}">{CATEGORIES_LNK}</a></td>
                                <td class="admin_menu"><a href="albmgr.php{CATL}" title="{ALBUMS_TITLE}">{ALBUMS_LNK}</a></td>
                                <td class="admin_menu"><a href="groupmgr.php" title="{GROUPS_TITLE}">{GROUPS_LNK}</a></td>
                                <td class="admin_menu"><a href="usermgr.php" title="{USERS_TITLE}">{USERS_LNK}</a></td>
                                <td class="admin_menu"><a href="banning.php" title="{BAN_TITLE}">{BAN_LNK}</a></td>
                                <td class="admin_menu"><a href="reviewcom.php" title="{COMMENTS_TITLE}">{COMMENTS_LNK}</a></td>
<!-- BEGIN log_ecards -->
                                <td class="admin_menu"><a href="db_ecard.php" title="{DB_ECARD_TITLE}">{DB_ECARD_LNK}</a></td>
<!-- END log_ecards -->
                                <td class="admin_menu"><a href="picmgr.php" title="{PICTURES_TITLE}">{PICTURES_LNK}</a></td>
                                <td class="admin_menu"><a href="searchnew.php" title="{SEARCHNEW_TITLE}">{SEARCHNEW_LNK}</a></td>
                                <td class="admin_menu"><a href="util.php" title="{UTIL_TITLE}">{UTIL_LNK}</a></td>
                                <td class="admin_menu"><a href="profile.php?op=edit_profile" title="{MY_PROF_TITLE}">{MY_PROF_LNK}</a></td>
<!-- BEGIN documentation -->
                                <td class="admin_menu"><a href="{DOCUMENTATION_HREF}" title="{DOCUMENTATION_TITLE}" target="cpg_documentation">{DOCUMENTATION_LNK}</a></td>
<!-- END documentation -->
                        </tr>
                </table>
                </div>

EOT;

// HTML template for title row of the thumbnail view (album title + sort options)
if (!isset($template_thumb_view_title_row))  //{THEMES}
$template_thumb_view_title_row = <<<EOT

                        <table width="100%" cellpadding="0" cellspacing="0">
                        <tr>
                                <td width="35%" class="statlink"><h2>{ALBUM_NAME}</h2></td>
<td><img src="images/spacer.gif" width="1" alt="" /></td>
                                <td>
                                       {CLICK}
                                </td>
                        </tr>
                        </table>

EOT;

if (!
function_exists('theme_display_thumbnails')) {  //{THEMES}
function theme_display_thumbnails(&$thumb_list$nbThumb$album_name$aid$cat$page$total_pages$sort_options$display_tabs$mode 'thumb')
{
    global 
$CONFIG;
    global 
$template_thumb_view_title_row,$template_fav_thumb_view_title_row$lang_thumb_view$template_tab_display$template_thumbnail_view$lang_album_list;

    static 
$header '';
    static 
$thumb_cell '';
    static 
$empty_cell '';
    static 
$row_separator '';
    static 
$footer '';
    static 
$tabs '';
    static 
$spacer '';

    if (
$header == '') {
        
$thumb_cell template_extract_block($template_thumbnail_view'thumb_cell');
        
$tabs template_extract_block($template_thumbnail_view'tabs');
        
$header template_extract_block($template_thumbnail_view'header');
        
$empty_cell template_extract_block($template_thumbnail_view'empty_cell');
        
$row_separator template_extract_block($template_thumbnail_view'row_separator');
        
$footer template_extract_block($template_thumbnail_view'footer');
        
$spacer template_extract_block($template_thumbnail_view'spacer');
    }

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

    
$theme_thumb_tab_tmpl $template_tab_display;

    if (
$mode == 'thumb') {
        
$theme_thumb_tab_tmpl['left_text'] = strtr($theme_thumb_tab_tmpl['left_text'], array('{LEFT_TEXT}' => $aid == 'lastalb' $lang_album_list['album_on_page'] : $lang_thumb_view['pic_on_page']));
        
$theme_thumb_tab_tmpl['inactive_tab'] = strtr($theme_thumb_tab_tmpl['inactive_tab'], array('{LINK}' => 'thumbnails.php?album=' $aid $cat_link '&page=%d'));
        
$theme_thumb_tab_tmpl['inactive_next_tab'] = strtr($theme_thumb_tab_tmpl['inactive_next_tab'], array('{LINK}' => 'thumbnails.php?album=' $aid $cat_link '&page=%d'));
        
$theme_thumb_tab_tmpl['inactive_prev_tab'] = strtr($theme_thumb_tab_tmpl['inactive_prev_tab'], array('{LINK}' => 'thumbnails.php?album=' $aid $cat_link '&page=%d'));
    } else {
        
$theme_thumb_tab_tmpl['left_text'] = strtr($theme_thumb_tab_tmpl['left_text'], array('{LEFT_TEXT}' => $lang_thumb_view['user_on_page']));
        
$theme_thumb_tab_tmpl['inactive_tab'] = strtr($theme_thumb_tab_tmpl['inactive_tab'], array('{LINK}' => 'index.php?cat=' $cat '&page=%d'));
        
$theme_thumb_tab_tmpl['inactive_next_tab'] = strtr($theme_thumb_tab_tmpl['inactive_next_tab'], array('{LINK}' => 'index.php?cat=' $cat '&page=%d'));
        
$theme_thumb_tab_tmpl['inactive_prev_tab'] = strtr($theme_thumb_tab_tmpl['inactive_prev_tab'], array('{LINK}' => 'index.php?cat=' $cat '&page=%d'));
    }

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

    
$tabs_html $display_tabs create_tabs($nbThumb$page$total_pages$theme_thumb_tab_tmpl) : '';
    
// The sort order options are not available for meta albums
    
if ($sort_options) {
        
$param = array('{ALBUM_NAME}' => $album_name,
            
'{AID}' => $aid,
            
'{PAGE}' => $page,
            
'{NAME}' => $lang_thumb_view['name'],
            
'{TITLE}' => $lang_thumb_view['title'],
            
'{DATE}' => $lang_thumb_view['date'],
            
'{SORT_TA}' => $lang_thumb_view['sort_ta'],
            
'{SORT_TD}' => $lang_thumb_view['sort_td'],
            
'{SORT_NA}' => $lang_thumb_view['sort_na'],
            
'{SORT_ND}' => $lang_thumb_view['sort_nd'],
            
'{SORT_DA}' => $lang_thumb_view['sort_da'],
            
'{SORT_DD}' => $lang_thumb_view['sort_dd'],
            
'{POSITION}' => $lang_thumb_view['position'],
            
'{SORT_PA}' => $lang_thumb_view['sort_pa'],
            
'{SORT_PD}' => $lang_thumb_view['sort_pd'],
'{CLICK}' => $lang_thumb_view['click'],
            );
        
$title template_eval($template_thumb_view_title_row$param);
    } else if (
$aid == 'favpics' && $CONFIG['enable_zipdownload'] == 1) { //Lots of stuff can be added here later
       
$param = array('{ALBUM_NAME}' => $album_name,
                             
'{DOWNLOAD_ZIP}'=>$lang_thumb_view['download_zip']
                               );
       
$title template_eval($template_fav_thumb_view_title_row$param);
    }else{
        
$title $album_name;
    }


    if (
$mode == 'thumb') {
        
starttable('100%'$title$thumbcols);
    } else {
        
starttable('100%');
    }

    echo 
$header;

    
$i 0;
    foreach(
$thumb_list as $thumb) {
        
$i++;
        if (
$mode == 'thumb') {
            if (
$aid == 'lastalb') {
                
$params = array('{CELL_WIDTH}' => $cell_width,
                    
'{LINK_TGT}' => "thumbnails.php?album={$thumb['aid']}",
                    
'{THUMB}' => $thumb['image'],
                    
'{CAPTION}' => $thumb['caption'],
                    
'{ADMIN_MENU}' => $thumb['admin_menu']
                    );
            } else {
                
$params = array('{CELL_WIDTH}' => $cell_width,
                    
'{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&pos={$thumb['pos']}",
                    
'{THUMB}' => $thumb['image'],
                    
'{CAPTION}' => $thumb['caption'],
                    
'{ADMIN_MENU}' => $thumb['admin_menu']
                    );
            }
        } else {
            
$params = array('{CELL_WIDTH}' => $cell_width,
                
'{LINK_TGT}' => "index.php?cat={$thumb['cat']}",
                
'{THUMB}' => $thumb['image'],
                
'{CAPTION}' => $thumb['caption'],
                
'{ADMIN_MENU}' => ''
                
);
        }
        echo 
template_eval($thumb_cell$params);

        if (((
$i $thumbcols) == 0) && ($i count($thumb_list))) {
            echo 
$row_separator;
        }
    }
    for (;(
$i $thumbcols); $i++) {
        echo 
$empty_cell;
    }
    echo 
$footer;

    if (
$display_tabs) {
        
$params = array('{THUMB_COLS}' => $thumbcols,
            
'{TABS}' => $tabs_html
            
);
        echo 
template_eval($tabs$params);
    }

    
endtable();
    echo 
$spacer;
}
}
?>


Any other suggestions?
Logged
Buy photographs online at www.redwax.co.uk

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Stats and table layout on mainpage
« Reply #3 on: July 27, 2006, 05:59:38 pm »

It's funny cause I use your theme.php and it's working for me!!!!!
x files in x albums and x categories with x comments viewed x times is gone !
- i see that you have add some code from theme.inc.php you can safely delete if statement like this
Code: [Select]
if (!isset($template_thumb_view_title_row))
or this:
Code: [Select]
if (!function_exists('theme_display_thumbnails')) {  //{THEMES}
Logged
‍I don't answer to PM with support question
Please post your issue to related board

redwax

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
    • Buy Images @ www.redwax.co.uk
Re: Stats and table layout on mainpage
« Reply #4 on: July 27, 2006, 07:29:36 pm »

Hmm, it's all very confusing, what I dont understand is why it is there if it is not called in the theme.php.  It is odd to have to add code and delete a bit to stop it showing, surely, not having it there in the first place should mean that it isn't displayed!?  I must be missing something!?

It must mean that there is some other piece of the code that displays it?  I'm using the classic theme and have modified the .css colors and minor adjustments to the template.html.

Logged
Buy photographs online at www.redwax.co.uk

Nibbler

  • Guest
Re: Stats and table layout on mainpage
« Reply #5 on: July 27, 2006, 08:29:16 pm »

Adding code to your theme.php overrides the default behaviour. If the default behaviour is to have some code that includes something that you don't want then you need to override it with the same code but with the section you don't want removed. You should remove the additional 'if' code as suggested by bmossavari.
Logged

redwax

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
    • Buy Images @ www.redwax.co.uk
Re: Stats and table layout on mainpage
« Reply #6 on: July 27, 2006, 08:41:33 pm »

If i delete the if code (the exact code that bmossavari suggests) then nothing works at all!?

Thank you for the explantion re: the default bahaviour override thing, that makes sense to me now.  the question is, from where does the default behaviour originate and can I not modify this to get arround the problem I am having?

Appologies for being dumb, this is my first real exposure to php so I am learning as I go here, your help is much appreciated
Logged
Buy photographs online at www.redwax.co.uk

Nibbler

  • Guest
Re: Stats and table layout on mainpage
« Reply #7 on: July 27, 2006, 08:48:18 pm »

What do you mean 'nothing works'? Do you get a blank page or an error message?

When you remove

Code: [Select]
if (!function_exists('theme_display_thumbnails')) {  //{THEMES}
you must also remove the corresponding bracket from the end of the code

Code: [Select]
}
} // remove this line too
?>
Logged

redwax

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
    • Buy Images @ www.redwax.co.uk
Re: Stats and table layout on mainpage
« Reply #8 on: July 27, 2006, 09:03:42 pm »

I simply get a blank page if i remove

Code: [Select]
if (!isset($template_thumb_view_title_row))
Logged
Buy photographs online at www.redwax.co.uk

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Stats and table layout on mainpage
« Reply #9 on: July 27, 2006, 09:10:31 pm »

here is your theme.php with some changes it's work fine for me (statistics removed)
Code: [Select]
<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2005 Coppermine Dev Team
  v1.1 originaly 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.2
  $Source: /cvsroot/coppermine/devel/themes/classic/theme.php,v $
  $Revision: 1.71 $
  $Author: gaugau $
  $Date: 2005/10/25 01:16:24 $
**********************************************/

// ------------------------------------------------------------------------- //
// 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>
                
        </tr>
<!-- END footer -->
<!-- BEGIN spacer -->
        <img src="images/spacer.gif" width="1" height="7" border="" alt="" /><br />
<!-- END spacer -->

EOT;

// HTML template for gallery admin menu
$template_gallery_admin_menu = <<<EOT

                <div align="center">
                <table cellpadding="0" cellspacing="1">
                        <tr>
<!-- BEGIN admin_approval -->
                                <td class="admin_menu" id="admin_menu_anim"><a href="editpics.php?mode=upload_approval" title="{UPL_APP_TITLE}">{UPL_APP_LNK}</a></td>
<!-- END admin_approval -->
                                <td class="admin_menu"><a href="admin.php" title="{ADMIN_TITLE}">{ADMIN_LNK}</a></td>
                                <td class="admin_menu"><a href="shop.php" title="Shop">Shop Admin</a></td>
<td class="admin_menu"><a href="catmgr.php" title="{CATEGORIES_TITLE}">{CATEGORIES_LNK}</a></td>
                                <td class="admin_menu"><a href="albmgr.php{CATL}" title="{ALBUMS_TITLE}">{ALBUMS_LNK}</a></td>
                                <td class="admin_menu"><a href="groupmgr.php" title="{GROUPS_TITLE}">{GROUPS_LNK}</a></td>
                                <td class="admin_menu"><a href="usermgr.php" title="{USERS_TITLE}">{USERS_LNK}</a></td>
                                <td class="admin_menu"><a href="banning.php" title="{BAN_TITLE}">{BAN_LNK}</a></td>
                                <td class="admin_menu"><a href="reviewcom.php" title="{COMMENTS_TITLE}">{COMMENTS_LNK}</a></td>
<!-- BEGIN log_ecards -->
                                <td class="admin_menu"><a href="db_ecard.php" title="{DB_ECARD_TITLE}">{DB_ECARD_LNK}</a></td>
<!-- END log_ecards -->
                                <td class="admin_menu"><a href="picmgr.php" title="{PICTURES_TITLE}">{PICTURES_LNK}</a></td>
                                <td class="admin_menu"><a href="searchnew.php" title="{SEARCHNEW_TITLE}">{SEARCHNEW_LNK}</a></td>
                                <td class="admin_menu"><a href="util.php" title="{UTIL_TITLE}">{UTIL_LNK}</a></td>
                                <td class="admin_menu"><a href="profile.php?op=edit_profile" title="{MY_PROF_TITLE}">{MY_PROF_LNK}</a></td>
<!-- BEGIN documentation -->
                                <td class="admin_menu"><a href="{DOCUMENTATION_HREF}" title="{DOCUMENTATION_TITLE}" target="cpg_documentation">{DOCUMENTATION_LNK}</a></td>
<!-- END documentation -->
                        </tr>
                </table>
                </div>

EOT;

// HTML template for title row of the thumbnail view (album title + sort options)
$template_thumb_view_title_row = <<<EOT

                        <table width="100%" cellpadding="0" cellspacing="0">
                        <tr>
                                <td width="35%" class="statlink"><h2>{ALBUM_NAME}</h2></td>
<td><img src="images/spacer.gif" width="1" alt="" /></td>
                                <td>
                                       {CLICK}
                                </td>
                        </tr>
                        </table>

EOT;

function 
theme_display_thumbnails(&$thumb_list$nbThumb$album_name$aid$cat$page$total_pages$sort_options$display_tabs$mode 'thumb')
{
    global 
$CONFIG;
    global 
$template_thumb_view_title_row,$template_fav_thumb_view_title_row$lang_thumb_view$template_tab_display$template_thumbnail_view$lang_album_list;

    static 
$header '';
    static 
$thumb_cell '';
    static 
$empty_cell '';
    static 
$row_separator '';
    static 
$footer '';
    static 
$tabs '';
    static 
$spacer '';

    if (
$header == '') {
        
$thumb_cell template_extract_block($template_thumbnail_view'thumb_cell');
        
$tabs template_extract_block($template_thumbnail_view'tabs');
        
$header template_extract_block($template_thumbnail_view'header');
        
$empty_cell template_extract_block($template_thumbnail_view'empty_cell');
        
$row_separator template_extract_block($template_thumbnail_view'row_separator');
        
$footer template_extract_block($template_thumbnail_view'footer');
        
$spacer template_extract_block($template_thumbnail_view'spacer');
    }

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

    
$theme_thumb_tab_tmpl $template_tab_display;

    if (
$mode == 'thumb') {
        
$theme_thumb_tab_tmpl['left_text'] = strtr($theme_thumb_tab_tmpl['left_text'], array('{LEFT_TEXT}' => $aid == 'lastalb' $lang_album_list['album_on_page'] : $lang_thumb_view['pic_on_page']));
        
$theme_thumb_tab_tmpl['inactive_tab'] = strtr($theme_thumb_tab_tmpl['inactive_tab'], array('{LINK}' => 'thumbnails.php?album=' $aid $cat_link '&page=%d'));
        
$theme_thumb_tab_tmpl['inactive_next_tab'] = strtr($theme_thumb_tab_tmpl['inactive_next_tab'], array('{LINK}' => 'thumbnails.php?album=' $aid $cat_link '&page=%d'));
        
$theme_thumb_tab_tmpl['inactive_prev_tab'] = strtr($theme_thumb_tab_tmpl['inactive_prev_tab'], array('{LINK}' => 'thumbnails.php?album=' $aid $cat_link '&page=%d'));
    } else {
        
$theme_thumb_tab_tmpl['left_text'] = strtr($theme_thumb_tab_tmpl['left_text'], array('{LEFT_TEXT}' => $lang_thumb_view['user_on_page']));
        
$theme_thumb_tab_tmpl['inactive_tab'] = strtr($theme_thumb_tab_tmpl['inactive_tab'], array('{LINK}' => 'index.php?cat=' $cat '&page=%d'));
        
$theme_thumb_tab_tmpl['inactive_next_tab'] = strtr($theme_thumb_tab_tmpl['inactive_next_tab'], array('{LINK}' => 'index.php?cat=' $cat '&page=%d'));
        
$theme_thumb_tab_tmpl['inactive_prev_tab'] = strtr($theme_thumb_tab_tmpl['inactive_prev_tab'], array('{LINK}' => 'index.php?cat=' $cat '&page=%d'));
    }

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

    
$tabs_html $display_tabs create_tabs($nbThumb$page$total_pages$theme_thumb_tab_tmpl) : '';
    
// The sort order options are not available for meta albums
    
if ($sort_options) {
        
$param = array('{ALBUM_NAME}' => $album_name,
            
'{AID}' => $aid,
            
'{PAGE}' => $page,
            
'{NAME}' => $lang_thumb_view['name'],
            
'{TITLE}' => $lang_thumb_view['title'],
            
'{DATE}' => $lang_thumb_view['date'],
            
'{SORT_TA}' => $lang_thumb_view['sort_ta'],
            
'{SORT_TD}' => $lang_thumb_view['sort_td'],
            
'{SORT_NA}' => $lang_thumb_view['sort_na'],
            
'{SORT_ND}' => $lang_thumb_view['sort_nd'],
            
'{SORT_DA}' => $lang_thumb_view['sort_da'],
            
'{SORT_DD}' => $lang_thumb_view['sort_dd'],
            
'{POSITION}' => $lang_thumb_view['position'],
            
'{SORT_PA}' => $lang_thumb_view['sort_pa'],
            
'{SORT_PD}' => $lang_thumb_view['sort_pd'],
'{CLICK}' => $lang_thumb_view['click'],
            );
        
$title template_eval($template_thumb_view_title_row$param);
    } else if (
$aid == 'favpics' && $CONFIG['enable_zipdownload'] == 1) { //Lots of stuff can be added here later
       
$param = array('{ALBUM_NAME}' => $album_name,
                             
'{DOWNLOAD_ZIP}'=>$lang_thumb_view['download_zip']
                               );
       
$title template_eval($template_fav_thumb_view_title_row$param);
    }else{
        
$title $album_name;
    }


    if (
$mode == 'thumb') {
        
starttable('100%'$title$thumbcols);
    } else {
        
starttable('100%');
    }

    echo 
$header;

    
$i 0;
    foreach(
$thumb_list as $thumb) {
        
$i++;
        if (
$mode == 'thumb') {
            if (
$aid == 'lastalb') {
                
$params = array('{CELL_WIDTH}' => $cell_width,
                    
'{LINK_TGT}' => "thumbnails.php?album={$thumb['aid']}",
                    
'{THUMB}' => $thumb['image'],
                    
'{CAPTION}' => $thumb['caption'],
                    
'{ADMIN_MENU}' => $thumb['admin_menu']
                    );
            } else {
                
$params = array('{CELL_WIDTH}' => $cell_width,
                    
'{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&pos={$thumb['pos']}",
                    
'{THUMB}' => $thumb['image'],
                    
'{CAPTION}' => $thumb['caption'],
                    
'{ADMIN_MENU}' => $thumb['admin_menu']
                    );
            }
        } else {
            
$params = array('{CELL_WIDTH}' => $cell_width,
                
'{LINK_TGT}' => "index.php?cat={$thumb['cat']}",
                
'{THUMB}' => $thumb['image'],
                
'{CAPTION}' => $thumb['caption'],
                
'{ADMIN_MENU}' => ''
                
);
        }
        echo 
template_eval($thumb_cell$params);

        if (((
$i $thumbcols) == 0) && ($i count($thumb_list))) {
            echo 
$row_separator;
        }
    }
    for (;(
$i $thumbcols); $i++) {
        echo 
$empty_cell;
    }
    echo 
$footer;

    if (
$display_tabs) {
        
$params = array('{THUMB_COLS}' => $thumbcols,
            
'{TABS}' => $tabs_html
            
);
        echo 
template_eval($tabs$params);
    }

    
endtable();
    echo 
$spacer;
}
?>

try it
it should work , if it didn't work then you should check include/theme.inc.php in case you edit that !!!
Logged
‍I don't answer to PM with support question
Please post your issue to related board

redwax

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
    • Buy Images @ www.redwax.co.uk
Re: Stats and table layout on mainpage
« Reply #10 on: July 27, 2006, 09:16:48 pm »

Cool, well, here is the result http://www.redwax.co.uk/test/index.php

All exactly the same, with the stats in there.  So, I will have a look at the include/theme.inc.php and see what's happening there.

Thanks a million
Logged
Buy photographs online at www.redwax.co.uk

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Stats and table layout on mainpage
« Reply #11 on: July 27, 2006, 09:48:58 pm »

- you are using 1.4.2 , you should upgrade to most recent version (1.4.8)
« Last Edit: July 28, 2006, 07:10:36 am by GauGau »
Logged
‍I don't answer to PM with support question
Please post your issue to related board
Pages: [1]   Go Up
 

Page created in 0.03 seconds with 20 queries.