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:
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.
To make it a bit simpler for those wanting to use it for their portal page, I've attached a file below. Change the path toward the bottom to match your path, rename the extension to index.php and upload where you need it.
Also both the columns are being displayed on the left.
This is fairly straight foward, so not sure where I have gone wrong - unless I should have more info in the template - I assume this just contains the raw html from the main body of the page and nothing else.
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.
This works great for my custom pages.
Code
// 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"); ?>
When I follow the instructions for that, it works BUT when visiting the generated page it shows me as logged out. What do I need to add?
// Get all the info $wowConnect = mysql_connect($config['dbserver'], $config['dbuser'], $config['dbpass']); if ($wowConnect){ mysql_select_db($config['dbname'], $wowConnect); }
could someone explain to me in layman's terms what this all allows me to do? I think this is an answer i've been looking for, but i'm a little confused about it, and would like to clear it up before I start to really dig into it and get moving on it.
essentially it allows you to have one or more pages with your own content (within the template page) on your site, whilst still retaining the header, footer, sidebars, breadcrumbs etc.
We have around 100 other pages on our site.
It can be used for anything.
Of course it is simple to add further scripting into those pages.
The page that the user sees is external to UBB (and can be anywhere on your domain) - however you will need to upload the script page to the scripts folder and the template page to the templates/default folder.
For the various scripts and template pages I preceded these files with ff for FansFocus.Com so that I can easily find them within the folders. They do not need to be the same name as the page the user sees on your site.
Just follow the examples shown above and you should be fine
Would it be possible to have this generic page configured such that the left and/or right columns could be on or off? Or does the user's preference setting prevent this?
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.
I have tried unsuccessfully to make a generic page (inside of the forum directory). While there is a sample.inc.php script, there is no sample.tpl file I can use, and as a complete newbie with no real desire to learn php, I have no idea where to start.
Is this documented somewhere? I guess what I need is a step by step instruction on how to make generic pages (for dummies) - which I will use for static link collections, about-texts etc.
I am not trying to make anything complicated, just a static custom page with some plain html content.
While fiddling around with this, I got the following error when trying to view my page:
page_about_gpc not found!
Any help/pointers or links to instructions would be highly appreciated.
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.