Friday 3 April 2015

How to add static block call in phtml,xml and cms page in magento

How to add static block call in phtml,xml and cms page in magento


Hello Here sample code add static block in phtml,xml  and cms page.

In your Phtml File in magento


<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('set your block id')->toHtml() ?>

herer set i am setting my block

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('block-header-top1')->toHtml() ?>

In your xml file

  <reference name="content">
    <block type="cms/block" name="home-page-block">
      <action method="setBlockId">add your block id
    </block>
  </reference>

In Your cms page

{{block type="cms/block" block_id="add your block id "}}

I hope this blog help you to add static block in your magento  any suggetion for me please comment it.


Wednesday 1 April 2015

How to add custom sidebar in wordpress

How to add custom sidebar in wordpress


Hello

Here Example of add custom sidebar in wordpress

please check it below code.

here example to add custom sidebar.

function theme_slug_widgets_init() {

register_sidebar( array(
        'name' => __( 'Header Sidebar', 'theme-slug' ),
        'id' => 'home-header-1',
        'description' => __( 'Widgets in this area will be shown on all posts and pages.', 'theme-slug' ),
        'before_title' => '

',

        'after_title' => '
',
    ) );

}
add_action( 'widgets_init', 'theme_slug_widgets_init' );

here to add custom sidebar in wordpress
name : you can add your sidebar name
id : it can use to uniq and call siderbar in wordpress
description: it can be what can be added in siderbar 
and what to add for this just description for end user
knowledge where to add this sidebar
before_title and after title: here name display h1 tag in you can change in tag. or html of before title and after title.

if you want to add this siderbar check below code

if ( is_active_sidebar( 'home-header-1' ) ) : 
 dynamic_sidebar( 'home-header-1' )
endif

here dynamic_sidebar add siderbar id if sidebar is active then
it will call

How To remove default jquery in wordpress

How To remove default jquery in wordpress


Hello

If you want to remove the WordPress default jquery in wordpress

just check below code you can understand how to remove that add your js.

How to add Jquery in footer in wordpress

How to add Jquery in footer in wordpress

Hello

here the if you want add jquery file (js file) in footer then 
check it below code.

How To add jquery and css in child theme or theme Wordpress

How To add  jquery and css in child theme or theme Wordpress


Hello 

Here We learn that how to add js and css in your theme or child theme.

When you want to add jquery and css using code then fist open your functions.php file

Here add this code for add jquery.

Wednesday 25 March 2015

Design anchor tag in visited link, select link, unvisited link and active link and link open in new tab


hello

you want to open in new tab then use target="_blank" propertity in anchor tab
example

http://myphpinformation.blogspot.in

anchor tag css

/* unvisited link */
a:link {
color: green;
}

/* visited link */
a:visited {
color: #776655;
}

/* mouse over link */
a:hover {
color: red;
}

/* selected link */
a:active {
color: yellow;
}
anchor tag css add in style see it.

if you want to change text-decoration in anchot tag.

text-decoration propertity by default in text-decoration: underline; if you want to remove
unader line text-decoration: none; is your css.

a:link {
color: green;
text-decoration: none;
}

if you want line in over the link then you can set as
below
a:link {
color: green;
text-decoration: overline;

}

if you want to create link line-through then change

a:link {
color: green;
text-decoration: line-through;

}

you can also change anchor tag background color;

a:link {
background-color: red;
color: #ffcc77;
text-decoration: none;
}

you can also change it font family
a:link {
background-color: red;
color: #ffcc77;
text-decoration: none;
font-family: Verdana;
}



How to get base url and go back facility in php

How to get base url and go back facility in php


Here for very normal code for that 

just get base url then you can try this code

<?php echo "http://" . $_SERVER['SERVER_NAME'] . 
$_SERVER['REQUEST_URI']; ?>

try i think it's working for you and you want create go back

<a href="#" onclick="window.history.back();">Go Back

this two for php very usefull check it suggest me.

Change connection root name, username, password and db name dynamically in PHP

Change connection root name, username, password and deb name dynamically in PHP



Hello,

I am just creating dynamically change your dbname, servername, username and password.

You can create just one file you can change your DB.

Create database blog and create a connection table in PHP my admin

Here it's code and its data

Table structure for table `connction`

CREATE TABLE IF NOT EXISTS `connction` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `localhost` varchar(200) NOT NULL,
  `username` varchar(200) NOT NULL,
  `password` varchar(200) DEFAULT NULL,
  `db_name` varchar(200) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

Dumping data for table `connction`

INSERT INTO `connction` (`id`, `localhost`, `username`, `password`, `db_name`) VALUES
(1, 'localhost', 'root', '', 'blog');

Saturday 21 March 2015

daily activity usefull link that your like this link.

https://www.screenr.com/ 
It can be used for sceenshot for your sceen and upload to youtube.

http://goo.gl/
this can be used for convert logn  url to short Url please try it. it's very nice.

http://unfurlr.com/
this can used for when you convert url in to short to long after you want to know main url of short url then it can be used this site.

http://www.qlock.com/time/
this can used for when you want to check any city time of it's local map.

http://copypastecharacter.com/
This site used for if you want to write a unique word there is not available in
Your keyword. Just check it.

https://www.random.org/
it can be used when you want random value then check this url.

http://www.pdfescape.com
it can be used for check your online pdf. you can upload your pdf and check it online.also checking with url.

http://www.myfonts.com/WhatTheFont/
Submit an image to WhatTheFont to find the closest matches in our database. used for which font are used in images.

https://join.me/
it can be used for online sceen mate.

http://gtmetrix.com
it's can be used for your site performance link page speed etc.

https://imo.im/
All Facebook, skip, and google friendliest chat togather.

https://translate.google.com/
It can be used for translating website, document in any language.

http://kleki.com/
this paint site. Here multiple type of brush.

http://www.similarsites.com/
it can be used for get similars site search check it.

https://privnote.com/
Send notes that will self-destruct after being read

http://downforeveryoneorjustme.com/
this can be check your site is up or not

http://www.typing.com
this site used for online typing pratice

http://talltweets.com/
if you want to tweet more than 140 charater then loin here.

https://www.woorank.com/en/user/overview
it can be used for check what your site seo status

http://xuix.com/
it can be 10 lakhas more than sofate.

Friday 6 March 2015

create slider plugin in wordpress

Create slider plugin in WordPress



here Simple Code 

Step create plugin plugin folder, create folder and 
create country.php file.(wp-content\plugins\country\contry.php)


<?php
/**
* Plugin Name: Country slider
* Plugin URI: http://myphpinformation.blogspot.in//
* Description: A brief description of the plugin.
*/
?>