Quote:
Originally Posted by NonCompare
Now my problem is I don't know how to implement that so-called outside variables, so that when I click Articles(2), for example, it will go to view.php?pg=articles&forumid=2 and will display all threads that belong to Articles category. But remeber it use the same template, so if I click Introduction again, for example, it will go again to view.php?pg=articles&this_forumid_here_will_change _accordingly
|
If I understand it correctly, it sounds possible. You need to put "forumid" into "Outside Variables" section of your webtemplate.
Then create a new webquery that depends on this very $forumid variable. Eg.
-----------------
SELECT threadid, title, postusername,postuserid,dateline
FROM " . TABLE_PREFIX . "thread
WHERE sticky=0 AND visible=1 AND forumid='$forumid'
ORDER BY dateline DESC
LIMIT 10
---------------------
In this webquery also makes sure you enter this line to "Query PHPInclude Code" :
PHP Code:
$forumid = intval($forumid);
Now you can include this webquery in your webtemplate and everytime you call your webtemplate with a new "$forumid" value, the content of it will change.
Is this what you wanted to achieve?