perhaps, i have the wrong format for iconforums?
nothing is showing up
perhaps its this line?
PHP Code:
`iconforums` varchar(100) NOT NULL default '',
PHP Code:
CREATE TABLE `icon` (
`iconid` smallint(5) unsigned NOT NULL auto_increment,
`iconforums` varchar(100) NOT NULL default '',
`title` varchar(100) NOT NULL default '',
`iconpath` varchar(100) NOT NULL default '',
`imagecategoryid` smallint(5) unsigned NOT NULL default '0',
`displayorder` smallint(5) unsigned NOT NULL default '1',
PRIMARY KEY (`iconid`)
) TYPE=MyISAM AUTO_INCREMENT=22 ;
--
-- Dumping data for table `icon`
--
INSERT INTO `icon` VALUES (1, '2,3,4,5,6,7,8,10,11,12,13,14,15', 'News', 'images/icons/icon1.gif', 4, 1);
INSERT INTO `icon` VALUES (2, '2,3,4,5,6,7,8,10,11,12,13,14,15', 'Read This', 'images/icons/icon2.gif', 4, 1);
INSERT INTO `icon` VALUES (3, '2,3,4,5,6,7,8,10,11,12,13,14,15', 'Idea', 'images/icons/icon3.gif', 2, 21);
INSERT INTO `icon` VALUES (4, '2,3,4,5,6,7,8,10,11,12,13,14,15', 'Important!', 'images/icons/icon4.gif', 2, 30);
INSERT INTO `icon` VALUES (5, '2,3,4,5,6,7,8,10,11,12,13,14,15', 'Question', 'images/icons/icon5.gif', 2, 20);
INSERT INTO `icon` VALUES (6, '2,3,4,5,6,7,8,10,11,12,13,14,15', 'Cool', 'images/smilies/cool.gif', 2, 10);
INSERT INTO `icon` VALUES (7, '2,3,4,5,6,7,8,10,11,12,13,14,15', 'Smile', 'images/smilies/smile.gif', 2, 6);
INSERT INTO `icon` VALUES (8, '2,3,4,5,6,7,8,10,11,12,13,14,15', 'Angry', 'images/smilies/mad.gif', 2, 9);
INSERT INTO `icon` VALUES (9, '2,3,4,5,6,7,8,10,11,12,13,14,15', 'Unhappy', 'images/smilies/frown.gif', 2, 8);
INSERT INTO `icon` VALUES (10, '2,3,4,5,6,7,8,10,11,12,13,14,15', 'Big Smile', 'images/smilies/biggrin.gif', 2, 10);
INSERT INTO `icon` VALUES (11, '2,3,4,5,6,7,8,10,11,12,13,14,15', 'Red face', 'images/smilies/redface.gif', 2, 10);
INSERT INTO `icon` VALUES (12, '2,3,4,5,6,7,8,10,11,12,13,14,15', 'Wink', 'images/smilies/wink.gif', 2, 7);
INSERT INTO `icon` VALUES (13, '2,3,4,5,6,7,8,10,11,12,13,14,15', 'Thumbs down', 'images/icons/icon13.gif', 2, 25);
INSERT INTO `icon` VALUES (14, '2,3,4,5,6,7,8,10,11,12,13,14,15', 'Thumbs up', 'images/icons/icon14.gif', 2, 26);
INSERT INTO `icon` VALUES (15, '2,3,4,5,6,7,8,10,11,12,13,14,15', 'Very Important!', 'images/buttons/report.gif', 4, 1);
INSERT INTO `icon` VALUES (16, '2,3,4,5,6,7,8,10,11,12,13,14,15', 'Extremely Important!', 'images/icons/important.gif', 4, 4);
any ideas on the proper row structure?
ps, heres the code
as u can see its exactly as ur instructions say...
PHP Code:
// original SELECT iconid, iconpath, title
$icons = $DB_site->query("
SELECT iconid, iconpath, title, iconforums
FROM " . TABLE_PREFIX . "icon AS icon
WHERE imagecategoryid NOT IN (0$badcategories)
ORDER BY imagecategoryid, displayorder
");
if (!$DB_site->num_rows($icons))
{
return false;
}
$numicons = 0;
$show['posticons'] = false;
while ($icon = $DB_site->fetch_array($icons))
{
// hack
$forumid = $foruminfo[forumid];
$forums = explode(',',$icon[iconforums]);
if (in_array($forumid,$forums))
{
// hack end
$show['posticons'] = true;
if ($numicons % 7 == 0 AND $numicons != 0)
{
$posticonbits .= "</tr><tr><td> </td>";
}
$numicons++;
$iconid = $icon['iconid'];
$iconpath = $icon['iconpath'];
$alttext = $icon['title'];
if ($seliconid == $iconid)
{
$iconchecked = HTML_CHECKED;
$selectedicon = array('src' => $iconpath, 'alt' => $alttext);
}
else
{
$iconchecked = '';
}
eval('$posticonbits .= "' . fetch_template('posticonbit') . '";');
// hack
}
// hack end
}
|