what in this code do i need to edit to make fav 1 column? what in this code do i need to edit to make fav 1 column?
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

what in this code do i need to edit to make fav 1 column?

Started by bit bit spears, March 22, 2004, 04:17:03 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bit bit spears

case 'favpics': // Favourite Pictures

                $album_name = $lang_meta_album_names['favpics'];
                if (count($FAVPICS)>0){
                        $favs = implode(",",$FAVPICS);
                        $result = db_query("SELECT COUNT(*) from {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' AND pid IN ($favs)");
                        $nbEnr = mysql_fetch_array($result);
                        $count = $nbEnr[0];
                        mysql_free_result($result);

                        $select_columns = '*';

                        $result = db_query("SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES'AND pid IN ($favs) $limit");
                        $rowset = db_fetch_rowset($result);

                        mysql_free_result($result);

                        if ($set_caption) foreach ($rowset as $key => $row){
                                $caption = $rowset[$key]['title'] ? "<span class=\"thumb_caption\">".($rowset[$key]['title'])."</span>" : '';
                                $caption .= $rowset[$key]['caption'] ? "<span class=\"thumb_caption\">".bb_decode(($rowset[$key]['caption']))."</span>" : '';
                                $rowset[$key]['caption_text'] = $caption.$rowset[$key]['pid'];
                        }
                }
                return $rowset;
                break;

ok~> all of my other album/thumbnail views have been set to four columns in config.php

but i want to make my fav page only one column/thumbnail per row.

how would i change this? without changing all of the other views to 1 column?

Tarique Sani

As you can see the retruned $rowset is an array - none of the rendering is happening here...

Look at functions display_thumbnails and theme_display_thumbnails
SANIsoft PHP applications for E Biz

bit bit spears

:?  im really confused by what you said-there isn't anything there that i could change to affect only the favorites

Tarique Sani

The snippet you have posted is from the function get_pic_data -

If you want to change the display you will have to look into function display_thumbnails and theme_display_thumbnails
SANIsoft PHP applications for E Biz

bit bit spears

:oops: i'm not a coder-just a confused person :oops:

here are the snippets from what you said to edit-i don't know what code i need to put in there to make the favorites page only have one column of thumbnails.

here is theme_display_thumbnails
               theme_display_thumbnails($thumb_list, $thumb_count, $album_name, $album, $cat, $page, $total_pages, is_numeric($album), $display_tabs);


i don't see how to modify this to change only the favorites thumbnails

and the same for this

here is display_thumbnails
function display_thumbnails($album, $cat, $page, $thumbcols, $thumbrows, $display_tabs)
{
        global $CONFIG, $AUTHORIZED, $HTTP_GET_VARS;
        global $album_date_fmt, $lang_display_thumbnails, $lang_errors, $lang_byte_units;

        $thumb_per_page = $thumbcols * $thumbrows;
        $lower_limit = ($page-1) * $thumb_per_page;

        $pic_data = get_pic_data($album, $thumb_count, $album_name, $lower_limit, $thumb_per_page);
        $total_pages = ceil($thumb_count / $thumb_per_page);

        $i = 0;
        if (count($pic_data) > 0) {
                foreach ($pic_data as $key => $row) {
                        $i++;

                        $image_size = compute_img_size($row['pwidth'], $row['pheight'], $CONFIG['thumb_width']);

                        $pic_title =$lang_display_thumbnails['filename'].$row['filename']."\n".
                                $lang_display_thumbnails['filesize'].($row['filesize'] >> 10).$lang_byte_units[1]."\n".
                                $lang_display_thumbnails['dimensions'].$row['pwidth']."x".$row['pheight']."\n".
                                $lang_display_thumbnails['date_added'].localised_date($row['ctime'], $album_date_fmt);

                        $thumb_list[$i]['pos'] = $key < 0 ? $key : $i - 1 + $lower_limit;
                        $thumb_list[$i]['image'] = "<img src=\"" . get_pic_url($row, 'thumb') . "\" class=\"image\" {$image_size['geom']} border=\"0\"></a>";
                        $thumb_list[$i]['caption'] = $row['caption_text'];
                        $thumb_list[$i]['admin_menu'] = '';
                        $thumb_list[$i]['aid'] = $row['aid'];
                }
                theme_display_thumbnails($thumb_list, $thumb_count, $album_name, $album, $cat, $page, $total_pages, is_numeric($album), $display_tabs);
        } else {
                theme_no_img_to_display($album_name);
        }
}



i am sooo confused-can you please code or help me code this section?

Tarique Sani

Am sorry - your request is too specific to your case, I can't help you any more than what has already been done

May be someone else will pick up the thread and help you further....
SANIsoft PHP applications for E Biz

bit bit spears


Joachim Müller


bit bit spears

i followed the rules, gaugau-you said not to bump the same day as the last post-so i didn't i did it a day later

Tarique Sani

:evil:  :evil:  :evil:  :evil:  :evil:  :evil:  :evil:  :evil:  :evil:  :evil:  :evil:  :evil:
One more of your smart alecky post and I will ban you.
SANIsoft PHP applications for E Biz