Search    Register    Log In   

By on May 13, 2015 at 10:09 PM (Edited May 13, 2015 at 10:11 PM)

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:
<IF {LINKTEXTLENGTH} is greater than 2000><p><a href="{LINKDETAILSURL}">Read Full Blog Entry</a></p></IF>

By on May 12, 2015 at 4:57 PM

Some small tasks completed today:
  • When the filtering condition ownerid= is passed to the RSS feed without a member id, I've changed the behavior so that it'll show an unfiltered feed instead of an error. It seems some people have rssfeed.php?thecondition=ownerid={MEMBERID} or rssfeed.php?thecondition=ownerid={LINKOWNERID} links which were causing this problem (showing all the listings owned by a particular member or listing owner). If you have one of those links, the right way to solve it is to conditionalize the RSS link to only show when the id is present. For example, <IF {MEMBERID}><a href="rssfeed.php?thecondition=ownerid={MEMBERID}">{MEMBERNAME}'s RSS Feed</a></IF>.
  • Added a readablejs tweak and also changed so that when index.php?action=readablejs is loaded the script will write an un-minified javascriptheader.js file. For the moment at least, only the WSN-specific javascript is de-minified and the standard jquery/jquery ui remains minified. I needed this to debug some quirky javascript interactions between bootstrap and jquery ui. Found that the javascriptheader.js file was being rewritten on every admin panel view, fixed that to not happen until needed now, though the bad behavior didn't cause any problems except for in the debugging process.
  • Changed the ownership field text on the submit listing page so that it shows the current ownership as your member name if you're logged in as a member.

By on May 12, 2015 at 1:11 PM (Edited May 12, 2015 at 3:06 PM)

I'll be using this blog to discuss whatever changes I'm making or considering in WSN on a given day, and probably share some tips and tricks. If you'd like, you can use it to learn more about WSN or to follow development more closely and have your say on shaping the things I'm thinking about.

To get started, a word about the blog tech. It's a WSN Knowledge Base installation with members integrated with the WSN support forum, with the bootstrap theme, categories switched off, and a customized front page template including a calendar widget. I'll probably be adding a few more bloggy features along the way. If you'd like to use WSN KB for a blog in the present or future, I'd be happy to help.
<< March 2019 >>

Recent Comments