Double Scrollbars (iframe) Double Scrollbars (iframe)
 

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

Double Scrollbars (iframe)

Started by msbr, March 07, 2008, 06:52:36 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

msbr

Hi,

After upgrading to the lastest pnCPG I have the double scrollbars issue.  It could be something I did at the same time, but I cannot think of anything in paticular.

This scrollbar issue is unique in that it only happens when I access my website by using anything other than http://mydomain.com.  For example, if I access it with http://www.mydomain.com or http://mydomainalias.com or http://www.mydomainalias.com, the scrollbars appear.  When I use http://mydomain.com there are no scrollbars.

I have found a difference in the source output:

NO SCROLLBARS:


<script language='javascript' type='text/javascript'>function iFrameHeight() {  var h = 0; if ( !document.all ) { h = document.getElementById('blockrandom').contentDocument.height; document.getElementById('blockrandom').style.height = h + 60 + 'px'; parent.scrollTo(0,0); } else if( document.all ) { h = document.frames('blockrandom').document.body.scrollHeight; document.all.blockrandom.style.height = h + 20 + 'px'; parent.scrollTo(0,0); }}</script><iframe onload='iFrameHeight()' id='blockrandom' name='pnCPG'  src='http://mydomain.com/gallery/index_pn.php?parm=Guest|1|0|0|0||http://mydomain.com/|english||y|default||y||||%26check=9c7f8121ea7a8b01076b5c6a3205ea98' width='100%' height='400' scrolling='auto' align='top' frameborder='0'></iframe>



SCROLLBARS:

<script language='javascript' type='text/javascript'>function iFrameHeight() {  var h = 0; if ( !document.all ) { h = document.getElementById('blockrandom').contentDocument.height; document.getElementById('blockrandom').style.height = h + 60 + 'px'; parent.scrollTo(0,0); } else if( document.all ) { h = document.frames('blockrandom').document.body.scrollHeight; document.all.blockrandom.style.height = h + 20 + 'px'; parent.scrollTo(0,0); }}</script><iframe onload='iFrameHeight()' id='blockrandom' name='pnCPG'  src='http://mydomain.com/gallery/index_pn.php?parm=Guest|1|0|0|0||http://www.mydomain.com/|english||y|default||y||||%26check=3737925c67e430b5bad20456c1d85d8d' width='100%' height='400' scrolling='auto' align='top' frameborder='0'></iframe>



It must be related to the difference in output of the "src" paramater.  I have looked at the code of this function but it is a little over my head...  Does anybody know what would be causing the scrollbar issue here?

Thanks for the help.

casNuy

Perhaps you need to sync the setting of pncpg with whatever you use as domain.
Not sure but could be the difference.

Cas

msbr

Thanks.  I tried changing that but I didnt see a difference.

Also, I use the http://mydomain.com but some people search engines etc use http://www.mydomain.com - thus I cannot guarantee how they will access the site.

As mentioned it worked either way before the upgrade.  Is the code I included above part of pnCPG?

Thanks again.

casNuy

Yes it is but that has not changed since version 3.5

msbr

I think if the variable reflected the actual host name entered it would work correctly, Do you know how I can make it use this value?

casNuy

Need to think about that one...............

Kenshino

Perhpas reading http://forum.coppermine-gallery.net/index.php/topic,43206.0.html might solve your problems.

The links in there should be dead as I only direct the domain to the name servers when I need it for testing but however there are some vital information that should help you.

I believe what you need is a .htaccess file to rewrite all the domain names to whatever that is not causing double scrollers.

msbr

That article addressed my problem - I was able to get it working with a mod_rewrite.  I am still puzzled why I did not need this before.  FYI this is definately related to the value of "Location of the Coppermine installation" for pnCPG.  If any new ideas come to mind please let me know.  Thanks cas.