forum.coppermine-gallery.net

Support => Older/other versions => cpg1.2 PHPnuke/Postnuke Support => Topic started by: tkx on November 29, 2003, 10:00:38 am

Title: RC4 missing user album navigation! (breadcrumbs)
Post by: tkx on November 29, 2003, 10:00:38 am
if you are in a specific user album, the album name doesn't show up in the menu... you have to go all the way back to the user directory...   Where can I fix this so that the album name shows in the "Home > User galleries > myuser > (missing part)  ????
Title: RC4 missing user album navigation! (breadcrumbs)
Post by: gtroll on November 29, 2003, 10:32:17 am
Is this in displayimage or thumbnails.php or? I am making a fix to displayimage as we speak and will post the code as a sticky.
Title: RC4 missing user album navigation! (breadcrumbs)
Post by: tkx on November 29, 2003, 10:34:55 am
modules.php?name=coppermine&file=displayimage&album=random&cat=&pos=-545

Quote from: "gtroll"
Is this in displayimage or thumbnails.php or? I am making a fix to displayimage as we speak and will post the code as a sticky.
Title: RC4 missing user album navigation! (breadcrumbs)
Post by: tkx on November 29, 2003, 10:59:36 am
Nope, didn't work...

also what's with "if ($this_id < 2) $this_name = 'Mr. X';"  ??? was that for testing// :)..  



Quote from: "gtroll"
Ok it's sounds like the problem I am just fixing try this and tell me if it works for you
replace:
Code: [Select]
if (is_numeric($album)) {
                $cat = - $album;
                $actual_cat = $CURRENT_ALBUM_DATA['category'];
                breadcrumb($actual_cat, $breadcrumb, $breadcrumb_text);
                $cat = - $album;
            } else {
                $actual_cat = $CURRENT_ALBUM_DATA['category'];
                $RES = db_query("SELECT catname FROM {$CONFIG['TABLE_CATEGORIES']} WHERE cid='{$CURRENT_ALBUM_DATA['category']}' LIMIT 1");
                if (!mysql_num_rows($RES)) cpg_die(CRITICAL_ERROR, sprintf($lang_errors['pic_in_invalid_album'], $CURRENT_PIC_DATA['aid']), __FILE__, __LINE__);
                $actual_catname = mysql_fetch_array($RES);
                $actual_catname = $actual_catname[0];
                $breadcrumb_text = "$actual_catname > $lang_meta_album_names[$album]";
                breadcrumb(0, $breadcrumb, $breadcrumb_text);
            }        

with:
Code: [Select]
if (is_numeric($album)) {
                $cat = - $album;
                $actual_cat = $CURRENT_ALBUM_DATA['category'];
                breadcrumb($actual_cat, $breadcrumb, $breadcrumb_text);
                $cat = - $album;
            } else {
                $actual_cat = $CURRENT_ALBUM_DATA['category'];
                                        if ($actual_cat >= FIRST_USER_CAT) {
                                    $this_name = get_username($actual_cat - FIRST_USER_CAT);
                                    $this_id = get_userid($this_name);
                                    if ($this_id < 2) $this_name = 'Mr. X';
                                                $breadcrumb_text = "<a href=\"$CPG_URL&cat=1\">User galleries</a> > <a href=\"$CPG_URL&cat=$actual_cat\">$this_name</a> > $lang_meta_album_names[$album]";
                                breadcrumb(0, $breadcrumb, $breadcrumb_text);        
                                        }else{                                        
                                                $RES = db_query("SELECT catname FROM {$CONFIG['TABLE_CATEGORIES']} WHERE cid='{$CURRENT_ALBUM_DATA['category']}' LIMIT 1");
                                if (!mysql_num_rows($RES)) cpg_die(CRITICAL_ERROR, sprintf($lang_errors['pic_in_invalid_album'], $CURRENT_PIC_DATA['aid']), __FILE__, __LINE__);
                                $actual_catname = mysql_fetch_array($RES);
                                $actual_catname = $actual_catname[0];
                                $breadcrumb_text = "$actual_catname > $lang_meta_album_names[$album]";
                                breadcrumb(0, $breadcrumb, $breadcrumb_text);
                                        }
            }
Title: RC4 missing user album navigation! (breadcrumbs)
Post by: tkx on November 29, 2003, 11:06:58 am
Oh ya... also, when it is doing:

if (is_numeric($album)) {
...

It is returning TRUE, so all it calls is:
 $cat = - $album;
                $actual_cat = $CURRENT_ALBUM_DATA['category'];
                breadcrumb($actual_cat, $breadcrumb, $breadcrumb_text);
                $cat = - $album;


I just did some echo "test"; in the code to see where it went..
Title: RC4 missing user album navigation! (breadcrumbs)
Post by: gtroll on November 29, 2003, 11:09:58 am
code worked for me URL?
Mr.X is if you allow anon to have user albums. weird, but could happen.
Title: RC4 missing user album navigation! (breadcrumbs)
Post by: tkx on November 29, 2003, 11:13:06 am
Sent via PM... site not live, in beta phase :).

Quote from: "gtroll"
code worked for me URL?
Mr.X is if you allow anon to have user albums. weird, but could happen.
Title: RC4 missing user album navigation! (breadcrumbs)
Post by: gtroll on November 29, 2003, 12:12:13 pm
I see what your talking about and will fix in morning, good night....
Title: RC4 missing user album navigation! (breadcrumbs)
Post by: tkx on November 29, 2003, 08:39:24 pm
Quote from: "gtroll"
I see what your talking about and will fix in morning, good night....


Thanks :).   I went to bed right before you wrote this message :).
Title: RC4 missing user album navigation! (breadcrumbs)
Post by: DJMaze on November 29, 2003, 08:44:10 pm
sweetdreams and we are after the breadcrumbs.
Please don't eat them to get the way to real life again.
Wait untill we placed on the right spots.
Title: RC4 missing user album navigation! (breadcrumbs)
Post by: tkx on November 29, 2003, 11:36:57 pm
still waiting for some breadcrumbs... :P
Title: RC4 missing user album navigation! (breadcrumbs)
Post by: tkx on December 02, 2003, 07:48:48 pm
*bump
Title: RC4 missing user album navigation! (breadcrumbs)
Post by: gtroll on December 03, 2003, 02:03:19 pm
Patience, this is not an easy solution and they will be fixed in v1.2.0 which will be out within the next day or so.