View Full Version : Layout display problems with expand/contract on main page

March 14th, 2009, 04:21 PM

I am not sure how to explain what I see on my screen, but I am curious on why it does it.

When I pull up my site, if you watch the screen, you will see the front page expand/contract a few times to beyond 100% width, instead of pulling the site into the 80% layout that I have set via the header.

With this, I see the site expand/contract 2-3 times before I get the final display. It looks like it is expanding each table every time until the last one.

It does it both in IE and FF, and has been going on since I bought the software. If the site is at 100% width, it still does it, so I am not really sure what could be causing it.

What do you think is causing this problem?

Chuck S
March 14th, 2009, 05:10 PM
Free image hosting, free photo sharing, Create free photo albums at Skidpics - - Skidpics.com (http://skidpics.com/)

Your site displays at 80% for me!

March 14th, 2009, 05:11 PM
I know it does, but when it first loads, do you not see the site expanding/contracting to the right in the browser?

March 14th, 2009, 05:15 PM
Maybe it's my graphics card?

Chuck S
March 14th, 2009, 05:34 PM
Yes I do but thats probally a result of all your little tweaks and ads your showing which have to render.

March 14th, 2009, 05:35 PM
hmm - even with the sidebar off, it still does it.

all I have running then are the banner ads..

I didn't tweak too much on the front page.. other than announcement

March 14th, 2009, 05:37 PM
I suppose I can do a base install and test it to see if it does it. then apply some of the changes to the front page to see what could be causing it.

Chuck S
March 14th, 2009, 06:26 PM
That would be best as it is something you added to the code.

Main Index - ReefTalk Gallery (http://www.reeftalk.com/gallery/)

I can view many sites and our base code does not freak like that its gonna be your ads etc as remember your pulling several things from external sites.

March 14th, 2009, 11:13 PM
what do you suggest? What file do I upload to fix the front page layout? I took off the ads, disabled the announcement - turn sidebar off and still the same issue.

NO tweaks at this point for the front page.

and I reuploaded the base template directory

Chuck S
March 14th, 2009, 11:32 PM
How about your header and footer

March 14th, 2009, 11:41 PM
I have the header as this: Disabled right now:

<table class="" cellpadding="1" cellspacing="1" border="0" width="85%" align="center">

and footer as this:


If I disable - the page goes to 100% and seems to load fine.

I just noticed it was still trying to load the header, which is now disabled.

So.. how do I get the page 80% without doing all that stuff then?

BTW - looking at the source code, it is loading the default.css template even though I am taking the style integration from SMF - is that overwritten somewhere down the line?

March 14th, 2009, 11:47 PM
taking the headers out, with the base index, it doesn't do it.

adding the sidebar back in it does a bit - all I have is calendar running right now.

can you test it for me?

March 14th, 2009, 11:50 PM
wow - hit the 'more' on the Most popular images and the page goes way out of whack

March 14th, 2009, 11:56 PM
sorry - I meant random photos at the bottom of the page

March 15th, 2009, 12:15 AM
okay - I think the random pal is throwing it off when enabled on the index. When I turn it off, it goes good, when on, the page expands closer when the bottom part is pulled up. If I click the 'more' - the screen goes crazy.. the filenames of the photos are shown and not wrapping when the -more- is clicked?

In the sidebar pal random - same issue - when -more- is clicked, long filenames are expanding the table..

1. Random pal file names expanding the tables - if turned off on index, it stops - sidebar only when -more- is selected.
2. if Header % is resizing the page if the tables are bigger than 80% - changed to 90% and fixing part of that resizing expansion.

Chuck S
March 15th, 2009, 04:33 AM
Line 511 of showframe.php try changing it to this

$ptitle[$count] = ( strlen($features['title']) < 20 ? $features['title'] : substr($features['title'], 0, 20) );

March 15th, 2009, 10:03 AM
That doesn't seem to fix it. Even removing it still blows that frame out really quick

Chuck S
March 15th, 2009, 10:08 AM
I have never seen that on any site to tell you the truth.

I have seen sites expand because they can not fit in a constrained space but then they stay expanded.

The line I posted simply cuts a title to 20 characters on the more link script like the title already is in the features that initially appear.

I think your going to find if you install a clean unmodified copy no header footer etc your not going to see an issue.

March 15th, 2009, 10:10 AM
I have never seen that on any site to tell you the truth.

I have seen sites expand because they can not fit in a constrained space but then they stay expanded.

The line I posted simply cuts a title to 20 characters on the more link script like the title already is in the features that initially appear.

I think your going to find if you install a clean unmodified copy no header footer etc your not going to see an issue.

I suppose this might be right.. then I will just apply the changes I need one at a time and test it before continuing to the other..

March 15th, 2009, 10:16 AM
problem is, I never modified the front page. just basically the announcement box to accept longer html, added google banner code in the feature.tmpl , and modified the showphoto.tmpl to allow for my social posting widget and a banner, not to mention, the language file.. that's about it, so no idea why the index would be so out of whack.

So you best option is to just copy the entire download package back over and overwrite everything, then reapply the changes as needed, correct?

Chuck S
March 15th, 2009, 10:20 AM
well your trying to figure out what is expanding things

1. there are google ads in the sidebar and in the announcements.

2. There is javascript in the footer

3. there are 5 thumbnail rows in a 800 pixel width might want to lower that to 4

March 15th, 2009, 10:33 AM
okay - understand. I have 5 thumbs right now at 100% with no sidebar and no banners - and it seems to work okay - except that the -more- will blow the table out again on the random photos

the overal width of PP has to be equal or smaller than my header?

Of course, my thumbs are 130px also, maybe making them smaller will help also.

I think I will reapply the source, and start from there.

March 15th, 2009, 11:26 AM
Which files control the random pal on the index page?

Chuck S
March 15th, 2009, 12:10 PM
which random pal? feature template or featurepal template

March 15th, 2009, 02:20 PM
Whichever feature pal it uses on the index? I haven't taken that close of a look at it..

Chuck S
March 15th, 2009, 02:34 PM
it uses both if you have them turned on and using sidebar etc.

March 15th, 2009, 02:37 PM
I was thinking about that. feature is the the page, and featurepal is for the sidebar, correct?

I will reup the base install and see where it takes me. and apply the needed mods I need to run the site, one at a time

Chuck S
March 15th, 2009, 02:39 PM
what did you see with a clean test install ;)

yes that is correct.

March 15th, 2009, 02:43 PM
the layout doesn't change..

I haven't copied the files over to the main site yet.. will do that later.

right now I have to go into work for a bit and hire a new employee - will do it later today and let you know how that went. thanks for all the input so far..

I migh be converting the site over to VB - it seems to have a better layout.

Chuck S
March 15th, 2009, 03:25 PM
where is this test install with no mods?

March 15th, 2009, 04:27 PM
Skidpics Test Install Base (http://skidpics.com/photopost)

Chuck S
March 15th, 2009, 06:21 PM
My Photo Gallery - Main Index (http://skidpics.com/photopost/)

Okay and what is wrong with this base test install?

Like I said before I dont see an issue with default code. You can place a simple table to constrain everything to 800 width in the header and close it in your footer but before you do that make sure to cut down the number of thumbs rows your showing. :)

Your not going to fit 6 thumbnails and everything else in a small area.

March 15th, 2009, 06:42 PM
I didn't say anything was wrong with it. I was going to apply the changes to this and see what happens.

I will apply the default base to the main site here in a bit and just change the files I need to see if that changes the issue.

thanks for the pointers.

Chuck S
March 15th, 2009, 06:50 PM

well there is where you confused me because when I asked you if things where fine with a new install no mods and you said nothing changed. ;)

March 15th, 2009, 06:54 PM
Sorry about that. any change I have done on my main site has not resolved the issue though.. therefore, I will have to reupload all the base files to the main site, then apply some of the changes and see what happens to it.. it shouldn't make the site any different, just some of the things won't be there until I alter the code a bit again. This time, I will test it a bit better.

Perhaps PP in the future should provide admin option to add banner code in certain places, via admin panel? That way, all will stay correct with the software?..

The announcement box would be nice if it were an include instead of the default admin db input - it would get rid of 1 query for sure..

Chuck S
March 15th, 2009, 08:44 PM
all would not remain alright in the software if you add code that is going to stretch the page loading it ;)

March 16th, 2009, 01:05 AM
Okay, I uploaded all the base install to my site, which means all added content has been reset to the original files.

I have my layout set to 100%, with 5 columns and it still does the expand/collapse to the right side for an instant.

IF i turn the random pal off for the index page, it does fine.. If I turn it on, it does what we are discussion.. I have no idea what do do with it now..

March 16th, 2009, 10:25 AM
well your trying to figure out what is expanding things

3. there are 5 thumbnail rows in a 800 pixel width might want to lower that to 4

How do you get rid of all that space in between the thumbnails?

I had more so that they would be closer together, but with 4, there is lots of wasted space next to each thumbnail...

I am viewing it in IE, with 6 thumbs right now at is has acted weird -firefox on the other hand is doing the weird e/c still. but only when the random block is enabled.

What do I need to change to get them right next to each other?

and to make things even weirder. the -more- in the random block on the index, actually changes the random pal in the sidebar??.. IE and Firefox both

Chuck S
March 16th, 2009, 10:38 AM
The more links on both random boxes change there own.

The thumbnails are as close as they can render it depends on the space you give them. All I am saying is if you try constricting something in an 800 pixel space which was basically 90's before everyone had 17+ inch monitors you just have to watch how much data you put in one such small space thats just html 101.

You did not apply that change to showframe.php I talked about earlier to limit the titles.

Your still not constricting the default page to 800 pixels without any mods to show it works fine.

March 16th, 2009, 10:42 AM
At this point Chuck, the more link om the index page is changing my random pal images, not the one I am clicking in. Random in the randpal does only change the random pal. I verified this in IE and FF just now. Can you check that for me?

I am leaving the page at 100%, without a header controlling it.

I applied your change, but I noticed no difference,but let me put it in again..

Remember, I reuploaded the base install, so any weird thing I might have done is gone at the moment..

March 16th, 2009, 10:46 AM
in fact, the more in in the random feature changes my random pal in sidebar ot 4x4 layout.

Chuck S
March 16th, 2009, 10:47 AM
I already visited your site which is why I posted what I did. If I click more on randompal it changes randompal if I click more on random it changes random

Okay well then your weirdness is gone so I guess that discussion is closed.

I checked your site again in both browsers same thing works as expected

March 16th, 2009, 10:49 AM
hmm - Let me reboot and clear some things and maybe that will change the actions I have here on those blocks...

March 16th, 2009, 11:19 AM
okay - all seems to be working a bit better.

One last question - I have the random pal showing 2 across and 6 total.. when I click more, it default back to 1 column, and 6 down, how do I keep at at the present ?

if ( $Globals['randompal'] == "yes" ) {
echo "<div id=\"randompal\">";
display_gallery("random", "", "", 2, 6, 1);
echo "</div>";

Chuck S
March 16th, 2009, 11:21 AM
You would have to edit the same display_gallery call in showframe.php and make the same change for the pal one there also.

March 16th, 2009, 11:22 AM
okay. thanks. I will look into it here in a bit.

Thanks for the troubleshooting there Chuck! Enjoy your day!

Chuck S
March 16th, 2009, 11:38 AM
I will try see ya

March 16th, 2009, 02:52 PM
iT IS WEIRD. Sometimes, the random opens up into the sidebar pal with me, and at times, it doesn't..

Chuck S
March 16th, 2009, 03:17 PM
yeah weird maybe some weird ajax thing

March 16th, 2009, 03:31 PM
I just had another user confirm this issue, and it did it for him also.

Did you test it to see if it did the same thing for you?

March 16th, 2009, 05:37 PM
I still think the random pals have somethign to do with it. If I disable them, it almost stops.

If I am not having the header control the size of the layout, which means 100% - what is controlling the width of the page? SMF, since it is integrated, or the default layout settings in admin?

If it is supposed to be 100%,m why does it resize to a smaller size anyways?

Either way, it just isn't displaying the site layout very smoothly.

Chuck S
March 16th, 2009, 05:55 PM
well the only thing I notice is it is only when you add all our stuff that you get any rendering issues.

Chuck S
March 16th, 2009, 05:57 PM
I always suggest leaving photopost layout at 100%

You can constrain width with a table in the header and close in the footer thats best if you run a sidebar

March 16th, 2009, 06:02 PM
I re-added the header/footer and have it set up to 90% for now.

I will play with it for a few days, and see what happens. just no idea what could be causing it.. since the code has been updated.

random pal and random feature seems to impact the effect even more though

Chuck S
March 16th, 2009, 08:22 PM
right but when you had things without the mods the page never jumped past 100% so something doesnt like playing with something else.

Chuck S
March 16th, 2009, 08:23 PM
could be something like the random pal trying to generate the same time that ads or other stuff you have rendering at the same time that pushes it out if they both do it at the same time.

March 16th, 2009, 09:03 PM
I placed the ads inside the <span> of the custompal1 - which is turned off.

The banner in the menubar is gone. so - no ads..

With the random pals running, it resized. Without, it stops. So I don't know.

whats is your suggestion on placing ads in PP to prevent layout problems?

Chuck S
March 16th, 2009, 10:09 PM
that all depends on the ads as they are pulling from external sites right

If there is a timedelay in rendering this could cause an issue but who knows.

March 16th, 2009, 10:10 PM
yes they are.

Chuck S
March 16th, 2009, 10:13 PM
yeah just thoughts here. I have viewed many sites and yours is the only one I have seen what your saying.

March 16th, 2009, 10:15 PM
geez - one of a kinda I am..

I did upload all the new files from 6.21 - and still have the same issue..

do you think it is SMF related?

March 16th, 2009, 10:20 PM
Chuck, I just noticed something.

I have my layout set at thumbnails only for border, IF I change it to say thumbnails -rounded .. the site stops doing it...

Not sure if that is just a fluke, but that seems to stop it. Maybe the image placeholders formats the tables instead of having to guess at the thumbnail sizes to display?

Seemed to fix the random feature pal issue also? hmm
can you confirm?

March 16th, 2009, 10:38 PM
I have NEVER noticed before that when you hit 'more' the first time on the random feature pals, it changes the listing to Most Recent · Most Popular · Random at the top of the pal - when was that added?

Chuck S
March 17th, 2009, 12:35 AM
some time ago in 6.x something whenever the ajax was added

March 17th, 2009, 10:48 AM
Yep - adding one of thumbnail borders solved the layout issue - question now is, why...

Chuck S
March 17th, 2009, 12:24 PM
works for me still

Your java link for the more links is different on each more link like so

regular random photos more link has this


randompal has this


That how the java knows which one to update

March 17th, 2009, 03:45 PM
The only things I see it not doing is showing more random photos is -more- is pushed more than once, in IE only thought.

This new Ajax deal would be nice for the front page instead of the tables ;-)

It would clean up the front page quite a bit..

any way to get it incorporated like the random pal ajax instead of the default layout? You guys might look into this.. ;-)

How can we get the Most Recent · Most Popular · Random to show as standard instead of cycling the java first?

Chuck S
March 17th, 2009, 09:05 PM
Feel free to place any suggestions as always for Michael in the suggestions forum.

April 11th, 2009, 07:15 AM
I don't now Chuck. The random block on the index for 'more' still updates the sidebar a random block. If the sidebar random pal is turned off, it all works fine..