Hi All
I am running XOOPS 2.3.1 with smartsection 2.13.
I have noticed a problem with the notifications in this module on my site at
http://www.montgomerycountymonitor.comNotifications for other modules on the site seem to be working appropriately.
The specific problem with the notifications with this module (called news and a clone of the module referred to as public information on my site) is that I do not get a message that notifications are updated when I attempt to add notifications and of course the notifications do not work.
When I check one of the notification boxes while viewing an individual story and hit the "Update Now" button the notifications do not update. It appears it is trying to update but it just refreshes the screen and the box I had just checked is no longer checked.
However, when I attempt to change global notifications on the categories summary page ( reached by clicking on Public Information on the left hand Main Menu), I do get the notifications updated message and the update box that I clicked remains checked after the page refreshes
When I turn on error messages I only get a couple of notices, not actual errors.
So it seems the global notifications for categories is working properly but not any other notification for this module.
I am including the code from the /modules/public_information/include/notification.inc.php in hopes that someone can offer some help.
/**
* $Id: notification.inc.php,v 1.6 2006/03/03 11:52:54 malanciault Exp $
* Module: Public_Information
* Author: The SmartFactory
* Licence: GNU
*/
function public_information_notify_iteminfo($category, $item_id)
{
global $xoopsModule, $xoopsModuleConfig, $xoopsConfig;
include_once(XOOPS_ROOT_PATH . "/modules/public_information/include/seo_functions.php");
if (empty($xoopsModule) || $xoopsModule->getVar('dirname') != 'public_information') {
$module_handler = &xoops_gethandler('module');
$module = &$module_handler->getByDirname('public_information');
$config_handler = &xoops_gethandler('config');
$config = &$config_handler->getConfigsByCat(0, $module->getVar('mid'));
} else {
$module = &$xoopsModule;
$config = &$xoopsModuleConfig;
}
if ($category == 'global') {
$item['name'] = '';
$item['url'] = '';
return $item;
}
global $xoopsDB;
if ($category == 'category') {
// Assume we have a valid category id
$sql = 'SELECT name, short_url FROM ' . $xoopsDB->prefix('public_information_categories') . ' WHERE categoryid = ' . $item_id;
$result = $xoopsDB->query($sql); // TODO: error check
$result_array = $xoopsDB->fetchArray($result);
$item['name'] = $result_array['name'];
$item['url'] = public_information_seo_genUrl('category', $item_id, $result_array['short_url']);
return $item;
}
if ($category == 'item') {
// Assume we have a valid story id
$sql = 'SELECT title, short_url FROM ' . $xoopsDB->prefix('public_information_items') . ' WHERE itemid = ' . $item_id;
$result = $xoopsDB->query($sql); // TODO: error check
$result_array = $xoopsDB->fetchArray($result);
$item['name'] = $result_array['title'];
$item['url'] = public_information_seo_genUrl('item', $item_id, $result_array['short_url']);
return $item;
}
}
?>
For those trying to help you can login using the following:
Username: test
Pass: tester
If any other info is needed dont hesitate to ask.
I have thoroughly searched both this site and the modules old site and new site and have been unable to resolve this issue.
Thanks for the help.
Foz