$page ) $direction = 'older'; else $direction = 'newer'; } else { if ( $current_page < $page ) $direction = 'older'; else $direction = 'newer'; } return 'http://ajax-scroll175926233/javascript:ajax_scroll(\'' . $direction . '\', \'' . urlencode($link) . '\', \'' . $as_elem_id . '\');'; } public function fix_link($link) { if ( substr($link, 0, 39) == 'http://ajax-scroll175926233/javascript:' ) return substr_replace($link, '', 0, 28); return $link; } /* * $url - URI to pull contents from * $direction - "newer" or "older" * $text - text to link * $container - id of the element that will be transitioned */ static public function generateLink($url, $direction, $text, $container='') { if ( empty($container) ) { global $as_elem_id; $container = $as_elem_id; } echo '', $text, ''; } static public function get_generateLink($url, $direction, $container='') { if ( empty($container) ) { global $as_elem_id; $container = $as_elem_id; } return 'ajax_scroll(\'' . $direction . '\', \'' . urlencode($url) . '\', \'' . $container . '\');'; } }