[DLmod] User config change download subcategory

Support zu den Modifikationen (MODs) von Entwickler OXPUS für das phpBB 3.0.x
Antworten
Zookeeper
Beiträge: 6
Registriert: Fr 11. Dez 2009, 14:53

[DLmod] User config change download subcategory

Beitrag von Zookeeper »

Hello

Is there a way to change the standard option to No instead of Yes at the user config panel where they can choose if the sub categories will be visible in de downloads index?
At this moment it is for all users set to Yes, i would like to see it is standard set to No and that the users have to change it to Yes if they would like to see all the subcategories in de index.

I presume i can do this with a minor change in one of the codes to realise this?
Benutzeravatar
oxpus
Chief handy-man
Beiträge: 2660
Registriert: Do 13. Dez 2007, 23:06
Wohnort: Irgendwo im I-Net
Kontaktdaten:

Re: [DLmod] User config change download subcategory

Beitrag von oxpus »

Hello,

at first run thie sql statement:

Code: Alles auswählen

ALTER TABLE phpbb_users SET user_dl_sub_on_index user_dl_sub_on_index TINYINT(1) DEFAULT 0 NOT NULL;
UPDATE phpbb_users SET user_dl_sub_on_index = 0;
This will set the option for new user off and disable it for all existing users, too.
Karsten Ude
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
Zookeeper
Beiträge: 6
Registriert: Fr 11. Dez 2009, 14:53

Re: [DLmod] User config change download subcategory

Beitrag von Zookeeper »

After running the statement i get an error message:
I have only got a testphpbb_users file instead of a phpbb_users file, so i changed that to your code. That is because i run this mod on a test fourm before i put it on the live one.

Code: Alles auswählen

ALTER TABLE testphpbb_users SET user_dl_sub_on_index user_dl_sub_on_index TINYINT(1) DEFAULT 0 NOT NULL;
UPDATE testphpbb_users SET user_dl_sub_on_index = 0;
the error i get back:
Fout

SQL-query:

ALTER TABLE testphpbb_users SET user_dl_sub_on_index user_dl_sub_on_index TINYINT( 1 ) DEFAULT 0 NOT NULL ;

MySQL retourneerde: Documentatie
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET user_dl_sub_on_index user_dl_sub_on_index TINYINT(1) DEFAULT 0 NOT NULL' at line 1
This is the error message in the online manual for the error code:
Error: 1064 SQLSTATE: 42000 (ER_PARSE_ERROR)

Message: %s near '%s' at line %d
Since in run the mod on a test forum it is not a big problem for now but is there a way i can change de code in the files from your mod before i install the mod on the live forum? So i don´t have to alter de sql afterwards.
What i mean is, can i change a file in the mod in the same way i change files for lets say a style?
example:
  • Open style/prosilver/overallheader.tpl
    Find line xxxx
    Replace xxxx with xxyy
Benutzeravatar
oxpus
Chief handy-man
Beiträge: 2660
Registriert: Do 13. Dez 2007, 23:06
Wohnort: Irgendwo im I-Net
Kontaktdaten:

Re: [DLmod] User config change download subcategory

Beitrag von oxpus »

Sorry, little mistake:

Code: Alles auswählen

ALTER TABLE testphpbb_users CHANGE user_dl_sub_on_index user_dl_sub_on_index TINYINT(1) DEFAULT 0 NOT NULL;
Karsten Ude
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
Zookeeper
Beiträge: 6
Registriert: Fr 11. Dez 2009, 14:53

Re: [DLmod] User config change download subcategory

Beitrag von Zookeeper »

Thank you Oxpus, It worked fine now.
Antworten