By Paul on Jul 19, 2019 at 1:26 am
- Fixed some sports in WSN Forum where it was saying "links" instead of "topics".
- Fixed an error message on adding an event when using the alertify switch. The error appeared in the alertify modal because there was a call to updateattachments() which wasn't applicable for events since events don't have attachments.
- Someone encountered a problem where an email notification was missing a line break, despite the line break being in the corresponding language item. My best guess so far is it might've been due to a discrepancy in types of line breaks, with email clients expecting the windows style return followed by newline instead of the unix simple newline. Mime emails already normalized to windows newlines, but I found that plain text emails do not appear to have been doing so, thus I applied the normalization to plain text emails in this release.
- Another person set up a minimum age to register, but was using the quick registration option which hides the birthdate field, thus making it impossible to register. To prevent this scenario, I made the age requirement refuse to activate when quick registration is switch on and the quick registration switch refuse to be turned on when the age requirement is already set.
- When reverting language items to standard in the admin, it has been annoying that it redirected back to a generic language page. I changed it so that it redirects to the search filtered version of the page, so that you don't lose your place and don't have to search again to continue.
- Many websites in recent years have switched from HTTP to HTTPS urls. With that in mind, I added an option to the dead link checker to automatically update HTTP to HTTPS. It checks if there's a redirect or not found header, then tests if the HTTPS version exists, and if so applies it to the url, reciprocal url and rss feed url.
- CloudFlare, in their infinite annoyingness, decided to use a completely different way than all other proxi...
By Paul on Jul 19, 2019 at 1:07 am
The effects of development or production mode are defined by you, at Admin -> Settings -> Development Mode and Admin -> Settings -> Production Mode. In general, you'll want to apply minification/caching/speed options in production and apply things that make debugging easier or prevent users from recieving notifications of test data in development. If there's a particular option you'd like to have configurable for development/production which isn't there yet, please contact support to ask about it.
At the regular locations of each setting, you'll see a warning to the right telling you that the setting is overriden in development or production mode. When you see the warning, be aware that the change you're applying is only a change to standard mode. If development and production are set to use the standard value, then WSN won't show you the warning.
To switch your site between modes, simply click the desired mode on the front page of your admin panel.
By Paul on Jun 15, 2019 at 4:51 pm
There've been a lot of WSN changes involved in supporting this theme.
As a bootstrap 4 theme, most of the work centered on bootstrap 4 support. It was a long slog due to the many differences between the versions, but at this point WSN can pretty seemlessly switch between bootstrap 3 and 4. There's a toggle for it on the theme settings page and also a way to specify inside the stylesheet. The templates have classes for both versions specified. BS3 glyphicons are automatically swapped for appropriate font-awesome equivalents in BS4. Bootstrap javascript has been fully incorporated and jQuery UI is only needed for legacy templates now.
Like many packaged themes, Flattern comes with a bunch of subdirectories with resources split up into many dozens of files. Rather than painstakingly lift and adapt code from those files, it's much easier to just include them directly from WSN templates. To facilitate this, I made WSN's theme packager and theme installer support custom subdirectories in themes so now you can just dump all the subdirectories in templates/yourtheme/ and use {TEMPLATESDIR}/css/cssfile.css or {TEMPLATESDIR}/js/js.js or the like in your templates to call in files... which you could already do, but now it gets packaged correctly.
I found that flattern's bootstrap.js differs from the standard bootstrap 4 javascript in some frustrating way, so I ended up adding a bsjavascripturl tweak and flag which allows specifying a custom file to become the bootstrap javascript file. Flattern has a nice big black navigation section which looked best by putting {NAVIGATION} into the wrapper template... to support that without having duplicate navigation and without having to edit {NAVIGATION} out of all the body templates, I added a headernavonly tweak/flag which suppresses non-wrapper instances of {NAVIGATION}. I a...
By Paul on May 31, 2019 at 5:48 am
What this does is it transforms all internal links into javascript calls. The javascript immediately replaces the whole <div class="main"> middle section of the page with a loading indicator graphic, then it loads the requested URL with &usewrapper=no tacked on to suppress the wrapper, and places that inside the <div class="main"> area. The result is that the top and bottom of the page remain static and the URL doesn't change, while the middle of the page loads changes when you click categories and listings and other stuff.
The one big limitation here is forms. There's no safe universal way to convert form submissions to AJAX (mainly because some of them involve file uploads), so forms still submit in the traditional HTML way with your browser loading a new page. If someone is interested, I could work on a form method that'd work for most people's site configurations but not be universal.
By Paul on May 29, 2019 at 7:17 am
So, the last few days, I've finally had time to convert all those jquery ui elements to bootstrap. That includes the login modal, the ad unblocker modal, the search all tabs, the admin validation tabs and the admin template editor help tabs. They all now use bootstrap's bootstrap.js javascript functions now, when you're using a bootstrap theme. When you're using a legacy theme, they still use jquery ui. Fortunately I was able to write the templates in such a way that the same template code works for both jquery ui and bootstrap, which should prevent any problems from arising for legacy theme uncustomized templates that auto-update.
The dropdown options menu was already using bootstrap's javascript for a while, because of how incongruous the superclick dropdown menus were. Instead of including the dropdown javascript WSN now includes the full bootstrap javascript, so you can freely use any bootstrap javascript features you wish and remove any custom includes of bootstrap.js you may have made.
Round up of other recent work:
- Rewrote the category selector / sitemap generation system so that it should work on sites with more thousands of categories than before.
- Added search refinements to the language editor, which makes it much easier to find the language item you're looking for.
- Added a member age requirement option for sites that want to require members to be 18+.
- Yet more bootstrap 4 support work including a tweak and flag t...