1
libkhorse
Re:NewBB Module - Blank Page after submitting a posting
  • 2004/10/7 4:04

  • libkhorse

  • Just popping in

  • Posts: 4

  • Since: 2004/9/17


Hi! tedsmith
It's nothing.

1. Sorry, I have made a mistake. the file name of mine is also notification.inc.php not notification.php.
2. I mean make sure the things in the second quote (here is E:/Www/xoops) in the following line in mainfile.php to be lowercase
define('XOOPS_ROOT_PATH', 'E:/Www/xoops');

So for better, this line after modified should be like :
define('XOOPS_ROOT_PATH', 'e:/www/xoops');



2
libkhorse
Re:NewBB Module - Blank Page after submitting a posting
  • 2004/10/6 7:21

  • libkhorse

  • Just popping in

  • Posts: 4

  • Since: 2004/9/17


By the way!
The problem is caused by php's include_once() function and this function's case sensitive attribute. So when your host is based on windows, be careful at the XOOPS_ROOT_PATH defined in mainfile.php, make it all lowercase will be safe.
As that reason even the newbb2 will probably cause the problem too!



3
libkhorse
Re:NewBB Module - Blank Page after submitting a posting
  • 2004/10/6 7:07

  • libkhorse

  • Just popping in

  • Posts: 4

  • Since: 2004/9/17


Hi! sorry, these day is our national day, so I'm on vacation. Now I'm back.
:)
I mean that just replace all contents in the /modules/newbb/include/notification.php (not the newbb\functions.php) with the following codes :

<?php
//  ------------------------------------------------------------------------ //
//                XOOPS - PHP Content Management System                      //
//                    Copyright (c) 2000 XOOPS.org                           //
//                       <https://xoops.org/>                             //
//  ------------------------------------------------------------------------ //
//  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.                                      //
//                                                                           //
//  You may not change or alter any portion of this comment or credits       //
//  of supporting developers from this source code or any supporting         //
//  source code which is considered copyrighted (c) material of the          //
//  original comment or credit authors.                                      //
//                                                                           //
//  This program is distributed in the hope that it will be useful,          //
//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
//  GNU General Public License for more details.                             //
//                                                                           //
//  You should have received a copy of the GNU General Public License        //
//  along with this program; if not, write to the Free Software              //
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
//  ------------------------------------------------------------------------ //

if ( !defined('NEWBB_NOTIFY_ITEMINFO') ) {
define('NEWBB_NOTIFY_ITEMINFO'1);

    function 
newbb_notify_iteminfo($category$item_id)
    {
        
$module_handler =& xoops_gethandler('module');
        
$module =& $module_handler->getByDirname('newbb');

        if (
$category=='global') {
            
$item['name'] = '';
            
$item['url'] = '';
            return 
$item;
        }

        global 
$xoopsDB;
        if (
$category=='forum') {
            
// Assume we have a valid forum id
            
$sql 'SELECT forum_name FROM ' $xoopsDB->prefix('bb_forums') . ' WHERE forum_id = '.$item_id;
            
$result $xoopsDB->query($sql); // TODO: error check
            
$result_array $xoopsDB->fetchArray($result);
            
$item['name'] = $result_array['forum_name'];
            
$item['url'] = XOOPS_URL '/modules/' $module->getVar('dirname') . '/viewforum.php?forum=' $item_id;
            return 
$item;
        }

        if (
$category=='thread') {
            
// Assume we have a valid topid id
            
$sql 'SELECT t.topic_title,f.forum_id,f.forum_name FROM '.$xoopsDB->prefix('bb_topics') . ' t, ' $xoopsDB->prefix('bb_forums') . ' f WHERE t.forum_id = f.forum_id AND t.topic_id = '$item_id ' limit 1';
            
$result $xoopsDB->query($sql); // TODO: error check
            
$result_array $xoopsDB->fetchArray($result);
            
$item['name'] = $result_array['topic_title'];
            
$item['url'] = XOOPS_URL '/modules/' $module->getVar('dirname') . '/viewtopic.php?forum=' $result_array['forum_id'] . '&topic_id=' $item_id;
            return 
$item;
        }

        if (
$category=='post') {
            
// Assume we have a valid post id
            
$sql 'SELECT subject,topic_id,forum_id FROM ' $xoopsDB->prefix('bb_posts') . ' WHERE post_id = ' $item_id ' LIMIT 1';
            
$result $xoopsDB->query($sql);
            
$result_array $xoopsDB->fetchArray($result);
            
$item['name'] = $result_array['subject'];
            
$item['url'] = XOOPS_URL '/modules/' $module->getVar('dirname') . '/viewtopic.php?forum= ' $result_array['forum_id'] . '&amp;topic_id=' $result_array['topic_id'] . '#forumpost' $item_id;
            return 
$item;
        }
    }
}
?>



4
libkhorse
Re: NewBB Module - Blank Page after submitting a posting
  • 2004/9/18 6:53

  • libkhorse

  • Just popping in

  • Posts: 4

  • Since: 2004/9/17


I just got this problem, and solve it by the following method:

you can modify the modules/newbb/include/notification.php
libk this:
<?php
if ( !defined('NEWBB_NOTIFY_ITEMINFO') ) {
define('NEWBB_NOTIFY_ITEMINFO', 1);
function newbb_notify_iteminfo($category, $item_id)
{
$module_handler =& xoops_gethandler('module');
$module =& $module_handler->getByDirname('newbb');

if ($category=='global') {
$item['name'] = '';
$item['url'] = '';
return $item;
}
global $xoopsDB;
if ($category=='forum') {
// Assume we have a valid forum id
$sql = 'SELECT forum_name FROM ' . $xoopsDB->prefix('bb_forums') . ' WHERE forum_id = '.$item_id;
$result = $xoopsDB->query($sql); // TODO: error check
$result_array = $xoopsDB->fetchArray($result);
$item['name'] = $result_array['forum_name'];
$item['url'] = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/viewforum.php?forum=' . $item_id;
return $item;
}

if ($category=='thread') {
// Assume we have a valid topid id
$sql = 'SELECT t.topic_title,f.forum_id,f.forum_name FROM '.$xoopsDB->prefix('bb_topics') . ' t, ' . $xoopsDB->prefix('bb_forums') . ' f WHERE t.forum_id = f.forum_id AND t.topic_id = '. $item_id . ' limit 1';
$result = $xoopsDB->query($sql); // TODO: error check
$result_array = $xoopsDB->fetchArray($result);
$item['name'] = $result_array['topic_title'];
$item['url'] = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/viewtopic.php?forum=' . $result_array['forum_id'] . '&topic_id=' . $item_id;
return $item;
}

if ($category=='post') {
// Assume we have a valid post id
$sql = 'SELECT subject,topic_id,forum_id FROM ' . $xoopsDB->prefix('bb_posts') . ' WHERE post_id = ' . $item_id . ' LIMIT 1';
$result = $xoopsDB->query($sql);
$result_array = $xoopsDB->fetchArray($result);
$item['name'] = $result_array['subject'];
$item['url'] = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/viewtopic.php?forum= ' . $result_array['forum_id'] . '&topic_id=' . $result_array['topic_id'] . '#forumpost' . $item_id;
return $item;
}
}
}

wish this will help you!
btw. I think you run XOOPS on windows, is that right?




TopTop



Login

Who's Online

226 user(s) are online (131 user(s) are browsing Support Forums)


Members: 0


Guests: 226


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits