[7.x] Generic Page Outside of forum directory - 01/15/2007 6:58 AM
In UBB.Threads 7, a /scripts/sample.inc.php file is provided to help you create your own custom pages as needed.
For example, you can duplicate the /scripts/sample.inc.php file to /scripts/mypage.inc.php Then create a /templates/default/mypage.tpl template file with the HTML for your page.
Then visiting ubbthreads.php?ubb=mypage will load that page.
But if you need to have this page appear outside of your forum directory, you can create a PHP script elsewhere on your site to load this page from within UBBThreads. Here's how.
For example create a "mypage.php" script elsewhere on your site which looks like this:
You will need to edit the variable to match the name of the thread script and template you created above, and you'll also need to edit the full path to your UBB.Threads directory.
Thanks to Allen for requesting this.
For example, you can duplicate the /scripts/sample.inc.php file to /scripts/mypage.inc.php Then create a /templates/default/mypage.tpl template file with the HTML for your page.
Then visiting ubbthreads.php?ubb=mypage will load that page.
But if you need to have this page appear outside of your forum directory, you can create a PHP script elsewhere on your site to load this page from within UBBThreads. Here's how.
For example create a "mypage.php" script elsewhere on your site which looks like this:
Code
<?php
// Generic UBBThreads wrapper
// This allows you to access a UBBThreads 7 script from outside
// The UBBThreads directory.
//
// Instructions: create your sample.inc.php script and sample.tmp file
// (follow the example Groupee provided) you can rename as needed if you
// need more pages. Then create this script wherever you wish on your server.
// Edit the variable and full path as needed.
// Set this variable to whatever scriptname.inc.php file you have included in /scripts
$_REQUEST['ubb'] = "mypage";
// Set the full path to your ubbthreads.php file
include("/home/threads/public_html/ubb7/ubbthreads.php");
?>
You will need to edit the variable to match the name of the thread script and template you created above, and you'll also need to edit the full path to your UBB.Threads directory.
Thanks to Allen for requesting this.