Page 1 of 1

Any addon coders left? If so any help?

PostPosted: Sun Jun 01, 2008 10:54 pm
by Pirate Elf
Well now that the forums are back up I was wondering if anyone could help me. I am working on an addon Idea I had a few years ago and finally got around to working on. The problem I am having is I cannot make coranto see where the variable is. To explain:

The addon makes new fields for the user fields like a checkbox and drop down boxes. However I can't view the edited information for anything other than single line and multiline. I need the addon to be able to read from the actual field so say this:

I have a checkbox

Checkbox Field: (Unchecked)
I go to my user prefs and check the box and save.
Coranto accepts that the check is there but if I go back to my prefs it shows
Checkbox Field: (Unchecked)

Where is the sub or hook that will actually be able to make coranto read the new fields I am adding? If you want I can post the addon so you can take a look at what I am doing.

PostPosted: Tue Jul 01, 2008 7:32 am
by Pirate Elf
Can anyone take a look at this and tell me what is wrong?

Code: Select all
if ($userDB{$i}->{'FieldType'} == 2) {
        my $curval = $userdata{$username}->{$i};
    $ucode = $ucode = qq~<select name="$i" size="$userDB{$i}->{'FieldSize'}"><option value="$curval">$curval</option>~ . join('', map { '<option ' . ($_ =~ /^\[(.+)\]/ ? 'selected>' . HTMLescape($1) : '>' . HTMLescape($_)) . '</option>' } split(/\|/, $userDB{$i}->{'Options'})) . '</select>';



I can't figure how to make the darn field show the current value except by doing it this way but it looks all screwy and the option to have a default option shows regardless of the current value.