Details
Browser Issues and Debug Mode
By Paul
May 13, 2015 pm31 10:09 PM (Edited )
The main time sink issue today was tracking down why the deleting and whitelisting javascript links in the WSN antivirus scanner misbehave in Firefox. As it turns out, the unrelated javascript that checks the window width to resize the menu frame for small screens is at fault. The jquery $(window).width() works nicely in chrome but breaks in firefox. To make firefox happy, I've changed it to document.innerWidth.
I decided to disable the ability to set debug mode with a URL paramter when not logged in as an admin. Tough call as it makes my job harder, especially in identifying causes of page slowness, but showing less info to potential attackers may help. Debug info for admins from the debug=1 parameter will only start after the admin info has been verified, so it's much better to use the System Configuration page to activate debug mode.
I was looking to limit the length of blog entries that show on the front page and to show a "read more" after cutting them off. For that purpose, I've added {LINKTEXTLENGTH}, {LINKMESSAGELENGTH} and {LINKDESCRIPTIONLENGTH} template variables to WSN. Here's what I'm using in the front page template:
{LINKTEXT[2000]}
<IF {LINKTEXTLENGTH} is greater than 2000><p><a href="{LINKDETAILSURL}">Read Full Blog Entry</a></p></IF>
By Paul
May 13, 2015 pm31 10:09 PM (Edited )
I decided to disable the ability to set debug mode with a URL paramter when not logged in as an admin. Tough call as it makes my job harder, especially in identifying causes of page slowness, but showing less info to potential attackers may help. Debug info for admins from the debug=1 parameter will only start after the admin info has been verified, so it's much better to use the System Configuration page to activate debug mode.
I was looking to limit the length of blog entries that show on the front page and to show a "read more" after cutting them off. For that purpose, I've added {LINKTEXTLENGTH}, {LINKMESSAGELENGTH} and {LINKDESCRIPTIONLENGTH} template variables to WSN. Here's what I'm using in the front page template:
{LINKTEXT[2000]}
<IF {LINKTEXTLENGTH} is greater than 2000><p><a href="{LINKDETAILSURL}">Read Full Blog Entry</a></p></IF>
Tags | javascript |
Views | 136 views. Averaging 136 views per day. |
Similar Listings |
Sorry, you don't have permission to post. Log in, or register if you haven't yet.
Please login or register.