Archive for January, 2006

Firefox 1.5 – Extension Won’t Install

Monday, January 9th, 2006

Ultimately I ended up doing a clean install of Firefox and then everything worked fine. I know a “clean install” sounds scary but these tutorials walk you through it and you get to keep everything that’s important (except extensions, you’ll have to reinstall those).

-Mozilla Forum – installing FF 1.5 and how to do a clean install

Background Info
Specifically the problem I was having is that EditCSS wouldn’t install. Here’s what was happening:
I try to install EditCSS 0.3.4 from

https://addons.mozilla.org/extensions/moreinfo.php?id=179

But I got an error message that says:

Firefox could not install the file at

http://releases.mozilla.org/pub/mozilla.org/extensions/editcss/editcss-0.3.4-fx.xpi

because: Unexpected installation error
Review the JavaScript Console log for more details

Then in my javascript console it says:

installLocation has no properties
file:///C:/Program%20Files/Mozilla%20Firefox/components/nsExtensionManager.js
Line: 3391

I’m guessing that the underlying problem was that I had uninstalled that extensions when I upgraded because I uninstalled every extension when I upgraded to 1.5 because I was getting a gray box in Firefox (Also covered in above link).

[tags]Firefox upgrade,extension problem, Firefox install[/tags]

How to add digg this, reddit this, et al links to WordPress Posts

Saturday, January 7th, 2006

Want submission links to all the social browsing/bookmarking websites to appear on each of your posts? Then just follow my instructions.
(See bottom of this post for an example and here’s an image of that example in case I ever stop using it on this site someday.)

I searched around for plugins and any advice on how to do this. Upon having no luck I decided to take matters into my own hands. Here’s what you do:

  1. Download these images and upload them to a directory on your webserver.
    del.icio.us
    Digg
    FURL
    Yahoo! My Web 2.0
    Reddit

  2. Now go find these two files in the current theme you are using and get them ready for editing:
    index.php
    single.php

  3. Edit these files by inserting this text between where the post content is printed and the closing parts of the post is printed. (Of course you must add the URL’s of those images from step 1 to this code before it will work.)

    <div class="spreadtheword">
        <a title="Save To del.icio.us" href="http://del.icio.us/post?url=<?php the_permalink() ?>;title=<?php bloginfo('name'); ?> &gt;&gt; <?php the_title() ?>"><img src="[URL DIRECTORY TO WHERE YOU UPLOADED YOUR IMAGE]/delicious.gif" alt="del.icio.us" border="0"></a>&nbsp;|&nbsp;
        <a title="Submit To Digg" href="http://digg.com/submit?phase=2&url=<?php the_permalink() ?>" ><img src="[URL DIRECTORY TO WHERE YOU UPLOADED YOUR IMAGE]/digg.gif" alt="Digg" border="0"></a>&nbsp;|&nbsp;
        <a title="Save To FURL" href="http://www.furl.net/storeIt.jsp?t=<?php the_title() ?>;u=<?php the_permalink() ?>" ><img src="[URL DIRECTORY TO WHERE YOU UPLOADED YOUR IMAGE]/frul.gif" alt="FURL" border="0"></a>&nbsp;|&nbsp;
        <a title="Save to Yahoo! My Web 2.0" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?t=<?php the_title() ?>;u=<?php the_permalink() ?>"><img src="[URL DIRECTORY TO WHERE YOU UPLOADED YOUR IMAGE]/yahoomyweb.jpg" alt="Yahoo! My Web 2.0" border="0"></a>&nbsp;|&nbsp;
        <a title="Save to Reddit" href="http://reddit.com/submit?url=<?php the_permalink() ?>;title=<?php the_title() ?>" ><img src="[URL DIRECTORY TO WHERE YOU UPLOADED YOUR IMAGE]/reddit_btn.gif" alt="Reddit" border="0"></a>
    </div>
    

    As an example here is how my final single.php looks (remember you’re also doing this to index.php):

    <?php get_header(); ?>
    <div id="content">
        <?php while (have_posts()) : the_post(); ?>
            <div class="post">
                <h3 class="storytitle" id="post-<?php the_ID(); ?>">
                    <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php if (function_exists('ImageHeadline_get_ttf_font_name')) the_title('-image-'); else the_title(); ?> </a>
                </h3>
                <p class="postdate"><strong><?php the_time('l, F jS, Y') ?></strong> at <strong><?php the_time() ?></strong> by <strong><?php the_author(); ?></strong> <?php edit_post_link('Edit','<small>|','</small>'); ?></p>
                <div class="storycontent">
                    <?php the_content('<br /><strong">Read the rest of this entry &#187;</strong>'); ?>
                </div>
    
                <div class="spreadtheword">
                    <a title="Save To del.icio.us" href="http://del.icio.us/post?url=<?php the_permalink() ?>;title=<?php bloginfo('name'); ?> &gt;&gt; <?php the_title() ?>"><img src="http://www.answermysearches.com/wp-content/themes/cleanbreeze/images/delicious.gif" alt="del.icio.us" border="0"></a>&nbsp;|&nbsp;
                    <a title="Submit To Digg" href="http://digg.com/submit?phase=2&amp;url=<?php the_permalink() ?>" ><img src="http://www.answermysearches.com/wp-content/themes/cleanbreeze/images/digg.gif" alt="Digg" border="0"></a>&nbsp;|&nbsp;
                    <a title="Save To FURL" href="http://www.furl.net/storeIt.jsp?t=<?php the_title() ?>;u=<?php the_permalink() ?>" ><img src="http://www.answermysearches.com/wp-content/themes/cleanbreeze/images/frul.gif" alt="FURL" border="0"></a>&nbsp;|&nbsp;
                    <a title="Save to Yahoo! My Web 2.0" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?t=<?php the_title() ?>;u=<?php the_permalink() ?>"><img src="http://www.answermysearches.com/wp-content/themes/cleanbreeze/images/yahoomyweb.jpg" alt="Yahoo! My Web 2.0" border="0"></a>&nbsp;|&nbsp;
                    <a title="Save to Reddit" href="http://reddit.com/submit?url=<?php the_permalink() ?>;title=<?php the_title() ?>" ><img src="http://www.answermysearches.com/wp-content/themes/cleanbreeze/images/reddit_btn.gif" alt="Reddit" border="0"></a>
                </div>
    
                <div class="feedback">
                    <?php link_pages('<span class="pagelink">Pages: ', '</span> | ', 'number'); ?>&nbsp;
                    <a href="<?php trackback_url(display); ?>" title="Trackback URI"><strong>Trackback</strong></a>&nbsp;
                    <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent link to <?php the_title(); ?>"><img src="<?php bloginfo('template_url'); ?>/images/link.gif" border="0" alt="Permanent link to <?php the_title(); ?>" /> Permalink</a>
                    <?php comments_popup_link('<img src="'.get_bloginfo('template_url').'/images/comments.gif" alt="Comments Icon" /> Post your comments &#187;', '  <img src="'.get_bloginfo('template_url').'/images/comments.gif" alt="Comments Icon" /> 1 Comment &#187;', '  <img src="'.get_bloginfo('template_url').'/images/comments.gif" alt="Comments Icon" /> % Comments &#187;'); ?>&nbsp;
                    <img src="<?php bloginfo('template_url'); ?>/images/filed.gif" alt="Category Icon" /> Filed under: <?php if (function_exists('the_nice_category')) the_nice_category(); else the_category(', '); ?>
                </div>
                <!-- <?php trackback_rdf(); ?> -->
            </div>
            <?php comments_template(); ?>
        <?php endwhile; ?>
        <?php if (function_exists('updateBlogTimePNG')) : ?><div id="blogtimes"><img src="/wp-images/blogtimes.png" alt="blogtimes" width="480" height="65" /></div><?php endif; ?>
    </div>
    <?php get_sidebar(); ?><?php get_footer(); ?>
    

    Now after you’ve saved those changes you should be able to see the links at the end of each post.

  4. The final step which is optional is to edit the style.css file in your theme’s directory to handle the new class “spreadtheword”.
    Here’s what I added to my stylesheet:

    .spreadtheword {
        text-align: right;
        clear: both;
        font-size: 10px;
        padding-bottom: 10px;
    }
    

And that’s it. Good luck, and feel free to post questions or improvements in the comments section.

Hmm, and if you’re really ambitious go ahead and make a plugin that does this for all of this for us.

And of course feel free to push the del.icio.us, digg, reddit,et al buttons below ;-) .


Updates, We’ve got updates:

  1. This generator looks promising. It claims to do what I do here but for a lot more services and supports WordPress.
  2. I removed these links from this this site because no one was using them :-( . Instead of questioning the quality of my own posts, I made up the theory that anyone who cares enough to post something to one of these sites already has the bookmarkletts etc to do it and doesn’t need these links.
  3. The kind folks at reddit have provided a few more button images to choose from.
  4. The Digg button seems to always prompt to add a new digg even if the link is already dugg. I’m looking into this.

Upgrading to WordPress 2.0 Help – upgrade.php Gives Me Server Error 500

Friday, January 6th, 2006

So I carefully followed all of the steps in the WordPress upgrade guide but when I got to step 9 (Run the WordPress upgrade program) I was hit with a server 500 error*

I guessed properly that it was a permissions problem. I tried setting all of the permissions to every WordPress related file I could find to 755 but it didn’t help.

Finally in one last frusterated attempt I changed the permissions on every single file in my directory to 755 and that worked. So the problem was probably the permission on some file that I didn’t think of before.
If you can ssh into your web hosting account you can just run something like this:
$ chmod -R 755 html

Of course there are probably security issues or other problems with having every single file have permissions of 755 so probably don’t leave them like that. (An exercise left to the reader ;-) )

*Specifically it said:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.Please contact the server administrator, root@peregrinehw.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

[tags]WordPress 2.0,chmod,Permissions[/tags]

Stop Locking My Computer After 15 Minutes Of Inactivity! (For Windows Server 2003 at least)

Thursday, January 5th, 2006


This will make your computer (at least one running Windows Server 2003) never lock after inactivity and not require ctl-alt-del to login in. It may be similar for Windows XP too.

Here’s the answer:

  1. Goto Start>Run and type gpedit.msc
  2. Once it comes up go to computer configuration go to Windows>Settings>local policies>security options
    (For Windows XP you’d go to: Windows Settings>Security Settings>Local Policies>Security Options)
  3. From there you will see the require Ctl-Alt-Del setting. Disable it. (I’m not sure if you need to do this and this isn’t shown here in Windows XP.)
  4. Next find the one that says “Amount of idle time required before suspending session” and change it to its maximum value 99999.

I found part of this answer here.

It was quite hard to to locate this gem of information on the web but here are all of the searches I tried:

  1. “this computer is in use and has been locked” #The message I want to not see
  2. disable “this computer is in use and has been locked”
  3. “Server 2003″ lock after time
  4. “Server 2003″ auto logoff after set time
  5. “Server 2003″ locked

Windows Problem – Double Clicking on Folder brings up search window

Wednesday, January 4th, 2006

To fix this you need to go into your registry and remove stuff. These websites explain how to do it:

How to fix this exact problem.
How to remove unneeeded actions from “File Folder” file type in general.

The basic idea is to run regedit, navigate to “My Computer\HKEY_CLASSES_ROOT\Directory\Shell”, and remove the “Find” key. (Always make registry backups)

Some background on how I got this weird problem:
In windows explorer I was fooling with Tools>Folder Options>File Types. I clicked on “File Folder” (whatever that is), then clicked advanced, then new, and added something I ultimately didn’t want. Then the problem started, whenever I clicked on any folder it opened up the windows search window.

But the remove buttom was grayed out so I couldn’t remove this thing I didn’t want, and I didn’t see any way to add an “Open” option and set that as the default. So I searched and finally found a reasonable answer though I don’t have “Search” in my context menu for folders anymore :-(

Here’s what I searched for so some some future poor sap won’t have to spend 30 min. searching

  1. “file folder” + “file types” remove
  2. folder options file types can’t edit file folder