Mas*Mind
10-30-2001, 10:00 PM
For those that find it usefull and like to play around with XML and that kind of cool stuff, I've made a hack that returns a threadlist in XML format, sortable by lastpost, title, postusername, views, replycount or forumid; ascending or descending and on a limit of threads to be returned.
I'll try to create an XSL stylesheet for it later on.
It's only tested in v2.0.0 since I didn't upgraded yet, but I expect it to work in all latest versions (>= 2.0.0)
If you don't know what XML is about and what you can do with this hack, don't even bother to install it or go and search on the net to find out more about this matter.
Demo (http://feyenoord.messagebase.nl/fmbxmltracker.php?orderby=views&sortorder=asc&nr=15)
there are three variables that you can pass on in the URL: nr, sortorder and orderby
nr will specify how many threads should be returned and can contain any number between 0 and the number you specify in the $maximumThreads variable (currently 15)
orderby will specify against which database-field will be ordered and can contain: lastpost, title, postusername, views, replycount or forumid. If nothing specified or a unknown columns specified 'lastpost' will be used.
sortorder will specify if either ascending or descending will be ordered and can contain 'asc' or 'desc'
if you don't specify anything nr will default to 15 (can be changed in the variable $maximumThreads), orderby will default to 'lastpost' (can be changed in the variable $defaultOrder) and sortorder will default to 'desc'
Installation instructions:
download the attached vbxmltracker.php.txt
change these variables to reflect to your needs:
$defaultOrder (the database-field against which is ordered if no orderby field is specified)
$dateFormat (the dateformat, NOT the same as in your general settings more info (http://www.php.net/manual/en/function.strftime.php))
$forumsNotToInclude (the forumid's of the forums which you don't wanna include in the threadlist)
$maximumThreads (the maximum number of threads that can be requested)
$customError (a custom error-msg, on this moment not used)
$errmsg (the xml-string to be presented when a error occurs)
$xmlFormat (the xml-string for each thread)
$orderByOptions (the database fields against which the threadlist can be ordered)
$locale (the locale setting in order to change the date-format to your country's language and format, more info (http://www.php.net/manual/en/function.strftime.php)
If you don't understand any of these variables, I suggest you to leave them as is
rename the attached text file to a name with a .php or .php3 or any other php-executable extension and upload it to your vb root-folder
Do everything I forgot to mention :D
enjoy!
I'll try to create an XSL stylesheet for it later on.
It's only tested in v2.0.0 since I didn't upgraded yet, but I expect it to work in all latest versions (>= 2.0.0)
If you don't know what XML is about and what you can do with this hack, don't even bother to install it or go and search on the net to find out more about this matter.
Demo (http://feyenoord.messagebase.nl/fmbxmltracker.php?orderby=views&sortorder=asc&nr=15)
there are three variables that you can pass on in the URL: nr, sortorder and orderby
nr will specify how many threads should be returned and can contain any number between 0 and the number you specify in the $maximumThreads variable (currently 15)
orderby will specify against which database-field will be ordered and can contain: lastpost, title, postusername, views, replycount or forumid. If nothing specified or a unknown columns specified 'lastpost' will be used.
sortorder will specify if either ascending or descending will be ordered and can contain 'asc' or 'desc'
if you don't specify anything nr will default to 15 (can be changed in the variable $maximumThreads), orderby will default to 'lastpost' (can be changed in the variable $defaultOrder) and sortorder will default to 'desc'
Installation instructions:
download the attached vbxmltracker.php.txt
change these variables to reflect to your needs:
$defaultOrder (the database-field against which is ordered if no orderby field is specified)
$dateFormat (the dateformat, NOT the same as in your general settings more info (http://www.php.net/manual/en/function.strftime.php))
$forumsNotToInclude (the forumid's of the forums which you don't wanna include in the threadlist)
$maximumThreads (the maximum number of threads that can be requested)
$customError (a custom error-msg, on this moment not used)
$errmsg (the xml-string to be presented when a error occurs)
$xmlFormat (the xml-string for each thread)
$orderByOptions (the database fields against which the threadlist can be ordered)
$locale (the locale setting in order to change the date-format to your country's language and format, more info (http://www.php.net/manual/en/function.strftime.php)
If you don't understand any of these variables, I suggest you to leave them as is
rename the attached text file to a name with a .php or .php3 or any other php-executable extension and upload it to your vb root-folder
Do everything I forgot to mention :D
enjoy!