Sign in to follow this  
Followers 0
Chode

Opera URL Filtering for ad blocking

24 posts in this topic

Note: I have specifically set this up to allow Google ads so that this Forum can remain open. If the admins decide on new ad servers, they should pm me and I'll modify this guide to include the new ad server.

Or if you don't like this, feel free to destroy it.

This is a modified version of a guide found here

And also a modified HOSTS file from here

One of Opera's many features is a Kiosk mode.

One part of this mode is a URL filter which can accept wildcard entries. This is a perfect for blocking a lot of adservers. More effective than editing a HOSTS file, due to the wildcard entries.

---------

1) First, you will need at least version 6.02 of Opera (currently I am using this in version 7.5 Beta 1)

2) Make sure Opera is closed

3) Inside the program folder (in my case, "c:\program files\Opera75\") make a blank file called "Filter.ini" (full folder path: "C:\Program Files\Opera75\filter.ini")

4) The filter.ini file is made up of three sections: a [prefs] section, an [include] section, and an [exclude] section. Prefs is preferences, include refer to URL's that are allowed to be accessed, exclude refer to URL's that are forbidden. Now the fun begins.

5) Inside your "filter.ini" insert the following:

Snipped : here

6) Save and close this file.

7) Find your "Opera6.ini" file. It should be under the profile folder (in some cases, "c:\program files\opera75\profile". In other cases, "c:\documents and settings\******\Application Data\Opera\Opera75\profile", where ****** is your user name)

8) Open "Opera6.ini", and search for "[Adv User Prefs]". Under it add the following line:

URL Filter File=filter.ini

9) Save and close.

10) Now you can open Opera, and a lot of ads should be gone.

If you encounter any problems (most common is a page not opening, just instantly loading to a blank page), then compare the URL of the page to any entries under filter.ini. Remember that after editing filter.ini, you will need to close and reopen Opera.

A small tip, for easy editing of filter.ini: Right click filter.ini, and select "Send To > Desktop (Create Shortcut)". Now you have a desktop icon for easy editing of Filter.ini.

If you have any problems with this, feel free to to ask for help

*Chode*

Edited by Mr magoo

Share this post


Link to post
Share on other sites

I had problems with that before, the thing that solved it for me was:

change from "URL Filter File=filter.ini"

to "URL Filter File=<program path>\filter.ini" ("C:\Program Files\Opera\filter.ini")

Don't forget to add "" if the path has spaces in it.

Share this post


Link to post
Share on other sites

Moded Opera configuration made my Opera CPU Util to approx 100%, undoing it restored it to normal :no:

Share this post


Link to post
Share on other sites

moved the list onto to nw servers - pm for edits :)

Share this post


Link to post
Share on other sites
I had problems with that before, the thing that solved it for me was:

change from "URL Filter File=filter.ini"

to "URL Filter File=<program path>\filter.ini" ("C:\Program Files\Opera\filter.ini")

Don't forget to add "" if the path has spaces in it.

Good point. Most of the time it's not needed as long as you follow the paths I used above, but sometimes you need to use your method

Share this post


Link to post
Share on other sites

Nice guide, gonna check it out when I come home.

Ehm, maybe a guide how to get irc in Opera? :)

Share this post


Link to post
Share on other sites

hmmm did what you wrote here and it didnt work :(

Share this post


Link to post
Share on other sites
hmmm did what you wrote here and it didnt work :(

Try browsing to this link: http://101order.com/.

Let me know if the page actually loads, just sits indefinitely trying to load, or just loads a blank screen.

Share this post


Link to post
Share on other sites
hmmm did what you wrote here and it didnt work :(

Tried it with the full path?

Share this post


Link to post
Share on other sites

all loaded, with all the ads

I give up, even if it would work, there is no right clic menu to add a add to the list like Adblock extention does with FireFox

Also, cookies dont work at all!!! I have set to popup window when there is a cookie and i clic yes to accept those I want and I cant login to ANY sites at all

Also, I can't leave website's style using MY fonts... which I can with FireFox...

Gonnastay with FireFox.. the best for me

Edited by finalcut

Share this post


Link to post
Share on other sites
all loaded, with all the ads

I give up, even if it would work, there is no right clic menu to add a add to the list like Adblock extention does with FireFox

Also, cookies dont work at all!!! I have set to popup window when there is a cookie and i clic yes to accept those I want and I cant login to ANY sites at all

Also, I can't leave website's style using MY fonts... which I can with FireFox...

Gonnastay with FireFox.. the best for me

Whatever works for you, dude ;)

Share this post


Link to post
Share on other sites

FireFox shre does 100%

I tried everything with opera and I really wanted to switch... impossible..

Share this post


Link to post
Share on other sites
I tried everything with opera and I really wanted to switch... impossible..

I know what you mean.....

Recently I decided to try out Firefox....and I just couldn't "like" it. :(

Oh well, choice is what makes browsing unique for people

Share this post


Link to post
Share on other sites

Somehow that hostfile crashes opera for me...

Here is mine, covers up most of the ads with 10 times less information.

filter.ini

Share this post


Link to post
Share on other sites
Somehow that hostfile crashes opera for me...

Here is mine, covers up most of the ads with 10 times less information.

Don't think it was the hostfiles fault, I'm using it here on my copy of 7.5 Beta 1 and on my other machine running 7.23 without a hitch.

1) My filter.ini is a modified hostfile, hence the large number of entries to make it "more precise"

2) The filter.ini file you have attached will stop Google ads, meaning that you are cutting off support for this forum. :no:

I recommend you remove it, or ask a moderator to remove it for you.

Share this post


Link to post
Share on other sites

How is removing ads from this site different than removing ads on any other?

Share this post


Link to post
Share on other sites

Hmmmm, is Adblock for Firefox easy to configure?

Share this post


Link to post
Share on other sites
How is removing ads from this site different than removing ads on any other?

Well

1) it would be hipocritical for the mods/admins here to allow a guide to be hosted that cuts off support for the forum

and more importantly

2) Google ads are harmless. I've never seen one pose as a system pop up, attempt to install spyware, or be made up of bright flashing colours, or take up ridiculous amounts of bandwidth.

Google: The Ways It's Meant To Be Advertised. :)

Share this post


Link to post
Share on other sites
Somehow that hostfile crashes opera for me...

Hmm, after some investigating I managed to replicate this problem.

You are right, and I was wrong. There was a problem with the hostfiles/filter.ini

There was an errenous entry (***.) that caused 7.23 to crash in some cases. Removing the entry should fix that.

The guide probably will be modified to reflect that.

Share this post


Link to post
Share on other sites

Just thought I'd point out - I maintain the list of ad servers linked to in this thread's first post (as "a modified HOSTS file"). It's kind of funny that Mr. Chode linked to that URL and then went on to describe how it can be used in Opera's URL filtering - because it's actually possible to view the list in Opera's filter.ini format without needing to change anything (and has been for around two years). It's not meant to be a definitive filter.ini file, but it is quite a good start.

The list can also be viewed in quite a few other formats that can be used for different things. The main page has more information.

cheers,

pgl.

Share this post


Link to post
Share on other sites
Just thought I'd point out - I maintain the list of ad servers linked to in this thread's first post (as "a modified HOSTS file"). It's kind of funny that Mr. Chode linked to that URL and then went on to describe how it can be used in Opera's URL filtering - because it's actually possible to view the list in Opera's filter.ini format without needing to change anything (and has been for around two years). It's not meant to be a definitive filter.ini file, but it is quite a good start.

The list can also be viewed in quite a few other formats that can be used for different things. The main page has more information.

cheers,

pgl.

/mega forehead slap.

Doh. I only found your (quite excellent) list when someone linked me to it (forget where). Man, I can't believe I coded an application to convert it for me....

Oh well...thanks for your excellent list (Y). Hope it's ok that I used it for this guide....

Share this post


Link to post
Share on other sites
Hmmmm, is Adblock for Firefox easy to configure?

Extremely easy. You drag the Adblock "button" onto the ad or you can copy and paste the url to the ad servers into Adblocks dialog. It's that simple.

Share this post


Link to post
Share on other sites

Thanks for the compliments! You're more than welcome to use the list for whatever you like. If you can think of any other formats that might be useful, let me know.

Share this post


Link to post
Share on other sites

nice guide :yes:

only that i will never use opera again.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.