Webmastersite.net

Search    Register    Log In   


By on Dec 23, 2018 at 3:38 AM

10.3.26 brought a whole slew of new mobile fixes/enchancements too numerous to go into detail on, so let's talk about the non-mobile changes.

The first change you'll notice is that the release notes are now on permanent display on the front page of the admin. This way, your site automatically updating itself doesn't prevent you from seeing the list of what changed.

While doing the mobile stuff, note I moved the delete boxes on the edit listing/category/comment/member/field/help pages to the bottom and made them collapsed by default. This has a dual purpose: it reduces the amount of scrolling needed to get to the more commonly used content (especially important on mobile), and it serves as a confirmation of intent to delete since it takes two clicks/taps now.

Recently I removed a bunch of dead IM fields like AIM, Yahoo, MSN messenger. Now I've repurposed that section as "social" and added a twitter field. This should soon enable displaying recent tweets on a person's profile or by their listings/comments.

I've added a "login with meetup" option to go along with the facebook and google oauth federated sign-ins. It imports their meetup pic as avatar, their meetup interests and bio etc to the respective WSN fields. It also imports the member's twitter handle if they've supplied that to meetup. Meetup sends the person's first name usually as the only name identifier, so there will be a lot of name colissions causing WSN to append random numbers to the end of the names to make them unique. And unfortunately, meetup does not allow requesting the member email address. The member is logged in, but next time they try to edit their profile (and before they get any notifications) they'll have to enter their email if email is a required field on your site.

Non-mobile fixes in both 10.2 and 10.3 included a fuller proper fix to bulk add URLs, the member personal link list (which was redirecting to the index since who knows when), a tiny little map pin apostrophe encoding issu...

Read Full Blog Entry


By on Dec 20, 2018 at 12:03 AM

On a phone, your worst enemy is user input that happens to be slightly longer than you expect. The pages you check look fine, but then along comes the submitter who has a really long URL for their listing and suddenly the display of that URL on the listing details page is causing a horizontal scroll on people's phones. Today I've addressed that problem by adding the following lines to the base.css/bootstrapbase.css to be applied only on small screens:

.detailedinfo { display: inline-block; word-break: break-word; }
.urlarea .thumbshot { float: none; }

That forces long URLs shown on the details page to wrap onto multiple lines even though they have no spaces -- hopefully that inline-block doesn't have unintended sideeffects on other elements, I didn't see any. And the other line makes the URL start below the thumbshot instead of next to it, so it has more space to fill out.

Relatedly, I found that listings with very long titles (even with spaces) were causing their categories to become potentially wider than the screen. This proved a much more frustrating problem. It's easy to solve if you remove the tables and use a div only layout, but I can't assume that everyone will want to do that so I had to wrestle with the oddities of table layout CSS. In the end, based on a stackoverflow suggestion, I came up with this nonsensical voodoo that somehow works:

td.link
{
max-width: 0; /* I know it makes no sense, but it works, and removing it breaks */
}

.panel-title
{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

The .link panels continue to have a greater than zero width in defiance of all logic. Notably, if i apply the CSS to .panel instead of .link then logic does semi-apply to all other panels except the .link ones and they shrink to at least near nothing. Presumably it's something about being a <td> element that makes logic not apply at all. Thus if you happen to be using a tableless div layout with class...

Read Full Blog Entry


By on Dec 19, 2018 at 3:02 AM

One of the big annoyances I run into during WSN installations is cookie conflicts. If you only have one installation per domain you never have to worry about this, but I've often got dozens. There's nothing more frustrating than running the setup and then not being able to login to the admin panel because some other installation used the same cookie names from who knows what path, perhaps a global cookie from some other subdomain even. Digging through Chrome settings to remove the cookie to get in to change the cookie names is no fun.

Some time ago, I added a section to setup.php which checks to see if the installation is in a subdirectory of another WSN installation. When it detects that scenario, it automatically sets unique login cookie names. And that helps one common scenario... but it does nothing for all the other places cookies can come from.

To solve this, my first thought was to make setup.php check for $_COOKIE['wsnuser']. But then I realized that would only work for a manual setup (which almost nobody does anymore), because autosetup.php loads setup.php in a programatic way that does not transmit your browser cookies. So what I ended up having to do is modify both setup.php AND autosetup.php, so that autosetup.php can do the cookie check and can then send the request for de-conflicted cookie names to setup.php as a url parameter which setup.php then obeys.

The end result? No further risk of being immediately unable to log in to a fresh installation. There is still a risk of cookie conflicts though: you might have another installation capable of setting a conflicting login cookie, but which you are not presently logged into in that browser, but which will create a problem when you login later. I'm not sure if there's anything I can do to automatically handle that scenario.

If you encounter such a problem, by the way, you can solve it using a tweaks.php file.


By on Dec 18, 2018 at 7:56 PM (Edited Dec 18, 2018 at 7:58 PM)

The changes I made a couple weeks ago to the $leaveencoded and $nomemberinfo flags have had more than their share of hard to notice side effects. The latest I've found are the menu manager delete buttons not showing and the manage redirects page acting as if all switches were off when they're not. Hopefully I've caught all the recently-messed-up admin pages now.

There was also a problem with the category level selector for the add url list option, caused by having more than one level selector on the same page... I thought I'd fixed it before but apparently not fully until now. Then there was a little error message at the end of CSV exports that I fixed, which I hadn't noticed before because LibreOffice Calc automatically edits it out as being bad data. And an error on the admin stats page that was happening when there were no stats in the database yet.

I've gotten started on calendar enhancements. First, I added all the same location fields that links have to events (address, address2, city, state, country). I made the preexisting events "location" field into a location name field, since for events (unlike links) the location name is not likely to be the same as the event title. Then I ported the postal code autofill from links so it works for events. I was able to add the submit/edit map to the add/edit events pages. In imlementing an event details map, I found that there wasn't actually an event details page yet -- only a day page that showed all events for the day -- so I went ahead and added an event details template and page. Also added an event pin template to control what shows on the pin. In the future, I hope to add map on the calendar page that shows pins for where all upcoming events take place.

All the event mapping features can be toggled on or off with the "Calendar event maps" switch.


By on Dec 14, 2018 at 2:12 PM

Due mainly to 16 years of legacy, WSN uses tables as the default way to arrange your category and listings layouts. This has the advantage of making it easy to control the number of columns per row (via the settings at Admin -> Settings -> General), but the disadvantages of being considered poor practice and not reflowing easily on mobile devices.

To address the mobile problem, a year or two ago I added mobile override options on the mobile settings page. This allowed you to have for example 3 columns of categories on desktops/laptops but 1 column on mobile devices to fit into small screens without horizontal scrolling. Until now, only WSN Links had this set up by default on new installs -- today I've set all scripts to have 1 column per row on mobile by default, and have applied it to upgraders too (unless another value has been manually set or there are 0 columns per row) since there's really only one reason for another value.

That one reason was the big issue I had to deal with today: tableless layouts. For many years, WSN has allowed you to set the columns per row to 0 in order to stop WSN from auto-inserting any table cell code, so that you can remove the tables from your templates and use a div layout (autowrapping div floats or whatever you like). This created a sort of hidden conflict with the mobile override, because you might set the category columns per row to 0 at Admin -> Settings -> General -- but if there were a mobile override value of 1, you wouldn't realize you had to change that to 0 too. What I've done is I've made WSN automatically change the mobile override column values to 0 when you change the non-mobile values to 0, and change the mobile override column values to 1 when you change the non-mobile values from 0 to another number (reinstating tables).

This should allow a seemless experience where sites will fit mobile screens by default without your having to fiddle, and you'll still be able to change to a tableless layout w...

Read Full Blog Entry


By on Dec 13, 2018 at 11:12 PM

Someone today found the indent -s in the category level selectors confusingly unexpected. On consideration, the indent only makes sense for non-level selectors. Thus I've added a separate option for level selector option html compared to non-level selector option html, and have removed {CATINDENT} from the level selector one. I've also removed the category selector denied permission option html setting, which was using optgroups for MSIE7 support... it makes more sense these days to simply automatically apply the disabled attribute to the options since all browsers since MSIE8 support it. Although it looks like the current behavior is to just not show what can't be used, anyway.

I've also been running into several people who feel that WSN Links is broken because they've activated the show links in frameset switch. This switch worked fine back in the day, but with most modern websites being HTTPS and most modern web browsers being increasingly strict about security, it seems that browsers will refuse to render many sites in a frameset due to security policies on mixed content. To dissuade people from thoughtlessly using the switch, I've just moved it to the advanced options page.

Came upon a series of geolocation problems earlier this week. First there was an error that was making sites appear dead to unregistered guests when facebook connect was enabled but the new version of maxmind geolocation wasn't downloaded yet. Then there was a corrupted maxmind database download on one of my sites that was taking the site offline (a problem which is likely more frequent now because the new maxmind files are about 50 MB instead of 10 MB) -- I've fixed that by making it delete the file when the database can't be read.

My next major task will be an overhaul of the calendar system to add location and mapping and RSVP caps to events. This will probably lead to a new script WSN Group which will be optimized for group collaboration and meetups. I'm also giving thought to ...

Read Full Blog Entry


By on Dec 09, 2018 at 9:24 PM (Edited Dec 09, 2018 at 10:34 PM)

Today, I've been working mostly on updating the WSN KB blog theme. That's the theme this blog is based on.

The main change I wanted to make was to add a simple subscription button. It's much better for a blog to have a button to click on the front page for members to subscribe to email notifications of all new blog entries, instead of expecting people to edit their profile and set "Notify of all new blogs" to "yes". To do this I had to change the backend to make it possible to subscribe with a click. And then it seemed like a good idea to have the button available to guests too, by making it take them to a registration page configured to automatically subscribe them when they complete their registration. And an unsubscribe button seemed like a good idea. The end result of all this was the following template code which you can use in any WSN script as of 10.3.20 Beta 3:
<IF {THISMEMBERISREGISTERED} and {THISMEMBERNOTIFYOFLINKS} is yes>
<div class="addnewblog"><a href="index.php?action=unsubscribelistings" class="btn btn-info btn-lg"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> {LANG_GENERAL_UNSUBSCRIBEEMAIL}</a></div>
<ELSE>
<div class="addnewblog"><a href="index.php?action=subscribelistings" class="btn btn-info btn-lg"><span class="glyphicon glyphicon-cloud-download" aria-hidden="true"></span> {LANG_GENERAL_SUBSCRIBEEMAIL}</a></div>
</IF>

I noticed the blog theme, and so presumably other upgraded old themes as well, had a repeating pattern of magnifying glasses in the search input background due to the CSS rule #searchbox input { background-image: url('../images_blog/search.png'); } in the stylesheet. I think that was originally meant to be just shown on the left side of the input once and the base.css rule that made it only appear once must've been removed at some point after the idea was dropped f...

Read Full Blog Entry


By on Dec 07, 2018 at 4:51 PM (Edited Dec 07, 2018 at 4:51 PM)

Next to installing broken custom mod_security rules, the second most annoying thing web hosts do is set rediculously low maximum file upload sizes. Often they'll have upload limits of 2 MB, which isn't even enough to upload a photo taken from a phone. Confusingly, sometimes they have a large limit set for max_upload_filesize but then a small limit for max_post_size which also indirectly acts as a limit on the uploaded file size.

Because this results in a lot of support issues for me, in recent months I made WSN automatically configure the Admin -> Settings -> Files -> Max Attachment File Size to make it smaller than the php.ini limits set by the host. And yet, this ended up creating a different issue. After people go to their web hosts and ask for the limit to be increased, they're confused that they still get a message saying they can't upload larger files -- because they don't realize there's a setting they have to change.

The solution I implemented this week doesn't apply to old installations (for which this generally isn't an issue) but does apply to all new installs of 10.3. In all new installs, the Admin -> Settings -> Files -> Max Attachment File Size value is blank until manually filled in. A blank value is interpreted to mean "make the maximum be just below what the php.ini allows". WSN calculates the lower of the upload_max_filesize and post_max_size php.ini values in real time and makes that the dynamic upload size limit. The upshot of this is that when the host fixes the php.ini there's no need to change anything in WSN for larger files to start working. Most people get as large of files allowed as they can, and anyone who cares to set a low upload limit to protect their server disk space still has the option.


By on Nov 30, 2018 at 6:36 PM

Last night was openlayers (Open Street Map) headache night. Spent many hours pouring through contradictory documentation from the bazillion different versions of openlayers, and eventually discovered that there's a fundamental bug in it (or at least the version of it I'm using) where WebGL browser animations on the map cause the moveend and dragend events to fire about 50 times in a row. Eventually, the really ugly hack I came up with to be able to dynamically load more map pins on moveend/dragend was a timer which only adds more pins if it's been at least 5 seconds since last time. I can imagine this will lead to unpleasant little bugs where some pins don't show up after a quick series of zooms or pans. So it goes. At least Open Street Map now has some sort of support for dynamic pins. I was also able to make manual map location selection on the submit/edit map work for OSM. The biggest missing piece now is driving directions.

Today is video headache day. After spending the whole morning trying to get WSN to play videos and wondering why it wouldn't, I found a couple of problems. First, the easy one, I added $nobuffering = true; to download.php to prevent output buffering from messing up streaming video. The harder issue is that it turnes out HTML5 video only supports MP4, WebM and OGG. All other formats require the Flash browser plugin, which is no longer enabled by default in Chrome. This is a particularly big problem for all of you who've been using the convert to FLV switch and now have thousands of FLVs that a lot of people can't view.

So there's two things I needed to do for this. First, I needed to change the conver to FLV switch into a convert to MP4 switch -- so that videos people upload in unsupported formats get converted to a supported format. Then I needed a utility admins can run to convert existing videos. The latter will be far too resource-intensive to run automatically, so there's a prompt for it on the front page of the admin panel and then you...

Read Full Blog Entry


By on Nov 29, 2018 at 11:07 AM

When you upload a video to WSN and then play it on the listing details page, it plays through a javascript player interface called Flowplayer. Flowplayer is not actually included with the files of WSN, though. Instead, the javascript and CSS is referenced directly from flowplayer.org into your site. Partly this is because WSN is huge enough already, but mostly it's because Flowplayer is licensed under the GPLv3 and it's unclear what the legal implications would be if I distributed it (and I don't have money for a lawyer to find out). When picking WSN components, I normally choose MIT, BSD or LGPL licensed software because I know those licenses don't add any obligations for me to other code which I ship along side it, they only impact their own redistribution rights.

So anyway, normally it's no problem having flowplayer load from flowplayer.org instead of locally. But yesterday someone was having a problem with it because he was trying to play videos on a localhost installation on a computer that has no internet connection. In order to make it possible to use flowplayer without internet, I've added do-it-yourself support for a locally hosted version of flowplayer. All you need to do is save http://releases.flowplayer.org/6.0.3/skin/functional.css to jquery/flowplayerskin.css and save http://releases.flowplayer.org/6.0.3/flowplayer.min.js to jquery/flowplayer.min.js and then WSN will automatically use those local files instead of the flowplayer.org versions. This can also protect you in the event that flowplayer.org goes down, of course.



In other news, I've added openroute geocoding. Lots of redundant geocoding options now. We'll need openroute eventually for Open Street Map driving directions too. Since OpenCage provides a handy way to detect when the 2500 requests have been used, I'll make WSN automatically switch to openroute when OpenCage requires have been exhausted. Essentially you'll get 5000 geocodes per day now through the automatic combination of the tw...

Read Full Blog Entry

<< February 2019 >>
SunMonTueWedThuFriSat
12
3456789
10111213141516
17181920212223
2425262728

Recent Comments