Webmastersite.net

Search    Register    Log In   


By on Jul 08, 2015 at 12:14 PM (Edited Jul 08, 2015 at 4:02 PM)

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. This included the javascriptheader.js file, so all javascript was broken, impairing functionality considerably.

My web host, Liquid Web, is oblivious to the fact that things never worked this way before and suggests setting a umask in the script. For the sake of anyone else on a web host with bad defaults (so far I've only seen it happen on liquid web), I've set a umask(022) in the latest release of the four active series. This umask value causes the default permissions to be 755 for directories and 644 for files. Since the PHP manual entry for umask warns that it's not reliable on multithreaded webservers, I've also added CHMODs after file and directory creation to be extra sure the right permissions are set in all server configurations.

Unfortunately, if you're on Liquid Web and already affected by this (not sure if it affects all their clients), you'll have to manually open includes/prestart.php and add umask(022); right after the <?php at the top in order to be able to run an automatic update. There's nothing I can do to help that, except to offer to make that change for you manually if you contact me, since it's the old version that has to download and extract the tar.


By on Jul 03, 2015 at 11:43 PM

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. And there's a new option to demote failed reciprocators to regular listings, for sites where that's applicable. Unsuspending listings is now checkboxably easy too.

Take a look at these changes in 9.2.8 and 9.1.40 when they're out in a few days. They should make the link checking experience much less painful.


By on Jul 02, 2015 at 9:55 AM

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 <div id="pagewrapper"> just below <body> and add </div> just above </body>. Then in the stylesheet add this:

#pagewrapper
{
min-height:100%;
position:relative;
}

.main
{
padding-bottom: 200px;
}

footer
{
height: 200px;
width: 100%;
padding: 0;
margin: 0;
position:absolute;
bottom:0;
left: 0;
}

Your footer is now sticking to the bottom on short pages.


By on Jun 23, 2015 at 12:08 PM (Edited Jun 23, 2015 at 12:09 PM)

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?


By on Jun 17, 2015 at 3:55 PM

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.

Now there's a solution:
<!-- usesubwrapper=homesubwrapper.tpl -->

This works the same as the long-existing <!-- usewrapper=customwrapper.tpl --> syntax that was used for defining a custom wrapper inside the template instead of inside the URL. Now you can do it with subwrappers too. Just put <!-- usesubwrapper=homesubwrapper.tpl --> anywhere inside a template and that template will become part of the member home area.


By on Jun 11, 2015 at 5:47 PM

By default, the option for visitors to reassign a listing has been showing up for members on both the submit listing and edit listing pages. I feel this can be confusing on the submit listing page and people may end up generating new accounts and assigning listings to them when they don't read carefully. I can't think of any reason by a non-admin would want to reassign a listing during the submission process -- an admin would want to, and a member might want to reassign later when they sell a site but not during submit. So, to limit potential confusion, I'm changing it so that non-admin members only see the reassignment option on the edit listing page -- not on the submit listing page. This change is in the next release of 9.1 and 9.2.


By on Jun 08, 2015 at 8:35 AM

In the last few days: Changed WSN Forum's category names to use <h2> tags for better SEO. Converted the registration defaults to use a serialized array instead of the previous custom format, and added a helper function for changing a registration default. Did a lot of code refactoring for 9.2. Improved the details of parameters in backtraces in bug reports.

Made a lot of progress on the ability for the upgrader to update templates and styles from a theme instead of from the standard. Hopefully this will be finished for 9.2.1. After it's finished I'm hoping to incorporate simple theme selection (with just the best themes shown) into the installer, instead of the guided start. Then at some point I'll try to incorporate bootswatch to let people visually choose the coloring for bootstrap themes.


By on Jun 04, 2015 at 6:42 PM (Edited Jun 04, 2015 at 6:51 PM)

Found a nice tool called browsera for detecting javascript errors and layout problems that are specific to Internet Explorer.

Most of the time, WSN's template conditionals make things easy. There's a long-standing annoying case where they're buggy, though: checking whether a complex HTML field contains a term. Suppose you want to do <IF {LINKDESCRIPTION} contains widget>This listing mentions a widget</IF>. If the description has HTML tags, the conditional can error because the closing tags in the HTML are taken as closing the conditional. Worse yet, if you've enabled search highlighting even simple text can become HTML on the search results page. When someone searches for widget, 'widget' is replaced on the page with <span class="searchhighlight">widget</span> in order to highlight the searched word and this causes the same HTML comparison problem. One workaround for that is to exclude any fields you compare that way from search highlighting, but that's not ideal and it's hard to notice and catch the problem.

In order to have a safer way to do these sorts of comparisons, I'm introducing an optional new syntax {LINKVARCOMPARE[description <,> contains <,> text]}. You'll be able to safely write the conditional as <IF {LINKVARCOMPARE[description <,> contains <,> widget]}>. The first parameter is the template variable name, the second parameter is the operator, the third is the needle. The operators names are the same as in the conditionals syntax: is, is not, contains, does not contain, greater than and less than.

This new syntax will be available soon in both 9.1 and 9.2.


By on Jun 01, 2015 at 8:25 AM

The biggest issue with using a custom theme is that it gets out of date. The bootstrap theme modifies the majority of the templates, so it's especially succeptible to this. I'm thinking about how to allow people to use themes without that drawback. Here's the plan so far. Each theme can include a special file that specifies a URL to get a theme-specific template schema. WSN's manage templates page and upgrade.php can then check that URL, which will return an array of standard uniqueness hashes for theme-customed templates. For templates the user hasn't altered, upgrade.php will automatically replace them with the latest version of that template for that theme. When a user clicks 'revert to standard' in the template editor, the template will revert to the standard for the theme rather than the standard of the default theme. For templates that the theme hasn't altered, the template editor and upgrade utility will use the default theme standard versions so that there are no problems if the last theme update was a few versions back.

I think this plan should significantly improve the experience for people using themes other than the default.


By on Jun 01, 2015 at 6:20 AM

Just released 9.2.0 non-beta, though as the experimental series it's always kind of beta. Most people will probably hold off on upgrading to 9.2 until there's a specific feature you want in it. Note that the 7.1 series is now expired, so the active series are 8.0, 9.0, 9.1 and 9.2. Really there's no reason to use 9.0 though, because the upgrade to 9.1 is easy and 9.1 is now the stable series.

Discovered that the "last post" link for threads in WSN Forum was getting cached to older pages of the thread when using Firefox. This was because I was using an HTTP 301 redirect, I've fixed it to a 302 redirect. In other WSN Forum news, also fixed an issue where forum posts ending in a URL would end up sucking the [/quote] closing tag into the URL link when quoting them.
<< May 2019 >>
SunMonTueWedThuFriSat
1234
567891011
12131415161718
19202122232425
262728293031

Recent Comments