aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-07-14 20:39:46 -0700
committerfriendica <info@friendica.com>2012-07-14 20:39:46 -0700
commit03209d2d0dc6b0ceed2325bff598fede2c538301 (patch)
treefb230666b2b79f97ddd744fe155a4b088640ad29 /include
parenta20a6377277a985fa596b0ea460d91b97f79b4a5 (diff)
downloadvolse-hubzilla-03209d2d0dc6b0ceed2325bff598fede2c538301.tar.gz
volse-hubzilla-03209d2d0dc6b0ceed2325bff598fede2c538301.tar.bz2
volse-hubzilla-03209d2d0dc6b0ceed2325bff598fede2c538301.zip
updates
Diffstat (limited to 'include')
-rw-r--r--include/text.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/text.php b/include/text.php
index aa377dd68..7163d5e88 100644
--- a/include/text.php
+++ b/include/text.php
@@ -280,6 +280,31 @@ function paginate(&$a) {
return $o;
}}
+if(! function_exists('alt_pager')) {
+function alt_pager(&$a, $i) {
+ $o = '';
+ $stripped = preg_replace('/(&page=[0-9]*)/','',$a->query_string);
+ $stripped = str_replace('q=','',$stripped);
+ $stripped = trim($stripped,'/');
+ $pagenum = $a->pager['page'];
+ $url = $a->get_baseurl() . '/' . $stripped;
+
+ $o .= '<div class="pager">';
+
+ if($a->pager['page']>1)
+ $o .= "<a href=\"$url"."&page=".($a->pager['page'] - 1).'">' . t('newer') . '</a>';
+ if($i>0) {
+ if($a->pager['page']>1)
+ $o .= "&nbsp;-&nbsp;";
+ $o .= "<a href=\"$url"."&page=".($a->pager['page'] + 1).'">' . t('older') . '</a>';
+ }
+
+
+ $o .= '</div>'."\r\n";
+
+ return $o;
+}}
+
// Turn user/group ACLs stored as angle bracketed text into arrays
if(! function_exists('expand_acl')) {