Went to a developers meetup last night that covered RethinkDB and Grunt. RethinkDB is a NoSQL database with a query syntax that reminds me of jQuery, lots of chained selectors. The primary application seems to be highly reponsive real-time apps, where its push notifications provide a simpler and more scalable alternative to having to poll the database every few seconds. It might be useful for a future project but I won't be using it for WSN because of the impracticality of helping everyone to install it on their servers.
Cool discovery of the day: SQL Fiddle. Should help with quick tests. I've been working hard on smoothing more rough edges of the bootstrap theme. That includes collapsing the menu panel at mobile sizes, styling quoted posts, and fixing up a bunch of templates. Almost ready to roll out bootstrap as a default option during setup with a choice of bootswatch color schemes. Hopefully this will prove helpful to people who don't have time to mess with the stylesheet.
Gravatars are centrally-stored avatars used by wordpress and many other scripts. The latest WSN release ads an 'autoload gravitars' switch, which finds the gravatar for anyone who doesn't upload their own avatar when registering. If you have a lot of current avatarless members, you may want to go back and load gravatars for them to make your site and especially the comments threads a bit more colorful/personalized. To do that, copy this script to a text file and save it as loadgravatars.php:
A while back, I added some automatic file extension correction code that fixed the extension for files that were named incorrectly. If somebody named a png file as my.jpg, WSN detects that it's actually a png and renames it to my.png so that thumbnails etc work correctly. Turns out there was an unexpected problem with this. It works fine with images, but other file types have MIME values which can't easily be matched to a file extension. MP3 files can have a MIME type audio/mpeg or x-wav, so WSN was renaming them with .mpeg or .x-wav extensions.
Big changes in WSN Gallery yesterday. Youtube has completely dropped support for RSS feeds and hasn't introduced any equivalent searching mechanism in their much more restrictive api v3. Since youtube isn't playing ball and I'm unable to find any workarounds or third parties to generate youtube feeds, I've changed the feed focus over to flickr. WSN Gallery can now take a flickr search term from the submit feed page instead of a youtube search term. Unfortunate to have to make the change, but hopefully flickr will prove useful to someone, as they seem committed to their feeds.
A few days ago, all of my WSN installations stopped being able to update themselves. At first I thought something was wrong with the tar extraction code as it was only extracting the folder and not any of the files in it. After a few hours of testing I discovered that the problem was wider than that, and in fact any script-created directory was being created with 600 permissions which make it impossible to write any files to it. Worse yet, script-created files were also created as 600 which causes them to show up as 403 forbidden errors on the web.
I've been giving the link checker utilities some long-overdue attention. Lots of code cleanup there. Instead of awkward top of page output, it now uses the regular redirect page. The interface is visually simplified, output is shown automatically but no action is taken until it brings you to the suspects page at the end (except for the duplicate checker). The suspects page is now a separate template instead of being kludged into the link checkers template. Duplicate titles are finally handled correctly.
You might want your footer to stick to the bottom of the page when the page content is short (so that there's empty space in the middle but no empty space below the footer), while still allowing the footer to go down below the fold on long pages. If you know the fixed pixel height you want your footer to be (200px works well for the default footer) then here's a method for you. First, in the wrapper template, add just below and add just above . Then in the stylesheet add this: #pagewrapper { min-height:100%; position:relative; } .main { padding-bottom: 200px; } footer { height: 200px; width:
In recent days one of the things I've been working on is loadable data sets. I found a free source with ~400 business types organized into categories and subcategories, and I've added that as an option in the WSN Directory installer. I'm also using that to generate a dataset of the same categories as 3rd and 4th level subscategories beneath USA states and Canadian provinces (e.g. Canada -> Ontario -> Finance -> Insurance). What other datasets might be useful?
Sometimes you may want to incorporate a new page into a sub-wrapped area like the member home or the moderator control panel. In the past, you might've done that by linking to the new page as profile.php?TID=x to make it appear as part of the member home with the member home menu present. This is problematic if you're trying to incorporate a standard template though, like the help section. If you wanted to make the help section part of the member home, you might've decided to just copy the member home subwrapper content directly into the help templates -- making your site hard to maintain.