diff --git a/main/inc/ajax/social.ajax.php b/main/inc/ajax/social.ajax.php index e42b85abdc..ec89f0ef90 100755 --- a/main/inc/ajax/social.ajax.php +++ b/main/inc/ajax/social.ajax.php @@ -188,7 +188,7 @@ switch ($action) { case 'listWallMessage': $start = isset($_REQUEST['start']) ? intval($_REQUEST['start']) - 1 : 0; $length = isset($_REQUEST['length']) ? intval($_REQUEST['length']) : 10; - $userId = api_get_user_id(); + $userId = isset($_REQUEST['u']) ? intval($_REQUEST['u']) : api_get_user_id(); $array = SocialManager::getWallMessagesPostHTML($userId, $friendId, null, $length, $start); if (!empty($array)) { ksort($array); @@ -201,15 +201,14 @@ switch ($action) { $html .= Display::div( Display::url( get_lang('Next'), - api_get_self() . '?a=listWallMessage&start=' . + api_get_self() . '?u=' . $userId . '&a=listWallMessage&start=' . ($start + $length + 1) . '&length=' . $length, array( 'class' => 'nextPage', - 'style' => 'display: none;', ) ), array( - 'class' => 'next' + 'class' => 'next', ) ); echo $html; diff --git a/main/inc/lib/javascript/jquery-timeago/LICENSE.txt b/main/inc/lib/javascript/jquery-timeago/LICENSE.txt new file mode 100644 index 0000000000..fbc801d007 --- /dev/null +++ b/main/inc/lib/javascript/jquery-timeago/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright (c) 2008-2013 Ryan McGeary + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/main/inc/lib/javascript/jquery-timeago/README.markdown b/main/inc/lib/javascript/jquery-timeago/README.markdown new file mode 100644 index 0000000000..72b7ebf188 --- /dev/null +++ b/main/inc/lib/javascript/jquery-timeago/README.markdown @@ -0,0 +1,109 @@ +# timeago: a jQuery plugin + +Timeago is a jQuery plugin that makes it easy to support automatically updating +fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago") from ISO 8601 +formatted dates and times embedded in your HTML (à la microformats). + +## How You Can Help + +**If you like this project, please help. [Donate via Gittip][gittip] or [buy me a coffee with Bitcoin][bitcoin].**
+[![Gittip](http://img.shields.io/gittip/rmm5t.svg)][gittip] +[![Bitcoin](http://img.shields.io/badge/bitcoin-buy%20me%20a%20coffee-brightgreen.svg)][bitcoin] + +**[Bitcoin][bitcoin]**: `1rmm5tv6f997JK5bLcGbRCZyVjZUPkQ2m`
+[![Bitcoin Donation][bitcoin-qr-small]][bitcoin-qr-big] + +## Need Help? + +**You can [book a session with me on Codementor][codementor].**
+[![Book a Codementor session](http://img.shields.io/badge/codementor-book%20a%20session-orange.svg)][codementor] + +[gittip]: https://www.gittip.com/rmm5t/ "Donate to rmm5t for open source!" +[bitcoin]: https://blockchain.info/address/1rmm5tv6f997JK5bLcGbRCZyVjZUPkQ2m "Buy rmm5t a coffee for open source!" +[bitcoin-scheme]: bitcoin:1rmm5tv6f997JK5bLcGbRCZyVjZUPkQ2m?amount=0.01&label=Coffee%20to%20rmm5t%20for%20Open%20Source "Buy rmm5t a coffee for open source!" +[bitcoin-qr-small]: http://chart.apis.google.com/chart?cht=qr&chs=150x150&chl=bitcoin%3A1rmm5tv6f997JK5bLcGbRCZyVjZUPkQ2m%3Famount%3D0.01%26label%3DCoffee%2520to%2520rmm5t%2520for%2520Open%2520Source +[bitcoin-qr-big]: http://chart.apis.google.com/chart?cht=qr&chs=500x500&chl=bitcoin%3A1rmm5tv6f997JK5bLcGbRCZyVjZUPkQ2m%3Famount%3D0.01%26label%3DCoffee%2520to%2520rmm5t%2520for%2520Open%2520Source +[codementor]: https://www.codementor.io/rmm5t?utm_campaign=profile&utm_source=button-rmm5t&utm_medium=shields "Book a session with rmm5t on Codementor!" + +## Usage + +First, load jQuery and the plugin: + +```html + + +``` + +Now, let's attach it to your timestamps on DOM ready - put this in the head +section: + +```html + +``` + +This will turn all abbr elements with a class of timeago and an ISO 8601 +timestamp in the title (conforming to the +[datetime design pattern microformat](http://microformats.org/wiki/datetime-design-pattern)): + +```html +December 17, 2011 +``` + +into something like this: + +```html +about 1 day ago +``` + +HTML5 `