Archive

November 2016

Browsing

10 Quick Exercises for Busy Entrepreneurs

10 Quick Exercises for Busy Entrepreneurs

Many business owners who are busy managing their companies usually don’t exercise. Their excuse is that they just cannot find time to work out because they have so much to do. However, this shouldn’t be an excuse because you don’t have to spend several hours a day to get fit and healthy through exercise.

Spending 20 to 30 minutes would do and if you do the math, it’s only about 2% of the total hours of one day. A little break that would benefit you in a lot of ways is worth it, so you definitely should make it a priority and add it to your schedule.

There are times that your schedule can be really tight. The good news is that there are still simple alternatives that would also serve as your exercise. For example, instead of using the elevator, why not
take the stairs? While reading important papers, you may walk around instead of sitting still for hours.

Do simple exercises a few minutes a day and add more minutes gradually. These may be little changes, but in the long run, you’ll be surprised that you have already made it a habit to include exercise in your daily routine, no matter how busy your schedule is.

We want to help entrepreneurs find ways on how they can still exercise to stay healthy even if their schedule is hectic. This is why we created this great infographic that lists some exercises
that busy business owners can follow
.

Get to know these exercises from the image below:

How to Create Like & Unlike code like FB using PHP, MySQL and jQuery

How to Create Like & Unlike code like FB using PHP, MySQL and jQuery

In this tutorials we are going to learn How to Create Like & Unlike code using PHP, MySQL and jQuery.

Rating system is very useful for every web project. Through this system, web admin can track the visitors like and dislike. Also it will help webmaster to understand the visitors choices and make their website more interactive with the visitors.

Demo       |

We have made the simple rating or like or unlike code system using PHP, MySQL, jQuery and Ajax. This rating system take the visitors like or dislike with jQuery and Ajax.

Step 1: Create database ‘like’ table using MySQL query.

CREATE TABLE `likes` (
  `id` int(5) NOT NULL AUTO_INCREMENT,
  `pid` int(10) NOT NULL,
  `like` int(10) NOT NULL,
  `unlike` int(10) NOT NULL,
  `uid` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;

Step 2: Create database ‘products‘ table using MySQL query.

CREATE TABLE `products` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `product_name` varchar(255) NOT NULL,
  `price` double(10,2) NOT NULL DEFAULT '0.00',
  `status` int(2) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4;

-- 
-- Dumping data for table `products`
-- 

INSERT INTO `products` VALUES (1, 'developer desks design book', 20.00,  1);
INSERT INTO `products` VALUES (2, 'Developer desks login tutorials', 10.00, , 1);
INSERT INTO `products` VALUES (3, 'developer desks coding book', 100.00,  1);

Step 3: Connect DB function with db coding.

<?php
define('DB_SERVER', 'localhost');
define('DB_USERNAME', 'username');
define('DB_PASSWORD', 'password');
define('DB_DATABASE', 'database');
$connection = mysqli_connect(DB_SERVER,DB_USERNAME,DB_PASSWORD,DB_DATABASE);
?>

Step 4: Index.php files have Main file show products list and and like buttons:

<?php
session_start();
include("db.php");
if(!isset($_SESSION['user']))
{
    $_SESSION['user'] = session_id();
}
$uid = $_SESSION['user'];  // set your user id settings

if($_POST)  // AJAX request received section
{
    $pid    = mysqli_real_escape_string($connection,$_POST['pid']);  // product id
    $op     = mysqli_real_escape_string($connection,$_POST['op']);  // like or unlike op
    

    if($op == "like")
    {
        $gofor = "like";
    }
    elseif($op == "unlike")
    {
        $gofor = "unlike";
    }
    else
    {
        exit;
    }
    // check if alredy liked or not query
    $query = mysqli_query($connection,"SELECT * from `likes` WHERE pid='".$pid."' and uid='".$uid."'");
    $num_rows = mysqli_num_rows($query);

    if($num_rows>0) // check if alredy liked or not condition
    {
        $likeORunlike = mysqli_fetch_array($query);
    
        if($likeORunlike['like'] == 1)  // if alredy liked set unlike for alredy liked product
        {
            mysqli_query($connection,"update `likes` set `unlike`=1,`like`=0 where id='".$likeORunlike['id']."' and uid='".$uid."'");
            echo 2;
        }
        elseif($likeORunlike['unlike'] == 1) // if alredy unliked set like for alredy unliked product
        {
            mysqli_query($connection,"update `likes` set `like`=1,`unlike`=0 where id='".$likeORunlike['id']."' and uid='".$uid."'");
            echo 2;
        }
    }
    else  // New Like
    {
       mysqli_query($connection,"INSERT INTO `likes` (`pid`,`uid`, `$gofor`) VALUES ('$pid','$uid','1')");
       echo 1;
    }
    exit;
}


$query  = "SELECT * FROM  `products`"; // products list
$res    = mysqli_query($connection,$query);
$HTML = "";
while($row=mysqli_fetch_array($res))
{
    // get likes and dislikes of a product
    $query = mysqli_query($connection,"select sum(`like`) as `like`,sum(`unlike`) as `unlike` from `likes` where pid = ".$row['id']);
    $rowCount = mysqli_fetch_array($query);
    if($rowCount['like'] == "")
        $rowCount['like'] = 0;
        
    if($rowCount['unlike'] == "")
        $rowCount['unlike'] = 0;
        
    if($uid == "") // if user not loggedin then show login link on like button click
    {
        $like = '
            <input onclick="location.href = \'login.php\';" type="button" value="'.$rowCount['like'].'" rel="'.$row['id'].'" data-toggle="tooltip"  data-placement="top" title="Login to Like" class="button_like" />
            <input onclick="location.href = \'login.php\';" type="button" value="'.$rowCount['unlike'].'" rel="'.$row['id'].'" data-toggle="tooltip" data-placement="top" title="Login to Unlike" class="button_unlike" />';
    }
    else
    {
        $query = mysqli_query($connection,"SELECT * from `likes` WHERE pid='".$row['id']."' and uid='".$uid."'");
        if(mysqli_num_rows($query)>0){ //if already liked od disliked a product
            $likeORunlike = mysqli_fetch_array($query);
            // clear values of variables
            $liked = '';
            $unliked = '';
            $disable_like = '';
            $disable_unlike = '';
            
            if($likeORunlike['like'] == 1) // if alredy liked then disable like button
            {
                $liked = 'disabled="disabled"';
                $disable_unlike = "button_disable";
            }
            elseif($likeORunlike['unlike'] == 1) // if alredy dislike the disable unlike button
            {
                $unliked = 'disabled="disabled"';
                $disable_like = "button_disable";
            }
            
            $like = '
            <input '.$liked.' type="button" value="'.$rowCount['like'].'" rel="'.$row['id'].'" data-toggle="tooltip"  data-placement="top" title="Like" class="button_like '.$disable_like.'" id="linkeBtn_'.$row['id'].'" />
            <input '.$unliked.' type="button" value="'.$rowCount['unlike'].'" rel="'.$row['id'].'" data-toggle="tooltip" data-placement="top" title="Un-Like" class="button_unlike '.$disable_unlike.'" id="unlinkeBtn_'.$row['id'].'" />
            ';
        }
        else{ //not liked and disliked product
            $like = '
            <input  type="button" value="'.$rowCount['like'].'" rel="'.$row['id'].'" data-toggle="tooltip"  data-placement="top" title="Like" class="button_like" id="linkeBtn_'.$row['id'].'" />
            <input  type="button" value="'.$rowCount['unlike'].'" rel="'.$row['id'].'" data-toggle="tooltip" data-placement="top" title="Un-Like" class="button_unlike" id="unlinkeBtn_'.$row['id'].'" />
            ';
        }
    }
        
    $HTML.='
        <li> <img src="images/'.$row['image'].'" class="">
            <h4 class="">'.$row['product_name'].'</h4>
            <div class="product-price">
                <span class="normal-price">$'.$row['price'].'</span>
            </div>
            <a href="#" class="btn btn-default navbar-btn" >Buy Now</a>
            <div class="grid">
                '.$like.'
            </div>
        </li>';
}

?>
<!doctype html>
<head>
  </head>
  <body>
   <div class="container">
    <div class="row">
    <h1>PHPGang Shopping store</h1>
        <div class="col-sm-12 col-md-12">
            <ul class="thumbnail-list">
            <?php echo $HTML; ?>
            </ul>
        </div>
    </div>
</div>
  </body>
</html>

Step 5: Create style for css.

.button_like {
    background-image: url(like.png);
    background-color: #fff;
    background-repeat: no-repeat; 
    background-position: 2px 0;
    border: none;           
    cursor: pointer;       
    height: 32px;          
    padding-left: 40px;    
    vertical-align: middle;
    color: hsl(0, 0%, 33%);
    
 
}
.button_unlike {
    background-image: url(like.png);
    background-color: #FFF;
    background-repeat: no-repeat; 
    background-position: 2px -31px;
    border: none;           
    cursor: pointer;       
    height: 32px;          
    padding-left: 40px;    
    vertical-align: middle;
    color: hsl(0, 0%, 33%);
    
 
}
.button_disable{
    background-image: url("likebw.png");
}
.grid
{
    width: 450px;
    margin: 0 auto;
    text-align:middle;
}
.thumbnail-list {
  list-style:none;
  margin:0;
  padding:0;
  font-size:0;
}
.thumbnail-list li {
  display:inline-block;
  vertical-align:top;
  width:50%;
  padding:2%;
  font-size:12px;
}
.thumbnail-list img {
  display:block;
  width:100%;
}
.item { background:green; }
.cut-price {
  text-decoration:line-through;
  color:#ccc;
}
.product-price {
  float:left;
  width:100%;
  color:#999;
}
.btn-slide { display:none; }

@media (min-width:640px) {
  .thumbnail-list li { width:33.33333%; }
}
@media (max-width:767px) {
  .btn-slide {
    text-align:center;
    width:100%;
    padding:10px;
    margin:0 auto;
    display:block;
    font:bold 120%/100% Arial,Helvetica,sans-serif;
    color:#000;
    text-decoration:none;
    border:1px solid #ccc;
  }
  #panel { display:none; }
  .thumbnail-list li { text-align:center; }
}
@media (max-width:320px) {
  .thumbnail-list li { width: 100%}
}

Add jquery code and and css link for in the code.

  <script type="text/javascript" src="jquery-1.8.0.min.js"></script>
    <script type="text/javascript" src="script.js"></script>
    <link href="style.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">

This is the simple and easy code for like and unlike system I hope you guyz like this please share your feedback in comments. If you face any issue please fee free to comment below.

How to Send Push Notifications to Browser using WordPress Plugin

How to Send Push Notifications to Browser using WordPress Plugin

In Recent times, Push notifications to browser is much useful to grow your website clients. Its one of the way to increase the traffic of your websites easily. Push notifications are much like browser notifications, whenever you are installing a new mobile application on your phone, you will often be asked as to whether you would like to opt-in for push notifications. These notifications are simple alert messages that inform you about the latest entries from the platform that you signed up for, it could be news, new feature releases, or straightforward ‘special’ offers for you to take advantage of.

WordPress is a leader in blogging, with millions upon millions of bloggers and ten times as much readers, and getting your latest blog posts out to users’ mobile devices as soon as they are published is a sure way of keeping your content engaged, and blog active.

OneSignal – Free Web Push Notifications

how-to-send-push-notifications-to-browser-using-word-press-plugin-4OneSignal is a complete push notification solution for WordPress blogs and websites, trusted by over 80,000 developers and marketers including some of the largest brands and websites in the world.

After setup, your visitors can opt-in to receive desktop push notifications when you publish a new post, and visitors receive these notifications even after they’ve left your website.

 

Pushed

how-to-send-push-notifications-to-browser-using-word-press-plugin

Send Push Notifications from your WordPress site: it’s Free!

Pushed Push Notifications WordPress plugin allows you to send push notifications to iOs, Android and Desktop devices every time you publish a new post. The plugin integrates your WordPress blog with your Pushed app. It’s completely free.

WPPush | Push notifications Chrome & Safari

how-to-send-push-notifications-to-browser-using-word-press-plugin-3

Push notifications for chrome & safari (firefox coming soon) in your wordpress site.

WPPush | Send push notifications to your visitors computer. Works on both chrome & safari and we are working on firefox.

Your website can now send notifications to your visitors. When your visitors hit your website they will see a prompt asking you if you’d like to receive your latest updates. If accepted you will be able to send push notifications whether they have the browser open or not.

Push Monkey

how-to-send-push-notifications-to-browser-using-word-press-plugin

Push Monkey lets you send push notifications directly to your readers’ desktops when new content is fresh from the oven.

Why Push Monkey?

Increased Engagement

Readers can be informed about your content at all times: when reading other websites or while working in other apps, with the browser closed. Even when the computer is not active – it displays all missed notifications the moment it wakes up.

Push Notifications for WordPress (Lite)

how-to-send-push-notifications-to-browser-using-word-press-plugin-5

Send push notifications to iOS, Android, and Fire OS devices when you publish a new post. Straight from your WordPress site, in real-time. This plugin has a built in hub, allowing WordPress to send out the push notifications directly—without using any third-party’s server.

I hope this all are helpful for your websites audience grow. Please subscribe us for more articles, Thank you

Best SEO Plugins For WordPress To Get Website Higher Page Rank

Best SEO Plugins For WordPress To Get Website Higher Page Rank

In previously, I have shared How to Setup W3 Total Cache to Optimize WordPress Websites at Developerdesks. For today’s post, I have compiled a list of recommended WordPress Plugins for SEO. You do not need to use all of these SEO plugins, but each works in a different way, so I would suggest choosing and using the ones that best suit your needs. Its is Used to get your websites top in search.

Here We listed Some best Seo pluign free and also premium plugin too. This is my concern. so you can learn more about them and decide which SEO plugins are appropriate for your blog. If you think there are any WordPress SEO plugins missing from our list, do let us know, and we would be happy to review them and possibly add them to our list.

Best SEO Plugins For WordPress

Yoast WordPress SEO Plugin:

Best seo plugin for wordpress

WordPress SEO by Yoast is a best free SEO plugin for WordPress. This single plugin takes care of many aspects of your WordPress blog’s SEO. Using SEO by Yoast you can do following things:

  • Add meta value for homepage
  • Add meta value for single post
  • Social SEO
  • Create sitemap file
  • Edit robots.txt and .htaccess
  • Control indexing of your blog

All in One SEO Pack:

All in One SEO Pack Optimizes your WordPress blog for SEO (Search Engine Optimization).

all-in-one-seo-pack

  • XML Sitemap support – submit your sitemap to Google and Bing and improve your SEO
  • Google AMP support (Accelerated Mobile Pages)
  • Google Analytics support
  • Support for SEO on Custom Post Types
  • Advanced Canonical URLs
  • Redirect attachment pages to parent post

Broken Link Checker

This plugin will monitor your blog looking for broken links and let you know if any are found.

broken-link-checker

  • Monitors links in your posts, pages, comments, the blogroll, and custom fields (optional).
  • Detects links that don’t work, missing images and redirects.
  • Notifies you either via the Dashboard or by email.
  • Makes broken links display differently in posts (optional).
  • Prevents search engines from following broken links (optional).

SEO Smart Links

SEO Smart Links provides automatic SEO benefits for your site in addition to custom keyword lists, nofollow and much more.

Further SEO Smart links allows you to set up your own keywords and set of matching URLs. Finally SEO Smart links allows you to set nofollow attribute and open links in new window.

It is a perfect solution to get your blog posts interlinked or add affiliate links to other sites.

Rel Nofollow Checkbox

This plugin adds a simple checkbox in the insert/edit link popup for including nofollowattribute.

rel-nofollow-checkbox

SEO Friendly Images

SEO Friendly Images is a WordPress SEO plugin which automatically updates all images with proper ALT and TITLE attributes for SEO purposes. If your images do not have ALT and TITLE already set, SEO Friendly Images will add them according the options you set. Additionally this makes the post W3C/xHTML valid as well.

seo-friendly-images

If you liked this article, Please subscribe to our DeveloperDesks for more articles. You can also find us on Twitter