• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Not a bug  Forum descriptions show on refresh

steven s

Well-known member
#1
So far I haven't noticed this on other forums.
When I refresh my XF forum, I can momentarily see the descriptions even though they should only popup.
And the first time I visit the forum, the purple background covers the entire forum.

beta2
 

Jake Bunce

XenForo moderator
Staff member
#2
The problem goes away when I use the default style on your forum. That means this is a problem with your custom style.

I recommend duplicating your custom style so you can systematically revert your custom templates and such to isolate the problem. You can export the style:

Admin CP -> Appearance -> Styles -> Export

Then import it as a new style:

Admin CP -> Appearance -> Import a Style
 

Miko

Well-known member
#3
That happens because the descriptions are hidden with JavaScript. That way a visitor with Javascript disabled will be able to read the descriptions without the jQuery tooltip.
You could hide them with CSS to prevent them flashing on refresh but then your visitors with JavaScript turned off won't be able to read the descriptions at all.
 

steven s

Well-known member
#5
That happens because the descriptions are hidden with JavaScript. That way a visitor with Javascript disabled will be able to read the descriptions without the jQuery tooltip.
You could hide them with CSS to prevent them flashing on refresh but then your visitors with JavaScript turned off won't be able to read the descriptions at all.
But no problem using the default style.
 

Miko

Well-known member
#6
I was just coming back because I noticed the same thing.
I'll make a backup, export and import.
Thanks.
That won't fix it. It's by design and it will happen in any styles default or not.
It's designed that way to allow people with JavaScript off to read the descriptions.

You have three options

1) ebable descriptions like in other forums software without popup tooltip
2) hide the description with CSS
3) leave with it :)
 

steven s

Well-known member
#8
Really?
I noticed when I reverted PAGE_CONTAINER and forum_list, the problem went away. Or so it seems.
I have adsense templates in the two reverted templates.
 

Miko

Well-known member
#9
If you have firefox with firebug you can actually see it happening in the code ;)

If it does bother you and don't care about people with JS off you can hide with CSS and avoid the small flashing.
 

steven s

Well-known member
#11
I see what it is now.
My google ads must slow things enough so the descriptions flash for a second.
Without the ads, I don't even notice.

How would I use CSS to to avoid the flash of the descriptions.
Do people really turn javascript off?
 

steven s

Well-known member
#12
That won't fix it. It's by design and it will happen in any styles default or not.
It's designed that way to allow people with JavaScript off to read the descriptions.

You have three options

1) ebable descriptions like in other forums software without popup tooltip
2) hide the description with CSS
3) leave with it :)
I tried living with it, but it's annoying as hell.
I think I will need to show the descriptions all the time.
I do believe this will end up being a problem, especially for those running adsense or banners.
 

Miko

Well-known member
#13
How would I use CSS to to avoid the flash of the descriptions.
Do people really turn javascript off?
In node_forum_level_2 template look for:

Code:
<blockquote class="nodeDescription baseHtml" id="nodeDescription-{$forum.node_id}">{xen:raw $forum.description}</blockquote>
add an extra class hide (or whatever name you prefer) so that it looks like:

Code:
<blockquote class="nodeDescription baseHtml hide"  id="nodeDescription-{$forum.node_id}">{xen:raw  $forum.description}</blockquote>
Now somewhere in your css add the following:

Code:
.hide {
display: none;
}
That should fix the description appearing for a fraction of a second during page load.


Please remember that users with JavaScript off won't be able to see the description at all.
Spiders are not affected by this change
 

steven s

Well-known member
#14
Thanks, but unfortunately it doesn't seem to work.
I added edited node_forum_level_2 and added the hide code to node_list.css.
I'll just figure on making the descriptions visible.
 

Miko

Well-known member
#15
try this so that the css get parsed last and should cascade correctly.

Add a new temlplate with the name of hide.css

inside the template paste the css posted above.

in the PAGE_CONTAINER template look for:

<link rel="stylesheet" type="text/css" href="css.php?css=xenforo,form,public&amp;style={xen:urlencode $_styleId}&amp;d={$visitorStyle.last_modified_date}" /> <!--XenForo_Require:CSS-->

add below:

<link rel="xenforo_stylesheet" type="text/css" href="hide.css" />

EDIT: fixed the code
 

Miko

Well-known member
#16
I just had a look at your forum and connot see the hide class to your descriptions.

If you put it on a live style I can give you a hand debugging it.
 

steven s

Well-known member
#17
I do not see <link rel="xenforo_stylesheet" type="text/css" href="xeno.css" /> in PAGE_CONTAINER.
I placed it above </head> but still didn't work. I removed it.
Don't understand, live style. BavForums style is my default style.
 

Miko

Well-known member
#18
Sorry I was looking at one of my modded styles.

Place the code directly below this:

Code:
    <link rel="stylesheet" type="text/css" href="css.php?css=xenforo,form,public&amp;style={xen:urlencode $_styleId}&amp;d={$visitorStyle.last_modified_date}" />
    <!--XenForo_Require:CSS-->
so that it looks like:


Code:
    <link rel="stylesheet" type="text/css"  href="css.php?css=xenforo,form,public&amp;style={xen:urlencode  $_styleId}&amp;d={$visitorStyle.last_modified_date}" />
    <!--XenForo_Require:CSS-->

    <link rel="xenforo_stylesheet" type="text/css" href="hide.css" />

Make sure to add the extra class to the node_forum_level_2

Send me a private conversation once you have done and I will have a look at it on your site and test it with firebug