forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Themes/Skins/Templates => Topic started by: zina on November 14, 2005, 05:18:24 pm

Title: Go to center page <a name="center"></a>
Post by: zina on November 14, 2005, 05:18:24 pm
Dear members,

I have this link in my template
<a name="center"></a>

i want evrey page of coppermine to go to that spot, how can i do this

thanks

Zina
Title: Re: Go to center page <a name="center"></a>
Post by: Nibbler on November 14, 2005, 05:43:09 pm
You'd need to modify every link in Coppermine to have #center at the end.
Title: Re: Go to center page <a name="center"></a>
Post by: zina on November 14, 2005, 06:55:46 pm
You'd need to modify every link in Coppermine to have #center at the end.

oke i changed displayimage.php now it only works for 2 times and then it stops
(i named the spot , <a name="content"> </a> )
can some one help me a little ? ::)

Code: [Select]
    if ($pos > 0) {
        $prev = $pos - 1;
        $prev_tgt = "$PHP_SELF$content?album=$album$cat_link&pos=$prev#content";
        $prev_title = $lang_img_nav_bar['prev_title'];
    } else {
        $prev_tgt = "javascript:;";
        $prev_title = "";
    }
    if ($pos < ($pic_count -1)) {
        $next = $pos + 1;
        $next_tgt = "$PHP_SELF$content?album=$album$cat_link&pos=$next#content";
        $next_title = $lang_img_nav_bar['next_title'];
    } else {
        $next_tgt = "javascript:;";
        $next_title = "";
    }
Title: Re: Go to center page <a name="center"></a>
Post by: Joachim Müller on November 14, 2005, 08:05:27 pm
erm, what's the actual question ::)?
Title: Re: Go to center page <a name="center"></a>
Post by: zina on November 14, 2005, 09:44:09 pm
erm, what's the actual question ::)?

well to have evrey page go to te place i  so you dont have to scroll evrey time, so i thought lets start with the displayimage.php page.
Title: Re: Go to center page <a name="center"></a>
Post by: Joachim Müller on November 14, 2005, 11:26:12 pm
as Nibbler suggested: you'll have to go through all of the coppermine code and add the anchor. A very big task if you ask me. Another option would be to implement a bit of JavaScript that is run onload and that scrolls down to the anchor.