No Posts = No Visits
- Comments:
- here.
I have noticed that my post hit count dropped off dramatically in the past week, when not posting any new entries. Hint for new players: post often if you want people to keep reading…
I have noticed that my post hit count dropped off dramatically in the past week, when not posting any new entries. Hint for new players: post often if you want people to keep reading…
For anyone who noticed, I’ve been out of town for a little over a week. I’ve got a couple of posts to write: one about why I was away. I’ll get onto them soon. This is just a post to let you know I’m still alive, and will return you to your regular service soon…
I’m still kinda bummed out over how long it takes to scan through all of the playlists in iTunes and grab the details of each song, and write it all out to a file. I’m talking about Smart Playlists here, since it would be a trivial exercise to just grab the songs from the XML file that iTunes so nicely provides for normal playlists. Since I don’t use normal playlists (except when looking for missing album art - darn iTunes’s inability to search on missing artwork!), Bery Rinaldo’s Export Playlist to M3U didn’t necessarily do what I am doing any better.
But, I did pinch some ideas from him - the first was a snippet on how to get the name of the currently selected playlist:
|
|
The second I haven’t implemented yet, is having settings, and a setup wizard.
Anyway, the updated version is Export Playlists.scpt, put it in ~/Library/iTunes/Scripts (User only) or /Library/iTunes/Scripts (System-wide).
I upgraded to iTunes 5, and also ran the latest Panther Security/System upgrade, and now my Finder, iTunes, and a couple of other random applications take ages (like about 5 minutes) to load. One of the programs that took a long time to load (and appeared to hang) was Quicktime Player: I traced this issue down to a dodgy QuickTimeStreaming.component bundle: I’ve moved it out of the /System/Library/Quicktime folder, and now Quicktime starts up super fast. I have tried the following techniques:
I’m about to upgrade to Tiger anyway, so I’ll just backup everything and do that, I think.
Note: this post is now out of date. Go to Gravatars in Blogsome instead. I did get Gravatars working in Blogsome to some extent a while ago, but it exposed the email addresses. What I’ve done now is obscure the email addresses, and it should be safe to use: <script type="text/javascript"> {capture name=reader}{comment_author_email}{/capture} var ob_email = "{$smarty.capture.reader|replace:'@':';'}"; var email = ob_email.replace(/;/g,"@"); document.write('<div class="right"><img src="http://www.gravatar.com/avatar.php?gravatar_id='); document.write(hex_md5(email)); document.write('&size;=50" /><\/div>'); </script> Basically, it grabs the Commenter’s email address, and changes it in Smarty from email@domain.com to email;domain.com - then JavaScript is used to change it back before passing to the hex_md5(); function. You will need to have the following code inserted in your template somewhere before this: <script type="text/javascript" src="/images/md5.jpg"></script> And the file md5.jpg stored on your server, or the following line (using the copy on my server): <script type="text/javascript" src="http://schinckel.net/images/md5.jpg"></script> If you download my version, clicking on the links won’t work: you’ll need to right-click and choose Save…
I’ve implemented Comment Previewing from Blogsome blogs. There is no way to install 3rd party plugins in WordPress MultiUser, so everything has to be done in JavaScript. But really, the plugin is just JavaScript packaged up nice anyway. You need four code fragments, all in your comments.html file. The first one I suggest goes after the line: {if 'open' == $post->comment_status} Because it is a JavaScript that uses { and }, you need to remember the {literal} tags. {literal}<script type="text/javascript"> <!-- function ReloadTextDiv() { var UseInstantPreview = document.getElementById("use_instant_preview").checked; if( UseInstantPreview == true ) { var NewText = document.getElementById("comment").value; splitText = NewText.split(/\n/).join("<br />"); var DivElement = document.getElementById("commentpreview"); DivElement.innerHTML = splitText; } } // --> </script>{/literal} It probably doesn’t matter exactly where it goes, but having it after the {if} clause means it will only be included in the file if comments are open. The second code fragment is: onkeyup="ReloadTextDiv();" And it goes in the <textarea id=comment … > tag. In context, mine is: <textarea name="comment" id="comment" cols="60" rows="12" tabindex="4" onkeyup="ReloadTextDiv();"></textarea> The third fragment is the checkbox for enabling or disabling Comment Preview. It can go wherever looks good. <input onclick='ReloadTextDiv();' name="use_instant_preview" type="checkbox" id="use_instant_preview" value="1" checked /> <label for='use_instant_preview'>Use Instant Preview</label> The final fragment tells the browser where the Comment Preview goes: <div><p id="commentpreview"></p></div> And it goes where you want the Comment Preview to actually go. I suggest just after the Submit button, or other instructions. Righto, all of that in there, and it should work. You may need to add an entry to your Site Style Sheet to make the Comment Preview box look the same as your actual comments box. • If you wanted to, you can also have a Preview button that will preview what is in the text area then, rather than having Live Preview. This is good for a couple of reasons: I find that long comments slow down when trying to update every keypress. The big problem is that you cannot have a normal input field inside the form set to do this, it will just try to submit it (or at least, mine did!). So, I’ve replaced my input tags in my form with the following (You may need to insert name='commentform' into the form start tag.): <a class='button' href='javascript:document.commentform.submit();'> Post Reply </a> <a class='button' href='javascript:ForceReloadTextDiv();'> Preview </a> You’ll also need to add the following in just after the ReloadTextDiv function definition: function ForceReloadTextDiv() { var NewText = document.getElementById("comment").value; splitText = NewText.split(/\n/).join(" "); var DivElement = document.getElementById("commentpreview"); DivElement.innerHTML = splitText; }
Note: The seperate Quicktags toolbar is not supported. Please use the full toolbox script, or hack it any way you like. The remainder of this post remains for posterity only.
•
This was easier than I thought. Alex King has done most of the work by having the Quicktags info already in a JavaScript file. I just grabbed my copy of the file (from /wp-admin/quicktags.js) and tweaked it. To upload to the Blogsome server I had to call it quicktags.jpg, but that is allowed, since you tell the browser explicitly that it is a text/javascript file. So, you can get my quicktags.js file (Right-click and download it!), and upload it to your server, and use the following code in your comments.html. Where you want the toolbar to appear, insert this:
|
|
After the <textarea>, insert the following code:
|
|
Note: you may need to chage the argument of getElementById to whatever your textarea id is. I’ve also tweaked the JavaScript file so it includes abbr, acronym and strike tags, and doesn’t include the tags that aren’t valid for comments. And I’ve added a button for inserting < and >, but I’m not totally happy with this. If anyone wants to edit it so it works better (try it out to see what I mean), then feel free.
I’ve also created another version that uses links instead of buttons (since Camino doesn’t render buttons with style, only as Mac-buttons), but it’s not quite as nice: the labels don’t update. Still, if anyone wants to play around with it, you can get it here. Remember to right-click and download it, it’s not really an image!
Next task: Live Preview.
The Conservative Philosopher: One Man, One Vote I don’t normally read conservative websites, but I cam across this one as part of some fault-finding I was doing for another Blogsome user.
Suppose you have two people, A and B. A is intelligent, well-informed, and serious. He does his level best to form correct opinions about the issues of the day. He is an independent thinker, and his thinking is based in broad experience of life. B, however, makes no attempt to become informed, or to think for himself. He votes as his union boss tells him to vote. Why should B’s vote have the same weight as A’s?
I think it’s interesting the term “He votes as his union boss tells him to vote.” It shows the clear bias in this piece: that uneducated people are unionists (and implies vice-versa). Would the article read differently if it read: “He votes as the radio shock-jocks tell him to vote.”
It is self-evident that B’s vote should not count as much as A’s.
No, it is not self-evident. It is self evident that you believe that less educated people are lesser human beings. I am all for education: I am a teacher, and believe that education is the key to most of societies ills, but disenfranchising people who are less advantaged than you is not the way to democracy. With ’lesser people’ not being able to vote, the balance of political power stays firmly in the hands of those who are already advantaged, and will never leave. Why should they vote for someone who wants to educate the poor? It will cost them more than it costs the poor, and it’s all money they wouldn’t otherwise have to pay, since they are sending their children to a private school already. Ideas like this entrench inherited poverty. I used to teach at a less advantaged school, and taught many students from lower Socio-Economic Backgrounds who showed more intelligence than their ‘richer’ counterparts (like those I went to school with, incidentally), and who showed far more moral fibre. Without a reasonable public education system these students would not have had the opportunity to attend university: and most of them are doing far better in their first degree than I did. Now for some straw man:
Comment Policy I (KBJ) have configured the PowerBlogs software so that only those who have (1) registered and (2) been approved (by me) may post comments. Please note that comments do not appear immediately, even by approved users; they must be approved individually. My aim in adopting this policy is to discourage incivility. If you want your comment to appear, it should be civil, coherent, and relevant to the post to which it is attached.
I had a quick read of the site and some comments, and I think the author may only allow comments that (a) support his views on the subject or (b) he already has a rebuttal prepared for, so he can answer straight back.
Smarty This may have some use: {insert}. I noticed it when backing up my templates tonight… • Also, I’d like to make buttons that act like the quicktags in the Blogsome backend for commenting: so it inserts the relevant tags in. Will require some JavaScript, I assume…
I can’t use iTunesMusicStore (I live in Australia), and I don’t listen to podcasts (dialup connection, besides I’d much rather listen to something from my Classical Music collection on the train anyway, chills me out nicely…), so I don’t need either of these in the Source list under iTunes 5. The setting for disabling the iTMS has moved to Parental Controls, and there wasn’t a Disable Podcasts one before, but there is now. I used to use the arrows that appeared for searching my library, but the functionality of this seems to have vanished under iTunes 5, so I’ll leave it off for now.