₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,327,347 members, 8,430,545 topics. Date: Saturday, 20 June 2026 at 04:52 PM

Toggle theme

Jquery Timeago Plugin Implementation Using PHP. - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingJquery Timeago Plugin Implementation Using PHP. (1121 Views)

1 Reply (Go Down)

Jquery Timeago Plugin Implementation Using PHP. by skptricks(op): 9:46am On Nov 26, 2017
Post link : http://www.skptricks.com/2017/11/timeago-jquery-script-using-php.html

Timeago is a JQuery plugin that provides a easy way to integrate timestamp update functionality in web based application. Nowadays Timeago Plugin is the most important functionality in social networking sites, it helps to update the timestamps automatically at specific interval of time.

In this post we will going to learn how to integrate and timeago Jquery plugin in web application with the help of PHP.

Why Timeago plugin ?
It's support the page caching in your web applications.
Automatically refresh the page and update the timestamp in web application.
Support the HTML5 tags.
Easy to integrate in web applications.

Lets see the below example for Timeago :
index.php
<html>
<head>
<script src="jquery-3.2.1.min.js" type="text/javascript"></script>
<script src="jquery.timeago.js" type="text/javascript"></script>
<script>
jQuery(document).ready(function() {
jQuery(".timeago"wink.timeago();
});
</script>
</head>
<body>
<?php
$time=time(); // Current timestamp eg: 1371612613
$formatedTime=date("c", $time); // Converts to date formate 2017-06-19T03:30:13+00:00
?>

<h1> You opened this page <a href='#' class='timeago' title="<?php echo $formatedTime; ?>"></a> </h1>

<h1> This page was last modified <a href='#' class='timeago' title="2017-07-17T14:06:04Z"></a> </h1>

NOTE : This will update every minute. Wait for it.

</body>
</html>

Re: Jquery Timeago Plugin Implementation Using PHP. by badmus306(m): 10:55am On Nov 26, 2017
Do u have an idea of a plugin that disable past date on a datePicker, but only shows the current days or days to comehuh
Re: Jquery Timeago Plugin Implementation Using PHP. by skptricks(op):
badmus306:
Do u have an idea of a plugin that disable past date on a datePicker, but only shows the current days or days to comehuh
Yes....

var array = ["2017-11-14","2017-03-15","2017-03-16"]

$('input').datepicker({
beforeShowDay: function(date){
var string = jQuery.datepicker.formatDate('yy-mm-dd', date);
return [ array.indexOf(string) == -1 ]
}
});
Re: Jquery Timeago Plugin Implementation Using PHP. by bassdow: 3:32pm On Nov 27, 2017
badmus306:
Do u have an idea of a plugin that disable past date on a datePicker, but only shows the current days or days to comehuh
Kai but you don't need a plugin for this na.
haba
installing plugin for something like this would be termed as Plugin Abuse.

A couple of minutes should solve it.

expo : try min and max or anything similar though
Re: Jquery Timeago Plugin Implementation Using PHP. by badmus306(m): 4:58pm On Nov 27, 2017
bassdow:
Kai but you don't need a plugin for this na.
haba
installing plugin for something like this would be termed as Plugin Abuse.

A couple of minutes should solve it.

expo : try min and max or anything similar though
Thank you bro grin
1 Reply

Free HTML5, CSS3 And Basic Javascript (jquery) TrainingFree Online Training For Html/css, Javascript, Jquery, Mysql, Php, Java, AndroidExtract URL Data Like Facebook Using PHP, Jquery And Ajax234

How Do I Get Real IP AddressI Need A BlogNigerian Man Invented Algorithm That Helps Translate Languages In Real Time