forum.coppermine-gallery.net

Dev Board => cpg1.4 Testing/Bugs => cpg1.4 Testing/Bugs: FIXED/CLOSED => Topic started by: Vujo91 on April 18, 2006, 07:21:15 am

Title: Problem with Index.php
Post by: Vujo91 on April 18, 2006, 07:21:15 am
Hello!

I'm install cpg1.4.4 and I have one problem!  http://www.beyonce-photos.com (http://www.beyonce-photos.com)

I put index.htm to be first page and rename index.php to index1.php and, in admin mod, I setup first (home page) for coppermine is index1.php!

Everything work good except one thing!  :'(

When I go to view picture  (displayimage.php)  when click on menu up of pic, that call index.phpxxxx and "The page cannot be displayed"

How can I solve this problem?  Please help me!!

Thanks a lot!!           


Sorry for my English
Title: Re: Problem with Index.php
Post by: Stramm on April 18, 2006, 08:36:30 am
index.php is still hardcoded into functions.inc.php, moving this thread to the bugs board

fix:
in functions.inc.php find
Code: [Select]
        // Add the Home link  to breadcrumb
        $breadcrumb_links[0] = '<a href="index.php">'.$lang_list_categories['home'].'</a>';
        $BREADCRUMB_TEXTS[0] = $lang_list_categories['home'];

        $cat_order = 1;
        foreach ($category_array as $category)
        {
            $breadcrumb_links[$cat_order] = "<a href=\"index.php?cat={$category[0]}\">{$category[1]}</a>";
            $BREADCRUMB_TEXTS[$cat_order] = $category[1];
            $cat_order += 1;
        }
and replace with
Code: [Select]
        // Add the Home link  to breadcrumb
        $breadcrumb_links[0] = '<a href="'.$CONFIG['home_target'].'">'.$lang_list_categories['home'].'</a>';
        $BREADCRUMB_TEXTS[0] = $lang_list_categories['home'];

        $cat_order = 1;
        foreach ($category_array as $category)
        {
            $breadcrumb_links[$cat_order] = "<a href=\"".$CONFIG['home_target']."?cat={$category[0]}\">{$category[1]}</a>";
            $BREADCRUMB_TEXTS[$cat_order] = $category[1];
            $cat_order += 1;
        }
Title: Re: Problem with Index.php
Post by: Vujo91 on April 18, 2006, 03:46:26 pm

    Thanks a lot!   Now work great!!


   kiss  ::)
Title: Re: Problem with Index.php
Post by: Vujo91 on April 18, 2006, 09:43:13 pm
Hey!  :o :o

I found new problem!   Help me!!!   In Menu Album list is steal linked on index.php not on index1.php

Look on the picture from attachmant!

Help me to solving this problem!!  Thanks a lot!   ;)
Title: Re: Problem with Index.php
Post by: Stramm on April 19, 2006, 09:03:39 am
hmm... after having a closer look... I've seen that this'll mean modifiying code all over the place.
Refering to the docs the functionality of 'URL of your home page' is not top change coppermine's index but where the 'home' button is linking to.

Still it's possible to modify the code so this function is setting coppemine's index. For that search all occurances of 'index.php' in the code and replace them with '$CONFIG['home_target']'
if index.php is in an heredoc (<<<) you may wish to put $CONFIG['home_target'] in brackets ({})

make backups of the files you modify and test after each modification. Good luck
Title: Re: Problem with Index.php
Post by: Joachim Müller on April 19, 2006, 10:09:20 am
this is not an actual bug imo. The user-settable "home" link can be anything, it is not related to the breadcrumb nav.

@Vujo91: use .htaccess to make another file the index file in coppermine's folder. Leave coppermine as is.
Title: Re: Problem with Index.php
Post by: Vujo91 on April 19, 2006, 03:45:54 pm
this is not an actual bug imo. The user-settable "home" link can be anything, it is not related to the breadcrumb nav.

@Vujo91: use .htaccess to make another file the index file in coppermine's folder. Leave coppermine as is.

I put .htaccess in root and solve the problem!!

Thanks a lot everyone!