Implement Google Adsense For Search In WordPress Blog

Google adsense for search in wordpress self-hosted blog

Adding Google Adsense for search (AFS) for self-hosted WordPress blogs is a bit tricky.In case of a blog hosted on Blogger, it’s enough if you place the codes wherever you want as long it lies within the <body>  section of the HTML source.Coming back to WordPress, even though there won’t be much difficulty in adding the code for displaying the Adsense search box, showing search results is the hard part.This requires you to create a separate page for displaying the search results.

Here we are coming up with an exclusive full tutorial on how to add Google Adsense site search in your WordPress blog.Follow the steps carefully to learn add Adsense site search feature on your own.

What Do We Need ?

– We need a standalone WordPress page to show search results

– We need a separate WordPress page template to embed the search results

– Codes for generating Adsense search box and Adsense search results

Procedure:

Step 1: Creating page template

We are going to generate a WordPress page template in this step.

Open any text editor and copy paste the below code into it and save it as something like googlesitesearch.php.

Code:

<?php
 /*
 Template Name: google site search
*/
?> 

<?php get_header(); ?> 

<!-- Your Adsense serach result code goes here --> 

<?php get_sidebar(); ?>
<?php get_footer(); ?>

Note the template name that you have given here (google site search), we make use of this in the next step.You may have to upload it to your WordPress theme folder to use it in the next step.

Step 2: Creating WordPress page

This is much simpler step, you just need to create a new WordPress page (Go to Pages> select “Add New”). Give it some name like Google Site Search.

Important: On the right side pane, select the page template that we have created in the first step (google site search).

WordPress page for site search results

Publish the page and note down the URL of the page (ex: www.techrena.net/google-site-search).

Step 3:

Login to your Adsense account and create a new Adsense for search ad.

In the second page of the AFS wizard, enter the above URL from the above step in the text box under “Open results within my own site” option.

AFS search results page

Finish the AFS settings wizard and now you are ready with two separate codes, one for generating Adsense search form and another for generating search results.

Adsense for search code

Step 4:

Copy the Search Results Code and paste it into the page template file (googlesitesearch.php), save it and re-upload it to your current WordPress theme folder via FTP. Now this is your final page template that loads the search results.
You are done and the sample result page will look like the following:

techrena AFS results page

Let us know, if you face any difficulties in implementing Adsense for search in your WordPress blog.

[How To] Make Gmail More Secure By Using HTTPS Instead Of HTTP

“If you sign in to Gmail via a non-secure Internet connection, like a public wireless or non-encrypted network, your Google account may be more vulnerable to hijacking. Non-secure networks make it easier for someone to impersonate you and gain full access to your Google account, including any sensitive data it may contain like bank statements or online log-in credentials” – Google

In order to avoid such kind of security risks we should enable HTTPS(Hypertext Transfer Protocol Secure) which is a secure protocol that provides authenticated and encrypted communication and the interceptors will not be able to tap the information.

You might have seen HTTPS being used in the banking and payment websites. So by using HTTPS for your Gmail, you will be able to a secure you mailbox.

In order of enable HTTPS protocol follow the steps below:

1. Sign in to Gmail

3. Check If your Gmail is secure?

Check if you have a https://mail.google.com url. If not then follow the steps else not required as it is already enabled.

gmail_url

3. Click Settings at the top of any Gmail page.

gmail_settings

4. Set Browser Connection to Always use https

always_use_https

5. Click Save Changes.

save_gmail_settings

6. Log out and Login.

7. Now find a secure login

You can see https://mail.google.com in the url.

gmail_https_url

Now you Gmail is as safe as you internet banking site. But never forget to Logout your account if you are using a public computer.

Notes:

  1. Using HTTPS may slow down a bit the speed of accessing your Gmail, so if you trust the security of your network, you can turn this feature off at any time
  2. “Always use https” will prevent you from accessing Gmail via HTTP
  3. Currently Gmail has enabled HTTPS by default. For the old users you can follow the method.

[How To] Disable Restart Your Computer Notification After Installing Windows Update

Microsoft Windows automatic updates provides maximum protection against latest security threats and fixes bugs discovered later. Well it is advisable to enable automatic updates or at least install them manually whenever any new update is released. The only annoying thing about Windows Automatic Updates is that it starts displaying a notification to restart your system in regular intervals once it finishes installing the updates.

This notification is even more annoying in Windows XP where we don’t have the option of increasing the time interval.

Windows_XP_Restart Windows-7-restart

Now we can disable this notification. The methods are given below:

1. By using Local Group Policy Editor (gpedit.msc)

Note: Local Group Policy Editor which is not available in Home versions of Windows

Open Local Group Policy Editor. Press Start + R, Type gpedit.msc and Enter.

Now go to in the left pane :

Computer Configuration—>Administrative Templates—>Windows Components—>Windows Update

Windows_update

In the Right Pane Double Click on:

No auto-restart with logged on users for scheduled automatic updates installations

no_auto_restart

Click on Enabled and press OK.

enable_no_auto_restart

Now the notification has been disabled permanently.

2. By using wuauserv command

Note: This method is applicable for all versions of Windows XP, Vista and Windows 7.

Press Start + R, Type net stop wuauserv and Enter.

net_stop_wuauserv

Stopping_windows_update_service

It will stop the Windows Update service for the current session. It will start again after the system restarts. It is important to note that you have to use this command only after Windows has finished installing the updates and when it starts notifying to restart. Do not stop the service while installing the updates.

If you want to start the service Type net start wuauserv and Enter.

This method stops the notification temporarily, only for the current session.

We hope that now you will not have to press restart later again and again and get hold of the annoying message.

You can subscribe to our RSS feed via email for more tutorials under Windows.

[How To] Remove Trojan.Vundo.H or Vundo.H Virus

danger

Trojan.Vundo.H also known as Vundo.H is a back door trojan horse program  that will activate corrupt infected local and network computers and download further malware programs onto the system. The Trojan.Vundo.H trojan horse is considered at severe security risk that can alter registry files and radically slow down computer speed.

Though popular anti-virus programs like AVG can detect the virus, it is found that some special anti-spyware program is needed to remove this virus application

Trojan.Vundo.H  infects and alters certain registries which include:

* HKEY_CLASSES_ROOT\CLSID\{39458c53-4dae-471a-a480-e3bc0b1d7dd9}
* HKEY_CLASSES_ROOT\CLSID\{65d46614-611d-4af2-aa13-a34fc317a96e}
* HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MS
* HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\dslcnnct

Some of the known infected files by Trojan.Vundo.H are given below:

* C:\WINDOWS\SYSTEM32\ugohwe.dll
* C:\WINDOWS\SYSTEM32\subapade.dll
* C:\WINDOWS\SYSTEM32\edapabus.ini
* c:\WINDOWS\SYSTEM32\voriyeji.dll
* C:\WINDOWS\SYSTEM32\pefedamu.dll

Removal of Trojan.Vundo.H program:

It is very difficult to remove the virus program manually, though it is possible. To monitor the activity and registries of the program we can use Hijack this. To know more follow step 2 in this post.

After a detailed research we have found that this spyware virus can be removed using the spyware program: Spyware Doctor with AntiVirus 2010 for Windows. You can download the program from the link below:

Download: Spyware Doctor with AntiVirus 2010 for Windows

Size: 34.9 MB

Run a full scan and remove the Virus files.

You can subscribe to our RSS feed via email for more tutorials under security.

[How to] Repair Install Windows XP without Data Loss

Have you ever faced any problem like ntldr file missing during the start up of Windows XP? During the cases of critical Windows file gone missing or corrupt, Windows will not Boot and hence cannot start. What will you do in such case where your data is at stake?

There may be many solutions available, but repairing Windows using the Windows XP setup CD will be the best. In repair install your data will be intact and no data loss will occur if everything goes right.

If you install a new copy of Windows then some of your data will be lost.

What is Windows XP repair Install?

In Repair install, all the Windows files and registries will be copied to your Hard drive from the Windows XP installation CD. The installed program files and personal data on your hard drive will not be affected in most cases.

How to perform Windows XP repair Install?

Requirements:

Your Windows XP installation CD and key

Follow the steps below:

1. Insert the Windows XP CD to your Optical Drive and Start your computer.

Make sure that the computer boots from the installation CD. If it is not booting from the CD try changing your boot options in the BIOS.

While booting from the CD, press any key to start the process.

boot_from_xp_cd

Xp_setup

2. Press ENTER to set up Windows XP.

Do not press R. It will start, Recovery Console which is not desirable.

Welcome_ro_setup

3. Press F8 to Agree the License Agreement.

F8_agreement

4. Press R to start the recovery install

Select the currently installed Windows XP location which you want to repair. Press R to repair the installation.

repair_xp

Now it will copy the files.

copying_files

5. Press ENTER to reboot or else wait until it reboots by itself

Setup will continue after restart.

reboot

6. Do not boot from the CD after start up

After booting up from your hard drive it will continue installation. Follow the normal installation process.

installing_windows

After successful installation, your computer will restart once again. It may take some time during the first startup.

first_boot

Now your desktop should be accessible. In case of any problem do leave a comment.

You can subscribe to our RSS feed via email for more tutorials under Windows.

[How To] Stop or Disable Hotlinking and Bandhwidth Theft using .htaccess file

We found out that many of our copyrighted popular posts have been copied by many of the bloggers. But with so many traffic hungry bloggers around, it is impossible to track and warn each of the bloggers.

Now, our main concern is that many of our copyrighted images are not only copied to other blogs but also hotlinked. This is a serious issue with every popular blog where hotlinking results to bandwidth theft. Now if you are having similar problems of hotlinking or not, you should disable hot linking for sure.

What is Hotlinking or Inline linking?

Inline linking (also known as hotlinking, leeching, piggy-backing, direct linking, offsite image grabs) is the use of a linked object, often an image, from one site into a web page belonging to a second site. The second site is said to have an inline link to the site where the object is located.[wikipedia]

This is when you insert an image to your blog from an image URL of someone else’s site instead of uploading the image to your server. Many people with limited server storage size tend to do this.

How to stop Hotlinking and Bandwidth theft using .htaccess file?

In order to disable hotlinking follow the steps below:

1. Open your .htaccess file by saving it.

.htaccess file is present in the public_html folder of your blog. This can be accessed by using the ftp client like FileZilla. Hope all webmasters know this. Save the file and open it using notepad.

dot_htaccess

2. Add the code to disable hotlinking of your images

Add the following code to your .htaccess file and save it back to your public_html folder.

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+\\.)?yoursite\\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\\.(jpe?g|gif|bmp|png)$ http://imagehostsite/warning.jpeg [L]

Change the orange colored code according to your need as shown in the example below.

Example: [Click to Enlarge]

disable_hotlinking

The RewriteCond can be added according to your purpose. If you have any other blog where you want to use the images, then add another line with the site’s address as we have done in the example.

Important notes:

1. Backup your .htaccess file before doing the changes.

2. in the RewriteRule line, you cannot use a warning image uploaded to your site because the warning image itself will be blocked. So upload the image to some other servers like blogger or other image hosting sites

3. The RewriteCond can be added according to your purpose. If you have any other blog where you want to use the images, then add another line with the site’s address.

Now after performing the changes, you can check the other site where your images are hotlinked. An example is given below where our most popular post Reset Windows XP, Vista, 7 Password Using USB Drive or CD was copied.

hotlinking_blocked

Hope you have seen something like ours. Any feedback will be appreciated.

You can also see how to protect your wordpress internal files using .htaccess.

You can subscribe to our RSS feed via email for more tutorials under Blogger Tips.

Speed Up Windows Boot Up and Startup Using gpedit and DPS

In Windows PC, slow boot up and slow startup is one of the major problem we face. During the starting of Windows, it may take a lot of time to come to the logon screen and then to the desktop. This kind of problem is common in PCs which are older and a lot of programs are running.

One method we have already posted to speed up your Windows PC is by using MSCONFIG. Here, we will be solving the slow boot up problem using Windows Boot Performance Diagnostics of Diagnostic Policy Service(DPS).

Diagnostic Policy Service (DPS) will detect Windows Boot Performance problems and attempt to determine their root causes. These root causes will be detected and corrective actions will be taken to solve the problems.

Follow the steps below to enable Windows Boot Performance Diagnostics.

1. Open Local Group Policy Editor

Press Start + R and Type gpedit.msc and press Enter. Incase of

2. Go to Windows Boot Performance Diagnostics

In the Left Pane of  Local Group Policy Editor go to the location:

Computer Configuration—>Administrative Templates—>System—>Troubleshooting and Diagnostics—>Windows Boot Performance Diagnostics

Windows_Boot_Diagnostics

3. Open Configure Scenario Execution Level of Windows Boot Performance Diagnostics

Now in the right pane Double Click on Configure Scenario Execution Level.

Configure_Scenario_Execution_Level

4. Enable Windows Boot Performance Diagnostics

Now Click on Enable and Select Scenario Execution Level as Detection, Troubleshooting and Resolution. Click OK

Enable_Windows_Boot_Diagnostics

If you select Detection and Troubleshooting only then  the root causes will be logged to the event log when detected, but no corrective action will be taken.

Now Windows Will Diagnose your Startup problems and try to fix them for a faster boot and startup.

Important Notes:

Note 1: Windows Boot Performance Diagnostics is a part of the Diagnostic Policy Service(DPS). So DPS should be running in your computer in order to successfully diagnose the problems. To check whether the service is running or not, Press Start + R and Type services.msc. Check out for Diagnostic Policy Service.

services

Incase if it is not started, you have to start it using MSCONFIG. To do that, Press Start + R and Type msconfig. Go to Services tab and Check Diagnostic Policy Service. Press OK.Note 1:

msconfig

Note 2: This service is available only in Windows Vista and Windows 7. And Local Group Policy Editor (gpedit.msc) may be available only with versions like Professional or higher.

You can subscribe to our RSS feed via email for more tutorials under Windows.

Create A Facebook Page For Your Website [How To]

facebook_logo

Facebook is undoubtedly the no.1 social networking site in the world.According to Alexa data, it’s next only to Google.It is very much true that majority of the traffic to the most of websites on the internet comes through Google mainly.Similar it is always essential for the website owners to look at sites like Facebook also as traffic sources for their blogs, provided they offer pretty good lovable content that the users on the Facebook like to read.Facebook has made it easier for all the webmasters to integrate Facebook into their sites easier courtesy the Facebook “Like”.

If you are a webmaster the you may be want to know how to create a Facebook page for your website or blog.So we are coming up with thus tutorial that will guide you to create a page for your site in Facebook in 10 simple steps.

Steps:

#1. Go to Facebook.com and login with your ID.If you don’t have an account yet, you must be living in another world, just come back to our world and signup for Facebook now.

#2. Go to Facebook create new page link.

#3. You will now find 3 options:

  • Local business
  • Brand, product, or organization
  • Artist, band, or public figure

Choose the 2nd option, and select “Website” from the drop-down menu.

#4. Give your page a name and click “Create Official Page”.

#5. Now you have created a simple page which is just having name nothing else.So we need to start editing the info about your website.

#6. Add a picture to your website page and edit other information as well from the Info tab.

Change facebook page picture
edit facebook page

#7. Go to page settings> find a section Notes under Applications.Click on Notes to open and edit notes.

Notes in Facebook page settings

#8. Under the Notes settings, click on Import a blog.
Notes settings in facebook page

Enter your blog URL in the Web URL field (you can even enter your blog’s RSS feed address) and click Start Importing.

Import a blog in Notes settings in Facebook page

#9. Now you will be shown the preview of the imported blog.Click Confirm Import to finish this step.

Facebook page blog import preview

#10. Now you are done with creating a page for your blog.You can also click on “Write Something about your page” link as shown in step #6 to write a brief introduction to your site page.Now your page looks like this, add yourself to the Facebook page by clicking the Like button.

techrena.net facebook page

May be you should also start following our blog in Facebook by clicking the Like button or by visiting Techrena Dot Net Facebook page.

Password Protect A RAR File Using WinRAR

Winrar logo

WinRAR is my favorite archiving software till date.It’s so simple and easy to use.That’s why almost all PC users will have installed this by default as their archiving program.But how many of you are aware that you can actually password protect any RAR file using WinRAR ? If you don’t know how to do ut, follow these steps:

Steps:

1. Right click on the file for which you wan to archive with a password.

2. Select “Add to Archive”

add_to_archive_winrar

3. In the Archive name and parameters window, go to Advanced tab, click “Set Password”

Archive name and parameters password

4. Choose the password for the archive and click OK.

setting archive password in Winrar

You can select “Encrypt file names” option if you want to encrypt the files names also, if this is selected, users will not be able to even see the contents of the archive file.

Find The Last ShutDown Time Of Any Windows PC

At times may be you allow somebody, take for instance your kid to use your computer but strictly warned him or her to shut it down by midnight.But you don’t really know till what time they had used your PC as you can’t figure it out easily by just looking at your desktop Smile.

Luckily you need not worry much, if your system runs Windows.If you want to know how to do that in your PC, follow the steps briefed below:

1. Open Event Viewer in your computer:

Windows 7 ot Vists users: Go to start menu and type “Event Viewer” in the search box and open the Event Viewer.

Windows XP users: Go to run command from Start> Run or by pressing Windows+R and type eventvwr.msc in the field and hit enter.

event viewer from start menu

2. In the Event Viewer, On the left side pane click on “Windows Logs” and in the right pane, click on the item “System”  [See the screenshot below].

Windows Logs in Event Viewer Windows 7

3. Now on the right pane, you will find all the system logs information basically divided into 3 tabs: Information,

Date and Time,

Source,

Event ID

Find the column corresponding to the Event ID 6006, the date and time displayed in this column is when your computer was last shuttedDown.

last shutdown time in event viewer

In the above screenshot, the time shown is 29-04-2010 12:42:00 AM, so this is the last shutdown time of the PC used here.