forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: allvip on December 09, 2013, 12:37:56 pm

Title: diffrent class for thumbnails views,date,comments,uploader name
Post by: allvip 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.
Title: Re: diffrent class for thumbnails views,date,comments,uploader name
Post by: allvip 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?
Title: Re: diffrent class for thumbnails views,date,comments,uploader name
Post by: Αndré 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.
Title: Re: diffrent class for thumbnails views,date,comments,uploader name
Post by: Αndré 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.
Title: Re: diffrent class for thumbnails views,date,comments,uploader name
Post by: allvip on December 12, 2013, 12:29:19 pm
great.thanks.
Title: Re: Re: diffrent class for thumbnails views,date,comments,uploader name
Post by: allvip on June 22, 2015, 10:48:06 am
Deleted my post. I made I mistake. SORRY.
Title: Re: diffrent class for thumbnails views,date,comments,uploader name
Post by: Phill Luckhurst 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.
Title: Re: diffrent class for thumbnails views,date,comments,uploader name
Post by: allvip on June 22, 2015, 11:06:15 am
OK.