Wednesday 20 February 2013

To make an Image readonly in your website

When you are dealing with photo uploading websites, You will definitely meet a requirement to make image readonly. Here iam explaining  how to make image read only b y addng single line of code....


In most cases your image code will be like this :-

<img src="imagename.jpg" alt="imagename " id="imageid">


so, Inorder to make read only you have to just add a span class and place image inside that span class.

<span oncontextmenu="return false" ondragstart="return false"> <img src="imagename.jpg" alt="imagename " id="imageid"></span>

Now you can check whether image is downloadable ... hope this works:-)



Monday 18 February 2013

Installing opera in ubuntu 12.1

Here Iam going to explain ,how to install opera in ubuntu 12.1.


1) To add Opera’s public key, first press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, type or use copy/paste method to add following command: sudo sh -c 'wget -O - http://deb.opera.com/archive.key | apt-key add -' and hit Enter.

2)When it asks password, type password and hit Enter again.

3)Now to add Opera repository type or use copy/paste method to add following command: sudo gedit /etc/apt/sources.list.d/opera.list and hit Enter.

4)When Gedit show's up, copy this line to Opera list: deb http://deb.opera.com/opera/ stable non-free then save it and close Gedit.

5)After you close Gedit, type or copy/paste following command to the Terminal, to update your system: sudo apt-get update and hit Enter.

6)To install Opera, type or use copy/paste method to add following command: sudo apt-get install opera and hit Enter.

7)When it asks you that do you want to continue, type 'Y' to the Terminal and hit Enter.

8)After Opera browser are installed, now close your Terminal.

9)To run Opera browser, press window key (key beside Alt key) to open Dash and type 'op' to search function, then click with your mouse on icon.

Friday 15 February 2013

Installing Php mysql package in Ubuntu 12.1

After normal installation of ubuntu 12.1 all normal users will find some trouble in installing php,mysql in their computer. so this post is mainly for helping those users..

Here Iam describing about installing it manually through terminal. so for that open the terminal then :-

1) First we tend to install MySQL five like this:

sudo apt-get install mysql-server mysql-client



2)Installing apache

sudo apt-get install apache2


3) Installing php5 apache as follows:-

sudo apt-get install php5 libapache2-mod-php5


4) We should restart Apache afterwards:

sudo /etc/init.d/apache2 restart

5) Obtaining MySQL Support In PHP5

To get MySQL support in PHP, we will install the php5-mysql package. it is a sensible plan to put in another PHP5 modules likewise as you would possibly would like them for your applications. you'll be able to explore for on the market PHP5 modules like this:
sudo apt-cache search php5

Pick those you wish and install them like this:


sudo apt-get install php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl

Now restart Apache2:
sudo /etc/init.d/apache2 restart



7)phpMyAdmin

phpMyAdmin may be a net interface through that you'll be able to manage your MySQL databases. it is a sensible plan to put in it:
sudo apt-get install phpmyadmin
Configure info for phpmyadmin with dbconfig-common

8) Linking phpmyadmin with localhost

sudo ln -s /usr/share/phpmyadmin/ /var/www/


9) Restart apache

sudo /etc/init.d/apache2 restart


10) Open a browser and type localhost/ you can access www directory and to access phpmyadmin..just type localhost/phpmyadmin

11) For enabling urlrewriting 

You have to edit the default file in the /etc/apache2/sites-available/ folder..

So for editing you have to type this command

sudo gedit /etc/apache2/sites-available/default 


change the line AllowOverride none to AllowOverride All