| ############################################################################### |
| ############################################################################### |
| # Settings_Advanced.pl # |
| # Settings_Advanced.pm # |
| |
| # $Date: 01.05.16 $ # |
| ############################################################################### |
| ############################################################################### |
| # YaBB: Yet another Bulletin Board # |
| # YaBB: Yet another Bulletin Board # |
| # Open-Source Community Software for Webmasters # |
| # Open-Source Community Software for Webmasters # |
| # Version: YaBB 2.5.2 # |
| # Version: YaBB 2.6.12 # |
| # Packaged: October 21, 2012 # |
| # Packaged: January 5, 2016 # |
| # Distributed by: http://www.yabbforum.com # |
| # Distributed by: http://www.yabbforum.com # |
| # =========================================================================== # |
| # =========================================================================== # |
| # Copyright (c) 2000-2012 YaBB (www.yabbforum.com) - All Rights Reserved. # |
| # Copyright (c) 2000-2016 YaBB (www.yabbforum.com) - All Rights Reserved. # |
| # Software by: The YaBB Development Team # |
| # Software by: The YaBB Development Team # |
| # with assistance from the YaBB community. # |
| # with assistance from the YaBB community. # |
| ############################################################################### |
| ############################################################################### |
| |
| use CGI::Carp qw(fatalsToBrowser); |
| |
| use English '-no_match_vars'; |
| |
| our $VERSION = '2.6.12'; |
| |
| |
| |
| $settings_advancedpmver = 'YaBB 2.6.12 $Revision: 1710 $'; |
| |
| if ( $action eq 'detailedversion' ) { return 1; } |
| |
| |
| |
| my $uploaddiriscorrect = qq~<span class="important">$admin_txt{'164'}</span>~; |
| |
| if ( -w $uploaddir && -d $uploaddir ) { |
| |
| $uploaddiriscorrect = |
| |
| qq~<span class="good">$admin_txt{'163'}</span>~; |
| |
| } |
| |
| |
| $settings_advancedplver = 'YaBB 2.5.2 $Revision: 1.1 $'; |
| my $pmUploadDirIsCorrect = qq~<span class="important">$admin_txt{'164'}</span>~; |
| if ($action eq 'detailedversion') { return 1; } |
| if ( -w $pmuploaddir && -d $pmuploaddir ) { |
| |
| $pmUploadDirIsCorrect = |
| |
| qq~<span class="good">$admin_txt{'163'}</span>~; |
| |
| } |
| |
| |
| my $uploaddiriscorrect = qq~<span style="color: red;">$admin_txt{'164'}</span>~; |
| require Admin::ManageBoards; |
| if(-w $uploaddir && -d $uploaddir) {$uploaddiriscorrect = qq~<span style="color: green;">$admin_txt{'163'}</span>~;} |
| # Needed for attachment settings |
| |
| |
| # Setting for gzip, if it's available |
| # Setting for gzip, if it is available |
| my $compressgzip = (-e "/bin/gzip" && open(GZIP, "| gzip -f")) ? qq~\n <option value="1" ${isselected($gzcomp == 1)}>$gztxt{'4'}</option>~ : ''; |
| my $compressgzip = |
| |
| ( -e "$backupprogbin/gzip" && open GZIP, '| gzip -f' ) |
| |
| ? qq~\n <option value="1" ${isselected($gzcomp == 1)}>$gztxt{'4'}</option>~ |
| |
| : q{}; |
| |
| |
| # Setting for Compress::Zlib, if it's available |
| # Setting for Compress::Zlib, if it's available |
| my $compresszlib; |
| my $compresszlib; |
| eval { require Compress::Zlib; Compress::Zlib::memGzip("test"); }; |
| eval { require Compress::Zlib; Compress::Zlib::memGzip('test'); }; |
| $compresszlib = qq~\n <option value="2" ${isselected($gzcomp == 2)}>$gztxt{'5'}</option>~ unless $@; |
| if ( !$@ ) { |
| |
| $compresszlib = |
| |
| qq~\n <option value="2" ${isselected($gzcomp == 2)}>$gztxt{'5'}</option>~; |
| |
| } |
| |
| |
| # RSS Defaults |
| # RSS Defaults |
| if ($rss_disabled eq '') { $rss_disabled = 0; } |
| if ( $rss_disabled eq q{} ) { $rss_disabled = 0; } |
| if ($rss_limit eq '') { $rss_limit = 10; } |
| if ( $rss_limit eq q{} ) { $rss_limit = 10; } |
| if ($rss_message eq '') { $rss_message = 1; } |
| if ( $rss_message eq q{} ) { $rss_message = 1; } |
| |
| |
| # Free Disk Space Checking |
| if ( ischecked2($checkspace) == 1) { |
| if( $^O !~ /Win/ ) { |
| $checklabel = qq~$admin_txt{'checkspace'} <b><a href="$adminurl?action=checkspace">Disk Space Functions</a></b> $admin_txt{'checkspace2'}~; |
| @disk_space = qx{df -k .}; |
| } |
| |
| else { $checklabel = qq~$admin_txt{'checkspace'}~ ; |
| map { $_ =~ s/ +/ /g } @disk_space; |
| |
| my @find = qx(find . -noleaf -type f -printf "%s-"); |
| |
| |
| |
| $hostusername = $hostusername || (split(/ +/, qx{ls -l YaBB.$yyext}))[2]; |
| |
| @quota = qx{quota -u $hostusername -v}; |
| |
| $quota[0] =~ s/^ +//; |
| |
| $quota[0] =~ s/ / /g; |
| |
| $quota[1] =~ s/^ +//; |
| |
| $quota[1] =~ s/ / /g; |
| |
| my $quota_select = qq~$quota[0]<br />$quota[1]~; |
| |
| if ($quota[2]) { |
| |
| my $ds = (split(/ +/, $disk_space[1], 2))[0] if !$enable_quota; |
| |
| $quota_select .= qq~<br /><select name="enable_quota_value">~; |
| |
| for (my $i = 2; $i < @quota; $i++) { |
| |
| $quota[$i] =~ s/^ +//; |
| |
| $quota[$i] =~ s/ +/ /g; |
| |
| $quota_select .= qq~<option value="$i" ~ . ${isselected($i == $enable_quota || ($ds && $quota[$i] =~ /^$ds/))} . qq~>$quota[$i]</option>~; |
| |
| } |
| |
| $quota_select .= '</select>'; |
| |
| } |
| |
| } |
| } |
| |
| |
| # List of settings |
| # List of settings |
| @settings = ( |
| @settings = ( |
| { |
| { |
| name => $settings_txt{'permarss'}, |
| name => $settings_txt{'permarss'}, |
| id => 'permarss', |
| id => 'permarss', |
| items => [ |
| items => [ |
| # Permalinks |
| |
| { |
| # Permalinks |
| header => $admin_txt{'24'}, |
| { header => $admin_txt{'24'}, }, |
| }, |
| { |
| { |
| description => |
| description => qq~<label for="accept_permalink">$admin_txt{'22'}</label>~, |
| qq~<label for="accept_permalink">$admin_txt{'22'}</label>~, |
| input_html => qq~<input type="checkbox" name="accept_permalink" id="accept_permalink" value="1" ${ischecked($accept_permalink)}/>~, |
| input_html => |
| name => 'accept_permalink', |
| qq~<input type="checkbox" name="accept_permalink" id="accept_permalink" value="1" ${ischecked($accept_permalink)}/>~, |
| validate => 'boolean', |
| name => 'accept_permalink', |
| }, |
| validate => 'boolean', |
| { |
| }, |
| description => qq~<label for="symlink">$admin_txt{'25'}<br /><span class="small">$admin_txt{'26'}</span></label>~, |
| { |
| input_html => qq~<input type="text" size="30" name="symlink" id="symlink" value="$symlink" />~, |
| description => |
| name => 'symlink', |
| qq~<label for="symlink">$admin_txt{'25'}<br /><span class="small">$admin_txt{'26'}</span></label>~, |
| validate => 'text,null', |
| input_html => |
| depends_on => ['accept_permalink'], |
| qq~<input type="text" size="30" name="symlink" id="symlink" value="$symlink" />~, |
| }, |
| name => 'symlink', |
| { |
| validate => 'text,null', |
| description => qq~<label for="perm_domain">$admin_txt{'23'}</label>~, |
| depends_on => ['accept_permalink'], |
| input_html => qq~<input type="text" size="30" name="perm_domain" id="perm_domain" value="$perm_domain" />~, |
| }, |
| name => 'perm_domain', |
| { |
| validate => 'text,null', |
| description => |
| depends_on => ['accept_permalink'], |
| qq~<label for="perm_domain">$admin_txt{'23'}</label>~, |
| }, |
| input_html => |
| # RSS |
| qq~<input type="text" size="30" name="perm_domain" id="perm_domain" value="$perm_domain" />~, |
| { |
| name => 'perm_domain', |
| header => $settings_txt{'rss'}, |
| validate => 'text,null', |
| }, |
| depends_on => ['accept_permalink'], |
| { |
| }, |
| description => qq~<label for="rss_disabled">$rss_txt{'1'}</label>~, |
| |
| input_html => qq~<input type="checkbox" name="rss_disabled" id="rss_disabled" value="1"${ischecked($rss_disabled)} />~, |
| # RSS |
| name => 'rss_disabled', |
| { header => $settings_txt{'rss'}, }, |
| validate => 'boolean', |
| { |
| }, |
| description => |
| { |
| qq~<label for="rss_disabled">$rss_txt{'1'}</label>~, |
| description => qq~<label for="rss_limit">$rss_txt{'2'}</label>~, |
| input_html => |
| input_html => qq~<input type="text" name="rss_limit" id="rss_limit" size="5" value="$rss_limit" />~, |
| qq~<input type="checkbox" name="rss_disabled" id="rss_disabled" value="1"${ischecked($rss_disabled)} />~, |
| name => 'rss_limit', |
| name => 'rss_disabled', |
| validate => 'number', |
| validate => 'boolean', |
| depends_on => ['!rss_disabled'], |
| }, |
| }, |
| { |
| |
| description => qq~<label for="rss_limit">$rss_txt{'2'}</label>~, |
| { |
| input_html => |
| description => qq~<label for="showauthor">$rss_txt{'7'}</label>~, |
| qq~<input type="text" name="rss_limit" id="rss_limit" size="5" value="$rss_limit" />~, |
| input_html => qq~<input type="checkbox" name="showauthor" id="showauthor" size="5"${ischecked($showauthor)} />~, |
| name => 'rss_limit', |
| name => 'showauthor', |
| validate => 'number', |
| validate => 'boolean', |
| depends_on => ['!rss_disabled'], |
| depends_on => ['!rss_disabled'], |
| }, |
| }, |
| |
| { |
| { |
| description => qq~<label for="showdate">$rss_txt{'8'}</label>~, |
| description => |
| input_html => qq~<input type="checkbox" name="showdate" id="showdate" size="5"${ischecked($showdate)} />~, |
| qq~<label for="showauthor">$rss_txt{'7'}</label>~, |
| name => 'showdate', |
| input_html => |
| validate => 'boolean', |
| qq~<input type="checkbox" name="showauthor" id="showauthor"${ischecked($showauthor)} />~, |
| depends_on => ['!rss_disabled'], |
| name => 'showauthor', |
| }, |
| validate => 'boolean', |
| { |
| depends_on => ['!rss_disabled'], |
| description => qq~<label for="rss_message">$rss_txt{'3'}</label>~, |
| }, |
| input_html => qq~ |
| |
| |
| { |
| |
| description => |
| |
| qq~<label for="rssemail">$rss_txt{'email'}</label>~, |
| |
| input_html => |
| |
| qq~<input type="text" size="30" name="rssemail" id="rssemail" value="$rssemail" />~, |
| |
| name => 'rssemail', |
| |
| validate => 'text,null', |
| |
| depends_on => ['showauthor'], |
| |
| }, |
| |
| |
| |
| { |
| |
| description => qq~<label for="showdate">$rss_txt{'8'}</label>~, |
| |
| input_html => |
| |
| qq~<input type="checkbox" name="showdate" id="showdate"${ischecked($showdate)} />~, |
| |
| name => 'showdate', |
| |
| validate => 'boolean', |
| |
| depends_on => ['!rss_disabled'], |
| |
| }, |
| |
| { |
| |
| description => |
| |
| qq~<label for="rss_message">$rss_txt{'3'}</label>~, |
| |
| input_html => qq~ |
| <select name="rss_message" id="rss_message" size="1"> |
| <select name="rss_message" id="rss_message" size="1"> |
| <option value="0" ${isselected($rss_message == 0)}>$rss_txt{'4'}</option> |
| <option value="0" ${isselected($rss_message == 0)}>$rss_txt{'4'}</option> |
| <option value="1" ${isselected($rss_message == 1)}>$rss_txt{'5'}</option> |
| <option value="1" ${isselected($rss_message == 1)}>$rss_txt{'5'}</option> |
| <option value="2" ${isselected($rss_message == 2)}>$rss_txt{'6'}</option> |
| <option value="2" ${isselected($rss_message == 2)}>$rss_txt{'6'}</option> |
| </select>~, |
| </select>~, |
| name => 'rss_message', |
| name => 'rss_message', |
| validate => 'number', |
| validate => 'number', |
| depends_on => ['!rss_disabled'], |
| depends_on => ['!rss_disabled'], |
| }, |
| }, |
| |
| ], |
| ], |
| }, |
| }, |
| { |
| { |
| name => $settings_txt{'email'}, |
| name => $settings_txt{'email'}, |
| id => 'email', |
| id => 'email', |
| items => [ |
| items => [ |
| |
| # Email |
| # Email |
| { |
| { header => $settings_txt{'email'}, }, |
| header => $settings_txt{'email'}, |
| { |
| }, |
| description => |
| { |
| qq~<label for="mailtype">$admin_txt{'404'}</label>~, |
| description => qq~<label for="mailtype">$admin_txt{'404'}</label>~, |
| input_html => qq~ |
| input_html => qq~ |
| |
| <select name="mailtype" id="mailtype" size="1"> |
| <select name="mailtype" id="mailtype" size="1"> |
| <option value="0" ${isselected($mailtype == 0)}>$smtp_txt{'sendmail'}</option> |
| <option value="0" ${isselected($mailtype == 0)}>$smtp_txt{'sendmail'}</option> |
| <option value="1" ${isselected($mailtype == 1)}>$smtp_txt{'smtp'}</option> |
| <option value="1" ${isselected($mailtype == 1)}>$smtp_txt{'smtp'}</option> |
| <option value="2" ${isselected($mailtype == 2)}>$smtp_txt{'net'}</option> |
| <option value="2" ${isselected($mailtype == 2)}>$smtp_txt{'net'}</option> |
| <option value="3" ${isselected($mailtype == 3)}>$smtp_txt{'tslnet'}</option> |
| <option value="3" ${isselected($mailtype == 3)}>$smtp_txt{'tslnet'}</option> |
| </select>~, |
| </select>~, |
| name => 'mailtype', |
| name => 'mailtype', |
| validate => 'number', |
| validate => 'number', |
| }, |
| }, |
| { |
| { |
| description => qq~<label for="mailprog">$admin_txt{'354'}</label>~, |
| description => |
| input_html => qq~<input type="text" name="mailprog" id="mailprog" size="20" value="$mailprog" />~, |
| qq~<label for="mailprog">$admin_txt{'354'}</label>~, |
| name => 'mailprog', |
| input_html => |
| validate => 'text,null', |
| qq~<input type="text" name="mailprog" id="mailprog" size="20" value="$mailprog" />~, |
| }, |
| name => 'mailprog', |
| { |
| validate => 'text,null', |
| description => qq~<label for="smtp_server">$admin_txt{'407'}</label>~, |
| }, |
| input_html => qq~<input type="text" name="smtp_server" id="smtp_server" size="20" value="$smtp_server" />~, |
| { |
| name => 'smtp_server', |
| description => |
| validate => 'text,null', |
| qq~<label for="smtp_server">$admin_txt{'407'}</label>~, |
| }, |
| input_html => |
| { |
| qq~<input type="text" name="smtp_server" id="smtp_server" size="20" value="$smtp_server" />~, |
| description => qq~<label for="smtp_auth_required">$smtp_txt{'1'}</label>~, |
| name => 'smtp_server', |
| input_html => qq~ |
| validate => 'text,null', |
| |
| }, |
| |
| { |
| |
| description => |
| |
| qq~<label for="smtp_auth_required">$smtp_txt{'1'}</label>~, |
| |
| input_html => qq~ |
| <select name="smtp_auth_required" id="smtp_auth_required" size="1"> |
| <select name="smtp_auth_required" id="smtp_auth_required" size="1"> |
| <option value="4" ${isselected($smtp_auth_required == 4)}>$smtp_txt{'auto'}</option> |
| <option value="4" ${isselected($smtp_auth_required == 4)}>$smtp_txt{'auto'}</option> |
| <option value="3" ${isselected($smtp_auth_required == 3)}>$smtp_txt{'cram'}</option> |
| <option value="3" ${isselected($smtp_auth_required == 3)}>$smtp_txt{'cram'}</option> |
| <option value="2" ${isselected($smtp_auth_required == 2)}>$smtp_txt{'login'}</option> |
| <option value="2" ${isselected($smtp_auth_required == 2)}>$smtp_txt{'login'}</option> |
| <option value="1" ${isselected($smtp_auth_required == 1)}>$smtp_txt{'plain'}</option> |
| <option value="1" ${isselected($smtp_auth_required == 1)}>$smtp_txt{'plain'}</option> |
| <option value="0" ${isselected($smtp_auth_required == 0)}>$smtp_txt{'off'}</option> |
| <option value="0" ${isselected($smtp_auth_required == 0)}>$smtp_txt{'off'}</option> |
| </select>~, |
| </select>~, |
| name => 'smtp_auth_required', |
| name => 'smtp_auth_required', |
| validate => 'number', |
| validate => 'number', |
| }, |
| }, |
| { |
| { |
| description => qq~<label for="authuser">$smtp_txt{'3'}</label>~, |
| description => qq~<label for="authuser">$smtp_txt{'3'}</label>~, |
| input_html => qq~<input type="text" name="authuser" id="authuser" size="20" value="$authuser" />~, |
| input_html => |
| name => 'authuser', |
| qq~<input type="text" name="authuser" id="authuser" size="20" value="$authuser" />~, |
| validate => 'text,null', |
| name => 'authuser', |
| }, |
| validate => 'text,null', |
| { |
| }, |
| description => qq~<label for="authpass">$smtp_txt{'4'}</label>~, |
| { |
| input_html => qq~<input type="password" name="authpass" id="authpass" size="20" value="$authpass" />~, |
| description => qq~<label for="authpass">$smtp_txt{'4'}</label>~, |
| name => 'authpass', |
| input_html => |
| validate => 'text,null', |
| qq~<input type="password" name="authpass" id="authpass" size="20" value="$authpass" />~, |
| }, |
| name => 'authpass', |
| { |
| validate => 'text,null', |
| description => qq~<label for="webmaster_email">$admin_txt{'355'}</label>~, |
| }, |
| input_html => qq~<input type="text" name="webmaster_email" id="webmaster_email" size="35" value="$webmaster_email" />~, |
| { |
| name => 'webmaster_email', |
| description => |
| validate => 'text', |
| qq~<label for="webmaster_email">$admin_txt{'355'}</label>~, |
| }, |
| input_html => |
| # New Member Notification |
| qq~<input type="text" name="webmaster_email" id="webmaster_email" size="35" value="$webmaster_email" />~, |
| { |
| name => 'webmaster_email', |
| header => $admin_txt{'366'}, |
| validate => 'text', |
| }, |
| }, |
| { |
| |
| description => qq~<label for="new_member_notification">$admin_txt{'367'}</label>~, |
| # New Member Notification |
| input_html => qq~<input type="checkbox" name="new_member_notification" id="new_member_notification" value="1"${ischecked($new_member_notification)} />~, |
| { header => $admin_txt{'366'}, }, |
| name => 'new_member_notification', |
| { |
| validate => 'boolean', |
| description => |
| }, |
| qq~<label for="new_member_notification">$admin_txt{'367'}</label>~, |
| { |
| input_html => |
| description => qq~<label for="new_member_notification_mail">$admin_txt{'368'}</label>~, |
| qq~<input type="checkbox" name="new_member_notification" id="new_member_notification" value="1"${ischecked($new_member_notification)} />~, |
| input_html => qq~<input type="text" name="new_member_notification_mail" id="new_member_notification_mail" size="35" value="$new_member_notification_mail" />~, |
| name => 'new_member_notification', |
| name => 'new_member_notification_mail', |
| validate => 'boolean', |
| validate => 'text,null', |
| }, |
| depends_on => ['new_member_notification'] |
| { |
| }, |
| description => |
| # New Member Notification |
| qq~<label for="new_member_notification_mail">$admin_txt{'368'}</label>~, |
| { |
| input_html => |
| header => $admin_txt{'600'}, |
| qq~<input type="text" name="new_member_notification_mail" id="new_member_notification_mail" size="35" value="$new_member_notification_mail" />~, |
| }, |
| name => 'new_member_notification_mail', |
| { |
| validate => 'text,null', |
| description => qq~<label for="sendtopicmail">$admin_txt{'601'}</label>~, |
| depends_on => ['new_member_notification'] |
| input_html => qq~<select name="sendtopicmail" id="sendtopicmail"> |
| }, |
| <option value="0"${isselected($sendtopicmail == 0)}>$admin_txt{'602'}</option> |
| |
| <option value="1"${isselected($sendtopicmail == 1)}>$admin_txt{'603'}</option> |
| # New Member Notification |
| <option value="2"${isselected($sendtopicmail == 2)}>$admin_txt{'604'}</option> |
| { header => $admin_txt{'600'}, }, |
| <option value="3"${isselected($sendtopicmail == 3)}>$admin_txt{'605'}</option> |
| { |
| </select>~, |
| description => |
| name => 'sendtopicmail', |
| qq~<label for="sendtopicmail">$admin_txt{'601'}</label>~, |
| validate => 'number', |
| input_html => |
| }, |
| qq~<select name="sendtopicmail" id="sendtopicmail"> |
| ], |
| <option value="0"${isselected($sendtopicmail == 0)}>$admin_txt{'602'}</option> |
| }, |
| <option value="1"${isselected($sendtopicmail == 1)}>$admin_txt{'603'}</option> |
| { |
| <option value="2"${isselected($sendtopicmail == 2)}>$admin_txt{'604'}</option> |
| name => $settings_txt{'attachments'}, |
| <option value="3"${isselected($sendtopicmail == 3)}>$admin_txt{'605'}</option> |
| id => 'attachments', |
| </select>~, |
| items => [ |
| name => 'sendtopicmail', |
| { |
| validate => 'number', |
| header => $settings_txt{'attachments'}, |
| }, |
| }, |
| ], |
| { |
| }, |
| description => qq~$edit_paths_txt{'20'}<br />$settings_txt{'changeinpaths'}~, |
| { |
| input_html => $uploaddir, # Non-changable setting |
| name => $settings_txt{'attachments'}, |
| }, |
| id => 'attachments', |
| { |
| items => [ |
| description => $settings_txt{'uploaddircorrect'}, |
| { header => $settings_txt{'post_attachments'}, }, |
| input_html => $uploaddiriscorrect, # This is tested to see if it's valid at the top of the file. |
| { |
| }, |
| description => |
| { |
| qq~$edit_paths_txt{'20'}<br />$settings_txt{'changeinpaths'}~, |
| description => $fatxt{'17'}, |
| input_html => $uploaddir, # Non-changable setting |
| input_html => qq~<input type="text" name="allowattach" id="allowattach" size="5" value="$allowattach" /> ~, |
| }, |
| name => 'allowattach', |
| { |
| validate => 'number', |
| description => $settings_txt{'uploaddircorrect'}, |
| }, |
| input_html => $uploaddiriscorrect |
| { |
| , # This is tested to see if it's valid at the top of the file. |
| description => qq~<label for="allowguestattach">$fatxt{'18'}</label>~, |
| }, |
| input_html => qq~<input type="checkbox" name="allowguestattach" id="allowguestattach" value="1" ${ischecked($allowguestattach)}/>~, |
| { |
| name => 'allowguestattach', |
| description => $fatxt{'17'}, |
| validate => 'boolean', |
| input_html => |
| depends_on => ['allowattach!=0'], |
| qq~<input type="text" name="allowattach" id="allowattach" size="5" value="$allowattach" /> ~, |
| }, |
| name => 'allowattach', |
| { |
| validate => 'number', |
| description => qq~<label for="amdisplaypics">$fatxt{'16'}</label>~, |
| }, |
| input_html => qq~<input type="checkbox" name="amdisplaypics" id="amdisplaypics" value="1" ${ischecked($amdisplaypics)}/>~, |
| { |
| name => 'amdisplaypics', |
| description => |
| validate => 'boolean', |
| qq~<label for="allowguestattach">$fatxt{'18'}</label>~, |
| depends_on => ['allowattach!=0'], |
| input_html => |
| }, |
| qq~<input type="checkbox" name="allowguestattach" id="allowguestattach" value="1" ${ischecked($allowguestattach)}/>~, |
| { |
| name => 'allowguestattach', |
| description => qq~<label for="checkext">$fatxt{'15'}</label>~, |
| validate => 'boolean', |
| input_html => qq~<input type="checkbox" name="checkext" id="checkext" value="1" ${ischecked($checkext)}/>~, |
| depends_on => ['allowattach!=0'], |
| name => 'checkext', |
| }, |
| validate => 'boolean', |
| { |
| depends_on => ['allowattach!=0'], |
| description => |
| }, |
| qq~<label for="amdisplaypics">$fatxt{'16'}</label>~, |
| { |
| input_html => |
| description => qq~<label for="extensions">$fatxt{'14'}</label>~, |
| qq~<input type="checkbox" name="amdisplaypics" id="amdisplaypics" value="1" ${ischecked($amdisplaypics)}/>~, |
| input_html => qq~<input type="text" name="extensions" id="extensions" size="35" value="~ . join(' ', @ext) . qq~" />~, |
| name => 'amdisplaypics', |
| name => 'extensions', |
| validate => 'boolean', |
| validate => 'text', |
| depends_on => ['allowattach!=0'], |
| depends_on => ['allowattach!=0', 'checkext'], |
| }, |
| }, |
| { |
| { |
| description => qq~<label for="checkext">$fatxt{'15'}</label>~, |
| description => qq~<label for="limit">$fatxt{'12'}</label>~, |
| input_html => |
| input_html => qq~<input type="text" name="limit" id="limit" size="5" value="$limit" /> KB~, |
| qq~<input type="checkbox" name="checkext" id="checkext" value="1" ${ischecked($checkext)}/>~, |
| name => 'limit', |
| name => 'checkext', |
| validate => 'number', |
| validate => 'boolean', |
| depends_on => ['allowattach!=0'], |
| depends_on => ['allowattach!=0'], |
| }, |
| }, |
| { |
| { |
| description => qq~<label for="dirlimit">$fatxt{'13'}</label>~, |
| description => qq~<label for="extensions">$fatxt{'14'}</label>~, |
| input_html => qq~<input type="text" name="dirlimit" id="dirlimit" size="5" value="$dirlimit" /> KB~, |
| input_html => |
| name => 'dirlimit', |
| q~<input type="text" name="extensions" id="extensions" size="35" value="~ |
| validate => 'number', |
| . join( q{ }, @ext ) . q~" />~, |
| depends_on => ['allowattach!=0'], |
| name => 'extensions', |
| }, |
| validate => 'text', |
| { |
| depends_on => [ 'allowattach!=0', 'checkext' ], |
| description => qq~<label for="overwrite">$fatxt{'53'}</label>~, |
| }, |
| input_html => qq~ |
| { |
| <select name="overwrite" id="overwrite" size="1"> |
| description => qq~<label for="limit">$fatxt{'12'}</label>~, |
| <option value="0"${isselected($overwrite == 0)}>$fatxt{'54r'}</option> |
| input_html => |
| <option value="1"${isselected($overwrite == 1)}>$fatxt{'54o'}</option> |
| qq~<input type="text" name="limit" id="limit" size="5" value="$limit" /> KB~, |
| <option value="2"${isselected($overwrite == 2)}>$fatxt{'54n'}</option> |
| name => 'limit', |
| </select>~, |
| validate => 'number', |
| name => 'overwrite', |
| depends_on => ['allowattach!=0'], |
| validate => 'number', |
| }, |
| depends_on => ['allowattach!=0'], |
| { |
| }, |
| description => qq~<label for="dirlimit">$fatxt{'13'}</label>~, |
| ], |
| input_html => |
| }, |
| qq~<input type="text" name="dirlimit" id="dirlimit" size="5" value="$dirlimit" /> KB~, |
| { |
| name => 'dirlimit', |
| name => $settings_txt{'images'}, |
| validate => 'number', |
| id => 'images', |
| depends_on => ['allowattach!=0'], |
| items => [ |
| }, |
| { |
| { |
| header => $admin_txt{'471'}, |
| description => qq~<label for="overwrite">$fatxt{'53'}</label>~, |
| }, |
| input_html => qq~ |
| { |
| <select name="overwrite" id="overwrite" size="1"> |
| description => qq~<label for="max_avatar_width">$admin_txt{'472'}</label>~, |
| <option value="0"${isselected($overwrite == 0)}>$fatxt{'54r'}</option> |
| input_html => qq~<input type="text" name="max_avatar_width" id="max_avatar_width" size="5" value="$max_avatar_width" /> pixel~, |
| <option value="1"${isselected($overwrite == 1)}>$fatxt{'54o'}</option> |
| name => 'max_avatar_width', |
| <option value="2"${isselected($overwrite == 2)}>$fatxt{'54n'}</option> |
| validate => 'number', |
| </select>~, |
| }, |
| name => 'overwrite', |
| { |
| validate => 'number', |
| description => qq~<label for="max_avatar_height">$admin_txt{'473'}</label>~, |
| depends_on => ['allowattach!=0'], |
| input_html => qq~<input type="text" name="max_avatar_height" id="max_avatar_height" size="5" value="$max_avatar_height" /> pixel~, |
| }, |
| name => 'max_avatar_height', |
| { header => $settings_txt{'pm_attachments'}, }, |
| validate => 'number', |
| { |
| }, |
| description => |
| { |
| qq~$edit_paths_txt{'20a'}<br />$settings_txt{'changeinpaths'}~, |
| description => qq~<label for="fix_avatar_img_size">$admin_txt{'473x'}</label>~, |
| input_html => $pmuploaddir, # Non-changable setting |
| input_html => qq~<input type="checkbox" name="fix_avatar_img_size" id="fix_avatar_img_size" value="1"${ischecked($fix_avatar_img_size)} />~, |
| }, |
| name => 'fix_avatar_img_size', |
| { |
| validate => 'boolean', |
| description => $settings_txt{'pmuploaddircorrect'}, |
| }, |
| input_html => $pmUploadDirIsCorrect |
| { |
| , # This is tested to see if it's valid at the top of the file. |
| description => qq~<label for="max_post_img_width">$admin_txt{'474'}</label>~, |
| }, |
| input_html => qq~<input type="text" name="max_post_img_width" id="max_post_img_width" size="5" value="$max_post_img_width" /> pixel~, |
| { |
| name => 'max_post_img_width', |
| description => qq~<label for="allow_attach_im">$fatxt{'17a'}</label>~, |
| validate => 'number', |
| input_html => |
| }, |
| qq~<input type="text" name="allowAttachIM" id="allow_attach_im" size="5" value="$allowAttachIM" /> ~, |
| { |
| name => 'allowAttachIM', |
| description => qq~<label for="max_post_img_height">$admin_txt{'475'}</label>~, |
| validate => 'number', |
| input_html => qq~<input type="text" name="max_post_img_height" id="max_post_img_height" size="5" value="$max_post_img_height" /> pixel~, |
| }, |
| name => 'max_post_img_height', |
| { |
| validate => 'number', |
| description => qq~<label for="pm_attach_groups">$fatxt{'17b'}</label>~, |
| }, |
| input_html => q~<select multiple="multiple" name="pmAttachGroups" id="pm_attach_groups" size="8">~ . DrawPerms($pmAttachGroups, 0) . q~</select>~, |
| { |
| name => 'pmAttachGroups', |
| description => qq~<label for="fix_post_img_size">$admin_txt{'475x'}</label>~, |
| validate => 'text,null', |
| input_html => qq~<input type="checkbox" name="fix_post_img_size" id="fix_post_img_size" value="1"${ischecked($fix_post_img_size)} />~, |
| depends_on => ['allowAttachIM!=0'], |
| name => 'fix_post_img_size', |
| }, |
| validate => 'boolean', |
| { |
| }, |
| description => |
| { |
| qq~<label for="pmdisplaypics">$fatxt{'16a'}</label>~, |
| description => qq~<label for="max_signat_img_width">$admin_txt{'476'}</label>~, |
| input_html => |
| input_html => qq~<input type="text" name="max_signat_img_width" id="max_signat_img_width" size="5" value="$max_signat_img_width" /> pixel~, |
| qq~<input type="checkbox" name="pmDisplayPics" id="pmdisplaypics" value="1" ${ischecked($pmDisplayPics)}/>~, |
| name => 'max_signat_img_width', |
| name => 'pmDisplayPics', |
| validate => 'number', |
| validate => 'boolean', |
| }, |
| depends_on => ['allowAttachIM!=0'], |
| { |
| }, |
| description => qq~<label for="max_signat_img_height">$admin_txt{'477'}</label>~, |
| { |
| input_html => qq~<input type="text" name="max_signat_img_height" id="max_signat_img_height" size="5" value="$max_signat_img_height" /> pixel~, |
| description => qq~<label for="pmcheckext">$fatxt{'15'}</label>~, |
| name => 'max_signat_img_height', |
| input_html => |
| validate => 'number', |
| qq~<input type="checkbox" name="pmCheckExt" id="pmcheckext" value="1" ${ischecked($pmCheckExt)}/>~, |
| }, |
| name => 'pmCheckExt', |
| { |
| validate => 'boolean', |
| description => qq~<label for="fix_signat_img_size">$admin_txt{'477x'}</label>~, |
| depends_on => ['allowAttachIM!=0'], |
| input_html => qq~<input type="checkbox" name="fix_signat_img_size" id="fix_signat_img_size" value="1"${ischecked($fix_signat_img_size)} />~, |
| }, |
| name => 'fix_signat_img_size', |
| { |
| validate => 'boolean', |
| description => qq~<label for="pmextensions">$fatxt{'14a'}</label>~, |
| }, |
| input_html => |
| { |
| q~<input type="text" name="pmAttachExt" id="pmextensions" size="35" value="~ |
| description => qq~<label for="max_attach_img_width">$admin_txt{'478'}</label>~, |
| . join( q{ }, @pmAttachExt ) . q~" />~, |
| input_html => qq~<input type="text" name="max_attach_img_width" id="max_attach_img_width" size="5" value="$max_attach_img_width" /> pixel~, |
| name => 'pmAttachExt', |
| name => 'max_attach_img_width', |
| validate => 'text', |
| validate => 'number', |
| depends_on => [ 'allowAttachIM!=0', 'pmCheckExt' ], |
| }, |
| }, |
| { |
| { |
| description => qq~<label for="max_attach_img_height">$admin_txt{'479'}</label>~, |
| description => qq~<label for="pmfilelimit">$fatxt{'12a'}</label>~, |
| input_html => qq~<input type="text" name="max_attach_img_height" id="max_attach_img_height" size="5" value="$max_attach_img_height" /> pixel~, |
| input_html => |
| name => 'max_attach_img_height', |
| qq~<input type="text" name="pmFileLimit" id="pmfilelimit" size="5" value="$pmFileLimit" /> KB~, |
| validate => 'number', |
| name => 'pmFileLimit', |
| }, |
| validate => 'number', |
| { |
| depends_on => ['allowAttachIM!=0'], |
| description => qq~<label for="fix_attach_img_size">$admin_txt{'479x'}</label>~, |
| }, |
| input_html => qq~<input type="checkbox" name="fix_attach_img_size" id="fix_attach_img_size" value="1"${ischecked($fix_attach_img_size)} />~, |
| { |
| name => 'fix_attach_img_size', |
| description => qq~<label for="pmdirlimit">$fatxt{'13a'}</label>~, |
| validate => 'boolean', |
| input_html => |
| }, |
| qq~<input type="text" name="pmDirLimit" id="pmdirlimit" size="5" value="$pmDirLimit" /> KB~, |
| { |
| name => 'pmDirLimit', |
| description => qq~<label for="img_greybox">$admin_txt{'479a'}</label>~, |
| validate => 'number', |
| input_html => qq~ |
| depends_on => ['allowAttachIM!=0'], |
| <select name="img_greybox" id="img_greybox"> |
| }, |
| <option value="0"${isselected(!$img_greybox)}>$admin_txt{'479b'}</option> |
| { |
| <option value="1"${isselected($img_greybox == 1)}>$admin_txt{'479c'}</option> |
| description => qq~<label for="pmfileoverwrite">$fatxt{'53'}</label>~, |
| <option value="2"${isselected($img_greybox == 2)}>$admin_txt{'479d'}</option> |
| input_html => qq~ |
| </select>~, |
| <select name="pmFileOverwrite" id="pmfileoverwrite" size="1"> |
| name => 'img_greybox', |
| <option value="0"${isselected($pmFileOverwrite == 0)}>$fatxt{'54r'}</option> |
| validate => 'number', |
| <option value="1"${isselected($pmFileOverwrite == 1)}>$fatxt{'54o'}</option> |
| }, |
| <option value="2"${isselected($pmFileOverwrite == 2)}>$fatxt{'54n'}</option> |
| ] |
| </select>~, |
| }, |
| name => 'pmFileOverwrite', |
| { |
| validate => 'number', |
| name => $settings_txt{'advanced'}, |
| depends_on => ['allowAttachIM!=0'], |
| id => 'advanced', |
| }, |
| items => [ |
| ], |
| { |
| }, |
| header => $settop_txt{'5'}, |
| { |
| }, |
| name => $settings_txt{'images'}, |
| { |
| id => 'images', |
| description => qq~<label for="gzcomp">$gztxt{'1'}</label>~, |
| items => [ |
| input_html => qq~ |
| { header => $admin_txt{'471'}, }, |
| |
| { |
| |
| description => |
| |
| qq~<label for="max_avatar_width">$admin_txt{'472'}</label>~, |
| |
| input_html => |
| |
| qq~<input type="text" name="max_avatar_width" id="max_avatar_width" size="5" value="$max_avatar_width" /> pixel~, |
| |
| name => 'max_avatar_width', |
| |
| validate => 'number', |
| |
| }, |
| |
| { |
| |
| description => |
| |
| qq~<label for="max_avatar_height">$admin_txt{'473'}</label>~, |
| |
| input_html => |
| |
| qq~<input type="text" name="max_avatar_height" id="max_avatar_height" size="5" value="$max_avatar_height" /> pixel~, |
| |
| name => 'max_avatar_height', |
| |
| validate => 'number', |
| |
| }, |
| |
| { |
| |
| description => |
| |
| qq~<label for="fix_avatar_img_size">$admin_txt{'473x'}</label>~, |
| |
| input_html => |
| |
| qq~<input type="checkbox" name="fix_avatar_img_size" id="fix_avatar_img_size" value="1"${ischecked($fix_avatar_img_size)} />~, |
| |
| name => 'fix_avatar_img_size', |
| |
| validate => 'boolean', |
| |
| }, |
| |
| { |
| |
| description => qq~<label for="max_avatarml_width">$admin_txt{'473a'}</label>~, |
| |
| input_html => qq~<input type="text" name="max_avatarml_width" id="max_avatarml_width" size="5" value="$max_avatarml_width" /> pixel~, |
| |
| name => 'max_avatarml_width', |
| |
| validate => 'number', |
| |
| }, |
| |
| { |
| |
| description => qq~<label for="max_avatarml_height">$admin_txt{'473b'}</label>~, |
| |
| input_html => qq~<input type="text" name="max_avatarml_height" id="max_avatarml_height" size="5" value="$max_avatarml_height" /> pixel~, |
| |
| name => 'max_avatarml_height', |
| |
| validate => 'number', |
| |
| }, |
| |
| { |
| |
| description => qq~<label for="fix_avatarml_img_size">$admin_txt{'473c'}</label>~, |
| |
| input_html => qq~<input type="checkbox" name="fix_avatarml_img_size" id="fix_avatarml_img_size" value="1"${ischecked($fix_avatarml_img_size)} />~, |
| |
| name => 'fix_avatarml_img_size', |
| |
| validate => 'boolean', |
| |
| }, |
| |
| { |
| |
| description => |
| |
| qq~<label for="max_post_img_width">$admin_txt{'474'}</label>~, |
| |
| input_html => |
| |
| qq~<input type="text" name="max_post_img_width" id="max_post_img_width" size="5" value="$max_post_img_width" /> pixel~, |
| |
| name => 'max_post_img_width', |
| |
| validate => 'number', |
| |
| }, |
| |
| { |
| |
| description => |
| |
| qq~<label for="max_post_img_height">$admin_txt{'475'}</label>~, |
| |
| input_html => |
| |
| qq~<input type="text" name="max_post_img_height" id="max_post_img_height" size="5" value="$max_post_img_height" /> pixel~, |
| |
| name => 'max_post_img_height', |
| |
| validate => 'number', |
| |
| }, |
| |
| { |
| |
| description => |
| |
| qq~<label for="fix_post_img_size">$admin_txt{'475x'}</label>~, |
| |
| input_html => |
| |
| qq~<input type="checkbox" name="fix_post_img_size" id="fix_post_img_size" value="1"${ischecked($fix_post_img_size)} />~, |
| |
| name => 'fix_post_img_size', |
| |
| validate => 'boolean', |
| |
| }, |
| |
| { |
| |
| description => |
| |
| qq~<label for="max_signat_img_width">$admin_txt{'476'}</label>~, |
| |
| input_html => |
| |
| qq~<input type="text" name="max_signat_img_width" id="max_signat_img_width" size="5" value="$max_signat_img_width" /> pixel~, |
| |
| name => 'max_signat_img_width', |
| |
| validate => 'number', |
| |
| }, |
| |
| { |
| |
| description => |
| |
| qq~<label for="max_signat_img_height">$admin_txt{'477'}</label>~, |
| |
| input_html => |
| |
| qq~<input type="text" name="max_signat_img_height" id="max_signat_img_height" size="5" value="$max_signat_img_height" /> pixel~, |
| |
| name => 'max_signat_img_height', |
| |
| validate => 'number', |
| |
| }, |
| |
| { |
| |
| description => |
| |
| qq~<label for="fix_signat_img_size">$admin_txt{'477x'}</label>~, |
| |
| input_html => |
| |
| qq~<input type="checkbox" name="fix_signat_img_size" id="fix_signat_img_size" value="1"${ischecked($fix_signat_img_size)} />~, |
| |
| name => 'fix_signat_img_size', |
| |
| validate => 'boolean', |
| |
| }, |
| |
| { |
| |
| description => |
| |
| qq~<label for="max_attach_img_width">$admin_txt{'478'}</label>~, |
| |
| input_html => |
| |
| qq~<input type="text" name="max_attach_img_width" id="max_attach_img_width" size="5" value="$max_attach_img_width" /> pixel~, |
| |
| name => 'max_attach_img_width', |
| |
| validate => 'number', |
| |
| }, |
| |
| { |
| |
| description => |
| |
| qq~<label for="max_attach_img_height">$admin_txt{'479'}</label>~, |
| |
| input_html => |
| |
| qq~<input type="text" name="max_attach_img_height" id="max_attach_img_height" size="5" value="$max_attach_img_height" /> pixel~, |
| |
| name => 'max_attach_img_height', |
| |
| validate => 'number', |
| |
| }, |
| |
| { |
| |
| description => |
| |
| qq~<label for="fix_attach_img_size">$admin_txt{'479x'}</label>~, |
| |
| input_html => |
| |
| qq~<input type="checkbox" name="fix_attach_img_size" id="fix_attach_img_size" value="1"${ischecked($fix_attach_img_size)} />~, |
| |
| name => 'fix_attach_img_size', |
| |
| validate => 'boolean', |
| |
| }, |
| |
| { |
| |
| description => |
| |
| qq~<label for="max_brd_img_width">$admin_txt{'brd_pic_w'}</label>~, |
| |
| input_html => |
| |
| qq~<input type="text" name="max_brd_img_width" id="max_brd_img_width" size="5" value="$max_brd_img_width" /> pixel~, |
| |
| name => 'max_brd_img_width', |
| |
| validate => 'number', |
| |
| }, |
| |
| { |
| |
| description => |
| |
| qq~<label for="max_brd_img_height">$admin_txt{'brd_pic_h'}</label>~, |
| |
| input_html => |
| |
| qq~<input type="text" name="max_brd_img_height" id="max_brd_img_height" size="5" value="$max_brd_img_height" /> pixel~, |
| |
| name => 'max_brd_img_height', |
| |
| validate => 'number', |
| |
| }, |
| |
| { |
| |
| description => |
| |
| qq~<label for="fix_brd_img_size">$admin_txt{'brd_pic'}</label>~, |
| |
| input_html => |
| |
| qq~<input type="checkbox" name="fix_brd_img_size" id="fix_brd_img_size" value="1"${ischecked($fix_brd_img_size)} />~, |
| |
| name => 'fix_brd_img_size', |
| |
| validate => 'boolean', |
| |
| }, |
| |
| { |
| |
| description => |
| |
| qq~<label for="img_greybox">$admin_txt{'479a'}</label>~, |
| |
| input_html => qq~ |
| |
| <select name="img_greybox" id="img_greybox"> |
| |
| <option value="0"${isselected(!$img_greybox)}>$admin_txt{'479b'}</option> |
| |
| <option value="1"${isselected($img_greybox == 1)}>$admin_txt{'479c'}</option> |
| |
| <option value="2"${isselected($img_greybox == 2)}>$admin_txt{'479d'}</option> |
| |
| </select>~, |
| |
| name => 'img_greybox', |
| |
| validate => 'number', |
| |
| }, |
| |
| ] |
| |
| }, |
| |
| { |
| |
| name => $settings_txt{'advanced'}, |
| |
| id => 'advanced', |
| |
| items => [ |
| |
| { header => $settop_txt{'5'}, }, |
| |
| { |
| |
| description => qq~<label for="gzcomp">$gztxt{'1'}</label>~, |
| |
| input_html => qq~ |
| <select name="gzcomp" id="gzcomp" size="1"> |
| <select name="gzcomp" id="gzcomp" size="1"> |
| <option value="0" ${isselected($gzcomp == 0)}>$gztxt{'3'}</option>$compressgzip$compresszlib |
| <option value="0" ${isselected($gzcomp == 0)}>$gztxt{'3'}</option>$compressgzip$compresszlib |
| </select>~, |
| </select>~, |
| name => 'gzcomp', |
| name => 'gzcomp', |
| validate => 'number', |
| validate => 'number', |
| }, |
| }, |
| { |
| { |
| description => qq~<label for="gzforce">$gztxt{'2'}</label>~, |
| description => qq~<label for="gzforce">$gztxt{'2'}</label>~, |
| input_html => qq~<input type="checkbox" name="gzforce" id="gzforce" value="1" ${ischecked($gzforce)}/>~, |
| input_html => |
| name => 'gzforce', |
| qq~<input type="checkbox" name="gzforce" id="gzforce" value="1" ${ischecked($gzforce)}/>~, |
| validate => 'boolean', |
| name => 'gzforce', |
| depends_on => ['gzcomp!=0'], |
| validate => 'boolean', |
| }, |
| depends_on => ['gzcomp!=0'], |
| { |
| }, |
| description => qq~<label for="cachebehaviour">$admin_txt{'802'}</label>~, |
| { |
| input_html => qq~<input type="checkbox" name="cachebehaviour" id="cachebehaviour" value="1" ${ischecked($cachebehaviour)}/>~, |
| description => |
| name => 'cachebehaviour', |
| qq~<label for="cachebehaviour">$admin_txt{'802'}</label>~, |
| validate => 'boolean', |
| input_html => |
| }, |
| qq~<input type="checkbox" name="cachebehaviour" id="cachebehaviour" value="1" ${ischecked($cachebehaviour)}/>~, |
| { |
| name => 'cachebehaviour', |
| description => qq~<label for="enableclicklog">$admin_txt{'803'}</label>~, |
| validate => 'boolean', |
| input_html => qq~<input type="checkbox" name="enableclicklog" id="enableclicklog" value="1" ${ischecked($enableclicklog)}/>~, |
| }, |
| name => 'enableclicklog', |
| { |
| validate => 'boolean', |
| description => |
| }, |
| qq~<label for="enableclicklog">$admin_txt{'803'}</label>~, |
| { |
| input_html => |
| description => qq~<label for="ClickLogTime">$admin_txt{'690'}</label>~, |
| qq~<input type="checkbox" name="enableclicklog" id="enableclicklog" value="1" ${ischecked($enableclicklog)}/>~, |
| input_html => qq~<input type="text" name="ClickLogTime" id="ClickLogTime" size="5" value="$ClickLogTime" />~, |
| name => 'enableclicklog', |
| name => 'ClickLogTime', |
| validate => 'boolean', |
| validate => 'number', |
| }, |
| depends_on => ['enableclicklog'], |
| { |
| }, |
| description => |
| { |
| qq~<label for="ClickLogTime">$admin_txt{'690'}</ |