buy viagra
Home » Archive

Articles in the Web Development Category

SEO »

[10 Dec 2008 | No Comment | ]

Problem
Earlier Today I wanted to notify Google about changes to an XML sitemap that I’d updated, and wondered if I could do it without having to log into Webmaster Tools. Call it lazyness, but I knew that the WordPress Sitemap plug-in ‘somehow’ alerted Google whenever it created a new sitemap for this blog, so I wanted to know how too!
Solution
Turns out it’s quite simple! Google, Live Search, Yahoo and ASK all allow you to ‘ping’ them about updates, via HTTP. Here are the details of each method:
Google ping URL:
http://www.google.com/webmasters/tools/ping?sitemap=http://[path to …

Textpad, regular expressions »

[10 Dec 2008 | 12 Comments | ]

Textpad is a great editor, been using it for years, but never really used it to it’s full potential. Recently I needed to do some find/replace work in some huge SQL and CSV files – huge enough to make manual editing impossible – so I had to start using Textpad’s Regular Expression capabilities.
Here are a few expressions that came in handy. I intend to add to this list as time goes on.
Regexp shown in Green, my comments in Red.
CSV Editing:
Remove spaces and tab characters at the beginning of a line:
Find …

CSS »

[9 Dec 2008 | No Comment | ]

Problem
If you need to center a div (or any another block element) over the rest of the content in a page, and you need it to be cross-browser and valid (CSS and XHTML)…
Solution
Try the following CSS in your stylesheet or page head:
#cdiv {
  position:absolute; /* important. */
  left:50%; /*important if you want it absolutely centred in window. */ 
  margin-left:-50px; /* importnant. must be half the width. */
  width:100px; /* set to your requirements, but remember left margin setting. */
  height:100px; /* not neccessary if the element needs to grow with content. */
  border:1px solid #ABF; /* not …

Joomla! »

[8 Dec 2008 | No Comment | ]

Problem
Man, this had me tearing my hair out! I was trying to install JCE Editor update 1.1.9.2, for the Joomla Content Editor component/mambot. The mambot installed fine, but whenever I tried to use a Plugin that had a file browse area, I’d see “Restricted Access” in the file list pane. An example is shown here:
Plugin showing Restricted Access
Solution
The problem was lazyness. I hadn’t read the install info thoroughly enough. is says “Joomla! 1.0.13 requires this session fix.” I don’t know exactly what the patch does, but it’s about session’ish’ness, and works a …

AdSense »

[6 Dec 2008 | No Comment | ]

Problem
Anyone that runs AdSense knows that YOU MUST NEVER CLICK ON YOUR OWN ADS. Now there’s a very slim chance you might one day accidentally click on an ad, which – if they are in a bad mood – might cause Google to suspend your account, or even remove it.
Solution
This is where the ‘google_adtest’ variable comes in handy. If you add this PHP code to your AdSense block…
<?php
if ($_SERVER["REMOTE_ADDR"]==”XXX.XXX.XXX.XXX”) {
echo “google_adtest=’on’;\n”;
}
?>
…just above the ‘google_ad_client’ variable, substituting ‘XXX.XXX.XXX.XXX’ for your home/workplace IP address, whenever you view pages with these …

PHP »

[5 Dec 2008 | No Comment | ]

Problem
When you’re using several domains which all point to one website, it’s important to make sure that Google only sees on domain when it’s crawling your site for content. Otherwise you’ll likely end up with ‘suplemental result’ listings in the SERPS. At worst they’ll dump the site thinking it’s duplicating content.
A Solution
So what you need is something to intelligently redirect traffic to your preferred domain, while preserving any path and querystring data also. To do this with PHP you can place the following code (in an include maybe?) into the …