Author |
Topic |
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
Posted - 09 February 2005 : 06:11:14
|
Hi there. I was wondering if someone could help me witht his one: I'm customizing my sidebar as advised by sr_erick, and I've come up with this idea ; I'm adding 1 field to the members-table, which stores an 11 digit key, containing all settings. Each position in this key has it’s own purpose.
A reference list: 10000000000 ; (0/1) ; If set to 1 it disables the mouseover effect in the sidebar 10000000000 ; (0-6) ; If set to 1-6 it shows 1-6 entries in the topictracker, if 0 then default. 10000000000 ; (0/1) ; If set to 1 it disables the Spambox, if 0 then default. 10000000000 ; (0/1) ; If set to 1 it disables the events calendar Box, if 0 then default. 10000000000 ; (0/1) ; If set to 1 it disables the Polls Box, if 0 then default. 10000000000 ; (0/1) ; If set to 1 it disables the RSS Feeds Box, if 0 then default. 10000000000 ; (0/1) ; If set to 1 it disables the Websearch Box, if 0 then default. 10000000000 ; (0/1) ; If set to 1 it disables the oxle.com / oxle.nl Box, if 0 then default. 10000000000 ; (0/1) ; If set to 1 it disables the Weather Box, if 0 then default. 10000000000 ; (0/1) ; If set to 1 it disables the Webradio Box, if 0 then default. So, an example ; 11501100010 The result of this setting would be that : Mouseover is disabled, topictracker enabled with 5 topics, Spambox default, Events calendar disabled, Polls disabled, RSS feed default, oxle.com default, Weather mod disabled, Webradio default.
To create this field in the db I created this dbs file:
User Definable Sidebar v0.1béta
The DBS File
[ALTER]
MEMBERS
ADD#M_SBSETTING#int#NULL#10000000000
[END]
[ALTER]
MEMBERS_PENDING
ADD#M_SBSETTING#int#NULL#10000000000
[END] If I do this, it says :
quote: Adding Column M_SBSETTING... ALTER TABLE FORUM_MEMBERS ADD COLUMN M_SBSETTING int NULL DEFAULT 10000000000 ALTER TABLE FORUM_MEMBERS ADD COLUMN M_SBSETTING int NULL DEFAULT 10000000000 -2147467259 | Type mismatch -------------------------------------------------------------------------------- Adding Column M_SBSETTING... ALTER TABLE FORUM_MEMBERS_PENDING ADD COLUMN M_SBSETTING int NULL DEFAULT 10000000000 ALTER TABLE FORUM_MEMBERS_PENDING ADD COLUMN M_SBSETTING int NULL DEFAULT 10000000000 -2147467259 | Type mismatch
What am I doing wrong? Any help would be very much appreciated. |
portfolio - linkshrinker - oxle - twitter |
Edited by - MarcelG on 09 February 2005 06:12:17 |
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 09 February 2005 : 06:21:48
|
The number you're using is too big to be an integer, you'll need to create a long integer field for it.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
Posted - 09 February 2005 : 06:39:47
|
quote: Originally posted by Shaggy
The number you're using is too big to be an integer, you'll need to create a long integer field for it.
Woops... So, This might work?
User Definable Sidebar v1.0béta
[ALTER]
MEMBERS
ADD#M_SBSETTING#long#NULL#10000000000
[END]
[ALTER]
MEMBERS_PENDING
ADD#M_SBSETTING#long#NULL#10000000000
[END] edit ; nope...doesn't work either.... So, int doesn't work, and long doesn't work either. Does it need to be a varchar then? |
portfolio - linkshrinker - oxle - twitter |
Edited by - MarcelG on 09 February 2005 06:41:39 |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 09 February 2005 : 06:49:22
|
Ay, it'd need to be varchar*, then you can use clng when pulling it from the database, if need be.
*Finally found my copy of the readme file for creating dbs files and it appears long integers aren't supported, probably because different database types have different abbreviations for them.quote: FIELDTYPE# Valid field Types are smallint,int,varchar,text
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 09 February 2005 : 07:47:30
|
No problemo, amigo
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
|
Topic |
|
|
|