1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-21 13:52:35 +02:00

Nextprev shortcode fix to handle proper dropdown navigation;

Admin UI - new nextprev parameters
This commit is contained in:
secretr
2010-05-18 15:21:42 +00:00
parent 95c46a0157
commit 74324c1043
2 changed files with 34 additions and 8 deletions

View File

@@ -1704,7 +1704,15 @@ class e_form
if($tree && $amount)
{
$parms = $total.",".$amount.",".$from.",".$url.'?'.($options['np_query'] ? $options['np_query'].'&' : '').'from=[FROM]';
// New nextprev SC parameters
$parms = 'total='.$total;
$parms .= '&amount='.$amount;
$parms .= '&current='.$from;
// NOTE - the whole url is double encoded - reason is to not break parms query string
// 'np_query' should be proper (urlencode'd) url query string
$url = rawurlencode($url.'?'.(varset($options['np_query']) ? str_replace(array('&', '&'), array('&', '&'), $options['np_query']).'&' : '').'from=[FROM]');
$parms .= '&url='.$url;
//$parms = $total.",".$amount.",".$from.",".$url.'?'.($options['np_query'] ? $options['np_query'].'&' : '').'from=[FROM]';
//$text .= $tp->parseTemplate("{NEXTPREV={$parms}}");
$nextprev = $tp->parseTemplate("{NEXTPREV={$parms}}");
if ($nextprev)