Jump to content



Photo

Opera URL Filtering for ad blocking


  • Please log in to reply
23 replies to this topic

#1 Chode

Chode

    Neowinian Misanthropist

  • 6,455 posts
  • Joined: 08-December 03

Posted 25 April 2004 - 14:45

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, 25 April 2004 - 17:10.



#2 Nathanael

Nathanael

    Neowinian Senior

  • 1,660 posts
  • Joined: 09-September 03
  • Location: The EU

Posted 25 April 2004 - 15:11

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.

#3 g3nu1n3

g3nu1n3

    Hmm....

  • 346 posts
  • Joined: 04-November 03
  • Location: Right Here

Posted 25 April 2004 - 15:44

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

#4 vetMr magoo

Mr magoo

    Neowinian

  • 8,290 posts
  • Joined: 29-September 01

Posted 25 April 2004 - 17:10

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

#5 OP Chode

Chode

    Neowinian Misanthropist

  • 6,455 posts
  • Joined: 08-December 03

Posted 26 April 2004 - 08:03

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

#6 biorK

biorK

    Neowinian Senior

  • 2,938 posts
  • Joined: 22-July 03
  • Location: Sweden, Lund

Posted 26 April 2004 - 08:06

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

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

#7 vetPink Floyd

Pink Floyd

    Neowinian Senior

  • 13,253 posts
  • Joined: 06-January 03

Posted 26 April 2004 - 19:53

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

#8 OP Chode

Chode

    Neowinian Misanthropist

  • 6,455 posts
  • Joined: 08-December 03

Posted 27 April 2004 - 06:34

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.

#9 Nathanael

Nathanael

    Neowinian Senior

  • 1,660 posts
  • Joined: 09-September 03
  • Location: The EU

Posted 27 April 2004 - 10:30

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

Tried it with the full path?

#10 vetPink Floyd

Pink Floyd

    Neowinian Senior

  • 13,253 posts
  • Joined: 06-January 03

Posted 28 April 2004 - 00:26

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, 28 April 2004 - 00:36.


#11 OP Chode

Chode

    Neowinian Misanthropist

  • 6,455 posts
  • Joined: 08-December 03

Posted 28 April 2004 - 09:56

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 ;)

#12 vetPink Floyd

Pink Floyd

    Neowinian Senior

  • 13,253 posts
  • Joined: 06-January 03

Posted 28 April 2004 - 10:46

FireFox shre does 100%
I tried everything with opera and I really wanted to switch... impossible..

#13 OP Chode

Chode

    Neowinian Misanthropist

  • 6,455 posts
  • Joined: 08-December 03

Posted 28 April 2004 - 11:15

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

#14 Nebuchadnezzar

Nebuchadnezzar

    Neowinian

  • 177 posts
  • Joined: 29-December 03

Posted 02 May 2004 - 19:08

Somehow that hostfile crashes opera for me...

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

Attached Files



#15 OP Chode

Chode

    Neowinian Misanthropist

  • 6,455 posts
  • Joined: 08-December 03

Posted 03 May 2004 - 06:39

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.



Click here to login or here to register to remove this ad, it's free!