RC4 missing user album navigation! (breadcrumbs) RC4 missing user album navigation! (breadcrumbs)
 

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

RC4 missing user album navigation! (breadcrumbs)

Started by tkx, November 29, 2003, 10:00:38 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

tkx

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)  ????

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.

tkx

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.

tkx

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:
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: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);
                                        }
            }

tkx

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..


tkx

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.


tkx

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 :).

DJMaze

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.
There are 2 kinds of users in this world: satisfied and complainers.
Why do we never hear something from the satisfied users?
http://coppermine-gallery.net/forum/index.php?topic=24315.0

tkx



gtroll

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.