Advanced search  

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

Pages: [1]   Go Down

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

0 Members and 1 Guest are viewing this topic.

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
diffrent class for thumbnails views,date,comments,uploader name
« on: December 09, 2013, 12: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

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: diffrent class for thumbnails views,date,comments,uploader name
« Reply #1 on: December 09, 2013, 12: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, 12:47:39 pm by allvip »
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: diffrent class for thumbnails views,date,comments,uploader name
« Reply #2 on: December 12, 2013, 09: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: 15764
Re: diffrent class for thumbnails views,date,comments,uploader name
« Reply #3 on: December 12, 2013, 09: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

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

great.thanks.
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
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

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • 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

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
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.02 seconds with 19 queries.