View Counter Placement View Counter Placement
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

View Counter Placement

Started by uglycars, September 08, 2008, 05:40:01 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

uglycars

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!

Nibbler

Re-arrange the blocks of code in the build_caption() function in include/functions.inc.php.

uglycars

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

Joachim Müller

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.

uglycars

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!