Skip to main content

Several Ways To Add HTML Accessories To Your Blog

If you have a malicious or misbehaving gadget in your blog, one of the easiest blog cleanups is removal of a malicious HTML gadget.

Unfortunately, this does not work, for every gadget on every blog. Depending upon how a gadget is installed, malicious code may, or may not, be visible - and if visible, may, or may not, be easily removable.

There are four ways to install accessories and gadgets, onto a blog.

  1. Add into the template, using "Edit HTML".
  2. Add into new posts, using the dashboard post template.
  3. Add into an existing HTML gadget, by editing the gadget.
  4. Add into a new HTML gadget.

The fourth is preferable, if only to isolate each gadget being added - and make it more easily maintainable.

Add into the template, using "Edit HTML".

For non visible code, the Template Editor will always be the most "logical" installation process.

Many accessories come with installation instructions.

Copy the code here, find the "<Body>" (or "</Body>") tag in your template editor, and paste after (or before) the tag. Then, Save - and test your change.

So simple to do, but so easy to mess up. Or have you never had a broken or scrambled template?

And if the code added becomes malicious later, it's can be a pain to use "Edit HTML" when you're stressed (the blog is redirecting, you have angry readers, ...).

Add into new posts, using the dashboard post template.

When code is added to the blog template, using the Template page "Edit HTML", the code addition takes place immediately. When code is added to the dashboard post template (using Settings - "Posts, comments and sharing" - "Post Template"), the code addition takes place as each new post is published.

A corresponding difference is experienced, when code is removed. Deletion of code from the blog template takes place immediately. Deletion of code from the dashboard post template takes place as each new post is published. To remove dashboard post template content from existing posts, each post must be individually edited.

Add into an existing HTML gadget, by editing the gadget.

Some people put all of their accessories, of a given type, into one HTML gadget. Maybe the code for each gadget will go into separate cells in a table structure (for visible gadgets), maybe it will simply be separated using "<br />" tags.

Either way, you can identify the problem gadget - when the time comes - but you have to edit the gadget, find the malicious code, delete the malicious code, and Save the gadget. Then, you see if you did not damage the remaining code, that you need to keep?
Oops, I did not mean to delete that tag!

All of this, again, when you're stressed (the blog is redirecting, you have angry readers, ...). Stress == Mistakes, and more stress.

Add into a new HTML gadget.

This takes extra work, in the beginning. You have to add a new HTML gadget, position the new gadget using Layout, make sure that the new gadget does not affect the other gadgets, ...

But extra work, in the beginning, gives less work, when you're stressed.
Just login to Blogger as a blog administrator, click on the link immediately below, then click on "Remove".
Isn't that so much easier?

Just be sure to add an HTML gadget, from Basics - and remember to edit the gadget, in HTML mode.

The bottom line.

It's easier, and more logical, to add code directly, using "Edit HTML". And, it keeps the code base more compact.

But if you ever have to remove code, quickly, having each code module isolated as a separate HTML gadget is way, way easier.

You'll find out, one day - if you ignore me, now.

Comments

Popular posts from this blog

What's The URL Of My Blog?

We see the plea for help, periodically I need the URL of my blog, so I can give it to my friends. Help! Who's buried in Grant's Tomb, after all? No Chuck, be polite. OK, OK. The title of this blog is "The Real Blogger Status", and the title of this post is "What's The URL Of My Blog?".

Add A Custom Redirect, If You Change A Post URL

When you rename a blog, the most that you can do, to keep the old URL useful, is to setup a stub post , with a clickable link to the new URL. Yo! The blog is now at xxxxxxx.blogspot.com!! Blogger forbids gateway blogs, and similar blog to blog redirections . When you rename a post, you can setup a custom redirect - and automatically redirect your readers to the post, under its new URL. You should take advantage of this option, if you change a post URL.

Adding A Link To Your Blog Post

Occasionally, you see a very odd, cryptic complaint I just added a link in my blog, but the link vanished! No, it wasn't your imagination.