Advanced search  

News:

cpg1.5.36 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.34 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: diffrent class for thumbnails views,date,comments,uploader name  (Read 3908 times)

0 Members and 1 Guest are viewing this topic.

allvip

  • Global Moderator
  • Coppermine addict
  • *****
  • Country: 00
  • Offline Offline
  • Posts: 1285
diffrent class for thumbnails views,date,comments,uploader name
« on: December 09, 2013, 01:37:56 PM »

I made changes to include/functions.inc.php to have diffrent class for thumbnails views,date,comments:

before the thumb title and the number users viewed a image had the same class:thumb_title,date and comments had class thumb_capption like thumb description.

for thumbnails views find:

Code: [Select]
if ($CONFIG['views_in_thumbview'] || in_array('hits', $must_have)) {
            $views = ($mode == 'albums') ? $row['alb_hits'] : $row['hits'];
            $caption .= '<span class="thumb_title">' . sprintf($lang_get_pic_data['n_views'], $views) . '</span>';
        }


replace thumb_title with your class (ex:thumb_view) :


for thumbnails date find:

Code: [Select]
if (in_array('msg_date', $must_have)) {
            $caption .= '<span class="thumb_caption">' . localised_date($row['msg_date'], $lang_date['lastcom']) . '</span>';


find:

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

find:

Code: [Select]
if (in_array('mtime', $must_have)) {

            $caption .= '<span class="thumb_caption">' . localised_date($row['mtime'], $lang_date['lasthit']);

replace thumb_caption for all 3 codes with your class (ex: thumb_date)

for thumbnails comments in last comments page find:

Code: [Select]
if ($row['author_id']) {
                $caption .= '<span class="thumb_caption"><a href="profile.php?uid=' . $row['author_id'] . '">' . $row['msg_author'] . '</a>: ' . $msg_body . '</span>';
            } else {
                $caption .= '<span class="thumb_caption">' . $row['msg_author'] . ': ' . $msg_body . '</span>';

replace thumb_caption with your class (ex:thumb_comments)

add thumb_view,thumb_date and thumb_comments to your your_theme_name/style.css and style it like you want.

for thumbnails uploader name just add .thumb_title a class to your_theme_name/style.css.
Logged

allvip

  • Global Moderator
  • Coppermine addict
  • *****
  • Country: 00
  • Offline Offline
  • Posts: 1285
Re: diffrent class for thumbnails views,date,comments,uploader name
« Reply #1 on: December 09, 2013, 01:39:16 PM »

Can I have diffrent class for thumbnails views,date,comments without editing coppermine files?
 just to add some code to theme.php?
« Last Edit: December 09, 2013, 01:47:39 PM by allvip »
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15211
Re: diffrent class for thumbnails views,date,comments,uploader name
« Reply #2 on: December 12, 2013, 10:08:44 AM »

I haven't checked the code but it's probably tricky or even not possible, as the title is created dynamically as you can see. You'd need to find out or guess which span contain which data. As we already added new CSS classes to the development version of cpg1.5.25, I don't mind to add further additional CSS classes. I'll have a look at it.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15211
Re: diffrent class for thumbnails views,date,comments,uploader name
« Reply #3 on: December 12, 2013, 10:42:16 AM »

Added CSS classes "thumb_title_title", "thumb_title_views", "thumb_title_owner", "thumb_caption_caption", "thumb_caption_msg_date", "thumb_caption_author", "thumb_caption_ctime", "thumb_caption_rating", "thumb_caption_mtime" to thumbnail meta data on thumbnails.php pages in SVN revision 8623. Will be part of cpg1.5.26 and later.
Logged

allvip

  • Global Moderator
  • Coppermine addict
  • *****
  • Country: 00
  • Offline Offline
  • Posts: 1285
Re: diffrent class for thumbnails views,date,comments,uploader name
« Reply #4 on: December 12, 2013, 01:29:19 PM »

great.thanks.
Logged

allvip

  • Global Moderator
  • Coppermine addict
  • *****
  • Country: 00
  • Offline Offline
  • Posts: 1285
Re: Re: diffrent class for thumbnails views,date,comments,uploader name
« Reply #5 on: June 22, 2015, 10:48:06 AM »

Deleted my post. I made I mistake. SORRY.
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4281
    • Windsurf.me
Re: diffrent class for thumbnails views,date,comments,uploader name
« Reply #6 on: June 22, 2015, 10:57:29 AM »

Even if you make a mistake, simply correct it in another post rather than deleting. We are all human and make mistakes.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

allvip

  • Global Moderator
  • Coppermine addict
  • *****
  • Country: 00
  • Offline Offline
  • Posts: 1285
Re: diffrent class for thumbnails views,date,comments,uploader name
« Reply #7 on: June 22, 2015, 11:06:15 AM »

OK.
Logged
Pages: [1]   Go Up
 

Page created in 0.065 seconds with 19 queries.