Categories
Tech Tutorial

How adblock works?

How does Adblock Plus block addresses?

The hard work here is actually done by Gecko, the engine on top of which Firefox, Thunderbird and other applications are built. It allows something called “content policies”. A content policy is simply a JavaScript (or C++) object that gets called whenever the browser needs to load something. It can then look at the address that should be loaded and some other data and decide whether it should be allowed. There is a number of built-in content policies (when you define which sites shouldn’t be allowed to load images in Firefox or SeaMonkey, you are actually configuring one of these built-in content policies) and any extension can register one. So all that Adblock Plus has to do is to register its content policy, other than that there is only application logic to decide which addresses to block and user interface code to allow configuration of filters.

For developers: to register a content policy you have to write an XPCOM component that should implement the nsIContentPolicy interface. Make sure to adjust the module’s registerSelf method to register your component in the “content-policy” category (use the category manager for this). That’s it, now your component’s shouldLoad method will be called and you can decide whether the specific request should be accepted or not.

How does Adblock Plus process its filters and which filters are faster?

All filters a translated into regular expressions internally, even the ones that haven’t been specified as such. For example, the filter adbanner.gif| will be translated into the regular expression/ad.banner.gif$/. However, when Adblock Plus is given an address that should be checked against all filters it doesn’t simply test all filters one after another — that would slow down the browsing unnecessarily.

Besides of translating filters into regular expressions Adblock Plus also tries to extract text information from them. What it needs is a unique string of eight characters (a “shortcut”) that must be present in every address matched by the filter (the length is arbitrary, eight just seems reasonable here). For example, if you have a filter |http://ad.* then Adblock Plus has the choice between “http://a”, “ttp://ad” and “tp://ad.”, any of these strings will always be present in whatever this filter will match. Unfortunately finding a shortcut for filters that simply don’t have eight characters unbroken by wildcards or for filters that have been specified as regular expressions is impossible.

All shortcuts are put into a lookup table, Adblock Plus can find the filter by its shortcut very efficiently. Then, when a specific address has to be tested Adblock Plus will first look for known shortcuts there (this can be done very fast, the time needed is almost independent from the number of shortcuts). Only when a shortcut is found the string will be tested against the regular expression of the corresponding filter. However, filters without a shortcut still have to be tested one after another which is slow.

To sum up: which filters should be used to make a filter list fast? You should use as few regular expressions as possible, those are always slow. You also should make sure that simple filters have at least eight characters of unbroken text (meaning that these don’t contain any characters with a special meaning like *), otherwise they will be just as slow as regular expressions. But with filters that qualify it doesn’t matter how many filters you have, the processing time is always the same. That means that if you need 20 simple filters to replace one regular expression then it is still worth it. Speaking of which — the deregifier is very recommendable.

The filter matching algorithm in detail

How does element hiding work?

Element hiding rules are translated into CSS and applied to all web pages the user is visiting. A rule like example.com#div(evil_ad) then looks like:

@-moz-document domain(example.com)
{
  div#evil_ad, div.evil_ad
  {
    display: none !important;
  }
}

@-moz-document is a proposed extension to the CSS standard, you can read more about it in theMozilla Developer Center.

Rules that are not restricted to a certain domain will be restricted to the protocols http:// and https:// to prevent them from hiding elements of the browser’s user interface (it is using the chrome:// protocol scheme). For example the rule #div(evil_ad) will be translated into:

@-moz-document url-prefix(http://),url-prefix(https://)
{
  div#evil_ad, div.evil_ad
  {
    display: none !important;
  }
}

For developers: Adblock Plus is using the stylesheet service here. This interface came with Gecko 1.8 and allows extensions to add user stylesheets dynamically (before that you could only modify userContent.css which requires you to restart the browser). User stylesheets will overwrite CSS code of all web sites, they have the highest possible importance.

[alert style=”yellow”] This is what we found on adblockplus wiki[/alert]

[alert style=”yellow”] Source : adblockplus wiki[/alert]

How AdBlockPlus give effect to bloggers

With Adblock many users wanted to block ads from youtube,but meanwhile when you surf website example my website the advertisement in this website also will be hidden.In this case the adblock will make our revenue decreased and hard to earn money from that ads.

Categories
Tutorial

How to install wordpress?

What is wordpress?Wordpress is same as Joomla but wordpress is older than Joomla.Wordpress is very easy to use and it is the 1st option for bloggers to create their blog on their webserver.

WordPress vs Joomla :

WordPress is better to use for blogging and many more while joomla is only to create company,government and productivity websites

Template :

WordPress have many template available while joomla have many portfolio template.

How to install?

1st download WordPress from http://wordpress.org

2nd Transfer file using FTP to your webserver

3rd open your website by typing in http://yourdomain.com.

Note : you will be redirected to installation page

4th Insert all of your website details, admin details and database details then press install

You’ll need to get the database from your web hosting panel.

5th confirm the installation.Press Yes

6th  Your wordpress installation are done

7th Now you’re able to customize your wordpress with beautiful template ad plugins

 

[alert style=”green”]We offer Free Installation for wordpress.If you want us to install WordPress for you,Do not hesitate to contact us using the contact me form on the contact me page above.This is absolutely free,no credit card required.For more info click here[/alert]

Categories
Tutorial

How to Install Joomla?

Having to create website for your company,or school.If you wanted to do that you considered to use Joomla for that.What is Joomla?Joomla is an open source Content management System (CMS).Who is Joomla for?Joomla is for everyone but for making blogs we suggest you to use WordPress.How to install Joomla?Yeah you can follow the tutorial below.

1st download Joomla

2nd Transfer file using FTP to your webserver

3rd open your website by typing in http://yourdomain.com.

Note : you will be redirected to installation page

4th Insert all of your website details and admin details then press next

5th insert database details. then press next

You’ll need to get the database from your web hosting panel.

6th confirm either you want to use sample data or not

7th  press install

8th wait untill the progress complete

Note : you maybe will experiencing some database problem please follow the steps in the video below.

9th Now you’re done.Just remove the installation folder from your webserver

10th your website are ready and online now

Categories
Tutorial

How to use MiniMu?

Maybe you have wanted to make a blog like cnn or other new site.Maybe you have seen the url’s in cnn looks like this :

[alert style=”grey”] http://news.cnn.com or http://edition.cnn.com [/alert]

So it is very easy to do like this.If you already have a working wordpress website you can done it by this tutorial.You need to check the prerequisites below either you have it or not.

[ul type=”check”]Hosting with cPanel[/ul]

[ul type=”check”]Wordpress 3.00 or higher(you can ask us to do this for you refer below)[/ul]

[ul type=”check”]MiniMu(You can download it from plugins page refer below)[/ul]

Ok let us start now.First of all you can get hosting for your own website from Bluehost and Hostgator.I recommend you to choose these two hosting provider because it provides cheap hosting.For Malaysian’s you can get hosting from SKSA Technology .SKSA offers you cheap domain and hosting like Bluehost and Hostgator.If you want us to setup this for you,you can fill in the Contact Form on Contact me page above.

Second,after you have gotten all of this setup,you can now starts installing WordPress using Softaculous or Installatron.You also can ask me to do this for you by using the contact form on the contact me page above.

Ok once you have installed WordPress you have to go to plugins and click on the add new,then search MiniMu.You will have result as the below picture.

Myhyazid
go to plugins and click on add new
Myhyazid
type Minimu in the search box
Screenshot (166)
Then click install.in this picture it wrote installed because i already installed minimu in my blog
Then go to Settings --> MiniMu
Then go to Settings –> MiniMu
And insert the properties that you want example news.mydomain.com
And insert the properties that you want example news.mydomain.com

Then go to settings ==> minimu and you will get settings as picture above.You need to insert your own domain example : news.mydomain.com and choose your category eg: news then enter the title and description.Then click save changes.Now you’re done.

Notes : You also can use http://mydomain.com/mypage instead of http://mypage.mydomain.com

for example you can view example at http://amanz.my/video .