FLOABN Page Link Manager
Filed Under:
When a media player is engaged (the playhead is at a particular point, play is pause-able, other typical options are present within that player, etc…), it will toss a callback function at the PLM which springs into action then by applying a class to all links outside the media container on the same page based on wether or not they are localhost/domain links or external (not within local name space).
Class Allocation
What The So-Called “Page Link Manager” Does
Applies one of two classes onLoad to all links within a page:
- .plm-internal
- .plm-external
.plm-internal
This class will be most useful for links which have an immediate function within the page where the media is currently engaged and will not likely be interrupted for other available functions on that page.
Examples include; but are obviously not limited to: file downloads, rss links, email addresses, and other links which normally come with the pre-knowledge from the user that that link itself performs a function outside basic navigation of ‘web pages’, or ‘document/site views’. That function, is one that updates their calendars, adds a feed to their preferred reader, launches their email client, etc…
All things, which while happening at a moments notice, do not always offer uninterrupted availability whereby they are often abandoned. That often abandoned circumstance is what promted this PLM approach.
*Note: A rule sheet can be written to manage lower tiers in internal linking groups/facets/etc…
.plm-external
This class requires less attention as at this point because it merely checks for outbound links and applies the class without discrimination. One could write rules per external name space or other imagined criteria of course but that is for custom applications and might/could be dealt with as needed.
Feedback in the form of use-cases much appreciated on this. My email address is human findable. – Josh
Swappable callto: and tel: for Skype & iPhone
Filed Under:
Marking up a telephone number to use Skype’s callto: except when User Agent is iPhone uses tel:.
Javascript
<script language="javascript"> window.onload = function () { if (navigator.userAgent.match (/iPhone/i)) { var a = document.getElementsByTagName ("a"); for (var i = 0; i < a.length; i++) { if (a[i].getAttribute ('href').search (/callto:/i) === 0) { a[i].setAttribute ('href', a[i].getAttribute ('href').replace (/^callto:/, "tel:")); } } } }; </script>
The precending chunk of Javascript in the head of a document will swap out callto: for tel: in the following HTML.
HTML
<a href="callto:15035555555">+1 (503) 555 5555</a>
This leaves you with a hyper-linked phone number which depends on the user to have Skype installed on their machine so if you’d prefer to not confuse those without Skype by tempting them to click the number then you might stick a Skype icon along side the link.
User Agents other than iPhone will recognize the tel: protocol so the Javascript above could be expanded to involve more User Agents.
Delayed Password Masking With ign_password_protect
Filed Under:
Requirements
- ign_password_protect (Textpattern Plugin)
- dpassword (jQuery Plugin)
- Textpattern (CMS)
- jQuery (Javascript Library)
Demonstration
In the password field (second field); enter some characters to see the delayed masking occur.
Javascript
- Include jQuery library in head of document.
- Include dPassword plugin in head of document.
- Call on the plugin’s dPassword function also in the head of your document.
<script type="text/javascript" src="<txp:site_url />js/jquery.js"></script> <script type="text/javascript" src="<txp:site_url />js/jQuery.dPassword.js"></script> <script type="text/javascript"> $(document).ready( function() { $('input:password').dPassword(); }); </script> </script>
Login Form
Called with the ign_password_protect plugin.
<txp:ign_show_login form="login_form" />
The Textpattern Form ‘login_form’ contains the following:
<input name="username" class="delayed-masking" type="username" /> <input name="delayed-masking" id="delayed-masking" class="delayed-masking" type="password" />
CSS (Optional)
An optional class was provided for each input field called delayed-masking. The following CSS mimics the example style above.
<style type="text/css"> input.delayed-masking { width: 290px; font-size: 20px; margin-right: 10px; } </style>
Can you remove googlehostedservice.html from Server?
Filed Under:
Yes you can. Once verified.
Suppendapo
Filed Under:
all screwed up. Must be their product order form. :) Google once froze my Checkout account because I had a ‘buy me beer’ button.
Better luck @ Vimeo
PHP Assignment Operators Baffled
Filed Under:
“The basic assignment operator is “=”. Your first inclination might be to think of this as “equal to”. Don’t. It really means that the left operand gets set to the value of the expression on the right (that is, “gets set to”).” – Via
Found this (practical) run down on Assignment Operators of PHP more helpful then this one.
Escape Textile
Filed Under:
<txp:php>echo date('F Y'); </txp:php> produces the following error when posted to the <txp:body /> of an article:
error: Parse error: syntax error, unexpected $end, expecting T_STRING or T_VARIABLE or '$' in /var/www/sitepath/textpattern/publish/taghandlers.php(3089) : eval()'d code on line 1
As noted here, escaping textile does render the PHP correctly. Escaping in textile is done as follows by wrapping with double equal signs.
==<txp:php>echo date('F Y'); </txp:php>==
And, thereby PHP does echo the date as shown here: Today is July 31, 2010
Now on to establishing a 1000 beat per day format for <txp:posted />…
Beating It
Filed Under:
Know how to tell someone what time it is approximately in Beat Time by judging from the Sun. Do this, rather than consulting a clock which doing so now provides that it is @181 and therefore 9:40a in Greenwich.
It is 8:20p in Oregon and knowing the most popular way to tell time will get me to the movie on time but it won’t satisfy.
Local vs. GMT
Time: 03:49:40 vs. 10:49:40
Swatch: 492 vs. 492
Finder Crash Loop
Filed Under:
Finder is crashing over and over again as it’s attempts to view the Desktop folder. Something is on there it doesn’t like.
Fire up Terminal.app, type pwd and press enter and likely you are shown /Users/youraccount.
Taking a look inside this folder by entering ls, which equates to ‘list’, you should by now realize where you are as you see a list of all files on your Desktop. We go here to weed out the bastard.
Let’s clear the whole mother off by entering rm -rf ./*. Wait… Let’s just delete the .sit files which persuaded us to download Stuffit in the first place by entering rm -rf ./*.sit.
While I’m in here I’m just going to delete the bazillion past-week random file saves entering rm -rf ./Untitled.* which will whack all files named that regardless of the file extension.
And for future reference, a string of particulars can follow the slash so as to remove multiple files of various attributes; In which case, rm -rf ./r* lo* .p*, would delete all files in which names begin with r, lo, and those in which the file extension name begins with p.
Favicon
Filed Under:

A 16 X 16 pixel graphic. Photoshop needs a plugin from telegraphics in order to export the file type (.ico) so Favicon Editor is available for the impatient.
- Upload favicon.ico to root directory.
- Place
<link rel="shortcut icon" href="http://joshuavaage.com/favicon.ico" type="image/x-icon" />in between the<head></head>tags of html document: - Visit website and enjoy seeing that it worked.


