Topic: [HACK] Next/Previous Links
Name: Next/Previous Links
Author: StealthEye
CuteNews Compatibility: 1.3.6 - * (no incompatibility reported yet)
Description: Go to the next or previous story when looking at your full story.
Instructions:
// Prev Next For Full Story
$index = array_search($active_news, $all_active_news);
$prev = explode("|", $all_active_news[$index - 1], 2);
$next = explode("|", $all_active_news[$index + 1], 2);
$next_link =
"$PHP_SELF?subaction=showfull&id=$next[0]&archive=$archive&start_from=$start_from&ucat=$ucat&$us
er_query";
$prev_link =
"$PHP_SELF?subaction=showfull&id=$prev[0]&archive=$archive&start_from=$start_from&ucat=$ucat&$us
er_query";
$output = str_replace("[next]", $next[0] ? "[url=]" : "", $output);
$output = str_replace("[prev]", $prev[0] ? "<a href=\"$prev_link\">" : "", $output);
$output = str_replace("[/next]", $next[0] ? "[/url]" : "", $output);
$output = str_replace("[/prev]", $prev[0] ? "</a>" : "", $output);
// End Prev Next For Full Story
add it below the 1st instance of
$output = str_replace("{cute-http-path}", $config_http_script_dir, $output);
That's around line 250 in SHOWS.INC.PHP in your INC folder.
TO INCLUDE THE NEXT/PREV LINKS IN YOUR TEMPLATE:
[next]<< Next[/next] - [prev]Previous >>[/prev]