Ahmad
16 Apr 2004, 21:53
Hi,
This is my first public hack. I hope I'm not breaking any rules! :rolleyes:
This is an enhanced version of external.php that gives you two little useful features:
1. Control the number of threads you want to get (up to 50 threads, or even more).
2. Change the order of threads from the date of the thread to the date of the last post.
This will allow you to make an external list of your latest XX posts using JavaScript, XML, or RSS.
Installation
1. Make a copy of the file external.php in the same directory and call it external2.php.
2. Open external2.php in your favorite text editor.
3. Look for these lines:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Add these lines above them:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Then find these two lines:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
And replace them with:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Usage
Just like you would use external.php, but with the following extra parameters:
1. limit: this controls the number of threads you want to be displayed. You cannot go beyond 50 here. If not set to anything, it will return 15 threads.
2. orderby: if set to 'lastpost', it will give you the last XX number of threads based on the last post to the thread. If set to anything else (or not set at all), it will give you the last XX number of threads based on their start date (this order doesn't change when someone replies to a thread).
If you ignore both extra parameters limit and orderby, the script will act just like the normal external.php. So, you can use it in place of external.php, instead of as an second (external2.php) script.
I hope you will find it useful.
This is my first public hack. I hope I'm not breaking any rules! :rolleyes:
This is an enhanced version of external.php that gives you two little useful features:
1. Control the number of threads you want to get (up to 50 threads, or even more).
2. Change the order of threads from the date of the thread to the date of the last post.
This will allow you to make an external list of your latest XX posts using JavaScript, XML, or RSS.
Installation
1. Make a copy of the file external.php in the same directory and call it external2.php.
2. Open external2.php in your favorite text editor.
3. Look for these lines:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Add these lines above them:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Then find these two lines:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
And replace them with:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Usage
Just like you would use external.php, but with the following extra parameters:
1. limit: this controls the number of threads you want to be displayed. You cannot go beyond 50 here. If not set to anything, it will return 15 threads.
2. orderby: if set to 'lastpost', it will give you the last XX number of threads based on the last post to the thread. If set to anything else (or not set at all), it will give you the last XX number of threads based on their start date (this order doesn't change when someone replies to a thread).
If you ignore both extra parameters limit and orderby, the script will act just like the normal external.php. So, you can use it in place of external.php, instead of as an second (external2.php) script.
I hope you will find it useful.