Dandello Forum AdministratorYaBB Modder Offline I love YaBB 2.7! Posts: 2235 Location: The Land of YaBB Joined: Feb 12th, 2014 Gender: Mood: Annoyed Zodiac sign: GMod permissions Feb 11th, 2015 at 1:13am Mark & QuoteQuote Does not properly show which items are checked. In Admin/AdminEdit.pm findCode (Perl) fopen( MODACCESS, "$vardir/gmodsettings.txt" ); @scriptlines = <MODACCESS>; fclose(MODACCESS); $startread = 0; $counter = 0; foreach my $scriptline (@scriptlines) { chomp $scriptline; if ( substr( $scriptline, 0, 1 ) eq q{'} ) { $scriptline =~ s/newsettings\;page\=//xsm; if ( $scriptline =~ /\"(.*?)\"/sm ) { $allow = $1; } if ( $scriptline =~ /\'(.*?)\'/sm ) { $actionfound = $1; } push @actfound, $actionfound; push @allowed, $allow; $counter++; } } @actfound = sort @actfound; $column = int( $counter / 2 ); $counter = 0; $aa = 0; foreach my $actfound (@actfound) { $checked = q{}; if ( $allowed[$aa] eq 'on' ) { $checked = ' checked="checked"'; } $dismenu .= qq~\n<input type="checkbox" name="$actfound" id="$actfound"$checked /> <label for="$actfound"><img src="$admin_img{'question'}" alt="$reftxt{'1a'} $gmodprivexpl_txt{$actfound}" title="$reftxt{'1a'} $gmodprivexpl_txt{$actfound}" /> $actfound</label><br />~; $counter++; $aa++; if ( $counter > $column + 1 ) { $dismenu .= q~</td><td class="windowbg2 vtop">~; $counter = 0; } } Replace with: Code (Perl) $counter = 0; my %gmodset1 = (); for my $key ( keys %gmod_access ) { $value = $gmod_access{$key}; $key =~ s/newsettings\;page\=//xsm; $gmodset1{$key} = $value; $counter++; } $column = int( $counter / 2 ); $counter = 0; my @gmodsrt = sort keys %gmodset1; for my $actfound (@gmodsrt) { $checked = q{}; if ( $gmodset1{$actfound} eq 'on' ) { $checked = ' checked="checked"'; } $dismenu .= qq~\n<input type="checkbox" name="$actfound" id="$actfound"$checked /> <label for="$actfound"><img src="$admin_img{'question'}" alt="$reftxt{'1a'} $gmodprivexpl_txt{$actfound}" title="$reftxt{'1a'} $gmodprivexpl_txt{$actfound}" /> $actfound</label><br />~; $counter++; if ( $counter > $column + 1 ) { $dismenu .= q~</td><td class="windowbg2 vtop">~; $counter = 0; } } Perfection is not possible. Excellence, however, is excellent. WWW IP Logged