Insert a block into a node or template in Drupal 7

To print the block you can use below code,

$addblock = module_invoke('addthis','block_view','addthis_block');
print render($addblock['content']);

addthis = "module_name" = This is module name can be found in block configuration URL or the name of the module's folder

block_view = Type of view

addthis_block = "block_delta" = This can also be found in the block configuration URL

*Configuration URL = Open blocks page in Drupal 7 which is "admin/structure/blocks", and click on "configure".

WAMP says Forbidden You don't have permission to access /phpmyadmin/ on this server Windows 7 or 8

First of all locate "phpmyadmin.conf" file under "C:\wamp\alias\". My WAMP installation is in C drive.

Then edit that file with any editor you have. I am using Notepad++.

You will find 

<Directory "c:/wamp/apps/phpmyadmin3.5.1/">

    Options Indexes FollowSymLinks MultiViews

    AllowOverride all

        Order Deny,Allow

Deny from all

Allow from 127.0.0.1

</Directory>

Broken package and dependency errors on Ubuntu solved

To solve this error I wen to too many articles from number of websites but none solved my problem. 
Then I figured this out by my own, 
To solve this error you have to restart your machine first,
then after restart you will get bios menu list where you select your operating system.
In this list Select ubuntu with recovery mode,
Recovery menu will appear, from that menu select 
dpkg Repair broken packages and hit enter.
 
It will then detect broken packages

How to display a popup box containing webform using simple dialog module of Drupal 7

 
To display a webform first you need to create a webform, 
We will create a simple webform to demontrate this example,
 
Go to "Add Content" and create a webform containing a name field and an email field.
 
After doing this create a simple block and add following code to it,
 
<a href="/my-webform" class="simple-dialog" name="webform-client-form-562" title="My Webform Title" rel="width:900;position:[center,60];">Link TItle</a>

How to install phpmyadmin on Ubuntu

 
 
Install phpmyadmin
 
sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin
 
After first confirmation you will be asked to choose the web server, choose apache2 from the list and press Enter.
Then it will ask you to configure database for phpmyadmin keep "Yes" highlighted and click enter, it will now ask you for your Mysql root user password, then
it will ask you password for phpmyadmin and will ask you to enter it again

How to create root user for the first time in Ubuntu

 
In this article we will create the root user for the first time in newly installed Ubuntu.
First open terminal window (Terminal window is used to run commands it is also called CLI that is command line interface)
Now type “sudo passwd” and press enter.
It will ask you to write new UNIX password. Type in your password.
Once it done write “su” and Enter, then enter your password and you will be logged in as a root user.