You can easily convert any given template in html to the word press
for this you have to first install wordpress on your computer and after that you have to go the the wp-content folder in the word press folder
in the wp-content you get the option of the wp-theams
in the theam folder you have available defoult theam of twentyten you copy that theam and make duplicate past of it and give it the name to your site theam
in your name theam go to the header.php file in this file you enter the header info which is in your html template and not chage the defoult menu funtion wp_nav_menu put it where you want to display your menu
after the on the page.php you can give the page content for the home page
in the side bar you can enter the static sidebar info
or in the footer .php you can enter the footer design info or content
after the you go to your site admin section in this section to go to the
the apearance option in this option you get the option of theam in the theam section you see the available theam that you created or other defoult theam that already activated you have to click your theam and activate it then you can see on your site on wordpress your theam working
Welcome any suggestion or question for more implementation
Wednesday, January 19, 2011
Wednesday, January 12, 2011
How To upload A image file in php
If you Want to upload an image in php or save any folder or database you can use the upload script
for this you first have to create the upload html form that is like
with html tag :
after that you have to use the php script to upload the perticular
image file
i.e
?php
if ((($_FILES["file"]["type"] == "image/gif")
|| ($_FILES["file"]["type"] == "image/jpeg")
|| ($_FILES["file"]["type"] == "image/pjpeg"))
&& ($_FILES["file"]["size"] < 20000))
{
if ($_FILES["file"]["error"] > 0)
{
echo "Error: " . $_FILES["file"]["error"] . "
";
}
else
{
echo "vikas: " . $_FILES["file"]["name"] . "
";
echo "Type: " . $_FILES["file"]["type"] . "
";
echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb
";
echo "Stored in: " . $_FILES["file"]["tmp_name"];
if (file_exists("upload/" . $_FILES["file"]["name"]))
{
echo $_FILES["file"]["name"] . " already exists. ";
}
else
{
move_uploaded_file($_FILES["file"]["tmp_name"],
"vikas/" . $_FILES["file"]["name"]);
echo "Stored in: " . "vikas/" . $_FILES["file"]["name"];
}
}
}
else
{
echo "Invalid file";
}
?>
here we check the condition for the file the file is of the type jpeg
gif , or pjpg type by which other file show invalid
the give file image uploaded by pressing the submit button or it save in the folder vikas as you already created
for this you first have to create the upload html form that is like
with html tag :
after that you have to use the php script to upload the perticular
image file
i.e
?php
if ((($_FILES["file"]["type"] == "image/gif")
|| ($_FILES["file"]["type"] == "image/jpeg")
|| ($_FILES["file"]["type"] == "image/pjpeg"))
&& ($_FILES["file"]["size"] < 20000))
{
if ($_FILES["file"]["error"] > 0)
{
echo "Error: " . $_FILES["file"]["error"] . "
";
}
else
{
echo "vikas: " . $_FILES["file"]["name"] . "
";
echo "Type: " . $_FILES["file"]["type"] . "
";
echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb
";
echo "Stored in: " . $_FILES["file"]["tmp_name"];
if (file_exists("upload/" . $_FILES["file"]["name"]))
{
echo $_FILES["file"]["name"] . " already exists. ";
}
else
{
move_uploaded_file($_FILES["file"]["tmp_name"],
"vikas/" . $_FILES["file"]["name"]);
echo "Stored in: " . "vikas/" . $_FILES["file"]["name"];
}
}
}
else
{
echo "Invalid file";
}
?>
here we check the condition for the file the file is of the type jpeg
gif , or pjpg type by which other file show invalid
the give file image uploaded by pressing the submit button or it save in the folder vikas as you already created
Bing Map problem with Opera not working on drawing onclick
Today testing my Bing map application on opera
I attach 'onclick' event of bing maps to a function "OnMapClick
map.AttachEvent("onclick", OnMapClick);
in which i am expecting to track Mouse button clicks. i need to check which button is clicked right or left.
var OnMapClick=function(e)
{
var x = e.mapX;
var y = e.mapY;
var pixel = new VEPixel(x, y);
var LL = map.PixelToLatLong(pixel);
alert(e.leftMouseButton);
}
var OnMapClick=function(e)
{
var x = e.mapX;
var y = e.mapY;
var pixel = new VEPixel(x, y);
var LL = map.PixelToLatLong(pixel);
alert(e.leftMouseButton);
}
In Firefox, IE8 and Chrome If works fin but in Opera onclick drawng it showing problum on stop right click or left click event not working
Still looking for solution for this problem. :(
I attach 'onclick' event of bing maps to a function "OnMapClick
map.AttachEvent("onclick", OnMapClick);
in which i am expecting to track Mouse button clicks. i need to check which button is clicked right or left.
var OnMapClick=function(e)
{
var x = e.mapX;
var y = e.mapY;
var pixel = new VEPixel(x, y);
var LL = map.PixelToLatLong(pixel);
alert(e.leftMouseButton);
}
var OnMapClick=function(e)
{
var x = e.mapX;
var y = e.mapY;
var pixel = new VEPixel(x, y);
var LL = map.PixelToLatLong(pixel);
alert(e.leftMouseButton);
}
In Firefox, IE8 and Chrome If works fin but in Opera onclick drawng it showing problum on stop right click or left click event not working
Still looking for solution for this problem. :(
Thursday, January 6, 2011
Adding Side Bar to the Wordpress Theme
many time u also faces the problum of no side bar in the Admin section
then for this you can also check the file functions.php of its spelling
for other way you
extract your theme into a folder and open it to see all the files. If your theme has only one sidebar, then most probably you will NOT find a file called functions.php in your theme folder. In that case you will have to create this file yourself. Just open notepad or any other code editor to start a new file.
Save the file as functions.php and put it in your theme folder. This piece of code actually tells WordPress to register two sidebars for you (See register_sidebars(2) in the code). If your theme has more than one sidebar, you will find the functions.php file already present in your theme folder. You just have to edit the number to your requirement and save the file.
then for this you can also check the file functions.php of its spelling
for other way you
extract your theme into a folder and open it to see all the files. If your theme has only one sidebar, then most probably you will NOT find a file called functions.php in your theme folder. In that case you will have to create this file yourself. Just open notepad or any other code editor to start a new file.
Save the file as functions.php and put it in your theme folder. This piece of code actually tells WordPress to register two sidebars for you (See register_sidebars(2) in the code). If your theme has more than one sidebar, you will find the functions.php file already present in your theme folder. You just have to edit the number to your requirement and save the file.
Subscribe to:
Posts (Atom)