View Single Post
  #5  
Old 05-19-2005, 06:32 AM
Jenta Jenta is offline
 
Join Date: Dec 2004
Posts: 377
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

perhaps, i have the wrong format for iconforums?
nothing is showing up

perhaps its this line?
PHP Code:
  `iconforumsvarchar(100NOT NULL default ''

PHP Code:
CREATE TABLE `icon` (
  `
iconidsmallint(5unsigned NOT NULL auto_increment,
  `
iconforumsvarchar(100NOT NULL default '',
  `
titlevarchar(100NOT NULL default '',
  `
iconpathvarchar(100NOT NULL default '',
  `
imagecategoryidsmallint(5unsigned NOT NULL default '0',
  `
displayordersmallint(5unsigned NOT NULL default '1',
  
PRIMARY KEY  (`iconid`)
TYPE=MyISAM AUTO_INCREMENT=22 ;

-- 
-- 
Dumping data for table `icon`
-- 

INSERT INTO `iconVALUES (1'2,3,4,5,6,7,8,10,11,12,13,14,15''News''images/icons/icon1.gif'41);
INSERT INTO `iconVALUES (2'2,3,4,5,6,7,8,10,11,12,13,14,15''Read This''images/icons/icon2.gif'41);
INSERT INTO `iconVALUES (3'2,3,4,5,6,7,8,10,11,12,13,14,15''Idea''images/icons/icon3.gif'221);
INSERT INTO `iconVALUES (4'2,3,4,5,6,7,8,10,11,12,13,14,15''Important!''images/icons/icon4.gif'230);
INSERT INTO `iconVALUES (5'2,3,4,5,6,7,8,10,11,12,13,14,15''Question''images/icons/icon5.gif'220);
INSERT INTO `iconVALUES (6'2,3,4,5,6,7,8,10,11,12,13,14,15''Cool''images/smilies/cool.gif'210);
INSERT INTO `iconVALUES (7'2,3,4,5,6,7,8,10,11,12,13,14,15''Smile''images/smilies/smile.gif'26);
INSERT INTO `iconVALUES (8'2,3,4,5,6,7,8,10,11,12,13,14,15''Angry''images/smilies/mad.gif'29);
INSERT INTO `iconVALUES (9'2,3,4,5,6,7,8,10,11,12,13,14,15''Unhappy''images/smilies/frown.gif'28);
INSERT INTO `iconVALUES (10'2,3,4,5,6,7,8,10,11,12,13,14,15''Big Smile''images/smilies/biggrin.gif'210);
INSERT INTO `iconVALUES (11'2,3,4,5,6,7,8,10,11,12,13,14,15''Red face''images/smilies/redface.gif'210);
INSERT INTO `iconVALUES (12'2,3,4,5,6,7,8,10,11,12,13,14,15''Wink''images/smilies/wink.gif'27);
INSERT INTO `iconVALUES (13'2,3,4,5,6,7,8,10,11,12,13,14,15''Thumbs down''images/icons/icon13.gif'225);
INSERT INTO `iconVALUES (14'2,3,4,5,6,7,8,10,11,12,13,14,15''Thumbs up''images/icons/icon14.gif'226);
INSERT INTO `iconVALUES (15'2,3,4,5,6,7,8,10,11,12,13,14,15''Very Important!''images/buttons/report.gif'41);
INSERT INTO `iconVALUES (16'2,3,4,5,6,7,8,10,11,12,13,14,15''Extremely Important!''images/icons/important.gif'44); 
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 == AND $numicons != 0)
        {
            
$posticonbits .= "</tr><tr><td>&nbsp;</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

    

Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01175 seconds
  • Memory Usage 1,845KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete