Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Catalog System
Author Message
TomNook08
Member


Posts: 67
Joined: Mar 2009
Reputation: 0
MyBux: 30
Post: #11
RE: Catalog System
Nope didn't work I'm sorry if I'm being annoying

I'm Baaaack XD....I have been busy :-P
03-13-2009 03:55 AM
Splappy
New Custom User Title



Posts: 341
Joined: Oct 2008
Reputation: 5
MyBux: 32
Post: #12
RE: Catalog System
It worked for me...
Find this:
PHP Code:
$catalog_admin = array(
        
'gid'            => 'NULL',
        
'name'            => 'catalogadmin',
        
'title'            => 'Catalog Admin',
        
'description'    => 'Settings For The Catalog System.',
        
'disporder'        => $rows+1,
        
'isdefault'        => 'no',
    );

    
$db->insert_query('settinggroups'$catalog_admin);
    
$gid $db->insert_id();

    
$catalog_setting_1 = array(
        
'sid'            => 'NULL',
        
'name'            => 'enablecatalog',
        
'title'            => 'Enable Catalog System?',
        
'description'    => 'If set to off, no one will get a catalog',
        
'optionscode'    => 'onoff',
        
'value'            => 'on',
        
'disporder'        => 1,
        
'gid'            => intval($gid),
    );

    
$catalog_setting_2 = array(
        
'sid'            => 'NULL',
        
'name'            => 'showwhichgames',
        
'title'            => 'Show Which Game',
        
'description'    => 'Set to 1 to show only ACGC items, 2 to show only ACWW items, 3 to show ACCF/LGTTC items, or 0 for all 3 games',
        
'optionscode'    => 'text',
        
'value'            => '0',
        
'disporder'        => 2,
        
'gid'            => intval($gid),
    );
    
$catalog_setting_3 = array(

        
'sid'            => 'NULL',
        
'name'            => 'adminitems',
        
'title'            => 'Admin Remove Items?',
        
'description'    => 'Do you want admins to be able to remove items?',
        
'optionscode'    => 'onoff',
        
'value'            => 'off',
        
'disporder'        => 3,
        
'gid'            => intval($gid),
    ); 
And replace it with this:
PHP Code:
$catalog_admin = array(
        
'gid'            => NULL,
        
'name'            => 'catalogadmin',
        
'title'            => 'Catalog Admin',
        
'description'    => 'Settings For The Catalog System.',
        
'disporder'        => $rows+1,
        
'isdefault'        => 'no',
    );

    
$db->insert_query('settinggroups'$catalog_admin);
    
$gid $db->insert_id();

    
$catalog_setting_1 = array(
        
'sid'            => NULL,
        
'name'            => 'enablecatalog',
        
'title'            => 'Enable Catalog System?',
        
'description'    => 'If set to off, no one will get a catalog',
        
'optionscode'    => 'onoff',
        
'value'            => 'on',
        
'disporder'        => 1,
        
'gid'            => intval($gid),
    );

    
$catalog_setting_2 = array(
        
'sid'            => NULL,
        
'name'            => 'showwhichgames',
        
'title'            => 'Show Which Game',
        
'description'    => 'Set to 1 to show only ACGC items, 2 to show only ACWW items, 3 to show ACCF/LGTTC items, or 0 for all 3 games',
        
'optionscode'    => 'text',
        
'value'            => '0',
        
'disporder'        => 2,
        
'gid'            => intval($gid),
    );
    
$catalog_setting_3 = array(

        
'sid'            => NULL,
        
'name'            => 'adminitems',
        
'title'            => 'Admin Remove Items?',
        
'description'    => 'Do you want admins to be able to remove items?',
        
'optionscode'    => 'onoff',
        
'value'            => 'off',
        
'disporder'        => 3,
        
'gid'            => intval($gid),
    ); 
Notice how there's no single quotes around NULL in my code.

lolwhut? | follow meh on twitter. NAW.
03-13-2009 04:07 AM


TomNook08
Member


Posts: 67
Joined: Mar 2009
Reputation: 0
MyBux: 30
Post: #13
RE: Catalog System
I am testing it on my laptop with EasyPhp which is one of those Apache servers for computers and I was wondering would that (for some odd reason) cause me to get that error?

I'm Baaaack XD....I have been busy :-P
03-13-2009 04:11 AM
Splappy
New Custom User Title



Posts: 341
Joined: Oct 2008
Reputation: 5
MyBux: 32
Post: #14
RE: Catalog System
(03-13-2009 04:11 AM)TomNook08 Wrote:  I am testing it on my laptop with EasyPhp which is one of those Apache servers for computers and I was wondering would that (for some odd reason) cause me to get that error?

No.
'NULL' is a string (letters and words) to MySQL.
NULL is an integer (number) to MySQL.
MySQL wanted an integer, and when you gave MySQL a string, it went "AHH THIS ISN'T AN INTEGER!!!" and caused an error.

lolwhut? | follow meh on twitter. NAW.
03-13-2009 04:19 AM


TomNook08
Member


Posts: 67
Joined: Mar 2009
Reputation: 0
MyBux: 30
Post: #15
RE: Catalog System
Ohhh Ok well I just tried it again and I get a different error

Code:
Incorrect integer value: '' for column 'gid' at row 1

Today is just not my day

I'm Baaaack XD....I have been busy :-P
03-13-2009 04:23 AM
Splappy
New Custom User Title



Posts: 341
Joined: Oct 2008
Reputation: 5
MyBux: 32
Post: #16
RE: Catalog System
(03-13-2009 04:23 AM)TomNook08 Wrote:  Ohhh Ok well I just tried it again and I get a different error

Code:
Incorrect integer value: '' for column 'gid' at row 1

Today is just not my day

Hmm...what's the code now, have you made any other changes?

lolwhut? | follow meh on twitter. NAW.
03-13-2009 04:28 AM


TomNook08
Member


Posts: 67
Joined: Mar 2009
Reputation: 0
MyBux: 30
Post: #17
RE: Catalog System
I haven't made any changes since I removed the single quotes from NULL

I'm Baaaack XD....I have been busy :-P
03-13-2009 04:30 AM
Nickman
Manager



Posts: 1,638
Joined: May 2008
Reputation: 35
MyBux: 442
Post: #18
RE: Catalog System
Just put 0 for default value.



Free Traffic for your forum! | Small URLs | Orbit Arcade | Tech news at a glance | BestVidz.net | Download'en
03-13-2009 04:39 AM


TomNook08
Member


Posts: 67
Joined: Mar 2009
Reputation: 0
MyBux: 30
Post: #19
RE: Catalog System
Ok I did that and it says:

Code:
1366 - Incorrect integer value: 'no' for column 'isdefault' at row 1

I'm Baaaack XD....I have been busy :-P
03-13-2009 04:43 AM
Nickman
Manager



Posts: 1,638
Joined: May 2008
Reputation: 35
MyBux: 442
Post: #20
RE: Catalog System
make that 0 as default too



Free Traffic for your forum! | Small URLs | Orbit Arcade | Tech news at a glance | BestVidz.net | Download'en
03-13-2009 05:10 AM


 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [Public Beta] Awards System Nickman 88 1,649 Yesterday 03:39 AM
Last Post: Polarbear541



New to MyBBSource?Need Assistance?
  • Mark Forums Read
  • View Forum Staff
  • Looking for a MyBB Host?

  



Theme created by AK-47. Find more great themes and skins at K! Dezign R1s.net