5
July
2005

HaloScan Hacks Part1 – Make advertisements disappear from HaloScan comments windows.

HaloScanOnce I implemented Blogger as a blogging system I started playing with adding comments to my blog. Using Blogger I created a template to generate RSS 2.0 feeds. As I also wanted to add comment functionality to the Photo Gallery section of the site, Bloggers comments were insufficient for this need. At this point I looked at HaloScan as a method of storing my comments because it allowed me to produce my on index keys for comment posts.

HaloScan worked out well however it had one annoying aspect that could not be changed with a free “Basic” account. The Comment window that was displayed when adding or reading comments displayed advertising at the bottom. Although this is not that intrusive I wondered if there was a way to remove it. If you upgrade your account you can edit the HTML but with a “Basic” Account you only have access to the style sheet that will be used. This is where the hack comes in.

HaloScan’s default comment window has a simple table structure so making the advertising disappear would be a simple as utilizing a HTML tag Selector for tables and set the display property to none with a directive.

table {
	display: none;
}

This works however also makes the comment entry disapear as well. Luckily the comment entry table contains a class identifier “MainTable”, so when simply undoing the previous change with in the class selector in the CSS file solves this problem. I did this by adding the following two directives to the .MainTable selector in the style sheet:

	display: block !important;
	display: inline;

The reason for the two lines is that IE and Mozilla handle the display of tables differently and a Box Model Hack is required. The first of the two directive is for Mozilla, Opera and other browsers that handle the box model correctly and understand the !important modifier. It specifies that the element will be displayed as a block-level element, with a line break before and after the element. The second directive over writes the first and is used by IE and specifies the element will be displayed as an inline element, with no line break before or after the element. This is a great demonstration of how IE and Mozilla differ in there handling of CSS styles.

You can view the style sheet I used and can modify it as necessary to work with your site. My modifications also included using my own banner and colour scheme.

As the main reason I decided to utilize Haloscan for my comments was to allow comments on my Photo Gallary page I wanted a way to display these comments on the actual pages. My Hack to do this will be discussed in HaloScan Hacks Part2.

WordPress database error: [Table 'd60338014.wp_comments' doesn't exist]
SELECT * FROM wp_comments WHERE comment_post_ID = '752' AND comment_approved = '1' ORDER BY comment_date

 

Leave a comment