1. 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

Discussion in 'Resolved Bug Reports' started by steven s, Oct 23, 2010.

  1. steven s

    steven s Well-Known Member

    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.

  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    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
  3. Miko

    Miko Well-Known Member

    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.
  4. steven s

    steven s Well-Known Member

    I was just coming back because I noticed the same thing.
    I'll make a backup, export and import.
  5. steven s

    steven s Well-Known Member

    But no problem using the default style.
  6. Miko

    Miko Well-Known Member

    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 :)
  7. Miko

    Miko Well-Known Member

    It does the exact same things, it might just be a little less noticeable :p

    Just took a screenshot during a page refresh on xenforo.com just to show you that it happens everywhere.

  8. steven s

    steven s Well-Known Member

    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.
  9. Miko

    Miko Well-Known Member

    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.
  10. steven s

    steven s Well-Known Member

    I think I'll live with it for now.
    Thanks for the explanation.
  11. steven s

    steven s Well-Known Member

    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?
  12. steven s

    steven s Well-Known Member

    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.
  13. Miko

    Miko Well-Known Member

    In node_forum_level_2 template look for:

    <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:

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

    .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
  14. steven s

    steven s Well-Known Member

    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.
  15. Miko

    Miko Well-Known Member

    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
  16. Miko

    Miko Well-Known Member

    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.
  17. steven s

    steven s Well-Known Member

    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.
  18. Miko

    Miko Well-Known Member

    Sorry I was looking at one of my modded styles.

    Place the code directly below this:

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

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

Share This Page