[Solved]: Thumbnail-view question about statistics [Solved]: Thumbnail-view question about statistics
 

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

Main Menu

[Solved]: Thumbnail-view question about statistics

Started by furiousweebee, June 03, 2004, 06:56:57 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

furiousweebee

Man that was hard to word the subject of this topic.

But anyway, on the thumbnail gallery view (where all the photos of that album are displayed), it has the title of each image, in addition to the number of views. This is a ridiculously trivial thing, but I'd like to put some spacing between the title and the "-X Views" text underneath the images. I've looked through the English.php, theme.php and several other pages but can't seem to find it exactly. Any help finding this piece of code would be greatly appreciated. Thanks.

Joachim Müller

edit include/functions.inc.php and find                // Set picture caption
                if ($set_caption) foreach ($rowset as $key => $row){
                        $caption = ($rowset[$key]['title']||$rowset[$key]['hits']) ? "<span class=\"thumb_title\">".$rowset[$key]['title'].(($rowset[$key]['title'])?"-":"").sprintf($lang_get_pic_data['n_views'], $rowset[$key]['hits'])."</span>" : '';
                        if ($CONFIG['caption_in_thumbview']){
                           $caption .= $rowset[$key]['caption'] ? "<span class=\"thumb_caption\">".bb_decode(($rowset[$key]['caption']))."</span>" : '';
                        }
                        if ($CONFIG['display_comment_count']) {
                                $comments_nr = count_pic_comments($row['pid']);
                                if ($comments_nr > 0) $caption .= "<span class=\"thumb_num_comments\">".sprintf($lang_get_pic_data['n_comments'], $comments_nr )."</span>";
                        }
                        $rowset[$key]['caption_text'] = $caption;
                }

                return $rowset;
        }
Edit accordingly...

GauGau

furiousweebee

Thanks for the help, I've found that part but I'm by no means a PHP expert so I'm not sure which part I should be removing. I want to get rid of the dash, followed by the number of views. Could you possibly show me what I should change the code to? Sorry to be a pain... and thanks again.

Joachim Müller

Replace $caption = ($rowset[$key]['title']||$rowset[$key]['hits']) ? "<span class=\"thumb_title\">".$rowset[$key]['title'].(($rowset[$key]['title'])?"-":"").sprintf($lang_get_pic_data['n_views'], $rowset[$key]['hits'])."</span>" : '';with$caption = ($rowset[$key]['title']||$rowset[$key]['hits']) ? "<span class=\"thumb_title\">".$rowset[$key]['title'];

GauGau

furiousweebee

Thanks for that. It ended up being slightly different to what you said. So in case anyone else wants to do this in future, here's what I changed it to:

$caption = ($rowset[$key]['title']||$rowset[$key]['hits']) ? "<span class=\"thumb_title\">".$rowset[$key]['title']."</span>":"";