nice one Xenon, can you possibly help me further I am have problems doing what I want.
I wanted to make a link on the forum threads ( in the forumdisplay ) so that users can click on them and sort them in set order.
Ie a link next to the thread starters name that when pressed sorts the posts in that thread but also sorts them in the order of lastpost.
So the link I have tried is
/forumdisplay.php?s=&forumid=$forumid&sortfield=pos tusername,%20lastpost&sortorder=asc
It dont work, so I tried this
/forumdisplay.php?s=&forumid=$forumid&sortfield=tes t&sortorder=asc
then in forumdisplay found
PHP Code:
switch ($sortfield) {
case 'title':
case 'lastpost':
case 'replycount':
case 'views':
case 'postusername':
case 'voteavg':
And added
after it, and found
PHP Code:
if ($sortfield=="voteavg" and !$foruminfo[allowratings]) {
$sortfield="lastpost";
}
and added after it
PHP Code:
if ($sortfield=="test"){
$sortfield="postusername, lastpost";
}
I get the error
Parse error: parse error, unexpected ',', expecting ']' in C:\Network\Apache2\htdocs\request\forumdisplay.php (702) : eval()'d code on line 1
It dont seem to work even with the error there ?
Can you point me in the direction as to what I need to change ?
Thanks