Webmastersite.net

Search    Register    Log In   


By on May 26, 2015 at 5:32 AM (Edited May 26, 2015 at 5:55 AM)

Started work on the 9.2 series. Immediate plans include integrating the HTML 5 audio tag for WSN Gallery (will backport that to 9.1 too) and an HTML 5 video player. If the video player requires a custom component I may add a components subdirectory and move all of the external component scripts (including ckeditor and the bulk uploader) into that for easier tracking and less top level clutter.

In minor 9.1 work today: Added some caching in the selectlevels function for the level-based category selector which will improve the submit/edit page speeds for those with 50+ top level categories who have secondary categories switched on. Also added a cap of 500 options to the selector because a client had 1940 subcaegories in the same category (due to dumping all the bad city name data from an import into subcategories of an "uncategorized" category) which caused out of memory errors. Nobody's going to be able to scroll and choose amongst nearly 2000 options so it's better not to run out of memory trying to generate that selector.

In other recent work, I fixed the bulk uploader tool to respect the maximum image upload size limits and thus prevent memory exhaustion errors. Refactored a lot of uploader code and combined code for the two uploaders in the process.


By on May 23, 2015 at 12:08 AM

Noticed today just how huge the difference in memory use is between PHP versions. A WSN page that uses 5 megabytes of memory in PHP 5.6 can use 40 megabytes in PHP 5.3. If you're still on PHP 5.3, time to upgrade! Your overall server and database performance will improve a lot as there's more free memory.

I don't have any immediate plans to discontinue PHP 5.3 support, but the memory profile makes it more likely that I will. Memory is often capped at 32 M in php.ini so running PHP 5.3 can lead to a lot of out of memory errors. I'll look into ways I can reduce WSN's memory consumption, but don't want to spend too much time on something that only significantly affects legacy PHP versions.


By on May 20, 2015 at 4:39 PM

Added two new templates: category tabular bit and category columns. These are for the subscriptions page for now, and are based on WSN Forum's forum listings bits. Provides much more info than the previous subscription template. May find other uses for tabular category display later.

Found an issue with non-latin URL rewriting of details pages and got that fixed.

Pondering whether to make bootstrap the default them in WSN 10. I fear it'd limit ease of customization, though I could try to visually integrate bootswatch.

Completed the guest saved listings, except for the import process after they register -- when they register they'll want their guest listings carried over. This should be fairly simple: insert a document ready javascript only when registered which checks localstorage. If present, it'll compile a comma-delimited list of guest saved ids to AJAX to the server side (which simply concatinates them with OR id=s to query the appropriate listings) and then destroys the localstorage["savedlistings"] variable.


By on May 19, 2015 at 12:33 AM (Edited May 19, 2015 at 12:35 AM)

Got an interesting new paid project. The goal is to allow unregistered guests to save listings in the same way members currently can. This is a fun opportunity to make my first complex use of HTML 5 local storage, which is finally supported by all relevant browsers (except opera mini). This also entails making a usergroup permission for saving listings, which means you can make saving listings a benefit for paid membership if you want in the future.

The rest of the day has been jquery updates (latest 1.x versios of jquery and jquery ui) and a lot of debugging. Found that help item deletion wasn't working because of the recent security change to require filled=1 to be POSTed in the admin panel, fixed that. Excluded aliased versions of listings from non-category google maps so you don't get several versions of the same pin on the same spot (a problem that although present wasn't visible until the recent addition of the spiderification that allows viewing many pins at the exact same coordinates). Then there was a little issue with updating some member fields when integrated with another script.

An idea in slow progress: sub-menus for the menu system. Unfortunately the GUI for the menu-builder utility gets quite complex to build so it's partially done but on the back burner for the moment.


By on May 15, 2015 at 8:33 PM

Discovered that when you use more than one map on a page (yes, you can do that) WSN was trying to put the second map's pins on the first map. Fixed that in 9.1.25 which I then released. While I'm thinking about maps, here's a tip for how to show a map of any filtered set of listings you want on any WSN template: {FUNC_FILTEREDMAP[title LIKE '%test%' <,> auto <,> ORDER BY title ASC]} -- this example filters to titles containing 'test' and orders by title ascending, with an automatic zoom level selection. You can use any mysql filtering condition.

I noticed the navigation bit was using the overall site title when it should really be using the installation area title, changed that and added the {INSALLTITLE} template variable in the process. This affects any site where the WSN installation is one section of a larger website.

I'll be starting a 9.2 series soon. There won't be any immediate significant changes, just a chance to stabalize 9.1 and encourage those still using 9.0 to update to 9.1 and do some riskier stuff in 9.2.

Ran into the old file permissions problem on a client's server today: the server runs PHP as a different user than FTP, and the script was installed via autosetup, so whenever I opened a file via FTP into my text editor I wasn't able to save my changes. Deleting and reuploading files is a dangerous kludge (if I were to forget to CHMOD to 666 after doing that, then the site would be only partially able to update itself, which would eventually lead to it commiting suicide in a botched self-update). The best solution I can think of would be a simple one-php-file tool that acts as a file browser and text editor. I could upload that file via the WSN admin panel so that it'd be owned by FTP, and then use it to do the rest of the editing, then delete it when done. Anyone know of a good script for that?


By on May 14, 2015 at 10:14 PM

Started today by digging into an old bug report of the pending listing edits page not showing pagination. In the process of fixing that, I also found that the page number from one pending tab was carrying over when clicking to a different pending tab, which was bad since there might not be a page 3 of attachments when there's a page 3 of listings. I've fixed that so it goes back to page 1 while switching tabs, and so all the pending validation tabs paginate (which most weren't before).

Spent this evening looking into free machine translation possibilities for language packs. Unfortunately the offer of free licenses hasn't enticed any human translators, which is understandable since there's so much text, so perhaps a rough machine translation will give people an easier starting point to work from. SDL's freetranslation.com seems like the best bet. I'll have to develop a way for it to translate only the text it's supposed to while leaving the item names, html tags, URLs, template variables and conditionals synax alone. That will be complicated and take a while so the fruits of these thoughts are probably a few months away.

I also integrated the bootstrap glyphicon for the admin panel help icons when using the bootstrap theme, improved the admin overview template messages for free version and trial version users, and fixed a few other minor issues. Hoping to get a few more fixes in and release 9.1.25 before I go to bed tonight.

On the business side, I finished rolling out the new annual licenses option and clarified the terms, namely that when an annual license isn't renewed your site stays active but loses support and updates. Since the free lite version with web hosting purchase offer hasn't attracted anyone, and the lite version in general seemed unpopular, I've changed the hosting offer to give a free year of the annual license instead.


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:
{LINKTEXT[2000]}
<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.
<< December 2018 >>
SunMonTueWedThuFriSat
1
2345678
9101112131415
16171819202122
23242526272829
3031