Archive for February, 2002
Handling of Robots #
Double-entry!!! Har har! #
Is this caused, in the main, by a page requested by a Location header not turning up in time and people freaking and re-clicking the button? If so then maybe some kind of “It’s OK, your message has been uploaded” HTML along with the Location header would be better. The v2 style delete buttons will help.
A propreitary template language is blantantly a much better idea as the full weight of PHP functionality is to much. What is useful though is simple logic. Being able to selectively dump sections based on NS or IE and page ID and that kind of stuff would still be good. Also QuickPlace’s ReplaceString attribute just rules sometimes, some kind of regex business would be cool perhaps.
Valid XHTML? CSS? It’s the trend, so rock it. Because of browser magic it could be dropped to HTML or WML when required.
Still can’t help thinking that XML could play some kind of role in the production of Hype…
Testing of sites #
In many ways Soup’s test room is a lie. The machines all run fairly recent versions of Internet Explorer, none of them are seriously underpowered and none of them are in regular production use. This means that no-one changes their fonts or installs an office bar or anything so heinous. It also means the res creeps up to 1024 once in a while. A much better way to test a product is on site. That major shoe company site I developed would have launched a day earlier if we had gone on-site and tested on their machines. Their MD had a copy of IE 4 which we can’t get because it’s Win 95 only. I think the same applies to Flash and Director.
An additional benefit is that if errors do occur they can be fixed then and their to the customers satisfaction. No more ringing up and saying “I’ve changed it, can you check it again for me? OK, so, right, what’s it doing now? [cue 5 minute description of something unrelated to the error].
Test on-site, even if you hate them and it’s fucking miles away.
PHP masked file downloads #
if(strstr($HTTP_USER_AGENT,"MSIE"))$attachment="";
else$attachment=" attachment;";
header("Content-type: application/octet-stream");
header("Content-disposition:$attachmentfilename=$file");
header("Content-length: ".filesize($file));
header("Content-name: ".$file);
readfile("/*********/web/$file");
A Quickplace function #
function h_QuickSearchFormSubmit( ) {
if (document.h_QuickSearchForm.h_SearchStringTmp.value == "") {
alert('Please type in a word or a phrase.');
document.h_QuickSearchForm.h_SearchStringTmp.focus();
return;
}
if (document.h_QuickSearchForm.h_SearchStringTmp.value.indexOf(',') != -1) {
alert('Search text cannot contain the following character: ,');
document.h_QuickSearchForm.h_SearchStringTmp.focus();
return;
}
var string = document.h_QuickSearchForm.h_SearchStringTmp.value;
if ( string.length > 200) {
alert('Search text is too long.');
return;
}
document.h_QuickSearchForm.action = getAbsoluteRoomPath(self) + '/' +(h_Context_InFolder==1?h_Context_InFolderName:'h_Toc')+"/
$new?EditDocument&Form=h_PageUI"+"&PreSetFields=h_EditAction;"+
"h_New"+",h_SetReadScene;"+'h_StdPageRead'+",h_SetEditScene;"+
'h_SearchResults'+",h_ReturnToPage;"+h_PageUnid;
document.h_QuickSearchForm.action +=
",h_SearchStart;0,h_SearchCount;15,h_SearchString;" + escape( string );
document.h_QuickSearchForm.submit( );
}
document.write('');
Javascript yes/no #
var conf1 = confirm(“Add another image?”);
Actually it’s OK/cancel but they’re more useful really.
Hypothetical Remote #
You got new messages on that site you read!
[Mat’s idea]