Skip navigation.

Confessions of a Web Developer

Posts tagged with "promotion"

Adding an Opera Button to WordPress: The Easy Way

, , ,

A while back I wrote a post on adding an Opera button to WordPress using your blogroll. It turns out there's much easier way to do it on WordPress.com, using sidebar widgets.

If you are using a widget-capable theme:

  1. Go to the Presentation tab on your blog's dashboard, then click on Sidebar Widgets.
  2. Drag a Text widget to the sidebar, then click on Configure.
  3. Load another tab or window and open the Choose Opera: Banners and Buttons page.
  4. Copy the code from the banner you want, then paste it into the text widget box.
  5. Close the widget configuration box, then hit Save changes.


Much easier!

Adding an Opera Button to WordPress

, , ,

Want to put an Opera banner on your site, but don't know HTML? Here's how to add an Opera button to any WordPress.com or WordPress-powered blog.

Update: I realized there's a much easier way to do this using sidebar widgets.

  1. Log into your WordPress account and go to the admin page.
  2. Go to Blogroll (wordpress.com) or Links (WordPress 2 or earlier)
  3. Click on Add Link
  4. Enter "Opera Web Browser" (or something similar) for the Name ("Link Name" in WP2)
  5. Enter http://www.opera.com/ for the Address ("URI" in WP2)*
  6. Click on the + in the Advanced bar so that you can see the Image Address field. (Or just scroll down in WP2)
  7. Open a new tab and open Choose Opera: Banners and Buttons
  8. Right-click on the banner you want and choose Copy image address
  9. Go back to your WordPress admin tab and paste that into Image Address ("Image URI" in WP2)
  10. Click on the Add Link button.
That's it!

Note: Depending on your theme, it may show only the text link. I've found that on WordPress.com, the default sidebar will only show the text, but if you go to Presentation / Sidebar Widgets and drag the Links widget onto the sidebar, it will show the button.

*Advanced Option: Log into your account on the My Opera Community first. At the top of the Banners and Buttons page, you'll see something like this:

Link to us using your affiliate url: http://my.opera.com/YOUR_NAME_HERE/affiliate/

Copy and that URL and use it instead of http://www.opera.com/ in the Address field. This will get you affiliate points, which you can keep track of on your My Opera preferences page...though I'm not sure if the points are actually used for anything.

Know Your Enemy

, , , ...

There's a lot of misinformation out there about various browsers. Opera can/can't do this. Firefox can/can't do that. There's only so much you can do to promote one product when you only know rumors or outdated facts about another.

If someone told you that Firefox was better than Opera because it doesn't have ads, you wouldn't take them seriously. You'd know the ads have been gone since last year, and you'd wonder what else they have wrong. Similarly, you won't convince a Firefox user that Opera is better because you can reorder tabs (you can, starting in Firefox 1.5). And you won't convince an IE fan that Opera is better because of tabs and a built-in search box because they'll tell you that IE7 has both.

When you're trying to convince someone that X is better than Y, and they know Y very well, you'd better know Y well enough not to make statements that the other person knows are false. When you do, you'll lose credibility, and the rest of your argument -- the part you do know well -- will suffer for it. (I suspect a lot of software flame wars get started this way!)

So here's my suggestion: If you want to promote Opera, go and download Firefox 1.5 and (if your OS will run it) the IE7 beta. If you're on a Mac, fire up Safari. Mess around with them enough that you're familiar with how they work, what you can do with them, and how they handle your favorite web pages. That way the next time you face an IE fan (to the extent that IE has fans), or a Firefox fan, or a Safari fan, you'll be armed with accurate information.

As for the post title -- I don't think it's necessary for the major browsers to be enemies. I think there's plenty of room for cordial competition rather than a cutthroat struggle. But "Know Your Enemy" is a better attention-getter than "Familiarize yourself with the competition." :wink:

Conditional Opera Banners Using JavaScript

, , , ...

Posting an Opera button on your website or blog is a great way to encourage people to try out the browser -- but what if the visitor already uses Opera? It shows solidarity, but what if you could show them something else, something that is new to them?

You might want to replace your regular Opera banner with an ad for Opera Mini. Or show them another graphic of your own design. Or maybe not even a graphic, maybe post some sort of message, like "Opera spoken here!" or "Welcome, Opera visitors!"

It's relatively simple to do this in PHP, or ASP, or some other server-side script...but sometimes you have to stick with static HTML. Well, client-side JavaScript can replace chunks of your page, and here's how to do it.

1. Put the following script in a file called operalinks.js:

function replaceOperaLink(linkID) {
if(linkNode=document.getElementById(linkID)) {
if ( 0 <= navigator.userAgent.indexOf('Opera') ) {
var newButton=document.createElement('span');
newButton.innerHTML = '<a href="http://www.opera.com/">Glad to see you\'re using Opera!</a>';
var parentNode=linkNode.parentNode;
parentNode.replaceChild(newButton,linkNode);
}
}
}


For the innerHTML section, you can plug in a new link and banner, or a special message, or anything you want. (Just make sure that you put a backslash (\) in front of any apostrophes you use.)

2. Put a unique ID in the tag for your regular Opera button. Use the outermost tag that you want to replace. For example, let's start it off with this:
<a id="OpLink" href="http://www.opera.com">Download Opera!</a>


3. Load the script in your document's <head> section:
&lt;script type="text/javascript" src="operalinks.js">


4. Call the function in the body onload event using the ID you chose in step 2:
&lt;body onload="replaceOperaLink('OpLink')">


When the page loads, the script will check the visitor's browser. If it's Opera, it'll replace the banner with whatever message you chose in step 1. It's compatible with both HTML and XHTML, and you don't need to worry about using <noscript> tags to make sure the banner still shows up for people with JavaScript disabled.