Eliminate Dates Eliminate Dates
 

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

Main Menu

Eliminate Dates

Started by mjz55, June 21, 2006, 05:43:39 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mjz55

I tried the search and read the FAQ's so hopefully I didn't miss this question from before.

I want to eliminate the dates under the pictures.  IE: 2 files, last one added on Jan 15, 2006.  There are also dates under latest additions section.

I didn't see the toggle in admin area.

Thanks

Paver

#1
Those are two different issues.

Album date removal

If you want to remove the entire stats line for an album, which includes the number of files, the last added date, and the number of linked files, you can merely remove the {ALB_INFOS} tag (and the entire line) from the two variables $template_album_list and $template_album_list_cat.  If you don't have these variables in themes/yourtheme/theme.php, then copy them from the sample theme.

If you want to remove the date only and keep the number of files, add the first line below (with its surrounding comments) in front of the next lines in the functions theme_display_album_list and theme_display_album_list_cat (with the same caveats about whether you already have those functions or not in your theme.php):
            // MOD - remove date from album info
            list($album['album_info'],$trash) = split(', ',$album['album_info'],2);
            // MOD - end
            $params = array('{COL_WIDTH}' => $column_width,
                '{ALBUM_TITLE}' => $album['album_title'],
                '{THUMB_CELL_WIDTH}' => $thumb_cell_width,
                '{ALB_LINK_TGT}' => "thumbnails.php?album={$album['aid']}",
                '{ALB_LINK_PIC}' => $album['thumb_pic'],
                '{ADMIN_MENU}' => $album['album_adm_menu'],
                '{ALB_DESC}' => $album['album_desc'],
                '{ALB_INFOS}' => $album['album_info'],
                );


Note that this will remove the "linked files" info as well.  If you want to keep the "linked files" info, you need to replace the one mod line with these two lines:
list($mod_albfiles,$trash,$trash,$mod_alblinkedfiles,$mod_albtotalfiles) = split(', ',$album['album_info'],5);
$album['album_info'] = $mod_albfiles . ($mod_alblinkedfiles ? ', '.$mod_alblinkedfiles.', '.$mod_albtotalfiles : '');

Note that this assumes you have a comma before the year in your date display.  If you don't, you need to change '5' to '4' in the first line and remove the second $trash from the same line.

Date Removal from Thumbnail Caption
Use this plugin: Advanced Captions

Hulaqueen


Gahlok

QuoteIf you want to remove the entire stats line for an album, which includes the number of files, the last added date, and the number of linked files, you can merely remove the {ALB_INFOS} tag (and the entire line) from the two variables $template_album_list and $template_album_list_cat.  If you don't have these variables in themes/yourtheme/theme.php, then copy them from the sample theme.

Sorry, but what exactly do I have to copy over? I searched for the words used and they are all over the sample theme.php, so I'm not really sure from where I should start copying.

Sami

here is the $template_album_list

$template_album_list = <<<EOT

<!-- BEGIN stat_row -->
        <tr>
                <td colspan="{COLUMNS}" class="tableh1" align="center"><span class="statlink"><b>{STATISTICS}</b></span></td>
        </tr>
<!-- END stat_row -->
<!-- BEGIN header -->
        <tr class="tableb_compact">
<!-- END header -->
<!-- BEGIN album_cell -->
        <td width="{COL_WIDTH}%" valign="top">
        <table width="100%" cellspacing="0" cellpadding="0">
        <tr>
                <td colspan="3" height="1" align="left" valign="top" class="tableh2">
                        <span class="alblink"><a href="{ALB_LINK_TGT}"><b>{ALBUM_TITLE}</b></a></span>
                </td>
        </tr>
        <tr>
                <td colspan="3">
                        <img src="images/spacer.gif" width="1" height="1" border="0" alt="" /><br />
                </td>
        </tr>
        <tr>
                <td align="center" valign="middle" class="thumbnails">
                        <img src="images/spacer.gif" width="{THUMB_CELL_WIDTH}" height="1" class="image" style="margin-top: 0px; margin-bottom: 0px; border: none;" alt="" /><br />
                        <a href="{ALB_LINK_TGT}" class="albums">{ALB_LINK_PIC}<br /></a>
                </td>
                <td>
                        <img src="images/spacer.gif" width="1" height="1" border="0" alt="" />
                </td>
                <td width="100%" valign="top" align="left" class="tableb_compact">
                        {ADMIN_MENU}
                        <p>{ALB_DESC}</p>
                        <p class="album_stat">{ALB_INFOS}</p>
                </td>
        </tr>
        </table>
        </td>
<!-- END album_cell -->
<!-- BEGIN empty_cell -->
        <td width="{COL_WIDTH}%" valign="top">
        <table width="100%" cellspacing="0" cellpadding="0">
        <tr>
                <td height="1" valign="top" class="tableh2">
                        <b>&nbsp;</b>
                </td>
        </tr>
        <tr>
                <td>
                        <img src="images/spacer.gif" width="1" height="1" border="0" alt="" /><br />
                </td>
        </tr>
        <tr>
                <td width="100%" valign="top" class="tableb_compact">
                    <div class="thumbnails" style="background-color:transparent"><img src="images/spacer.gif" width="1" height="{SPACER}" border="0" class="image" style="border:0;margin-top:1px;margin-bottom:0" alt="" /></div>
                </td>
        </tr>
        </table>
        </td>
<!-- END empty_cell -->
<!-- BEGIN row_separator -->
        </tr>
        <tr class="tableb_compact">
<!-- END row_separator -->
<!-- BEGIN footer -->
        </tr>
<!-- END footer -->
<!-- BEGIN tabs -->
        <tr>
                <td colspan="{COLUMNS}" style="padding: 0px;">
                        <table width="100%" cellspacing="0" cellpadding="0">
                                <tr>
                                       {TABS}
                                </tr>
                        </table>
                </td>
        </tr>
<!-- END tabs -->
<!-- BEGIN spacer -->
        <img src="images/spacer.gif" width="1" height="7" border="" alt="" /><br />
<!-- END spacer -->

EOT;


and it's $template_album_list_cat

$template_album_list_cat = <<<EOT

<!-- BEGIN c_stat_row -->
        <tr>
                <td colspan="{COLUMNS}" class="tableh1" align="center"><span class="statlink"><b>{STATISTICS}</b></span></td>
        </tr>
<!-- END c_stat_row -->
<!-- BEGIN c_header -->
        <tr class="tableb_compact">
<!-- END c_header -->
<!-- BEGIN c_album_cell -->
        <td width="{COL_WIDTH}%" valign="top">
        <table width="100%" cellspacing="0" cellpadding="0">
        <tr>
                <td colspan="3" height="1" valign="top" class="tableh2">
                        <span class="alblink"><a href="{ALB_LINK_TGT}"><b>{ALBUM_TITLE}</b></a></span>
                </td>
        </tr>
        <tr>
                <td colspan="3">
                        <img src="images/spacer.gif" width="1" height="1" border="0" alt="" /><br />
                </td>
        </tr>
        <tr>
                <td align="center" valign="middle" class="thumbnails">
                        <img src="images/spacer.gif" width="{THUMB_CELL_WIDTH}" height="1" class="image" style="margin-top: 0px; margin-bottom: 0px; border: none;" alt="" /><br />
                        <a href="{ALB_LINK_TGT}" class="albums">{ALB_LINK_PIC}<br /></a>
                </td>
                <td>
                        <img src="images/spacer.gif" width="1" height="1" border="0" alt="" />
                </td>
                <td width="100%" valign="top" class="tableb_compact">
                        {ADMIN_MENU}
                        <p>{ALB_DESC}</p>
                        <p class="album_stat">{ALB_INFOS}</p>
                </td>
        </tr>
        </table>
        </td>
<!-- END c_album_cell -->
<!-- BEGIN c_empty_cell -->
        <td width="{COL_WIDTH}%" valign="top">
        <table width="100%" cellspacing="0" cellpadding="0" >
        <tr>
                <td height="1" valign="top" class="tableh2">
                        <b>&nbsp;</b>
                </td>
        </tr>
        <tr>
                <td>
                        <img src="images/spacer.gif" width="1" height="1" border="0" alt="" /><br />
                </td>
        </tr>
        <tr>
                <td width="100%" valign="top" class="tableb_compact" >
                      <div class="thumbnails" style="background-color:transparent"><img src="images/spacer.gif" width="1" height="{SPACER}" border="0" class="image" style="border:0;margin-top:1px;margin-bottom:0" alt="" /></div>
                </td>
        </tr>
        </table>
        </td>
<!-- END c_empty_cell -->
<!-- BEGIN c_row_separator -->
        </tr>
        <tr class="tableb_compact">
<!-- END c_row_separator -->
<!-- BEGIN c_footer -->
        </tr>
<!-- END c_footer -->
<!-- BEGIN c_tabs -->
        <tr>
                <td colspan="{COLUMNS}" style="padding: 0px;">
                        <table width="100%" cellspacing="0" cellpadding="0">
                                <tr>
                                       {TABS}
                                </tr>
                        </table>
                </td>
        </tr>
<!-- END c_tabs -->
<!-- BEGIN c_spacer -->
        <img src="images/spacer.gif" width="1" height="7" border="" alt="" /><br />
<!-- END c_spacer -->

EOT;

‍I don't answer to PM with support question
Please post your issue to related board

Gahlok


adam625

#6
I have trying to eliminate the dates only (NOT the # of files) as you said, but I do not know anything about PHP and can't seem to figure it out. I am using the digital_red theme. Any help would be great! Thanks

adam625

I think the reason I'm having trouble is {ALB_INFOS} is not anywhere within the theme.php. So what exactly do I need to add and/or remove? Any help would be great. Here is the exact coding I currently have in my theme.php file...

<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2005 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.3
  $Source: /cvsroot/coppermine/stable/themes/digital_red/theme.php,v $
  $Revision: 2.0 $
  $Author: DaMysterious $
  $Date: 2006-01-12 10:01:00 $
**********************************************/

define('THEME_IS_XHTML10_TRANSITIONAL',1);

// HTML template for main menu
$template_sys_menu = <<<EOT
                <span class="topmenu">

<!-- BEGIN my_gallery -->
                        <a href="{MY_GAL_TGT}" title="{MY_GAL_TITLE}">{MY_GAL_LNK}</a><br /><br />
<!-- END my_gallery -->

<!-- BEGIN allow_memberlist -->
                        <a href="{MEMBERLIST_TGT}" title="{MEMBERLIST_TITLE}">{MEMBERLIST_LNK}</a><br /><br />
<!-- END allow_memberlist -->

<!-- BEGIN my_profile -->
                        <a href="{MY_PROF_TGT}">{MY_PROF_LNK}</a><br /><br />
<!-- END my_profile -->

<!-- BEGIN faq -->
                        <a href="{FAQ_TGT}" title="{FAQ_TITLE}">{FAQ_LNK}</a><br /><br />
<!-- END faq -->

<!-- BEGIN enter_admin_mode -->
                        <a href="{ADM_MODE_TGT}" title="{ADM_MODE_TITLE}">{ADM_MODE_LNK}</a><br /><br />
<!-- END enter_admin_mode -->

<!-- BEGIN leave_admin_mode -->
                        <a href="{USR_MODE_TGT}" title="{USR_MODE_TITLE}">{USR_MODE_LNK}</a><br /><br />
<!-- END leave_admin_mode -->

<!-- BEGIN upload_pic -->
                        <a href="{UPL_PIC_TGT}" title="{UPL_PIC_TITLE}">{UPL_PIC_LNK}</a><br /><br />
<!-- END upload_pic -->

<!-- BEGIN register -->
                        <a href="{REGISTER_TGT}" title="{REGISTER_TITLE}">{REGISTER_LNK}</a><br /><br />
<!-- END register -->

<!-- BEGIN login -->
                        <a href="{LOGIN_TGT}" title="">{LOGIN_LNK}</a>
<!-- END login -->

<!-- BEGIN logout -->
                        <a href="{LOGOUT_TGT}" title="">{LOGOUT_LNK}</a><br />
<!-- END logout -->
</span>
EOT;

// HTML template for sub_menu
$template_sub_menu = <<<EOT

<!-- BEGIN custom_link -->
     <a href="{CUSTOM_LNK_TGT}" title="{CUSTOM_LNK_TITLE}">{CUSTOM_LNK_LNK}</a><br /><br />
<!-- END custom_link -->

<!-- BEGIN album_list -->
     <a href="{ALB_LIST_TGT}" title="{ALB_LIST_TITLE}">{ALB_LIST_LNK}</a><br /><br />
<!-- END album_list -->
<a href="{LASTUP_TGT}">{LASTUP_LNK}</a><br /><br />
<a href="{LASTCOM_TGT}">{LASTCOM_LNK}</a><br /><br />
<a href="{TOPN_TGT}">{TOPN_LNK}</a><br /><br />
<a href="{TOPRATED_TGT}">{TOPRATED_LNK}</a><br /><br />
<a href="{FAV_TGT}">{FAV_LNK}</a><br /><br />
<a href="{SEARCH_TGT}">{SEARCH_LNK}</a>

EOT;


?>


Sami

Read post of Paver , you can find this :
If you don't have these variables in themes/yourtheme/theme.php, then copy them from the sample theme

and check my old post you can find those two variable , just copy them to your theme.php
‍I don't answer to PM with support question
Please post your issue to related board

adam625

I tried inserting the code you had in your old post above, but it didn't work. I even tried inserting the following 3 lines in the sample theme file directly above the below code and uploading that and it still didn't work. 

// MOD - remove date from album info
list($album['album_info'],$trash) = split(', ',$album['album_info'],2);
// MOD - end

$params = array('{COL_WIDTH}' => $column_width,
'{ALBUM_TITLE}' => $album['album_title'],
'{THUMB_CELL_WIDTH}' => $thumb_cell_width,
'{ALB_LINK_TGT}' => "thumbnails.php?album={$album['aid']}",
'{ALB_LINK_PIC}' => $album['thumb_pic'],
'{ADMIN_MENU}' => $album['album_adm_menu'],
'{ALB_DESC}' => $album['album_desc'],
'{ALB_INFOS}' => $album['album_info'],
);

I'm not sure what I am doing wrong :(

adam625

Hooray... I finally managed to figure it out! :) Thanks for your help!

adam625

Well, just when I think I got it, I'm back to the beginning! :( I was using the sample theme.php and got it to work that way, but it was messing up other things. I once again tried inserting the variables above into the theme.php that I am currently uses (which is the code I gave above), but its not even close to working. Any more help you can provide would be great!

Sami

Sorry I didn't read your first post completely!
if you want to remove data you should try Advanced caption plugin
‍I don't answer to PM with support question
Please post your issue to related board

adam625

#13
Ok, Were both confused now... LOL! Attached in .zip format is the theme.php file I'm currently using. All I am wanting is instead of "12 files, last one added on Aug 10, 2006" being displayed on each album I want simply "12 files" My gallery can be found here http://gallery.adamsphotogallery.com/. I have tried everything you suggested, but I seem to be still going wrong somewhere. Could you update my theme.php to do this? Any help would be great! Thanks :)

Stramm

lang/english.php (or the lang file you're actually using)

find
  'last_added' => ', last one added on %s',
and replace with
  'last_added' => '',

next time please start your own thread

adam625

YES!!!!! :) That worked! Thanks a million!

Next time I will be sure to start a new thread!

Thanks again!!!

mjz55

Is there anybody that could do this for me?  How much?  Thanks.  My email is mjz55@yahoo.com

Sami

Please post your offer on Looking for Freelancers / Paid help
And also read the sticky on that board firsrt
‍I don't answer to PM with support question
Please post your issue to related board

mjz55

Sorry, didn't mean to break the rules

Sami

‍I don't answer to PM with support question
Please post your issue to related board