This is a small problem occuring, when I use PHP-Nuke 6.8 and bbtonuke 2.0.4-2.0.6. I use Swedish language files completely translated. When I go to the Forums I see like you do above here Site name: Forums, but in Swedish it should be just Site name: Forum without s.
Grateful for suggestions in how to fix this. I have tried but failed.
Slackervara
Slackervaara Captain
Joined: Sep 13, 2003
Posts: 314
Posted:
Wed Oct 08, 2003 12:57 pm
I think this part of the code in pageheader.php is responsible:
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}
I'm Bulgarian and I had the same problem after upgrading to phpBB 2.0.5
My bulgarian Buttons did not appear. Instead I had the English one.
The postet above code is from phpBB 2.0.4 version and I think that this is the correct one.
After I replased the new pageheader.php with the old one, everythink went back to the right way. Now I have my bulgarian buttons back.
I do not know if it is wrong to replace the new with the old pageheader.php. To me it works just fine.
If you do not have the old file, here it is:
Code:
<?php
/***************************************************************************
* page_header.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: page_header.php,v 1.106.2.11 2002/12/19 17:17:39 psotfx Exp $
*
*
***************************************************************************/
/***************************************************************************
* phpbb2 forums port version 2.1 (c) 2003 - Nuke Cops (http://nukecops.com)
*
* Ported by Paul Laudanski (Zhen-Xjell) to phpbb2 standalone 2.0.4. Test
* and debugging completed by the Elite Nukers at Nuke Cops: ArtificialIntel,
* Chatserv, MikeM, sixonetonoffun, Zhen-Xjell. Thanks to some heavy debug
* work by AI in Nuke 6.5.
*
* You run this package at your sole risk. Nuke Cops and affiliates cannot
* be held liable if anything goes wrong. You are advised to test this
* package on a development system. Backup everything before implementing
* in a production environment. If something goes wrong, you can always
* backout and restore your backups.
*
* Installing and running this also means you agree to the terms of the AUP
* found at Nuke Cops.
*
* This is version 2.1 of the phpbb2 forum port for PHP-Nuke. Work is based
* on Tom Nitzschner's forum port version 2.0.6. Tom's 2.0.6 port was based
* on the phpbb2 standalone version 2.0.3. Our version 2.1 from Nuke Cops is
* now reflecting phpbb2 standalone 2.0.4 that fixes some major SQL
* injection exploits.
***************************************************************************/
/***************************************************************************
* This file is part of the phpBB2 port to Nuke 6.0 (c) copyright 2002
* by Tom Nitzschner (tom@toms-home.com)
* http://bbtonuke.sourceforge.net (or http://www.toms-home.com)
*
* As always, make a backup before messing with anything. All code
* release by me is considered sample code only. It may be fully
* functual, but you use it at your own risk, if you break it,
* you get to fix it too. No waranty is given or implied.
*
* Please post all questions/request about this port on http://bbtonuke.sourceforge.net first,
* then on my site. All original header code and copyright messages will be maintained
* to give credit where credit is due. If you modify this, the only requirement is
* that you also maintain all original copyright messages. All my work is released
* under the GNU GENERAL PUBLIC LICENSE. Please see the README for more information.
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}
global $name, $sitename, $is_inline_review;
$sql = "SELECT custom_title from ".$prefix."_modules where name='$name'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
if ($row[custom_name] == "") {
$mod_name = ereg_replace("_", " ", $name);
} else {
$mod_name = $row[custom_name];
}
if (!$is_inline_review AND $mod_name != "Private Messages") {
title("$sitename: $mod_name");
}
OpenTable();
if ( $phpver >= '4.0.4pl1' && ( strstr($useragent,'compatible') || strstr($useragent,'Gecko') ) )
{
if ( extension_loaded('zlib') )
{
ob_start('ob_gzhandler');
}
}
else if ( $phpver > '4.0' )
{
if ( strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip') )
{
if ( extension_loaded('zlib') )
{
$do_gzip_compress = TRUE;
ob_start();
ob_implicit_flush(0);
header('Content-Encoding: gzip');
}
}
}
}
//
// Parse and show the overall header.
//
// It'll supress the forum header for the PM and Member List.
// It's turned off for now, but you can turn it on if needed.
// if you do turn it on, also enable part 2 at the end of this file.
//
//
// Obtain number of new private messages
// if user is logged in
//
if ( $userdata['session_logged_in'] )
{
if ( $userdata['user_new_privmsg'] )
{
$l_message_new = ( $userdata['user_new_privmsg'] == 1 ) ? $lang['New_pm'] : $lang['New_pms'];
$l_privmsgs_text = sprintf($l_message_new, $userdata['user_new_privmsg']);
if ( $userdata['user_last_privmsg'] > $userdata['user_lastvisit'] )
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_last_privmsg = " . $userdata['user_lastvisit'] . "
WHERE user_id = " . $userdata['user_id'];
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update private message new/read time for user', '', __LINE__, __FILE__, $sql);
}
if ( !empty($userdata['user_popup_pm']) )
{
$template->assign_block_vars('switch_enable_pm_popup', array());
}
}
//
// Part 2 of header switching is below.
//
// if ($show_header AND (is_active("Forums"))) {
// $template->pparse('forum_header');
// } else {
$template->pparse('overall_header');
// }
?>
I did not have time to check where it is changed and to correct only that lines, but there is new line at the very begining of the new file:
define('HEADER_INC', TRUE);
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum