I have been expirimenting with PHP for the first time and came up with this:
I create a new page called html2ubbt.php and drop it in the root of my threads dir.
In this page I put this code:
code:
<?
// Require the library
require ("main.inc.php");
// ---------------------
// Send the page to them
$html = new html;
$html -> send_header("testpage",$Cat,0,0,0,0,$user);
$html -> table_header("testpage");
$phpurl = $config['phpurl'];
$html -> open_table();
readfile("{$config['path']}/html/test.html");
$html -> close_table();
// -------------
// Send a footer
$html -> send_footer();
Then I create a folder "html" in the threads root
In there I upload my test.html file which contains just plain html:
<br>
this is just a test<br>
<br>
this is just a test<br>
<br>
this is just a test<br>
<br>
If you go here you can see the result:
www.sat4all.com/board/html2ubbt.php What I want to do now is give the background of the table a variable which can be found in the stylesheets so the standard background color can be set to the same background color used on the forum summery page.
Then most importantly, I want to replace "testpage" with a varible called "name" which must be defined by the way you call the html2ubbt.php page.
example: yourdomain.com/ubbthreads/html2ubbt.php?name=tespage or something like that.
Then I would like to replace "test.html" with a variable "file" which calles the required file.
Example: yourdomain.com/ubbthreads/html2ubbt.php?name=tespage&file=test.html or something like that.
Can someone help me with this. It could be a nice addition to ubbthreads.
Regards,
Ron.