Return to Snippet

Revision: 54228
at December 15, 2011 20:04 by G470

Initial Code
if (!defined('SITE')) exit('No direct script access allowed');

function nextlink(){
$OBJ = get_instance();
global $rs;

$pages = $OBJ->db->fetchArray("SELECT id, url
FROM ".PX."objects, ".PX."sections
WHERE status = '1'
AND hidden != '1'
AND section_id = secid
ORDER BY sec_ord ASC, ord ASC");

if (!$pages) return 'Error with pages query';
foreach ($pages as $reord){
$order[$reord['sec_desc']][] = array(
'id' => $reord['id'],
'url' => $reord['url']);
$active = false;
foreach($order as $key => $out)
foreach($out as $page){
if ($active==true){
$active = false;}
$active = ($rs['id'] == $page['id']) ? true : false;
$next .= "<a href='".BASEURL.ndxz_rewriter($nextlink)."'>NEXT</a>";
return $next;

Initial URL

Initial Description
Save this as plugin.nextlink.php to your ndxz-studio/site/plugin folder. Call the Plugin where you need it: &lt;plug:nextlink /&gt;

Original by "gd"

Initial Title
Indexhibit nextlink

Initial Tags

Initial Language