forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 pnCPG (Coppermine for postNuke/Zikula) => Topic started by: anthropographia on March 19, 2007, 09:56:21 pm

Title: always on the top of the page
Post by: anthropographia on March 19, 2007, 09:56:21 pm
Every time I look at a new pict. the page reload to the top of the page.
Is there any possibility to stop that move in order to keep the web page always in the same position so we don't need every time to go down manualy.

Thank's

Mat.
Title: Re: always on the top of the page
Post by: casNuy on March 20, 2007, 08:44:09 pm
Simply remove the java code from pnuser.php.

Cas
Title: Re: always on the top of the page
Post by: anthropographia on March 20, 2007, 10:38:19 pm
sorry but i cannot find the pnuser.php in my coppermine folder

can you give me some more informations...

thank's
Title: Re: always on the top of the page
Post by: Joachim Müller on March 21, 2007, 09:04:45 am
Simply remove the java code from pnuser.php.
It's JavaScript afaik. Java and JavaScript are two entirely different animals.
Title: Re: always on the top of the page
Post by: casNuy on March 24, 2007, 11:36:24 am
True, it is the javascript.
In pnuser.php replace
Code: [Select]
echo "<iframe onload='iFrameHeight()' id='blockrandom' name='pnCPG'";
echo "  src='$url' width='100%' height='400' scrolling='auto' align='top' frameborder='0'>";
echo "</iframe>";
with
Code: [Select]
echo "<iframe src='$url' align='center' width='100%' height='800px' space=0 vspace=0 marginwidth=0 marginheight=0 frameborder=0 scrolling=auto name='pnCPG' onload='parent.scrollTo(0,0);' ></iframe>";
or with
Code: [Select]
echo "<iframe src='$url' align='center' width='100%' height='800px' space=0 vspace=0 marginwidth=0 marginheight=0 frameborder=0 scrolling=auto name='pnCPG'  ></iframe>";

Cas