Adsense Tweaks

August 22, 2005 on 9:54 pm | In 31 Days to a Better Blog, AdSense, Blog Housekeeping, Blogging | No Comments

I have been mentioning for a few days that I have been spending some time Tweaking the AdSense that appears here and on my Nicolas Darvas Website.

One of the biggest tasks was placing an 250 x 250 AdSense Box that appeared in just the first post of a displayed web page. If anyone is inerested in doing this themselves, then here is a brief description of how I did it.

The most important thing was to hack the index.php file in the current theme. What I needed to achieve was to insert the AdSense box into only the first post and not any of the subsequent ones.

So, to achieve this, I had to put a counter variable at the begining of the index.php file - I hope it doesn’t get too geeky!:

< ?php $showAdSense = True; ?>

Next, I had to scroll down through index.php to find the start of the <div> tag which handles the style for each post - In my current Theme, it is:

<div class=”entry”>

Once I had found this, I pasted my AdSense code immediately before it - with some PHP and a style wrapped around it - The PHP made sure only one block would be displayed and the style would place it in the right area of the post. Here is the code:

<?php If ($showAdSense) { ?>
<div style=”float: right; margin: 0px; margin-top: 10px; padding-right: 0px; padding-left: 5px”>
<script type=”text/javascript”><!–
google_ad_client = “pub-XXXXXXXXXXXXXXXX”;
google_ad_width = 250;
google_ad_height = 250;
google_ad_format = “250×250_as”;
google_ad_type = “text”;
google_ad_channel =”";
google_color_border = “FFFFFF”;
google_color_bg = “FFFFFF”;
google_color_link = “CC6600″;
google_color_url = “6699CC”;
google_color_text = “000000″;
//–></script>
<script type=”text/javascript”
src=”http://pagead2.googlesyndication.com/pagead/show_ads.js”>
</script>
</div>
<?php $showAdSense = False;} ?>

Basically, the first line of this code asks is there an AdSense Box here?. Because the showAdSense variable is set to True - then the answer to this question is Yes - so, the AdSense code is inserted into the HTML for the page.

At the end of the AdSense insertion, there is a piece of PHP code that then sets the showAdSense variable to False - so that the when it comes to insert the next post and the page asks if there is an AdSense box - the answer will be No.

And that - believe it or not - is all there is to it. Of course don’t be fooled by how easy it is - Remember to ALWAYS back-up any files you are working on when Hacking your Blogging Software. I know from bitter experience the pain of trying to unpick crappy code because you can’t restore to the original version.

Oh - and I’ve inserted all those XXXXXXXX’s in the AdSense block where my AdSense ID goes. If you would really like to show my ads on your pages - please let me know as I’ll be only to happy to oblige!


Related Posts:
3.28767 is the first Google AdSense Magic Number
Michael Cheneys AdSense Videos (Update)
Michael Cheneys AdSense Videos
AdSenseLog - Desktop AdSense Account Application
Chitika eMiniMalls

del.icio.us:Adsense Tweaks  digg:Adsense Tweaks  spurl:Adsense Tweaks  wists:Adsense Tweaks  simpy:Adsense Tweaks  newsvine:Adsense Tweaks  blinklist:Adsense Tweaks  furl:Adsense Tweaks  reddit:Adsense Tweaks  fark:Adsense Tweaks  blogmarks:Adsense Tweaks  Y!:Adsense Tweaks  smarking:Adsense Tweaks

Day 18 - Roundup

August 18, 2005 on 10:27 pm | In 31 Days to a Better Blog, Blog Housekeeping, Blogging | No Comments

Well I didn’t feel too creative this evening after last nights disruptions - so I have done some Blog House Keeping jobs which I have been saving up for times like these.

I have added some links to Blog Utility Sites (can’t think of a better name for them - somebody please correct me). You can see them on the left hand side of my page. They are

  • Pluck An online News Reader thingie - a bit like BlogLines. I saw this on Steve Pavlina’s Blog - so I had to have one too.
  • MyBlogLog - an utility which tracks outgoing links from your site. The idea being that you can find out what else interests your readers (because they are clicking the links) and engineer your content for their tastes - thus retaining readers. This is an affiliate link by the way.
  • BlogTopSites - This is a kind of Blog Ranking site. Darren Rowse has it on ProBlogger - so, yep, I had to have one too. It was hard work signing up for it as Darrens site is Number 1. However, when I signed up I was 65 (last) but in the last couple of hours I have shot up to 42. Incredible - It’s got to do wonders for your self confidence! Get one! Now!
  • Feedburner, BlogLines and NewsGator were added a week or so ago. I recomend getting these as they have generated a reasonable amount of traffic for my site.

Another Blog House Keeping job I’ve been working on is tweaking my AdSense. I’ve managed to insert a square block of ads into the first post of the page with some help from a handy post at the Wordpress Forums. It involves faffing around with some PHP in the index.php file - so you may want to back this file up if you plan to have a go yourself.

I have also done a spot of Blog Stubbing over at my Nicolas Darvas website - after being encouraged by some un-noticed Search Engine generated trafic and a sudden increase in AdSense revenue (only a couple of bucks though).


Related Posts:
Day 20 & 21 - Roundup
Day 7 - Roundup
Day 15 - Roundup
Day 9 - Roundup
Day 16 - Roundup

del.icio.us:Day 18 - Roundup  digg:Day 18 - Roundup  spurl:Day 18 - Roundup  wists:Day 18 - Roundup  simpy:Day 18 - Roundup  newsvine:Day 18 - Roundup  blinklist:Day 18 - Roundup  furl:Day 18 - Roundup  reddit:Day 18 - Roundup  fark:Day 18 - Roundup  blogmarks:Day 18 - Roundup  Y!:Day 18 - Roundup  smarking:Day 18 - Roundup

Web Hosting Offer

August 18, 2005 on 12:28 pm | In 31 Days to a Better Blog, Blog Housekeeping, Blogging | No Comments

The Web Hosting company who I host this Blog with have a special offer which is due to come to an end on the 29th of August 2005.

The company is called DreamHost [affiliate link] and I can highly recommend them.

The special offer increases your Bandwidth and Disk Storage by 3 times the normal amount - Thus their basic (shared hosting) package includes:

  • 2400MB Storage.
  • 120GB Bandwidth.
  • 600 Email Accounts.
  • Hosting for 3 Full Domains and 15 Sub Domains.
  • For the Geeks - A whole bunch of programing stuff - including PHP5 and Ruby on Rails with Fast CGI ;)
  • One Click Installs include Wordpress, phpBB and Subversion.
  • And more besides - just go and check them out.

I spent some time researching Web Hosting and came across DreamHost after a recomendation from a fellow poster at the Joel on Software forums.

If you are considering signing up with some Web Hosting in the near future I recomend you check them out.


Related Posts:
Website Hosting - Dreamhost Sale
GoDaddy
GoDaddy Again
Color Wheel Pro
Carnival of Entrpreneurship

del.icio.us:Web Hosting Offer  digg:Web Hosting Offer  spurl:Web Hosting Offer  wists:Web Hosting Offer  simpy:Web Hosting Offer  newsvine:Web Hosting Offer  blinklist:Web Hosting Offer  furl:Web Hosting Offer  reddit:Web Hosting Offer  fark:Web Hosting Offer  blogmarks:Web Hosting Offer  Y!:Web Hosting Offer  smarking:Web Hosting Offer

Style Sheet Update

August 12, 2005 on 10:28 pm | In 31 Days to a Better Blog, Blog Housekeeping, Blogging | No Comments

Ah-ha found the problem with the Style Sheet.

No I’ll be able to sleep properly!


Related Posts:
Day 11 - Roundup
Day 12 - Roundup
Google PageRank
Monday morning is a quiet day in New Zealand.
Michael Cheneys AdSense Videos (Update)

del.icio.us:Style Sheet Update  digg:Style Sheet Update  spurl:Style Sheet Update  wists:Style Sheet Update  simpy:Style Sheet Update  newsvine:Style Sheet Update  blinklist:Style Sheet Update  furl:Style Sheet Update  reddit:Style Sheet Update  fark:Style Sheet Update  blogmarks:Style Sheet Update  Y!:Style Sheet Update  smarking:Style Sheet Update

Day 12 - Roundup

August 12, 2005 on 10:20 pm | In 31 Days to a Better Blog, Blog Housekeeping, Blogging | No Comments

So, I’m close to the end of the second week of 31 Days to a Better Blog.

Have spent all of this evening sorting out the Style Sheet again. I posted about how it is important to check any changes in at least IE as well as Firefox. Of course, I didn’t do this when I made some adjustments last night, so have been fighting with it tonight.

There is an annoying white line which is appearing in the header layer underneath the Blog Title.

I can’t work out where it is coming from - and I am too tired to carry on - So it will have to wait until tommorrow.


Related Posts:
Day 20 & 21 - Roundup
Day 7 - Roundup
Day 15 - Roundup
Day 9 - Roundup
Day 16 - Roundup

del.icio.us:Day 12 - Roundup  digg:Day 12 - Roundup  spurl:Day 12 - Roundup  wists:Day 12 - Roundup  simpy:Day 12 - Roundup  newsvine:Day 12 - Roundup  blinklist:Day 12 - Roundup  furl:Day 12 - Roundup  reddit:Day 12 - Roundup  fark:Day 12 - Roundup  blogmarks:Day 12 - Roundup  Y!:Day 12 - Roundup  smarking:Day 12 - Roundup

Day 11 - Roundup

August 12, 2005 on 10:04 am | In 31 Days to a Better Blog, Blog Housekeeping, Etc... | No Comments

Not so much Blogging today.

Have fiddled around with the style sheet a bit and have also applied the style sheet to my Nicolas Darvas website.

I plan to spend a bit more time working on the Nicolas Darvas website too - there are several things I need to get set up for it to really get it going. I have finished the review of Wall Street the other Las Vagas there today also.

Whoops… forgot to publish this last night.


Related Posts:
Day 20 & 21 - Roundup
Day 7 - Roundup
Day 15 - Roundup
Day 9 - Roundup
Day 16 - Roundup

del.icio.us:Day 11 - Roundup  digg:Day 11 - Roundup  spurl:Day 11 - Roundup  wists:Day 11 - Roundup  simpy:Day 11 - Roundup  newsvine:Day 11 - Roundup  blinklist:Day 11 - Roundup  furl:Day 11 - Roundup  reddit:Day 11 - Roundup  fark:Day 11 - Roundup  blogmarks:Day 11 - Roundup  Y!:Day 11 - Roundup  smarking:Day 11 - Roundup

Day 8 - Roundup

August 8, 2005 on 9:14 pm | In 31 Days to a Better Blog, Blog Housekeeping, Blogging | 1 Comment

Well I’m now into the second week of 31 Days to a Better Blog. I’m still here and enjoying it.

I had a bit of a shock this morning when I opened my Web Site in Internet Explorer. I have been using Firefox religiously for the last few months and had never checked what www.dominicfoster.com looked like in IE.

BIG MISTAKE.

I have just spent the last hour or so patching up little mismatches between my site in IE and my site in Firefox. Luckily it was not anything too drastic. I kinda feel lucky to have learnt an important lesson under no so important circumstances. From now on, whenever I change my stylesheet or theme around, I shall be checking with different browsers.

I must say that I have been very inspired by Darren Rowes excellent Declaring War on Blogger Apathy - to the extent that I printed it to read on the bus on the way home. Indeed, something that I am working on is to get a bunch of ‘Stock Posts’ which I can use in times of emergency - like lack of time, Illness, and even … apathy! <sigh>


Related Posts:
Day 20 & 21 - Roundup
Day 7 - Roundup
Day 15 - Roundup
Day 9 - Roundup
Day 16 - Roundup

del.icio.us:Day 8 - Roundup  digg:Day 8 - Roundup  spurl:Day 8 - Roundup  wists:Day 8 - Roundup  simpy:Day 8 - Roundup  newsvine:Day 8 - Roundup  blinklist:Day 8 - Roundup  furl:Day 8 - Roundup  reddit:Day 8 - Roundup  fark:Day 8 - Roundup  blogmarks:Day 8 - Roundup  Y!:Day 8 - Roundup  smarking:Day 8 - Roundup

Blog Stubs

August 6, 2005 on 10:16 am | In 31 Days to a Better Blog, Blog Housekeeping, Blogging | 2 Comments

I’ve just spent a while going through my Notebook, checking up on what I can blog about next week for 31 Days to Better Blogging. At the same time I had Wordpress open in the Write Post section - I then had an idea. I’m sure it’s not unique - but I thought - Why don’t I take all my ideas from my notebook and write a quick Draft Post for that idea?

So guess what? That’s just what I did. I’m thinking that each time I log on to my Wordpress Admin I’ll be able to see what Ideas I have had which I wish to Blog about. For want of a better phrase, I shall hereon refer to this practice as writing Blog Stubs. Or even Blog Stubbing.

I took about half an hour of my time to do this. Now I have 12 Blog Stubs sitting in my Admin Section. Each one has a Title and a brief plan of what I want to convey in the Post or Article.

At the same time, it gives me some idea of what Categories I would like to add to my Blog.

I reckon this will really pay dividends when I am somewhere without my notebook, but have time to write.


Related Posts:
Day 6 - Roundup
Day 18 - Roundup
Meme
Edward de Bono - The Six Value Medals
Day 12 - Roundup

del.icio.us:Blog Stubs  digg:Blog Stubs  spurl:Blog Stubs  wists:Blog Stubs  simpy:Blog Stubs  newsvine:Blog Stubs  blinklist:Blog Stubs  furl:Blog Stubs  reddit:Blog Stubs  fark:Blog Stubs  blogmarks:Blog Stubs  Y!:Blog Stubs  smarking:Blog Stubs

Color Wheel Pro

August 5, 2005 on 8:52 pm | In 31 Days to a Better Blog, Blog Housekeeping, Blogging, Tools | 1 Comment

During my 31 Days to a Better Blog Project, I want to look at a few different tools which will hopefully help to make my Blogging better.

I believe there are several ways to make a web site appealing to visitors - Among these ways are - Fresh and Topical Content, Intuative Useability (Good User Interface) and an Appealing Design.

Today I’ve been thinking about the Design of my Web Site. I’m pleased with the Wordpress Template I’m using - It is called Safety and was designed by a guy called Josh Lyman - with a few extra mods by myself which you can read about here.

There are several ways you could go about having a web site designed.

  • You could pass the whole project over to a professional designer (along with a fair wedge of hard earned cash).
  • You could use a Content Management System (such as Wordpress, Mambo, Drupal or many others - some of which you have to pay for). Doing it this way, you can use the default template, download one for free from some kind souls web site, or pay for one.
  • You can do the whole thing yourself for free!

My personal option was to use Wordpress. DreamHost (my Web Hosting Provider) has a nifty One-Click-Install for this - They also have Triple Bandwidth and Disk Space special at the moment - which finishes on the 29th August! - I then tried a few different themes and settled on Safety. The main reason - apart from generally liking the theme - was because I wanted a 3 column layout.

Now, allthough I like the theme very much there are a number of modifications I’d like to make - such as adjusting the layout a little and also creating a logo for the header.

But the modification that has been on my mind today is an overhaul of the Color Scheme - And the really worrying thing about this is that I have an absolutely Shocking sense of Color Co-ordination

Luckily I have found a tool on the web which I am going to trial - and which will hopefully help me out. It’s called - Color Wheel Pro - a program that allows you to create color schemes and preview them on real examples.

I’ve pretty busy with it so far. What do you think of this for a Color Scheme darlings??


Very Bad Color Scheme

P.S. I didn’t use Color Wheel Pro to create that!


Related Posts:
Day 6 - Roundup
31 Days to Building a Better Blog
AdSenseLog - Desktop AdSense Account Application
Wheelspin and Traction

del.icio.us:Color Wheel Pro  digg:Color Wheel Pro  spurl:Color Wheel Pro  wists:Color Wheel Pro  simpy:Color Wheel Pro  newsvine:Color Wheel Pro  blinklist:Color Wheel Pro  furl:Color Wheel Pro  reddit:Color Wheel Pro  fark:Color Wheel Pro  blogmarks:Color Wheel Pro  Y!:Color Wheel Pro  smarking:Color Wheel Pro

faveicon.ico

August 3, 2005 on 9:40 pm | In 31 Days to a Better Blog, Blog Housekeeping, Blogging | 2 Comments

For a few years I had always wondered how some websites managed to get one of cool their icons into my browser address bar. Well since I’m going to be blogging better - and since I added another category for Blog Housekeeping yesterday - I thought that today is the day that I would sort out how to get an icon into the Browser address bar.

Another reason I wanted to get this sorted out comes from my fascination with my Web Stats.

Whenever I look at them, I always notice a section called Failure Report:

    Failure Report

On the graph representation of this report (above), there is a BIG slice of red pie labeled “favicon.ico”. This sounded to me like something that needed to be investigated - Also, since I know that *.ico files are icon files - It also sounded like it could be something to do with putting an icon in the browsers address bar.

A quick Google on ‘favicon.ico’ led me to an article called What is favicon.ico? Personalise Your Sites Bookmark by Christopher Heng - This sounded exactly what I was looking for.

It is really easy to get your icon into the address bar. Here is a summary of how I did it:

  1. Create an icon file which is 16×16 pixels of the icon you want to use. I used Microangelo to build mine.
  2. Save the icon as favicon.ico.
  3. Upload the file to you web sites root directory
  4. Job done.

So there you go. If you look up at your address bar, you should see my lovely ‘DF’ logo.

Does anyone know if this will affect my Web Stats Failure Report ?


Related Posts:
Day 3 - Roundup

del.icio.us:faveicon.ico  digg:faveicon.ico  spurl:faveicon.ico  wists:faveicon.ico  simpy:faveicon.ico  newsvine:faveicon.ico  blinklist:faveicon.ico  furl:faveicon.ico  reddit:faveicon.ico  fark:faveicon.ico  blogmarks:faveicon.ico  Y!:faveicon.ico  smarking:faveicon.ico

Next Page »

Pool theme design by Borja Fernandez.
Entries and comments feeds. Valid XHTML and CSS. ^Top^
Performancing