Archive for April, 2008

A word to the WordPress wise, and a whole lotta “cache”

Saturday, April 5th, 2008

If you’ve spent a lot of time tweaking your text in the text widgets, always remember to BACK IT UP. You may remember my ordeal with the newsletter, so imagine my surprise when I went to the website today and THE NEWSLETTER SIGNUP FORM WASN’T THERE. I went to the widgets admin panel and when I opened up that text widget, it was blank. Fortunately, I had actually pieced the code together in PSPad editor , and had saved a copy of it.

When I reloaded the main page, it still wasn’t showing up, and I remembered that the wp-cache plugin was caching the pages, so I went in and deleted the cache. Now my form was back, but I forgot that I had changed a bit of text at the bottom by hand, and it was just a little tedious html that I really didn’t want to have to redo.

Then I remembered google’s cache feature, and thought, “I wonder….”.

Sure enough the google cache page had my original form, and it was a simple matter of “view source” and copy and paste. Voilà! Everything was back to normal.

I thought about why the text disappeared in the first place, and I’ll hazard a few guesses:
1. Maybe one of the new plugins messed it up.
2. There was some style tags with css in it, along with a “comment”, well here is the code you can see for yourself:

<style>
   label
{
width: 2em;
float: left;
text-align: right;
margin-right: 0.1em;
display: block
}

.submit input
{
margin-left: 3.1em;
}
input
{
color: #007700;
background: #000000;
border: 2px solid #147
}

.submit input
{
color: #007700;
background: #000000;
border: 2px outset #147
}
fieldset
{
border: 2px solid #147;
width: 11em
}

legend
{
color: #147;
background: #000000;
border: 2px solid #147;
padding: 2px 6px
}
</style>

<script language="Javascript" type="text/javascript">
var fieldstocheck = new Array();
fieldnames = new Array();
function checkform() {
for (i=0;i<fieldstocheck.length;i++) {
if (eval("document.subscribeform.elements['"+fieldstocheck[i]+"'].value") == "") {
alert("Please enter your "+fieldnames[i]);
eval("document.subscribeform.elements['"+fieldstocheck[i]+"'].focus()");
return false;
}
}
return true;
}
function addFieldToCheck(value,name) {
fieldstocheck[fieldstocheck.length] = value;
fieldnames[fieldnames.length] = name;
}

</script>
<fieldset>
<legend><B>Newsletter</B></legend>
 <table>
      <tr>
           <td><form method="post" action="http://www.daveryder.com/newsletter/?p=subscribe&id=1" name="subscribeform">
Email:
           </td>
           <td><input type="text" name="email" value = "">
           </td>
      </tr>

      <tr>
           <td><script language="Javascript" type="text/javascript">addFieldToCheck("email","Email Address");</script>
First Name:
           </td>
           <td><input type="text" name="attribute1" value = "">
           </td>
      </tr>

      <tr>
           <td><script language="Javascript" type="text/javascript">addFieldToCheck("email","Email Address");</script>

Last Name:
           </td>
           <td><input type="text" name="attribute2" value = "">
           </td>
      </tr>

       <tr>
           <td>
           </td>
           <td><script language="Javascript" type="text/javascript">addFieldToCheck("attribute2","Name");</script>

<input type="hidden" name="list[2]" value="signup" />
<input type="submit" name="subscribe" value="Subscribe" onClick="return checkform();">
</form>
           </td>
      </tr>
      <tr><td colspan="2"><BR>
    <font color="red"><B>I hate spam</B>.</font><BR>
    I respect your privacy. I will not share your email address with anyone, ever.<BR>
</td></tr>

  </table>
</fieldset>

<!-- newsletter subscribe ends here --></div>

What I’ve done now is remove the comment, and put the CSS in the theme’s style sheet (where it should have been to begin with) – maybe that will stop this from happening again :-) .

Upgrading with WordPress Automatic Upgrade Plugin

Friday, April 4th, 2008

On Saturday, March 29, 2008, WordPress 2.5 was released. So when I saw the little notification alert on my dashboard informing me that “your version of WordPress is out of date” and that I needed to upgrade to the latest version I said, “sonofabitch”. Upgrading in the past has been a real pain in the ass, but after doing a little searching what did I find but the awesome WordPress Automatic Upgrade Plugin

Greatest.Plugin.Ever.

I uploaded it to the plugins directory, and with a certain amount of skepticism activated it. I chose to not use the purely automatic option and instead decided to upgrade manually (‘cos that’s how I roll) and upgraded the site (complete with all the recommended backups etc.) effortlessly.

It totally kicked ass. Here’s a picture of me celebrating:

it buuurrrrnnnnsss my precious
(ok not really that pic was taken awhile ago, but you gotta admit it’s funny. Especially the stupid look on my face).

And now to change the subject, I’ve occasionally thought about the Slashdot and Digg Effect and how it would affect my site if I ever got Slashdotted or Dugg (duh, I just figured my server would crash like Evel Knievel jumping the grand canyon), but now I may be able to withstand it thanks to these plugins: WP-Cache (which caches your pages) and Coralize (which redirects all or some of your page and site contents to the Coral Content Distribution Network. (Note: The coralize plugin appears to be temporarily unavailable, so no success with installing it yet). UPDATE 4-10-2008: I was able to get, upload and activate the Coralize plugin, so I think I’m protected. I have a minor question I asked the creator of the plugin a few minutes ago (Dave Grijalva – his blog is The Blog that Noone Reads), but aside from that it appears to be working. So thanks Dave!

So we’ll see if they work on the off chance it ever happens, I guess there isn’t really any way to check something like that until it actually happens…

Making your header image in WordPress clickable, and code-markup

Friday, April 4th, 2008

Here is by far the easiest way I found to make the header image in WordPress Clickable:

In your theme’s header you’ll find the code for the header (believe it or not, this website is the default theme “Kubrick” – but I’ve hacked it all up and renamed it Dr_C). The location is: wp-content > themes > default (for me anyway, you will need to get the header.php file from your theme directory. duh). Find this line

<div id="header">

Replace it with this:


<div id="header" onclick="location.href='http://yourdomain.com';" title="Name of your site, or Home" style="cursor:pointer;">

EDIT: I noticed that even though the header image was clickable in IE, the cursor stayed the same (not turning into the pointing finger – and not the finger I would like to point at the Internet Explorer developers either). I fixed that by inserting:

cursor: pointer;

into BOTH the #header and #headerimg div ids in the theme’s style sheet.

Bada bing bada boom, your header is clickable very easily. Which led to another problem, namely how to display this code in a post? A quick google and I found another really cool widget by Thunderguy Semicolon: Code Markup. It is VERY cool, and made the tedious task of trying to show the code without it actually rendering in the browser a breeze. Nice job Thunderguy!

Kent Hall – your song fucking rox

Thursday, April 3rd, 2008

Kent Hall is our “professor on the drumkit”. Kind of a Jekyll and Hyde – he’ll go from “soft and beautiful” to “now let me rip your head off” on the songs, and make it look easy. I always think about Carlos Santana talking about Michael Shrieve during an interview where he says something like, “…he has a palette with all the colors”. That is Kent exactly. All the colors.

r0X0Rs

He’s not just a drummer either, he’s a badass songwriter in his own right, and we email demos back and forth all the time for each other’s listening pleasure.

So here is the last email I sent him in reply to his newest effort “Late Night Natural”:

“Subject: Kent Hall – your song fucking rox

it’s awesome. except maybe for the bit where you get really weird with the bleep bloop stuff, but what do I know.

my part sucks, sorry I played so poorly. maybe you could bring out some basic loops sometime and I could put something better down.

if u want to completely delete me for now, believe me I will not be offended.

I’m working on “Shadow of the Dream” it is turning into something really special. I think you’ll freak, but I need real drums.

and more cowbell.

and I keep trying to turn down the suck knob, but I think it’s broken”

It made me laugh.

Colesauruszilla Rex

Wednesday, April 2nd, 2008

BTW, we are doing an album of low-brow comedy named “uh that shit is not funny”, and the album features our highlarious bad mofo Don Cole on the cover, here it is it cracks me up:

roooaaarrrraaarruuuggghhhsssqqquuuaaakkkkkqq!!!

A loooooooong list of album links – is gone

Wednesday, April 2nd, 2008

Setting up the new website design has been fun, but also a pain. Forcing WordPress to do what you want is always a challenge, and usually involves a bit of hacking, but the great thing about that is every time I think “I need to be able to do this“, somebody else has usually done it and posted a plugin or a hack somewhere that’s easily found by google.

For instance, I decided to post all 10 Dave Ryder Band albums and Dave Ryder (solo) albums, even though several are not finished. This requires a separate “page” for each album which WordPress was forcing to show the link for in the sidebar.

Enter Garrett Murphey with his excellent page link manager plugin. It is very cool, and now you only see the albums link in the sidebar, which when you click takes you to a page with 10 album covers. Clicking any cover takes you to that album’s webpage (which is hawesome with a capital HAW). heh.

Oh, and regarding the Album covers – some are only temporary like the C.Y.B.O.R.G. cover – that is a weak attempt used now mainly as a placeholder until our resident art genius Paul Becker gets time to make something better. And there is time, the actual album won’t be released for around 6 months, but we are posting some demos up on the page soon, and the storyline as it develops (it is a concept album like Electric Man and Inner Travels. And Ghost Voices, which I’ve always said will be considered my masterpiece, and which I have been working on for over 10 years now, but that’s a beast of a whole ‘nuther burden – there are no demos, or anything for that matter, up on the Ghost Voices page and that is not likely to change in the near future).

And finally, the RSS feed is working now, and there is a pretty blue icon you can click to syndicate this website, but for some funny reason clicking the text “syndicate” next to the icon only takes you to daveryder.com (huh? that must have been a 3 martini lunch decision, WordPress guys).

Newsletter from hell

Tuesday, April 1st, 2008

The old daveryder.com website had a newsletter with quite a few members, but when we changed servers everything was broken (bummer).

But I saved the list of members (yay).

So, in keeping with the spirit of upgrading the website I made the decision to revamp it to match the style of the new website, and also to put a quick and easy sign up form in the sidebar.

Major. Fucking. Headache.

Wow. 2 days later, after spending at least 20+ hours on it, I’m ready to reload my original members emails up and send them a “test” newsletter. So I’m sorry to say this, but you guys (my oldest and most valued friends and fans) are going to be the guinea pigs (boo! hiss!).

No, seriously, if you even get the test letter, let me know if anything is weird or whacko, and, as they are all sent as html, if you only allow text email I’m sure it won’t be pretty (but links should still function, you just won’t see any images. duh.)

Anyway I had major help incorporating all this into wordpress from H2B2 (off the horizon) at the phplist forums, and the cool CSS for creating the bitchin’ (whoa 80′s flashback) form box I learned from this tutorial at webcredible. So there’s the props and thanks guys.