Archive for the 'Website Development' category

The Problem with Becoming Popular

Everyone running a website wants high PR, but it does come at a price if you are operating a site with open commenting.

Here is a story about a site that got great PR, but then some website in Turkey put up a post that said this was a good blog to leave comments on pointing back to your website to boost PR. So now the poor operator gets loads of spam from Turkey. Not that it matters where it comes from, spam is spam.

The thing is though that links on this site are tagged “no follow” so the spam doesn’t even help boost PR!

Accessing Files in a WordPress Theme Directory

When developing or modifying themes in WordPress, you may want to reference a file in the theme, such as a graphic, or an additional style sheet.

The php function bloginfo(’template_directory’) outputs the path to the template to the template. In other words, this function has an echo statement built right into it. You can not assign a variable to the path using this method.

Continue reading

Improved WordPress Template

When I first set up this blog, I used a template adapted from my travel information website. That template isn’t perfect, actually it has some major problems that need to be adjusted, but hey, you’ve got to start somewhere! There are things I like about that template too.

Sooner or later though, the template for this site had to change, and that time turned out to be yesterday.

Continue reading

The Google AdSense preview tool

Google has a tool for previewing ads that might appear on a particular web page. This sounds like a good idea, but it does not go nearly far enough.

Firstly, it shows what might appear on a specific webpage, not what does appear if you actually have Google AdSense ads appearing on that page. Unless you don’t mind skewing your statistics by visiting your own website, this isn’t a great way of going about it. What I really want to know is what ads are appearing on my website, without visiting the website. And without being tempted to click on your real ads - definitely don’t do that!

I would like a list of ads and their URLs that have been served up on my website by past visitors, so I can determine if the ads are appropriate. I should be able to click on the link (without gaining income or charging the advertiser) and see what their website is about.

There is something else missing from Google’s ad previewing tool: it is limited to working only for Internet Explorer! This is very strange, as Google actively sponsors and promotes FireFox, and Microsoft is one of (if not the only) enemy of Google!

Even Good Intentions Can Lead to Being Banned from Google AdSense

I came across an article (thanks to Web Tools Collection) about how a well-intentioned effort to remove trash ads from a website lead to the website owner being banned from Google AdSense.

Andreas Viklund, explains how he clicked on his own ads to discover which ones were legitimate. He first logged into his Google AdSense account* so that the clicks would link to him, and not be counted.

*NOTE: I was going to link “Google AdSense account” to a Google referral link, but there is no way to do this without using Google’s script, which is not what I want here. Sometimes they go overboard on the scrips. Sometimes I wish they would use plain links as Amazon and PayPal allow you to do.

Google suspended Andrea’s account for clicking on his own ads, much to his frustration. He was able to resolve the Google issue, and learned not to click his own ads in the process.

While I understand Google’s desire to avoid click fraud, there are a couple of other legitimate issues to consider here. As Andreas explains in his post, some of the ads on his site were really interesting, and he even signed up for some of the offers. This stands to reason.

If you are interested enough in a subject to write about it, chances are you are one of the best prospects for the ads that appear on your own site.

When I registered some new domain names recently, I was curious to see what ads the aggregator operated by my domain registrar, before I configured the domains for my own website. Sure enough, some of the links pointed to very interesting websites, which I book marked for future reference.

It seems to me that there is a gaping hole in the Google Adsense system. I should have a list of ads and their URLs served up on my website, so I can determine if they are appropriate. I should be able to click on the link (without gaining income or charging the advertiser) and see what their website is about.

Google does have a preview tool , but it is very limited in what it can do.

I will be looking at some of Google’s competitors, just to see if they can offer a more interesting deal. For example, linkshare.com, and commisionjuntion.com. Note that I am not hyperlinking these references, because I don’t have personal experience with them (yet).

—————————–

Extending The Use Of BlogDesk

blogdesk-logoIn a separate post, I have complained about the shortcomings of the editors available for WordPress, Drupal and other content management systems.

The solution I have been using lately is BlogDesk. I have been using it for months to post on my blogs (I’m using it now). Lately I have extended its use for other projects such as my new allergy information website. That one uses Drupal, and has many types of content (blog, page, story, book …). Some of these need more configuration than BlogDesk can manage, so uploading from my desk top does not work for everything.

What does work well is to use BlogDesk to type text, embed images, format, add links etc. The built-in spell checker is pretty good to. Use only the Post section, not the More section. Add page breaks manually.

You can then view the HTML, where you can make further changes if necessary, such as adding floating DIV blocks etc.

When you are done editing, switch the view to HTML, then copy the entire post.

Disable the editor in the editor in your content management system. Paste the HTML into the body of your post body.

WARNING: Do not attempt to edit your post with a built-in editor at a later time if you use the above method to add additional HTML tags. The editor may remove or alter your carefully constructed HTML code. FCKeditor (for Drupal) seems to alter the HTML less than most.

Is Any Web-Based Built-In Editor Good?

I just disabled the built-in editor for WordPress. After trying several editors for Drupal, I’ve given up on them all. For now, I’ll stick to HTML, thanks.

I love the idea of WYSIWYG (what you see is what you get) editors, but I don’t like what any of these editors do to my posts.

I’ve had problems with TinyMCE, for example, I lost a lot of work when I tried to edit a link, and ended up jumping to the link instead.

Most on-line editors filter the HTML, which is just plain nasty if you are trying to embed elements in floating DIV statements for example (for an example, see this article on how to install TinyMCE in Drupal).

Although the idea of WYSIWYG is great, in practice the available options are wanting.

Typing HTML has problems as well. At first there is a lot to learn, but you get used to it. The problem is typos. Most of the links in my posts open a new window - it would be too easy to mistype “_blank” or leave out a quote somewhere.

The solution I have been using lately is BlogDesk. You can read more about extending the use of BlogDesk on a separate post.

Review of Editor for Drupal: WidgetEditor

Widgteditor is a simple replacement for a Drupal text area, with a WYSIWYG style editor.

It’s simplicity makes it interesting, and it is perfect for comments.

It has problems though, and for me it is a non-starter.

Firstly, there is no way (no easy way that I am aware of) for configuring where it appears. For example, I would like to be able to enable it for comments, but not for composing nodes (stories, pages etc.).

Secondly, I do not find it suitable for the article that I post. It is too simplistic. For example, when you want to insert a link, it provides for the link location only. There is no control over where the new URL will appear (same window, or new window for example).

As of this writing, it has a bug in Drupal 5, causing it to appear twice per text area.

If your needs are minimalist, and you don’t want to see any HTML, this editor may be the one for you. If you have slightly more demanding needs, consider TinyMCE or FCKeditor .

Clean URLs in Drupal: Getting Them to Work

Although everything is fully explained on the Drupal site, getting clean URLs to work can be tricky. Actually, it is more a matter of confusion. If you are not confused, you will have no trouble. If you are confused, you may be missing something.

The first thing to understand is the Run the clean URL test. When you click this link, Drupal attempts to go to [your domain]/admin/settings/clean-urls, for example www.allergy-details.com/admin/settings/clean-urls. If you get a 404, then your system has failed the test, and you have to configure it to work. If you end up at the Clean URLs configuration page, then all is well, and you can enable clean URLs.

There is no actual path to …/admin/settings/clean-urls, so if the test generates a 404, don’t go looking for this missing file!

Note: The following applies only to Apache servers.

What you need to do is fix .htaccess. This is part of the Drupal installation, but it can sometimes go missing. In my case, I used FileZilla to move the extracted Drupal files down a directory to where they belong, the .htaccess file got left behind (because it starts with a dot, FileZilla can’t see it).

There are two ways to fix this problem. One is to use your server’s control panel to move the .htaccess file to where it belongs (in the root directory of your Drupal installation). The other option is to edit the existing .htaccess file, remove all contents, and replace it with the correct contents. If you unzip the .htaccess file from the Drupal .zip on your PC, you can copy the contents from there. Or you can copy them from this post (if you are viewing this post from the front page of my website, or from an archive, you will have to click the “read more” link to see the .htaccess file contents from this post).

Continue reading