Nov 07

Advertising banner to Graphene theme header

Many WordPress owners biggest challenge is how to customize their theme. Specially when placing banner advertisement, they think they should
have PHP knowledge. If it is Graphene theme, then it will be very simple thing. Here I’m going to demonstrate how to put advertising banner to Graphene theme header ,just next to it’s title. This is dedicated for Graphene theme, but I can say, you will get an idea how to customize yours after following this tutorial.

Graphene theme header banner example

 

 

1) Open Graphene Advanced option tab

Go to “Appearance” –> “Graphene Options” –> then “Advanced” tab

2) Enable header widget

Toggle “Action Hooks Widget Areas” and tick “graphene_top_bar” then save it.

3) Adding banner code

Go to “Widgets” and you will see new widget called “Graphene Header“, just add your advertisement code to here, but keep in mind width and height of banner, recommended height is 90-100 pixel and width is around 700-750 pixel for banner. Otherwise you may need to adjust your WordPress width and height. Just add some random word such as “ABC123” etc. we need to figure out text box id later, and those words will help us.

If you really need to adjust header banner height go to “Graphene Options” –> “Display” and change height from “Header Display Options

4) Adding css to new Widget

Just open the site and view the source from web browser. More details can be find from here. Find the corresponding Widget-ID from it by searching string called “ABC123“.

Then go to “Graphene Options” –> “Display” , bottom of it you will find “Custom Css“, just add following css, don’t forget to replace text-id with yours.

That’s it. you can hide WordPress header image from “Customize” if you wish. Happy blogging …!!

Nov 05

Installing Perl modules

When running Perl script under fresh Linux system, many of Linux users experience error message called “Can’t locate … in @INC (@INC contains:” . It means Pearl executor is unable to find required Perl module. It may be due to broken Perl module, but most of the time fresh Linux OS only installed few essentials modules by default. Here I’m going to describe how to fix that error by installing Perl modules which is  needed for Perl script. You can install Perl module manually but it is bit hard and time consuming thing 🙂 , instead automatically process is recommended. Following steps are for Centos, RHEL based system, however logic is similar for any UNIX distribution.

1) Installing CPAN

2) Installing Perl modules

You can keep default settings like below.

 

3) Example Perl module installation

Example error :-

Can’t locate ExtUtils/MakeMaker.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl/usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5

Error message clearly indicate system is missing this “ExtUtils/MakeMaker.pm” module. So let’s look at how to fix it.
inside CPAN shell type following command.That’s it see you soon !!

 

Nov 03

Blocking websites using Zeroshell

The Zeroshell is one of most popular open source router I have ever found. It provides bunch of features such as DNS, DHCP, proxy server facilities like Squid Proxy and Firewall facilities. Here I’m going to share how to restrict particular sites for LAN users using ZeroShell built-in firewall. This method can be used to restict group of the web sites by matching string pattern which contained on domain name. For an instance you block all domains which contain string of “gossip” inside of  your LAN . Let’s go thorough quickly, steps of blocking websites using Zeroshell

1) Open Zeroshell Firewall window

GO “SECURITY” –> “FIREWALL

2) Select “INPUT” chain

zeroshell firewall input chain

 

 

 

 

 

 

3) Click “Add” to make a new rule

4) Configure new firewall rule

This example gossiplanka9.info domain will be going to block.you should replace your string value here.

Source ip :- host which is going to be blocked, you can define source range if you wish
Destination ip :- Default gateway (Zeroshell proxy LAN interface ip)

IPTABLES Parameters :-  -m string –algo kmp –string gossiplanka9.info
ACTION :- DROP

zeroshell INPUT chaing drop rule

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5) Save the rule

Don’t forget to SAVE, otherwise nothing will happen.

Older posts «

» Newer posts

Fetch more items