Wednesday 31 December 2014

Dynamic drop down first option selected as please select

Dynamic drop down first option selected as select
echo '<option selected="selected">'."--Select City--".'</option>';

before fetching values from loop.

Tuesday 30 December 2014

skype-name- chat

<a href="skype:-skype-name-?chat">Start chat</a>

Skype: <span><a href="skype:-webexpert9?chat">webexpert9</a></span>

Monday 29 December 2014

initialize drop down on click of previous button

initialize drop down on click of previous button
<script type='text/javascript'>
$(document).ready(function() {   $('#input_1_16').val('');  });
</script>

plugin development points

function create_menu() {

add_menu_page('cm panel', 'Resigistration', 'subscriber',  __FILE__, 'settings_page');

add_submenu_page(  __FILE__, 'New_Resigistration', 'New_Resigistration', 'manage_options', 'my-submenu-handle1','settings_page');

add_submenu_page(  __FILE__, 'User_Details', 'User_Details', 'read', 'my-submenu-handle2','section_1');

add_submenu_page(  __FILE__, '', '', 'manage_options', 'my-submenu-handle3','section_2');

add_submenu_page(  __FILE__, 'Old Dancer', '', 'manage_options', 'my-submenu-handle4','section_3');
}

function settings_page()
{
include('upload1.php');
}

function section_1()
{
include('floor_image.php');
//include(ABSPATH.'wp-content/themes/CherryFramework/front_display.php');
}

function section_3()
{
include('oldpage.php');
}
function section_2()
{

   $gid=$_GET['id'];

$a="select * from wp_usersinfo where id=$gid";
$res=mysql_query($a);
?>
<form action="" method="post" class="regty" enctype="multipart/form-data">
<?php
while($row=mysql_fetch_array($res))
{
//print_r($row);
?>

<div class="nn1"><span class="lab1">Name</span> <input type="text" name="name_2" value="<?php echo $row['name'];?>"/></div>
<div class="nn1"><span class="lab1">DOC</span> <input type="text" name="doc_2" value="<?php echo $row['doc'];?>" /></div>
<div class="nn1"><span class="lab1">Cell</span> <input type="text" name="cell_2" value="<?php echo $row['cell'];?>" /></div>
<div class="nn1"><span class="lab1">Prison</span> <input type="text" name="prison_2" value="<?php echo $row['prison'];?>"/></div>
<div class="nn1"><span class="lab1">Address</span><textarea cols="59" rows="5" name="address_2"><?php echo $row['address'];?></textarea></div>
<div class="nn1"><span class="lab1">City</span> <input type="text" name="city_2" value="<?php echo $row['city'];?>"/></div>
<div class="nn1"><span class="lab1">State</span> <input type="text" name="state_2" value="<?php echo $row['state'];?>"/></div>
<div class="nn1"><span class="lab1">Zip</span> <input type="text" name="zip_2" value="<?php echo $row['zip'];?>"/></div>
<div class="nn1"><span class="lab1">DOB</span> <input type="text" name="dob_2" value="<?php echo $row['dob'];?>" placeholder="dd/mm/yyyy"/></div>
<div class="nn1"><span class="lab1">
       <input type="radio" name="gender2" value="female">Female
       <input type="radio" name="gender2" value="male">Male
</div>
<div class="nn1"><span class="lab1">Height</span><input type="text" name="height_2" value="<?php echo $row['height'];?>" /></div>
<div class="nn1"><span class="lab1">Weight</span><input type="text" name="weight_2" value="<?php echo $row['weight'];?>"/></div>
<div class="nn1"><span class="lab1">Hair </span><input type="text" name="hair_color_2" value="<?php echo $row['hair'];?>" /></div>
<div class="nn1"><span class="lab1">Eyes</span><input type="text" name="eyes2" value="<?php echo $row['eyes'];?>" /></div>
<div class="nn1"><span class="lab1">Race</span><input type="text" name="race2" value="<?php echo $row['race'];?>"/></div>
<div class="nn1"><span class="lab1">Sexual Preference</span><input type="text" name="sexual_preference2" value="<?php echo $row['sexual_preference'];?>" /></div>
<div class="nn1"><span class="lab1">Seeking</span><input type="text" name="seeking2" value="<?php echo $row['seeking'];?>" /></div>
<div class="nn1"><span class="lab1">Personality</span><input type="text" name="personality2" value="<?php echo $row['personality'];?>" /></div>
<div class="nn1"><span class="lab1">New Inmates</span><input type="text" name="new_inmates2" value="<?php echo $row['new_inmates'];?>" /></div>
<div class="nn1"><span class="lab1">Wrongfully Convicted</span><input type="text" name="wrongfully_convicted2" value="<?php echo $row['wrongfully_convicted'];?>" /></div>
<div class="nn1"><span class="lab1">Lifer's</span><input type="text" name="lifers2" value="<?php echo $row['lifers'];?>" /></div>
<div class="nn1"><span class="lab1">Death Row</span><input type="text" name="deathrow2" value="<?php echo $row['deathrow'];?>" /></div>
<div class="nn1"><span class="lab1">Ad Expires</span><input type="text" name="adexpires2" value="<?php echo $row['adexpires'];?>" /></div>
<div class="nn1"><span class="lab1">Crime</span><input type="text" name="crime2" value="<?php echo $row['crime'];?>"/></div>
<div class="nn1"><span class="lab1">Expected Release Date</span><input type="text" name="expected_release_date2" value="<?php echo $row['expected_release_date'];?>" placeholder="yyyy/mm/dd" /></div>
<div class="nn1"><span class="lab1">Maximum Release Date</span><input type="text" name="maximum_release_date2" value="<?php echo $row['maximum_release_date'];?>" placeholder="yyyy/mm/dd"/></div>
<div class="nn1"><span class="lab1">Parole Date</span><input type="text" name="parole_date2" value="<?php echo $row['parole'];?>" placeholder="yyyy/mm/dd or NA"/></div>
<div class="nn1"><span class="lab1">Marital Status</span><input type="text" name="marital_status2" value="<?php echo $row['marital_status'];?>" /></div>
<div class="nn1"><span class="lab1">Have Children</span><input type="text" name="have_children2" value="<?php echo $row['have_children'];?>" /></div>
<div class="nn1"><span class="lab1">Want Children</span><input type="text" name="want_children2" value="<?php echo $row['want_children'];?>"/></div>
<div class="nn1"><span class="lab1">Home Town</span><input type="text" name="home_town_2" value="<?php echo $row['hometown'];?>" /></div>
<div class="nn1"><span class="lab1">Faith</span><input type="text" name="faith_2" value="<?php echo $row['faith'];?>"/></div>
<div class="nn1"><span class="lab1">Speaks</span><input type="text" name="speaks_2" value="<?php echo $row['speaks'];?>" /></div>
<div class="nn1"><span class="lab1">Hobbies</span><input type="text" name="hobbies_2" value="<?php echo $row['hobbies'];?>"/></div>
<div class="nn1"><span class="lab1">Bust</span><input type="text" name="bust_2" value="<?php echo $row['bust'];?>"/></div>
<div class="nn1"><span class="lab1">About us</span><textarea cols="59" rows="5" name="about_us_2"><?php echo $row['aboutus'];?></textarea></div>
<div class="nn1"><span class="lab1">Upload Profile image</span><input type="file" name="Photo" />
<img src="<?php echo bloginfo('template_url').'/images/'.$row['image_name']; ?>" width="125" height="100">
</div>

<div id="mainbody" >
 <!--
<div id="upload" ><span>Upload thumbnail images<span></div><span id="status" ></span>
-->
<span style="">
<?php
if($row['t_images']!=''){
$timg=explode(',', $row['t_images']);
foreach($timg as $dimg){
if($dimg != ''){
$imgpath = pathinfo($dimg);
?>
<li id="imgj<?php echo $imgpath['filename']; ?>" onclick="removeimg(this.id);">
<!---<li>---->
<img src="<?php echo $dimg; ?>" height="100" width="200" >
<input type="hidden" name="image[]" value="<?php echo $dimg; ?>" >
</li>
<?php }
} }
//echo '</ul>';
?>
</span>
<!-- <ul id="files" ></ul> -->



<!-- <input type="text" name="vi" value="<?php //echo $row['video']; ?>"> -->
</div>
<!--
<?php //if($row['checkbox'] == 1) {?>
Move To Old Page <input type="checkbox" name="chkbox" value="1" checked="checked" />
<?php //} else { ?>
Move To Old Page <input type="checkbox" name="chkbox" value="0" />

<?php //}?>
-->
<div class="nn1"><input type="submit" name="update" value="Update" class="subtn"></div>
<?php
}

?>
</form>

<?php
////////////////////////////////

if(isset($_POST['update']))
{
if(isset($_POST['chkbox']))
{
$chk = 1;

}
else
{
$chk = 0;
}


$imgv='';
if(isset($_POST['image'])){
$imgp =$_POST['image'];
foreach ($imgp as $value)
{
$imgv .= $value.",";

}
}
print_r($_FILES);
if($_FILES['Photo']['error']==0)
{
$uploadDir = get_template_directory().'/images/';
$fileName = $_FILES['Photo']['name'];
$tmpName = $_FILES['Photo']['tmp_name'];
$fileSize = $_FILES['Photo']['size'];
$fileType = $_FILES['Photo']['type'];
$filePath = $uploadDir.$fileName;
$livepath=bloginfo('template_url').'/images/'.$fileName;
$result = move_uploaded_file($tmpName, $filePath);
if (!$result) {
echo "Error uploading file";
exit;
}
if(!get_magic_quotes_gpc())
{
$fileName = addslashes($fileName);
$filePath = addslashes($filePath);
//$imgpath=$url.$fileName;
}

$a="UPDATE wp_usersinfo SET name='".$_POST['name_2']."'
,doc='".$_POST['doc_2']."',
cell='".$_POST['cell_2']."',
prison='".$_POST['prison_2']."',
address='".$_POST['address_2']."',
city='".$_POST['city_2']."',
dob='".$_POST['dob_2']."',
gender = '".$_POST['gender2']."',
height='".$_POST['height_2']."',
weight='".$_POST['weight_2']."',
hair='".$_POST['hair_color_2']."',
eyes='".$_POST['eyes2']."',
race ='".$_POST['race2']."',
state ='".$_POST['state_2']."',
zip ='".$_POST['zip_2']."',
personality ='".$_POST['personality2']."',
new_inmates ='".$_POST['new_inmates2']."',
wrongfully_convicted ='".$_POST['wrongfully_convicted2']."',
lifers ='".$_POST['lifers2']."',
deathrow ='".$_POST['deathrow2']."',
adexpires ='".$_POST['adexpires2']."',
sexual_preference = '".$_POST['sexual_preference2']."',
parole='".$_POST['parole_date2']."',
hometown='".$_POST['home_town_2']."',
faith='".$_POST['faith_2']."',
seeking ='".$_POST['seeking2']."',
crime = '".$_POST['crime2']."',
bust='".$_POST['bust_2']."',
expected_release_date ='".$_POST['expected_release_date2']."',
maximum_release_date ='".$_POST['maximum_release_date2']."',
marital_status = '".$_POST['marital_status2']."',
have_children = '".$_POST['have_children2']."',
want_children = '".$_POST['want_children2']."',
speaks='".$_POST['speaks_2']."',
hobbies='".$_POST['hobbies_2']."',
image_name='".$fileName."',
image_path='".$filePath."',
t_images='".$imgv."',
checkbox = '".$chk."',
aboutus='".$_POST['about_us_2']."'

where id='$gid'";
}
else
{
 $a="UPDATE wp_usersinfo SET name='".$_POST['name_2']."'
,doc='".$_POST['doc_2']."',
cell='".$_POST['cell_2']."',
prison='".$_POST['prison_2']."',
address='".$_POST['address_2']."',
city='".$_POST['city_2']."',
dob='".$_POST['dob_2']."',
state ='".$_POST['state_2']."',
zip ='".$_POST['zip_2']."',
personality ='".$_POST['personality2']."',
new_inmates ='".$_POST['new_inmates2']."',
wrongfully_convicted ='".$_POST['wrongfully_convicted2']."',
lifers ='".$_POST['lifers2']."',
deathrow ='".$_POST['deathrow2']."',
adexpires ='".$_POST['adexpires2']."',
gender = '".$_POST['gender2']."',
height='".$_POST['height_2']."',
weight='".$_POST['weight_2']."',
hair='".$_POST['hair_color_2']."',
eyes='".$_POST['eyes2']."',
race ='".$_POST['race2']."',
sexual_preference = '".$_POST['sexual_preference2']."',
parole='".$_POST['parole_date2']."',
hometown='".$_POST['home_town_2']."',
faith='".$_POST['faith_2']."',
seeking ='".$_POST['seeking2']."',
crime = '".$_POST['crime2']."',
bust='".$_POST['bust_2']."',
expected_release_date ='".$_POST['expected_release_date2']."',
maximum_release_date ='".$_POST['maximum_release_date2']."',
marital_status = '".$_POST['marital_status2']."',
have_children = '".$_POST['have_children2']."',
want_children = '".$_POST['want_children2']."',
speaks='".$_POST['speaks_2']."',
hobbies='".$_POST['hobbies_2']."',
image_name='".$fileName."',
image_path='".$filePath."',
t_images='".$imgv."',
checkbox = '".$chk."',
aboutus='".$_POST['about_us_2']."'

where id='$gid'";
}

mysql_query($a);
$admin = admin_url();
header('location:'.$admin.'admin.php?page=my-submenu-handle2');
//header('location:'.$admin.'admin.php?page=my-submenu-handle3&id='.$gid);
}
}
//////////////////////////////////
?>



<?php


function myplugin_activate()
{
global $wpdb;



$table = 'wp_usersinfo';

$sql= "CREATE TABLE $table
(id INT( 10 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
name VARCHAR(250),
age VARCHAR( 250 ) NULL ,
eyes VARCHAR( 250 ) NULL ,
race VARCHAR( 250 ) NULL ,
sexual_preference VARCHAR( 250 ) NULL ,
seeking VARCHAR( 250 ) NULL ,
crime VARCHAR( 250 ) NULL ,
expected_release_date VARCHAR( 250 ) NULL ,
maximum_release_date VARCHAR( 250 ) NULL ,
marital_status VARCHAR( 250 ) NULL ,
have_children VARCHAR( 250 ) NULL ,
want_children VARCHAR( 250 ) NULL ,
gender VARCHAR( 250 ) NULL ,
city VARCHAR( 250 ) NULL ,
height VARCHAR( 250 ) NULL ,
bust VARCHAR( 250 ) NULL ,
hair VARCHAR( 250 ) NULL ,
speaks VARCHAR( 250 ) NULL ,
hobbies VARCHAR( 250 ) NULL ,
image_name VARCHAR( 250 ) NULL ,
image_path VARCHAR( 250 ) NULL ,
t_images VARCHAR( 250 ) NULL ,
video VARCHAR( 250 ) NULL ,
checkbox VARCHAR( 250 ) NULL ,
aboutus MEDIUMTEXT NULL ,
fileUploadedOn DATETIME NOT NULL )";

require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
dbDelta($sql);

}
register_activation_hook( __FILE__, 'myplugin_activate' );
 add_action('admin_menu','create_menu');
 //add_shortcode('display', 'section_1');

?>

plugin development points

function create_menu() {

add_menu_page('cm panel', 'Resigistration', 'subscriber',  __FILE__, 'settings_page');

add_submenu_page(  __FILE__, 'New_Resigistration', 'New_Resigistration', 'manage_options', 'my-submenu-handle1','settings_page');

add_submenu_page(  __FILE__, 'User_Details', 'User_Details', 'read', 'my-submenu-handle2','section_1');

add_submenu_page(  __FILE__, '', '', 'manage_options', 'my-submenu-handle3','section_2');

add_submenu_page(  __FILE__, 'Old Dancer', '', 'manage_options', 'my-submenu-handle4','section_3');
}

Friday 26 December 2014

Short Code in Template file

// Use shortcode in a PHP file (outside the post editor).
echo do_shortcode( '[gallery]' );


// Use shortcodes in text widgets.
add_filter( 'widget_text', 'do_shortcode' );


// Store the short code in a variable.
 
$var = do_shortcode( '[gallery]' );
echo $var;

Thursday 25 December 2014

wordpress pagination

<?php 
// the query to set the posts per page to 3
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array('posts_per_page' => 3, 'paged' => $paged );
query_posts($args); ?>
<!-- the loop -->
<?php if ( have_posts() ) : while (have_posts()) : the_post(); ?>
  <!-- rest of the loop -->
  <!-- the title, the content etc.. -->
<?php endwhile; ?>
<!-- pagination -->
<?php next_posts_link(); ?>
<?php previous_posts_link(); ?>
<?php else : ?>
<!-- No posts found -->
<?php endif; ?>


         CUSTOM PAGINaTION QUERY
<?php 
      $temp = $wp_query; 
      $wp_query = null; 
      $wp_query = new WP_Query(); 
      $wp_query->query('showposts=6&post_type=ad_listing'.'&paged='.$paged); 
   ?> 
                <nav>
     <?php previous_posts_link('&laquo; Newer') ?>
     <?php next_posts_link('Older &raquo;') ?>
    </nav>

    <?php 
      $wp_query = null; 
      $wp_query = $temp;  // Reset
    ?>

Wednesday 24 December 2014

slider LayerSlider WP

slider LayerSlider WP

for different pages different slides


Theme used - maximus theme.

Tuesday 23 December 2014

eventespresso plugin

http://eventespresso.com/wiki/ticketing-add-on/

1. made a ticket
2. attach this ticket to any event to view it.copy full url.

jQuery - if a radio button not selected, cannot submit the form

<!DOCTYPE html>
<html>
<head></head>
<body>
  <form action="/" method="post">    
    <div id="customSize">something</div>
    <input type="radio" name="EmbedSizeID" value="1" onClick="OptionSelected()" />
    <input type="radio" name="EmbedSizeID" value="2" onClick="OptionSelected()" />
    <input type="submit" value="Save" id="submitButton" />
  </form>
  <script src="http://code.jquery.com/jquery-1.7.1.js"></script>
  <script type="text/javascript">
    function OptionSelected() {
                document.getElementById("customSize").style.display = 'none';
                var selected = $('input[name="EmbedSizeID"]:checked').val();
                if (selected == "4") {
                    document.getElementById("customSize").style.display = 'block';
                }
            }

            $(document).ready(function () {
                $("#submitButton").click(function (e) {
                    if (!$('input[name="EmbedSizeID"]').is(':checked')) {
                        return false;
                    }
                    else {
                        return true;
                    }
                });
            });
  </script>
</body>
</html>

Monday 22 December 2014

if document.ready function not working after click on next button use .live with change event

if document.ready function not working after click on next button. or post back not working
then use .live function
$(document).ready(function()
{
$("#input_1_16").live('change',function()
{
var id=$(this).val();
var dataString = 'id='+ id;
//alert("hello");
$.ajax
({
type: "POST",
url: " http://therapy.leadingedgeinfosolutions.com/ajax_city.php",
data: dataString,
cache: false,
success: function(html)
{
$("#input_1_50").html(html);
//alert(html);
}
});

});
});

Modifying Child theme CSS

/*
Theme Name: Spacious Child Theme
Theme URI: http://themegrill.com/themes/spacious/
Description: Spacious Child Theme
Author: ThemeGrill
Author URI: http://themegrill.com
Template: spacious
Version: 1.0
*/
@import url("../spacious/style.css");

/* =Theme customization starts here
------------------------------------------------------- */
#site-title a {
color: #0000FF;
font-size: 42px;
}

Child Theme Making Import CSS

/*
Theme Name: Spacious Child Theme
Theme URI: http://themegrill.com/themes/spacious/
Description: Spacious Child Theme
Author: ThemeGrill
Author URI: http://themegrill.com
Template: spacious
Version: 1.0
*/
@import url("../spacious/style.css");

/* =Theme customization starts here  


Points to remember:

  • Template name (here in this case spacious) should match the folder name of the parent theme and also make sure there are no blank space after the name.
  • In the line @import url("../spacious/style.css"); the word spacious should also match the folder name of the parent theme.
  • Other details can be added or changed as you like.

Sunday 21 December 2014

JavaScript Page Leave Message

<script type="text/javascript">
 window.onbeforeunload = function(){
    return "Are you sure you wanna leave my site?";
}
</script>


Disable submit button -

document.getElementById('button_id').onsubmit = function() { return false; }

Thursday 18 December 2014

jQuery select one radio at one time with different name tested on local

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
  <script type="text/javascript">
 
 $(document).ready(function(){
 $('#choice_46_0').click(function () {


  if ($('#choice_46_0').is(':checked'))
   {
   $('#choice_49_0').attr('checked', false);
   }
 
  });
  $('#choice_49_0').click(function () {


  if ($('#choice_49_0').is(':checked'))
   {
   $('#choice_46_0').attr('checked', false);
   }
 
  });
  alert("Hi");

 });

 </script>

Wednesday 17 December 2014

Selects only one Radio Button at A time. no one way possible.

/*
Selects only one Radio Button at A time. no one way possible.
if using different names..
and we cannot apply onclick event on input

$(document).on('pageinit', function () {
    $(document).on('change', '[type=radio]', function (e) {
        $('[type=radio]:checked').prop('checked', false).checkboxradio('refresh');
        $(this).prop('checked', true).checkboxradio('refresh');
    });
});



<tr><td class=m>Check In<input type="checkbox" name="_fid_28" onclick="document.qdbform._fid_29.checked=false;"</td>

<tr><td class=m>Check Out<input type="checkbox" name="_fid_29" onclick="document.qdbform._fid_28.checked=false;"</td>
*/

Tuesday 16 December 2014

Jquery 2 sliders conflicting each other

use this code at the end of first slider script -- --tested ok

$ = jQuery.noConflict(true);





other options are --

 
Try wrapping your code like this:

(function($){

    $(document).ready(function(){
         //document ready code here
    });

})(jQuery);

Sunday 14 December 2014

Fetch cities from database in alphabetical order

Code To  Fetch cities in Alphabetical order with jquery Ajax ---

$(document).ready(function(){

$(".country").change(function() {
setTimeout(
  function()
  {
      var options = $('select.city option');
    var arr = options.map(function(_, o) {
        return {
            t: $(o).text(),
            v: o.value
        };
    }).get();
    arr.sort(function(o1, o2) {
        return o1.t > o2.t ? 1 : o1.t < o2.t ? -1 : 0;
    });
    options.each(function(i, o) {
        console.log(i);
        o.value = arr[i].v;
        $(o).text(arr[i].t);
    });

  }, 1000);

});

-------------------------------------

$("#input_1_10").change(function() {

//get the selected value

var categ = $("#input_1_10 option:selected").text();
    //var state = this.value;
var  city = $("#input_1_21").val();
//var category = $("#input_1_10").val();
//var  categ = $("#input_1_10 option:selected").text();


//alert(categ+city);

   $.ajax({
        url: 'http://therapy.leadingedgeinfosolutions.com/chkstatus.php',
        type: 'POST',
        data: {city : city,category: category},
        success: function(data) {


        if( data == 'no')
{

$("#lightf2").show();
$("#fade").show();
$("#input_132").val(state);
$("#input_98").val(categ);


return false;
}
         
        }
    });
    //make the ajax call

});
});
</script>

Jquery No Conflicts Code Goes here

<script src="jquery.js"></script>


<script>
$.noConflict();

jQuery( document ).ready(function( $ ) {

  // Code that uses jQuery's $ can follow here.

});

// Code that uses other library's $ can follow here.

</script>

Map the original object that was referenced by $ back to $.


jQuery.noConflict();
// Do something with jQuery
jQuery( "div p" ).hide();
// Do something with another library's $()
$( "content" ).style.display = "none";

The jQuery noConflict() Method

$.noConflict(); jQuery(document).ready(function(){   jQuery("button").click(function(){     jQuery("p").text("jQuery is still working!");   }); });
You can also create your own shortcut very easily. The noConflict() method returns a reference to jQuery, that you can save in a variable, for later use. Here is an example:
var jq = $.noConflict(); jq(document).ready(function(){   jq("button").click(function(){     jq("p").text("jQuery is still working!");   }); });

Sliders Tooltip and Other Useful Stuff

http://www.htmldrive.net/ - 

Saturday 13 December 2014

Total Plugins Used Details

1. contact form-7
2. gravity form
3. just custom fields for wordpress plugin
4. Social media plugins
5. store locator plgin
6. wp-e-commerce plugin
7. All In One SEO Pack plugin
8. Nextgen Gallery plugin
9. google captcha plugin
10. math captcha
11. Paid membership pro plugin  --- http://www.paidmembershipspro.com/homepage/
12. Contact Form 7 Datepicker
13. Custom Facebook Feed
14. HG Slider
15. Profile Builder -- Login, registration and edit profile shortcodes for the front-end
16. Recent Posts Widget Extended..
17. Smooth Scroll Up -- Smooth Scroll Up is a lightweight plugin that creates a customizable "Scroll to top / Back to top
18. WP Flicker - WP Flicker plugin will display your flicker images just like a nice image gallery.
19 .All In One SEO Pack
20. Gravity Forms Category Selector Add-On
21. Gravity Forms PayPal Add-On
22. Gravity Forms User Registration Add-On
23. Newsletter - Newsletter is a cool plugin to create your own subscriber list, to send newsletters, to build your business. Before update give a look to this page to know what's changed.
24. WordPress Researcher -- WordPress research tool.
25. Advanced-Custom-Fields - https://wordpress.org/plugins/advanced-custom-fields/screenshots/
26 . Buddy Press

27. wordpress security plugin - https://wordpress.org/plugins/wordfence/installation/   -- Good      Some sites worked with on wordpress

28 . recent-posts-slider.0.7.5   - shows featured images title in slide show

29.ajaxy-search-form  - seraches all posts

30 . azindex  - shows hotel list on single page

sites -
1. http://www.mammalena.info/
2. http://hillcrestfarmmarket.com/
3. http://beckyfox.com
4. http://www.swimava.com/
5. https://revyrealty.com/
6. http://www.kelownamartialarts.com/  -  quest martial arts kelowna
7. http://www.thepondsbellevue.ca/
8. http://siciliana.it/sicilywine/
9. http://www.talkingimage.co.uk/
10. http://www.cuttingedgeconcepts.ca/
11. http://www.kellyobryans.com/
12. http://www.skiwest.ca/
13. http://www.thecreekskelowna.ca/
14.http://www.missiongroup.ca/aqua-marine-valet/
15. http://bettselectric.com/
16. http://www.sports-ville.in/
17. http://outlawsonline.com/
18 . http://christianprisonpenpals.org/

http://allyourwebsolutions.blogspot.in

     --   Themes worked  --
   1. zippy
   2. cherry framework
   3. classipress  - for directory sites
   4.  genesis theme
  5.  Zeeflow
  6. custom themes and child themes 

Gravity Form Access the input values of individual form elements using their IDs like so

Following the Gravity guidelines you set up the hook to call your own function - in the case below the function is after_submission().

You can access the input values of individual form elements using their IDs like so;


add_action("gform_after_submission", "after_submission", 10, 2);

function after_submission($entry, $form){

    $name = $entry["2"];
    $address = $entry["17"] . ', '. $entry["18"] .', '. $entry["19"];


}

Friday 12 December 2014

wordpress wplogin.php file kept on root folder

wplogin.php file kept on root folder

show hide div with java script


<script>
function myFunction() {
        document.getElementById("my_file").style.display = "block";

}
</script>


<input type="button" onclick="myFunction()" id="addmore" width="30px" name="addmore" value="Add More Images"/>

<input type="file" id="my_file" name="Photo1" style="display: none;" />

fetching value from multidimentional array

fetching value from this kind of array -

 print_r($user_last) gives result -
  then fetching city code - $scity =  $user_last['city'][0];
Array
(
    [nickname] => Array
        (
            [0] => rakesh
        )
    [first_name] => Array
        (
            [0] => rakesh
        )

    [last_name] => Array
        (
            [0] => roshan
        )
    [city] => Array
        (
            [0] => mohali
        )
)

wordpress logged in user related things

global $current_user  - > this shows current logged in user.

print_r($current_user);  - will give all details of current user
$cid =  $current_user->ID;  -- fetch id of current user.
echo $cid;   gives value
$custom_fields = get_post_custom($cid);  pass this id to this function and get the values of custom fields
related with current user.

print_r($custom_fields);  will display all details of custom fields
  die;

GET_USER_META - gives all the values associated with logged in user
$user_last = get_user_meta( $cid );

Thursday 11 December 2014

Complete Search result Form for custom table query in wordpress

This is complete template Example for custom table query search.
<?php

/**

* Template Name: Advanced Search Result Page

*/
?>
<?php get_header(); ?>
<div class="main_content">
<div class="page_content_wrapper">
<div class="page_content the_content">
             <div class="ad-search">
<form role="search" method="get"  action="/advanced-serach-result">
   Advanced Search <input type="text" value="" name="adsearch" />
           <input type="submit" value="Advanced Search" name="submit" />
           </form>
</div>
<?php
           if(isset($_GET['submit'])){
if(preg_match("/^[a-zA-Z 0-9]+/", $_GET['adsearch'])){
                                $term = $_GET['adsearch'];
$admin = admin_url();
$url = plugins_url();
$sql="SELECT * FROM wp_usersinfo WHERE name LIKE '%" . $term .  "%' OR city LIKE '%" . $term ."%' OR race LIKE '%" . $term ."%' OR state LIKE '%" . $term ."%' OR hometown LIKE '%" . $term ."%' OR crime LIKE '%" . $term ."%' OR eyes LIKE '%" . $term ."%' OR hair LIKE '%" . $term ."%' OR height LIKE '%" . $term ."%' OR weight LIKE '%" . $term ."%' OR gender LIKE '%" . $term ."%'";

$result = mysql_query($sql) or die(mysql_error());
$num_rows = mysql_num_rows($result);
echo "Total Inmates Found : - $num_rows \n";
while($row = mysql_fetch_array($result)){
  $ID = $row['id'];
  echo "<ul class='ad-right-detail'>\n";
  echo "<li><span><strong>" . "<a  href=\"my-detail-page?id=$ID\">"   .$row['name'] ."</a></span></strong></li>\n";
                                   echo "</ul>";
 }    
}
}
?>

</div>
</div>
</div>

<?php get_footer(); ?>

How to Create a Search Feature with PHP and MySQL

<?php
  if(isset($_POST['submit'])){
  if(isset($_GET['go'])){
  if(preg_match("/^[  a-zA-Z]+/", $_POST['name'])){
  $name=$_POST['name'];
  //connect  to the database
  $db=mysql_connect  ("servername", "username",  "password") or die ('I cannot connect to the database  because: ' . mysql_error());
  //-select  the database to use
  $mydb=mysql_select_db("yourDatabase");
  //-query  the database table
  $sql="SELECT  ID, FirstName, LastName FROM Contacts WHERE FirstName LIKE '%" . $name .  "%' OR LastName LIKE '%" . $name ."%'";
  //-run  the query against the mysql query function
  $result=mysql_query($sql);
  //-create  while loop and loop through result set
  while($row=mysql_fetch_array($result)){
          $FirstName  =$row['FirstName'];
          $LastName=$row['LastName'];
          $ID=$row['ID'];
  //-display the result of the array
  echo "<ul>\n";
  echo "<li>" . "<a  href=\"search.php?id=$ID\">"   .$FirstName . " " . $LastName .  "</a></li>\n";
  echo "</ul>";
  }

For Responsive menu add this js in header

<script src="<?php echo get_template_directory_uri(); ?>/js/jquery.slicknav.js" type="text/javascript"></script>

<script type="text/javascript">

jQuery( document ).ready(function( $ ) {
$('#mainnav-menu').slicknav();
// Code that uses jQuery's $ can follow here.
});
</script>

Wednesday 10 December 2014

add class with jquery

include latest jquery file on top.
write code -
<script>
$(document).ready(function(){
    $("#menu-item-2308").addClass("blue");
});
</script>

here menu-item-2308 is id of div where you want to add class and blue is class name.

when using java script use this one

  <script type="text/javascript">
 window.onload = function() {
                document.getElementById('menu-item-134').className = 'blue';
               };
   </script>

Or if you're using jQuery:

$(function() {
  $('#about').addClass('expand');
});

Tuesday 9 December 2014

plugin - advanced-custom-fields

https://wordpress.org/plugins/advanced-custom-fields/screenshots/

this plugin is for a-z solution for all your custom fields needs.
A perfect plugin.

unexpected output" During Plugin Activation error

  • use this plugin "unexpected output" During Plugin Activation by David Wells.
check in file zilla error messages are shown there.

start removing data causing this error.

Monday 8 December 2014

gravity forms taxonomy

Once you've created your Custom Taxonomy, make sure you have at least a draft post of a CPT using that taxonomy.
Once you're adding/editing your Gravity Form, just use the regular ole Drop Down field (NOT a post field) and you should see the Populate w/ Taxonomy option.

Multiple Categories and classipress or vantage?

ClassiPress does not have any functionality to sell items within the theme, so if you're needing purchase options, these are not available by default. There are a couple of ClassiPress child themes available in the AppThemes marketplace which will allow you to add such functionality through compatibility with woocommerce.

Users cannot select multiple categories from the front end, however admin can select multiple categories for listings from the wp-admin.

There is only one login type available, so this would require customization on your part if you were looking to implement different login types. ClassiPress is not encrypted, so you are free to modify the theme as you wish. Thanks.    

step forms data comes from -
step1.php
step2.php
step-functions.php
file kept in includes/forms/step-functions.php                                                    

About me

Hello Visitors,
My Name is Madhukar , i am a PHP developer.I have started working on wordpress from past two year 
This site is developed for Learning purpose.This site will contain very basics of wordpress so that beginners may learn the basics.

Post types Retrive data

Codes start here.
<code> 
<?php 
                    $args = array(
                         'post_type' => 'betts_team',
                         'post_status' => 'publish',
                         'posts_per_page' => -1,
                         'orderby'=>'menu_order', 
                         'order'=> 'ASC'
                         );
                    $team_query = new WP_Query($args);
                   if($team_query->have_posts()){
                    while ($team_query->have_posts()) : $team_query->the_post();
                    
                    $content = get_the_content();

                    $image= wp_get_attachment_image_src(get_post_thumbnail_id($post->ID),'team-thumb');
                                 
                    if(get_post_meta($post->ID, 'title-people-page', true) !=""){
                    $title =  get_post_meta($post->ID, 'title-people-page', true);
                    }else{
                    $title= "";
                    }
                    if(get_post_meta($post->ID,'resume-pdf-download-people-page',true) !=""){
                    $resume = get_post_meta($post->ID,'resume-pdf-download-people-page',true);
                    }else{
                     $resume="";
                    }
                    
                    if(get_post_meta($post->ID,'email-people-page',true) !=""){
                    $email= get_post_meta($post->ID,'email-people-page',true);
                    }else{
                    $email="";
                    }
                    if(get_post_meta($post->ID,'phone-number-people-page',true) !=""){
                    $phone = get_post_meta($post->ID,'phone-number-people-page',true);    
                    }else{
                    $phone="";
                    }
                    if(get_post_meta($post->ID,'extension-people-page',true) !=""){
                    $extension = get_post_meta($post->ID,'extension-people-page',true);
                    }else{
                    $extension = "";
                    }
                    if(get_post_meta($post->ID,'accreditation-logos-people-page',true) !=""){
                    $images = get_post_meta($post->ID,'accreditation-logos-people-page',true);
                    }else{
                    $images = "";
                     }
                    ?>
 </code>
<code> 
if($resume[0]['image'] !=""){ ?>
                    <a href="<?php echo $resume[0]['image']; ?>" target="_blank" class="pdf-link"><span>CV</span></a>    
                    <?php } ?>
                    </p>
                    <?php if($email !=""){ ?>
                    <p class="people-mail"><a href="mailto:<?php echo $email; ?>"><?php echo $email; ?></a></p>
                    <?php } if($phone !=""){ ?>
                    <p class="people-tel"><?php    echo $phone; ?>
                    &nbsp;Ext.&nbsp; <span><?php echo $extension; ?></span>
                    </p>
                    <?php } if(!empty($images)){  ?>
                         <p class="people-logo">
                        <b>Accreditations</b> <br />
                        <?php
                      foreach($images as $imgs){    
                      ?>
                        <img src = "<?php echo $imgs['image']; ?>" />
                        <?php } 
                       echo "</p>";
                    }
                       ?>
                        
                    </div>
                    </div>
                 <?php endwhile;
                  wp_reset_query();
                  }
                  ?> 
</code>