This patch file includes kaushik_sarkar's 5.x update, as well as the following:
Have added fields to the Admin Settings function to allow for customizable text field name and descriptive text. Edited the code injection function to make use of these new variables.
One issue has come up, though:
* warning: Missing argument 2 for variable_get(), called in C:\xampp\xampp\htdocs\modules\regcode\regcode.module on line 138 and defined in C:\xampp\xampp\htdocs\includes\bootstrap.inc on line 369.
* warning: Missing argument 2 for variable_get(), called in C:\xampp\xampp\htdocs\modules\regcode\regcode.module on line 141 and defined in C:\xampp\xampp\htdocs\includes\bootstrap.inc on line 369.
Both of those calls seem to be correct, though:
case 'register':
// Inject the registration code field into the registration form.
$form['regcode_code'] = array(
'#type' => 'textfield',
'#title' => variable_get('regcode_title', ''),
//'#default_value' => variable_get('regcode_codes', ''),
'#required' => TRUE,
'#description' => variable_get('regcode_desc', '')
);
return $form;Thanks for your attention to this. :)
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | regcode.4.7.x-1.0.patch | 1.87 KB | jvermillion |
| #3 | regcode_0.patch | 1.56 KB | jvermillion |
| regcode.patch | 6.37 KB | jvermillion |
Comments
Comment #1
jvermillion commentedHrm, actually, this code is good to go. I had some outside sources test the page, and it seems like the errors I'm getting are just a cached copy of the old page.
Comment #2
colanThanks for the patch. Would you be able to split it up though? As in, please post a patch exclusively for the new feature.
I'll create a separate issue for a 5.x version; I saw that post a while ago. Sorry about the delay.
Comment #3
jvermillion commentedThis is a patch for the 4.7.x code to add the requested features. I don't have any way to test 4.7.x code, so it will need to be reviewed.
Comment #4
jvermillion commentedFixed a bug in the previous patch code that kept forcing regcode_title and regcode_desc back to their defaults.
Comment #5
colanLet's keep new features to the development branch of the 5.x version. I'm not planning on adding new features to the 4.7 version.
Comment #6
colanComment #7
aidanlis commentedFixed in both the D5 and D6 release.