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: Removig informations from last updated albums  (Read 3923 times)

0 Members and 1 Guest are viewing this topic.

darkheartagram

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Removig informations from last updated albums
« on: August 25, 2009, 08:26:48 pm »

Hi

I'm trying to remove information such as category, date and statistics in lastalb ( last updated albums ) but I can't fing the file where it is (I'd like to have only album name ).

My page http://student.agh.edu.pl/~pawelek/coppermine/index.php
CPG version 1.4.24
Logged

Nibbler

  • Guest
Re: Removig informations from last updated albums
« Reply #1 on: August 25, 2009, 09:08:55 pm »

Category and statistics are not displayed normally. You must have applied some mod to accomplish that. Check the build_caption function in include/functions.inc.php
Logged

darkheartagram

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: Removig informations from last updated albums
« Reply #2 on: August 25, 2009, 09:38:17 pm »

Code: [Select]
function build_caption(&$rowset,$must_have=array())
{
    global $CONFIG, $THEME_DIR;
    global $album_date_fmt, $lastcom_date_fmt, $lastup_date_fmt, $lasthit_date_fmt, $cat;
    global $lang_get_pic_data, $lang_meta_album_names, $lang_errors;

    foreach ($rowset as $key => $row) {
        $caption='';
        if ($CONFIG['display_filename']) {
          $caption .='<span class="thumb_filename">' . $row['filename'] . '</span>';
        }

        $caption .= ($row['title']) ? '' : '';

        if ($CONFIG['views_in_thumbview'] || in_array('hits',$must_have)) {
            $caption .= '<span class="thumb_title">' . sprintf($lang_get_pic_data['n_views'], $row['hits']).'</span>';
        }
        if ($CONFIG['caption_in_thumbview']){
            $caption .= $row['caption'] ? "test1<span class=\"thumb_1caption\">".strip_tags(bb_decode($row['caption']))."</span>" : '';
        }
        if ($CONFIG['display_comment_count']) {
            $comments_nr = count_pic_comments($row['pid']);
            if ($comments_nr > 0) {
                $caption .= "test2<span class=\"thumb_num_comments\">".sprintf($lang_get_pic_data['n_comments'], $comments_nr )."</span>";
            }
        }
        if ($CONFIG['display_uploader'] /*&& !in_array($row['owner_id'],$CONFIG['ADMIN_USERS']) *|| ($CONFIG['display_admin_uploader'] && in_array($row['owner_id'],$CONFIG['ADMIN_USERS']))*/) {
            $caption .= ($row['owner_id'] && $row['owner_name']) ? '<span class="thumb_title" ><a href ="profile.php?uid='.$row['owner_id'].'">'.$row['owner_name'].'</a></span>' : '';
        }

        if (in_array('msg_date',$must_have)) {
            $caption .= 'test3<span class="thumb_caption" alt="6">'.localised_date($row['msg_date'], $lastcom_date_fmt).'</span>';
        }
        if (in_array('msg_body',$must_have)) {
            $msg_body = strip_tags(bb_decode($row['msg_body'])); // I didn't want to fully bb_decode the message where report to admin isn't available. -donnoman
            $msg_body = utf_strlen($msg_body) > 50 ? utf_substr($msg_body,0,50).'...': $msg_body;
            if ($CONFIG['enable_smilies']) $msg_body = process_smilies($msg_body);
            if ($row['author_id']) {
                $caption .= 'test4<span class="thumb_caption" alt="5"><a href ="profile.php?uid='.$row['author_id'].'">'.$row['msg_author'].'</a>: '.$msg_body.'</span>';
            } else {
                    $caption .= 'test5<span class="thumb_caption" alt="4">'.$row['msg_author'].': '.$msg_body.'</span>';
            }
        }
        if (in_array('ctime',$must_have)) {
            $caption .= '<span class="thumb_caption" alt="3">'.localised_date($row['ctime'], $lastup_date_fmt).'</span>';
        }
        if (in_array('pic_rating',$must_have)) {
            if (defined('THEME_HAS_RATING_GRAPHICS')) {
                $prefix= $THEME_DIR;
            } else {
                $prefix= '';
            }
            $caption .= "<span class=\"thumb_caption\">".'<img src="'.$prefix.'images/rating'.round($row['pic_rating']/2000).'.gif" alt=""/>'.'<br />'.sprintf($lang_get_pic_data['n_votes'], $row['votes']).'</span>';
        }
        if (in_array('mtime',$must_have)) {
                $caption .= "<span class=\"thumb_caption\">".localised_date($row['mtime'], $lasthit_date_fmt);
                if (GALLERY_ADMIN_MODE) {
                  $caption .="<br/>".$row['lasthit_ip'];
                }
                $caption .='</span>';
        }

        $rowset[$key]['caption_text'] = $caption;
    }
    $rowset = CPGPluginAPI::filter('thumb_caption',$rowset);
}

Here is the code I can't find something strange in it
Logged

darkheartagram

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: Removig informations from last updated albums
« Reply #3 on: August 25, 2009, 11:41:44 pm »

ok I've found that code below show it

Code: [Select]
if (in_array('ctime',$must_have)) {
            $caption .= '<span class="thumb_caption" alt="3">'.localised_date($row['ctime'], $lastup_date_fmt).'</span>';
        }

So tell me what is wrong and where to look now. That code showind also date in last added photos
Logged

darkheartagram

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: Removig informations from last updated albums
« Reply #4 on: August 26, 2009, 12:19:38 am »

Solved, search album plugin cause that problem

After uninstall I have new one. Probably I deleted something and I don't have album title below thumbnail. Where repair it?
Logged

darkheartagram

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: Removig informations from last updated albums
« Reply #5 on: August 26, 2009, 12:33:02 am »

All problems solved. Sorry for mistake
Logged
Pages: [1]   Go Up
 

Page created in 0.034 seconds with 19 queries.