Thank you deka87.
you really consume your time to solve this issue.
first of all i should insist that xoops 2.5.5 failed to update templates in database.
As you can see the first 4 newbb block templates are not updated until now.
other templates are updated. I recommend you and everybody else to
copy the templates from "base file" to the "DB-default" template set in database using Altsys. then you will be sure that all templates are correctly updated. Anyway, i have this issue in my xoops websites with news, newbb and some other modules.
IMO it is a xoops 2.5.5 bug that should be investigated more and then we can send it to the tracker for core team review.
Then it seems we should investigate more in xoops files.
could you show me the content of this filein you website:
xoops-2.5.5/htdocs/modules/system/preloads/core.php
i need to know if the eventCoreIncludeFunctionsRedirectheader function works correctly.
function eventCoreIncludeFunctionsRedirectheader($args)
{
global $xoopsConfig;
$url = $args[0];
if (preg_match("/[\0-\31]|about:|script:/i", $url)) {
if (!preg_match('/^b(java)?script:([s]*)history.go(-[0-9]*)([s]*[;]*[s]*)$/si', $url)) {
$url = XOOPS_URL;
}
}
if (!headers_sent() && isset($xoopsConfig['redirect_message_ajax']) && $xoopsConfig['redirect_message_ajax']) {
$_SESSION['redirect_message'] = $args[2];
header("Location: " . preg_replace("/[&]amp;/i", '&', $url));
exit();
}
}
then also please show me the content of this file in your website:
xoops-2.5.5/htdocs/include/functions.php
around line 563:
/**
* Function to redirect a user to certain pages
*/
function redirect_header($url, $time = 3, $message = '', $addredirect = true, $allowExternalLink = false)
{
global $xoopsConfig, $xoopsLogger, $xoopsUserIsAdmin;
$xoopsPreload =& XoopsPreload::getInstance();
$xoopsPreload->triggerEvent('core.include.functions.redirectheader', array($url, $time, $message, $addredirect, $allowExternalLink));
if (preg_match("/[\0-\31]|about:|script:/i", $url)) {
if (!preg_match('/^b(java)?script:([s]*)history.go(-[0-9]*)([s]*[;]*[s]*)$/si', $url)) {
$url = XOOPS_URL;
}
}
if (!$allowExternalLink && $pos = strpos($url, '://')) {
$xoopsLocation = substr(XOOPS_URL, strpos(XOOPS_URL, '://') + 3);
if (strcasecmp(substr($url, $pos + 3, strlen($xoopsLocation)), $xoopsLocation)) {
$url = XOOPS_URL;
}
}
if (defined('XOOPS_CPFUNC_LOADED')) {
$theme = 'default';
} else {
$theme = $xoopsConfig['theme_set'];
}
require_once XOOPS_ROOT_PATH . '/class/template.php';
require_once XOOPS_ROOT_PATH . '/class/theme.php';
$xoopsThemeFactory = null;
$xoopsThemeFactory = new xos_opal_ThemeFactory();
$xoopsThemeFactory->allowedThemes = $xoopsConfig['theme_set_allowed'];
$xoopsThemeFactory->defaultTheme = $theme;
$xoTheme =& $xoopsThemeFactory->createInstance(array(
"plugins" => array(), "renderBanner" => false));
$xoopsTpl =& $xoTheme->template;
$xoopsTpl->assign(array(
'xoops_theme' => $theme ,
'xoops_imageurl' => XOOPS_THEME_URL . '/' . $theme . '/' ,
'xoops_themecss' => xoops_getcss($theme) ,
'xoops_requesturi' => htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES) ,
'xoops_sitename' => htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES) ,
'xoops_slogan' => htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES) ,
'xoops_dirname' => isset($xoopsModule) && is_object($xoopsModule) ? $xoopsModule->getVar('dirname') : 'system' ,
'xoops_pagetitle' => isset($xoopsModule) && is_object($xoopsModule) ? $xoopsModule->getVar('name') : htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES)));
if ($xoopsConfig['debug_mode'] == 2 && $xoopsUserIsAdmin) {
$xoopsTpl->assign('time', 300);
$xoopsTpl->assign('xoops_logdump', $xoopsLogger->dump());
} else {
$xoopsTpl->assign('time', intval($time));
}
if (!empty($_SERVER['REQUEST_URI']) && $addredirect && strstr($url, 'user.php')) {
if (!strstr($url, '?')) {
$url .= '?xoops_redirect=' . urlencode($_SERVER['REQUEST_URI']);
} else {
$url .= '&xoops_redirect=' . urlencode($_SERVER['REQUEST_URI']);
}
}
if (defined('SID')&& SID && (!isset($_COOKIE[session_name()]) || ($xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '' && !isset($_COOKIE[$xoopsConfig['session_name']])))) {
if (!strstr($url, '?')) {
$url .= '?' . SID;
} else {
$url .= '&' . SID;
}
}
$url = preg_replace("/&/i", '&', htmlspecialchars($url, ENT_QUOTES));
$xoopsTpl->assign('url', $url);
$message = trim($message) != '' ? $message : _TAKINGBACK;
$xoopsTpl->assign('message', $message);
$xoopsTpl->assign('lang_ifnotreload', sprintf(_IFNOTRELOAD, $url));
$xoopsTpl->display('db:system_redirect.html');
exit();
}
Mamba: if you could find sometime and work on this issue in newbb it would be great.
IMO it is much more important than adding module admin class GUI to the old modules.
then we can have a newbb ready for release.
I hope Alfred continue this newbb module development because it needs some hardcodes removing by an expert.
some pages like print.php should be completly rewrite and also some permissions like "access to pdf creation" should be added.