Good day
Need a little help or advice.
How not to show long list of forum ids when changing pages?
Because now when choose several forums and press page 2, the link is
test.php?do=show&pp=20&page2&forum[]=91&forum[]=95&forum[]=99.
Is there a way I can hide from url such string '&forum[]=91&forum[]=95&forum[]=99' and keep work page navigation?
For one of my new pages I use Multiselect, i mean something like this in template
Code:
<label for="select_forum">Choose forum</label>
<select name="forum[]" id="select_forum" size="4" style="display:block" multiple="multiple">
<option value="0" $noforumselected>All forums</option>
<option value="91">Test forum1 with forumid 91</option>
<option value="95">Test forum2 with forumid 95</option>
<option value="99">Test forum2 with forumid 99</option>
</select>
This code i put into form
Code:
<form action="test.php?do=show" method="post">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="page" value="$pagenumber" />
<input type="hidden" name="pp" value="$perpage" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="do" value="viewthreads" />
<label for="select_forum">Choose forum</label>
<select name="forum[]" id="select_forum" size="4" style="display:block" multiple="multiple">
<option value="0" $noforumselected>All forums</option>
<option value="91">Test forum1 with forumid 91</option>
<option value="95">Test forum2 with forumid 95</option>
<option value="99">Test forum2 with forumid 99</option>
</select>
</form>
In test.php i have required code for working page navigation
PHP Code:
.............
.............
// ###############################
if ($_REQUEST['do'] == 'show')
{
$vbulletin->input->clean_array_gpc('r', array(
'perpage' => TYPE_UINT,
'pagenumber' => TYPE_UINT,
'daysprune' => TYPE_INT,
'sortfield' => TYPE_NOHTML,
'sortorder' => TYPE_NOHTML,
'forum' => TYPE_ARRAY,
));
............
............
$sortfield =& $vbulletin->GPC['sortfield'];
$perpage =& $vbulletin->GPC['perpage'];
$pagenumber =& $vbulletin->GPC['pagenumber'];
$daysprune =& $vbulletin->GPC['daysprune'];
$forum =& $vbulletin->GPC['forum'];
............
............
$sorturl = "test.php?" . $vbulletin->session->vars['sessionurl'] . "do=show&forum[]=" . implode('&forum[]=', $vbulletin->GPC['forum']) . "&pp=$perpage&daysprune=$daysprune";
$pagenav = construct_page_nav($pagenumber, $perpage, $totalthreads, $sorturl . "&sort=$sortfield" . iif(!empty($vbulletin->GPC['sortorder']), "&order=" . $vbulletin->GPC['sortorder']));