Topic: punBB more integration-friendly
Some small hacks that could be added to vanilla punBB.
header.php
change:
<link rel="stylesheet" type="text/css" href="style/<?php echo $pun_user['style'].'.css' ?>" />
to:
<link rel="stylesheet" type="text/css" href="<?PHP echo PUN_ROOT.'/'; ?>style/<?php echo $pun_user['style'].'.css' ?>" />
CSS is visible for punbb pages included from outsite the forum (like in a script).
register.php
- form ACTION could be changed to:
<?PHP
IF(ereg('\?', $_SERVER['REQUEST_URI']))
{
$act = $_SERVER['REQUEST_URI'].'&';
}
else
{
$act = $_SERVER['REQUEST_URI'].'?';
}
?>
<form id="register" method="post" action="<?PHP echo $act; ?>action=register" onsubmit="this.register.disabled=true;if(process_form(this)){return true;}else{this.register.disabled=false;return false;}">
(instead register.php?action=register)
and
require PUN_ROOT.'include/common.php';
to:
require_once PUN_ROOT.'include/common.php';
Allows adding registration in the integrated script in your CMS/Script add:
include_once PUN_ROOT.'register.php';
and you will have punBB registration - it will look like punBB but it will "use" the script links like "index.php?mod=user&act=register" for my RkCMF