coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: uglycars on September 08, 2008, 05:40:01 AM

Title: View Counter Placement
Post by: uglycars on September 08, 2008, 05:40:01 AM
Is it possible to move the view counter below the Description of the photo versus being above it.

Looks rather odd having the:
Title
View Counter
Description

instead of:
Title
Description
View Counter

Any help is greatly appreciated!
Title: Re: View Counter Placement
Post by: Nibbler on September 08, 2008, 02:23:24 PM
Re-arrange the blocks of code in the build_caption() function in include/functions.inc.php.
Title: Re: View Counter Placement
Post by: uglycars on September 09, 2008, 10:04:47 PM
can you please explain to me what I have to move where.  I do not know ANY php so I'm not sure what function works with the view counter.

Thanks,
UglyCars
Title: Re: View Counter Placement
Post by: Joachim Müller on September 10, 2008, 07:22:54 AM
find        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>';
        }
and cut it out. Paste it in (into a new line) after        if ($CONFIG['caption_in_thumbview']){
            $caption .= $row['caption'] ? "<span class=\"thumb_caption\">".strip_tags(bb_decode($row['caption']))."</span>" : '';
        }
If you have no idea what you're doing you should not mess with such core files.
Title: Re: View Counter Placement
Post by: uglycars on September 10, 2008, 05:24:09 PM
I don't have problems modifying the code once I know what to move.

I've been editing php files for a while now with Mybb, but I just don't know any php.

Thanks for the help!  I'll try it out when I get home!