Welcome, Guest
You have to register before you can post on our site.

Username/Email:
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 394
» Latest member: tusar
» Forum threads: 136
» Forum posts: 241

Full Statistics

Online Users
There are currently 2 online users.
» 0 Member(s) | 2 Guest(s)

Latest Threads
Google Algorithm Updation...
Forum: SEO
Last Post: randiv
Yesterday, 10:16 AM
» Replies: 0
» Views: 4
Hi, Hello
Forum: Introduce Yourself
Last Post: JJesica
09-15-2017, 02:15 PM
» Replies: 0
» Views: 19
I am the new guy
Forum: Introduce Yourself
Last Post: LatoyaMobs
09-07-2017, 03:43 PM
» Replies: 0
» Views: 30
About Google Search Engin...
Forum: SEO
Last Post: randiv
09-05-2017, 10:29 AM
» Replies: 1
» Views: 100
Reliable Shared And Resel...
Forum: Paid Hosting Offers
Last Post: world
09-02-2017, 11:25 AM
» Replies: 0
» Views: 32
Blue Jquery Pop Up Subscr...
Forum: Web Orianted Scripts
Last Post: trainerplus
08-15-2017, 11:41 AM
» Replies: 0
» Views: 37
AngularJS Chat Applicatio...
Forum: Android Development
Last Post: trainerplus
08-07-2017, 01:33 PM
» Replies: 0
» Views: 38
Real Time chatting app us...
Forum: Android Development
Last Post: trainerplus
08-07-2017, 01:27 PM
» Replies: 0
» Views: 29
Create Your Own Realtime ...
Forum: Android Development
Last Post: trainerplus
08-07-2017, 01:10 PM
» Replies: 0
» Views: 26
Google Plus Like Blogger ...
Forum: Blogger Template
Last Post: trainerplus
08-07-2017, 06:18 AM
» Replies: 0
» Views: 37

 
  WordPress Pagination Code to Display Page Pagination in Custom Post Type
Posted by: waphunt@gmail.com - 05-07-2017, 05:06 PM - Forum: WordPress Development - No Replies

Hello, Guys.

Today I am going to share the code which helps you to add number type pagination to your custom type blog post listing template page. All you want to do, Create a page called pagination.php in page-templates folder and copy the given code to it. After that call the page using include function to your custom type post listing page in page-template folder.

PHP Code:
 <?php

    $big
=100;

 
    echo paginate_links(array(

 
       'base' => str_replace$big'%#%'esc_urlget_pagenum_link$big ) ) ),

 
       'format' => '?paged=%#%',

 
       'current' => max1$pge ),

 
       'total' => $total,

 
       'prev_text'    => __('<i class="fa fa-caret-left"></i>'),

 
       'next_text'    => __('<i class="fa fa-caret-right"></i>'),

 
   ) ); ?>


            <?php wp_reset_postdata(); ?>



<script>

jQuery(document).ready(function(){

    jQuery('.paging-navigation a').each(function(){

        a=jQuery(this);

        href=a.attr('href');

        href_or=a.attr('href');

        href=href.split('/');

        if(href[7]==1){

        if(href[4]=="ar"){new_href= href_or.replace("/page/1","");

        a.attr('href',new_href);}}

    })

})

</script> 

You can call the pagination code by using the include in PHP. Like the below example.

PHP Code:
            <?php

            $news_args 
= array(

                    
'post_type' => "college_directory",

                    
'post_status' => "publish",

                    
'orderby' => 'menu_order',

                    
'posts_per_page' => 1,

                    
'paged' => $paged,

                    
'order' => 'ASC'

            
);

            
$my_query = new WP_Query($news_args);

            if (
$my_query->have_posts()) {

                    while (
$my_query->have_posts()) {

                            
$my_query->the_post(); ?>
                    <div class="media">
                        <div class="media-left media-middle">
                                <a href="<?php the_permalink(); ?>">
                                <div><?php   the_post_thumbnail( array(6565))?></div>
                                </a>
                            </div>
                            <div class="media-body">
                                <h4 class="media-heading"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4>
                                    <p class="media-p"><?php the_excerpt(); ?></p>
                            </div>
                    </div>
                    <?php

                
$total $my_query->max_num_pages;

                    
$pge get_query_var('paged');

                    include 
'pagination.php';

            } else {

                    echo 
'No institutions to display';

            }

            
?>

On the above page, you can see that by using include I called the pagination.

If you have any doubts, Just comment.

Thnaks.

Print this item

  PHP File Upload Script to Upload Files to Your Web Server From Your Website
Posted by: waphunt@gmail.com - 05-07-2017, 04:58 PM - Forum: Programming Related - No Replies

Hello, guys.

Today I am going to share a PHP Code which will help you to implement a File Uploading option to your website. By Implementing this option, Your users can upload files to your website. You can change the path to any directory on your web server.


You don't need to create any database for this activity.

PHP Code:
<?php
$target_dir 
"uploads/";
$target_file $target_dir basename($_FILES["fileToUpload"]["name"]);
$uploadOk 1;
$imageFileType pathinfo($target_file,PATHINFO_EXTENSION);
// Check if image file is a actual image or fake image
if(isset($_POST["submit"])) {
 
   $check getimagesize($_FILES["fileToUpload"]["tmp_name"]);
 
   if($check !== false) {
 
       echo "File is an image - " $check["mime"] . ".";
 
       $uploadOk 1;
 
   } else {
 
       echo "File is not an image.";
 
       $uploadOk 0;
 
   }
}
// Check if file already exists
if (file_exists($target_file)) {
 
   echo "Sorry, file already exists.";
 
   $uploadOk 0;
}
// Check file size
if ($_FILES["fileToUpload"]["size"] > 500000) {
 
   echo "Sorry, your file is too large.";
 
   $uploadOk 0;
}
// Allow certain file formats
if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"
&& $imageFileType != "gif" ) {
 
   echo "Sorry, only JPG, JPEG, PNG & GIF files are allowed.";
 
   $uploadOk 0;
}
// Check if $uploadOk is set to 0 by an error
if ($uploadOk == 0) {
 
   echo "Sorry, your file was not uploaded.";
// if everything is ok, try to upload file
} else {
 
   if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) {
 
       echo "The file "basename$_FILES["fileToUpload"]["name"]). " has been uploaded.";
 
   } else {
 
       echo "Sorry, there was an error uploading your file.";
 
   }
}
?>

Change $target_dir = "uploads/";to your file directory where the file to be uploaded.

Thanks

Print this item

  Create Own URL Shortner Site With PHP Script
Posted by: waphunt@gmail.com - 05-07-2017, 04:50 PM - Forum: Mobile & Wapscripts - No Replies

Hello, guys.

This script with help you to create own URL Shortener website using PHP. All you want to do, Just upload the script to your web server using FTP or any other tool and run the site.

Demo: http://yourls.org/cookie+

Download The Source Code From Attachment.

Thanks



Attached Files
.zip   YOURLS-1.7.2.zip (Size: 2.49 MB / Downloads: 28)
Print this item

  Wordpress Custom Post Type Pagination 404 Page Error Problem Solved
Posted by: waphunt@gmail.com - 05-07-2017, 04:35 PM - Forum: WordPress Development - No Replies

Introduction:

Hello guys, After a long time, I am writing My next blog post which is related to WordPress. Now a day, I am working with  WordPress theme, and I worked out some themes. Actually, the development is too easy than Blogger Template Development. One of My friends helped Me to learn Wordpress. While creating Custom Post Type Listing with Page Template, We faced a 404 Page Error. We searched the Internet a lot about the problem. In the normal blog post, I can access the page/2 and page/3 directly via the address bar but I can't access those page in the Custom Post Type Listing page. After a long research about the problem, We finally found the solution.

How to Solve The Page 2 Not Working Problem in WordPress Custom Post Type:

The problem happen to Me was, I created both Custom Post Type Name and Custom Post Type Page Template Name as the same. In WordPress it is not possible to create both name as same. So the solution is, change any of the Custom Post Type Template Page Name or Custom Post Type Name.

I hope the solution worked out for you.

If this worked for you, Please share this article with your friends.

Thanks

Print this item

  Kikkas Torrent Site Like Blogger Template Free Download
Posted by: waphunt@gmail.com - 05-04-2017, 02:44 PM - Forum: Blogger Template - No Replies

Hello, guys.

We all know about the famous torrent site Kikkas. Today I am going to share the Blogger Template of that Kikkas torrent site via this forum. If you like the article, Please like my thread. Also, share them with your friends via Social Media's.

Demo of The Template:
http://torrenttheme.blogspot.in/

Download The Template From Attachment.



Attached Files
.zip   Torrentism_Free.zip (Size: 22.74 KB / Downloads: 1)
Print this item

  Angularjs Export Json to Excel
Posted by: trainerplus - 04-21-2017, 12:59 PM - Forum: Programming Related - No Replies

Hello, guys.

Today I am going the script which helps you to export Excel sheet from Jason in AngularJS. All you want to do, Just follow the steps given below. Thanks

AngularJS Html Code, We are going to export the Table content to Excel Sheet. Create an HTML Page and copy paste the code.

Code:
<html ng-app="myApp">

 <head>
   
   <script data-require="angular.js@*" data-semver="2.0.0" src="https://code.angularjs.org/1.4.8/angular.js
"></script>
   <script data-require="jquery@*" data-semver="2.1.4" src="https://code.jquery.com/jquery-2.1.4.js"></script>
 </head>

 <body ng-controller="MyCtrl">
   <h1>Export to Excel</h1>
   <button class="btn btn-link" ng-click="exportToExcel('#tableToExport')">
     <span class="glyphicon glyphicon-share"></span>
Export to Excel
   </button>
   <div id="tableToExport">
     <table border="1">
       <thead>
         <tr class="table-header">
           <th>Team</th>
           <th>Process Type</th>
           <th>Cedent</th>
         </tr>
       </thead>
       <tbody>
         <tr>
           <td>value 1</td>
           <td>value 2</td>
           <td>value 3</td>
         </tr>
         <tr>
           <td>value 4</td>
           <td>value 5</td>
           <td>value 6</td>
         </tr>
         <tr>
           <td>10.12.2015</td>
           <td>AXA Affin</td>
           <td>101024 - Quota Share QS</td>
         </tr>
       </tbody>
     </table>
   </div>
 </body>

</html>

CSS Style code to style the table.

Code:
/* Styles go here */
.table-header
{
background-color: lightskyblue;  
}

AngularJS code to export the Table content to Excel Sheet.

Code:
// Code goes here
var myApp=angular.module("myApp",[]);
myApp.factory('Excel',function($window){
       var uri='data:application/vnd.ms-excel;base64,',
           template='<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body><table>{table}</table></body></html>',
           base64=function(s){return $window.btoa(unescape(encodeURIComponent(s)));},
           format=function(s,c){return s.replace(/{(\w+)}/g,function(m,p){return c[p];})};
       return {
           tableToExcel:function(tableId,worksheetName){
               var table=$(tableId),
                   ctx={worksheet:worksheetName,table:table.html()},
                   href=uri+base64(format(template,ctx));
               return href;
           }
       };
   })
   .controller('MyCtrl',function(Excel,$timeout,$scope){
     $scope.exportToExcel=function(tableId){ // ex: '#my-table'
           var exportHref=Excel.tableToExcel(tableId,'WireWorkbenchDataExport');
           $timeout(function(){location.href=exportHref;},100); // trigger download
       }
   });

Create a copy of yours and enjoy.

Share your feedback. Thanks

Print this item

  Codecanyon HTML5 File Upload Script Free Download
Posted by: trainerplus - 04-14-2017, 07:03 PM - Forum: Web Orianted Scripts - No Replies

Hello, Guys.

Today I am going to share a script that will help you to create own File uploading sites like Codecanyon File Upload Script. All You Want to do, Just upload the script and configure with your web server.

[Image: html5_uploader.png]

Demo Here: https://ibb.co/iR2Tfk

You can download the script from the attachment.

Thanks



Attached Files
.zip   fileuploader-1.0.0.3.zip (Size: 162.39 KB / Downloads: 12)
Print this item

Thumbs Up Create Own Youtube Like Website Using AngularJS
Posted by: trainerplus - 04-13-2017, 07:15 PM - Forum: Web Orianted Scripts - No Replies

Hello, guys.

Today I am going to share an Angularjs script with you. This script will allow you to create own youtube like a website within 5 minutes. All you want to do, just upload the script to your host and run it.

You may need an API Key from Google. You can create it from Google Developer Console.


[Image: youtube_using_angularjs.png]
Demo Here: http://jgthms.com/juketube/


Thanks



Attached Files
.zip   juketube-master.zip (Size: 882.11 KB / Downloads: 36)
Print this item

  How to Send Push Notification With AngularJS
Posted by: trainerplus - 04-02-2017, 09:06 AM - Forum: Web Orianted Scripts - No Replies

Hello, guys.

Today I am going to share an Opensource AngularJS script which allows you to send Realtime Push Notification to your website users. All you want to do, just download the script and configure it.

Demo : https://sagiegurari.github.io/angular-web-notification/

Download the script from the attachment.

Thanks



Attached Files
.zip   angular-web-notification-master.zip (Size: 26.35 KB / Downloads: 2)
Print this item

  PHP Scripts to Backup Mysql Database
Posted by: trainerplus - 04-02-2017, 06:17 AM - Forum: Programming Related - No Replies

Hello, guys.

Today I am going to introduce a PHP Program which helps you to take Backup of your Mysql Database using PHP Program. All you want to do, just specify the name and password of the database. Also, the table which you want to take backup. Copy the below code to a php page and take backup.

PHP Code:
<?php
    
//ENTER THE RELEVANT INFO BELOW
 
   $mysqlUserName      "Database Username";
 
   $mysqlPassword      "Password Here";
 
   $mysqlHostName      "Hostname Here";
 
   $DbName             "Database Name Here";
 
   $backup_name        "mybackup.sql";
 
   $tables             = array("asset_branch""asset_category""asset_products""asset_user""login""message""replace_app");

 
  //or add 5th parameter(array) of specific tables:    array("mytable1","mytable2","mytable3") for multiple tables

 
   Export_Database($mysqlHostName,$mysqlUserName,$mysqlPassword,$DbName $tables=false$backup_name=false );

 
   function Export_Database($host,$user,$pass,$name $tables=false$backup_name=false )
 
   {
 
       $mysqli = new mysqli($host,$user,$pass,$name);
 
       $mysqli->select_db($name);
 
       $mysqli->query("SET NAMES 'utf8'");

 
       $queryTables    $mysqli->query('SHOW TABLES');
 
       while($row $queryTables->fetch_row())
 
       {
 
           $target_tables[] = $row[0];
 
       }
 
       if($tables !== false)
 
       {
 
           $target_tables array_intersect$target_tables$tables);
 
       }
 
       foreach($target_tables as $table)
 
       {
 
           $result           $mysqli->query('SELECT * FROM '.$table);
 
           $fields_amount    $result->field_count;
 
           $rows_num=$mysqli->affected_rows;
 
           $res              $mysqli->query('SHOW CREATE TABLE '.$table);
 
           $TableMLine       $res->fetch_row();
 
           $content        = (!isset($content) ?  '' $content) . "\n\n".$TableMLine[1].";\n\n";

 
           for ($i 0$st_counter 0$i $fields_amount  $i++, $st_counter=0)
 
           {
 
               while($row $result->fetch_row())
 
               //when started (and every after 100 command cycle):
 
                   if ($st_counter%100 == || $st_counter == )
 
                   {
 
                           $content .= "\nINSERT INTO ".$table." VALUES";
 
                   }
 
                   $content .= "\n(";
 
                   for($j=0$j<$fields_amount$j++)
 
                   {
 
                       $row[$j] = str_replace("\n","\\n"addslashes($row[$j]) );
 
                       if (isset($row[$j]))
 
                       {
 
                           $content .= '"'.$row[$j].'"' ;
 
                       }
 
                       else
                        
{
 
                           $content .= '""';
 
                       }
 
                       if ($j<($fields_amount-1))
 
                       {
 
                               $content.= ',';
 
                       }
 
                   }
 
                   $content .=")";
 
                   //every after 100 command cycle [or at last line] ....p.s. but should be inserted 1 cycle eariler
 
                   if ( (($st_counter+1)%100==&& $st_counter!=0) || $st_counter+1==$rows_num)
 
                   {
 
                       $content .= ";";
 
                   }
 
                   else
                    
{
 
                       $content .= ",";
 
                   }
 
                   $st_counter=$st_counter+1;
 
               }
 
           $content .="\n\n\n";
 
       }
 
       //$backup_name = $backup_name ? $backup_name : $name."___(".date('H-i-s')."_".date('d-m-Y').")__rand".rand(1,11111111).".sql";
 
       $date date("Y-m-d");
 
       $backup_name $backup_name $backup_name $name.".$date.sql";
 
       header('Content-Type: application/octet-stream');
 
       header("Content-Transfer-Encoding: Binary");
 
       header("Content-disposition: attachment; filename=\"".$backup_name."\"");
 
       echo $content; exit;
 
   }
?>

Thanks

Print this item