mu.nu - Fighting attention deficit disorder wherever it - ooh, shiny!
April 26, 2005
Fellow munuvians, here is a fix I implemented over at the Jawa. IT WORKS!!
For most mu.nu sites, for some reason, the cookies won't really work. So that your readers must fill in their information every time they want to comment. Gordon at Cranky Neocon took a gander at my site a few months back and fixed it. Getting the cookies working is VITAL to readership growth. If you want to retain readers then make it easy for them to come back again and again to leave comments. Pretty soon you will have a real community of readers. And they tell their friends, and so on, and so on. Anyway, here it is UPDATE: This is as good as I could get it. Just e-mail me if you have problems removing the little smiley faces. <em>In the section called <head> replace the existing <script></script> block with this code.</em> <em><script type="text/javascript">//<!-- var HOST = ''; //<$MTBlogHost$>'; // Copyright (c) 1996-1997 Athenia Associates.
// http://www.webreference.com/js/
// License is granted if and only if this entire
// copyright notice is included. By Tomer Shiran. function setCookie (name, value, expires, path, domain, secure)
var curCookie = name + "=" +
escape(value) + ((expires) ? "; expires=" +
expires.toGMTString() : ""

((path) ? "; path=" + path : ""

((domain) ? "; domain=" + domain : ""

((secure) ? "; secure" : ""

function getCookie (name)
var prefix = name + '=';
var c = document.cookie;
var nullstring = '';
var cookieStartIndex = c.indexOf(prefix);
if (cookieStartIndex == -1)
return nullstring;
var cookieEndIndex = c.indexOf(";",
cookieStartIndex + prefix.length);
if (cookieEndIndex == -1)
cookieEndIndex = c.length;
return unescape(c.substring(cookieStartIndex + prefix.length, cookieEndIndex));
function deleteCookie (name, path, domain)
if (getCookie(name))
document.cookie = name + "=" +
((path) ? "; path=" + path : ""

((domain) ? "; domain=" + domain : ""

"; expires=Thu, 01-Jan-70 00:00:01 GMT";
function fixDate (date)
var base = new Date(0);
var skew = base.getTime();
if (skew > 0)
date.setTime(date.getTime() - skew);
function rememberMe (f)
var now = new Date();
fixDate(now);
now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000);
setCookie('mpjauth', f.author.value, now, '', HOST, '');
setCookie('mpjmail', f.email.value, now, '', HOST, '');
setCookie('mpjhome', f.url.value, now, '', HOST, '');
function forgetMe (f)
deleteCookie('mpjmail', '', HOST);
deleteCookie('mpjhome', '', HOST);
deleteCookie('mpjauth', '', HOST);
f.email.value = '';
f.author.value = '';
f.url.value = '';
//-->
</script> At the bottom of the page put this code over the old code:
<script type="text/javascript">
//<!--
document.getElementById('email').value = getCookie("mpjmail"

document.getElementById('author').value = getCookie("mpjauth"

document.getElementById('url').value = getCookie("mpjhome"

if (getCookie("mpjauth"

document.getElementById('bakecookie').checked = true;
else
document.getElementById('forget').checked = true;
//-->
</script><html> </em>
Posted by: Rusty at 05:23 PM | Comments (42) | Add Comment | Trackbacks (Suck)

Posted by: Tig @ at April 26, 2005 05:40 PM
Posted by: Rusty Shackleford @ at April 26, 2005 05:44 PM
Paste in your code, then hit 'encode'. Paste the results back into your post here.
Paul
(It' usually the angle brackets that trip you up. MT uses them to delineate code that should be executed, so it thinks your post is just yet another snippet of instructions for it to perform, as opposed to text to display.)
Posted by: Light & Dark @ at April 26, 2005 06:09 PM
Posted by: Rusty Shackleford @ at April 26, 2005 06:40 PM
Posted by: Eric @ at April 26, 2005 07:16 PM
Posted by: Tuning Spork @ at April 27, 2005 02:49 AM

Posted by: Pixy Misa @ at April 27, 2005 03:57 AM
Posted by: caltechgirl @ at April 27, 2005 04:19 AM
Posted by: Eric @ at April 27, 2005 04:27 AM
Posted by: caltechgirl @ at April 27, 2005 04:08 PM
Processing 0.01, elapsed 0.016 seconds.
22 queries taking 0.0088 seconds, 33 records returned.
Page size 14 kb.
Powered by Minx 0.8 beta.