Quote:
Originally Posted by Spinball
No, the php in the CODE does not work - the PHP bit is not run.
The image I showed you is an example of what it SHOULD look like if the PHP worked.
I suspect what I need to do is alter the hack itself to process the header and footer so that php script is run.
I'm confidant with PHP but hacking vBulletin is something entirely different.
|
OK, so you have an HTML file you want to include in your Forum Home page?
Here is what I tried (and IT WORKED!!!)
Edit your index.php file and find:
PHP Code:
require_once('./includes/functions_forumlist.php');
Below that, add:
PHP Code:
// effort to help
globalize($_REQUEST, array(
'file' => STR,
'title' => STR
));
$file="announcement.htm";
$exts = "html, htm, txt, shtml";
$formats = explode(",",str_replace(" ", "", strtolower($exts)));
function checkfile($file, $formats) {
$ext = strtolower(substr($file,-strpos(strrev($file),'.')));
if(!in_array($ext, $formats)) return FALSE;
if(!file_exists($file)) return FALSE;
if( substr($file,0,5) != "./../" && substr($file,0,7) != "http://" ) return TRUE;
return FALSE;
}
if (checkfile($file, $formats)) {
$fd = fopen ($file,"r");
$buffer = fread($fd,filesize($file));
fclose ($fd);
$buffer = str_replace('"',"'",$buffer);
} else {
$errormessage = "There is an error with this link: $file";
}
// $navbits[""] = $pagetitle;
// $navbits = construct_navbits($navbits);
eval("\$HTML = \"$buffer\";");
// end of effort to help
Remember to change $file="announcement.htm" in the code above, to whatever your file name is.
Then, go into your FORUMHOME template and find :
Below that, add:
It worked on my forum, but you might have to play a bit with it, I am not sure if errors are handled etc.
Rgds