Update of /cvs/scoop/scoop/struct
In directory sodium.sabren.com:/tmp/cvs-serv14523/struct
Modified Files:
scoop.sql
Log Message:
Fixes for userprefs (and comment post form) and some patented rusty
"wouldn't it be cool if" features for userprefs.
-janra
Index: scoop.sql
===================================================================
RCS file: /cvs/scoop/scoop/struct/scoop.sql,v
retrieving revision 1.199
retrieving revision 1.200
diff -C2 -d -r1.199 -r1.200
*** scoop.sql 4 Aug 2004 21:49:48 -0000 1.199
--- scoop.sql 17 Aug 2004 19:03:41 -0000 1.200
***************
*** 1,5 ****
# MySQL dump 8.14
#
! # Host: localhost Database: scoopdev
#--------------------------------------------------------
# Server version 3.23.39-log
--- 1,5 ----
# MySQL dump 8.14
#
! # Host: localhost Database: scoop
#--------------------------------------------------------
# Server version 3.23.39-log
***************
*** 256,260 ****
INSERT INTO blocks VALUES ('spell_err','<font color=\"red\">','1','<P>This block is used to format misspelled words if the spellchecking system is installed and active. It should be a complete opening font tag or other formatting tag. It should match its closing tag set in the block <B>spell_err_end</B>.</P>','Fonts','default','en');
INSERT INTO blocks VALUES ('spell_err_end','</font>','1','<P>This block is used to format misspelled words if the spellchecking system is installed and active. It should be a closing tag for whatever is in the block <B>spell_err</B>.</P>','Fonts','default','en');
! INSERT INTO blocks VALUES ('new_user_html','%%title_font%%Create New User Account%%title_font_end%%\r\n<H3><CENTER>%%error_font%%%%error%%%%error_font_end%%</CENTER></H3>\r\n\r\n<P>%%norm_font%%In order to create an account (which is free), fill out this form. You will receive an email containing your username and autogenerated password, at the address you provide here. Use this data to login. It\'s that easy.%%norm_font_end%%</P>\r\n\r\n<P>%%norm_font%%Why is the password autogenerated? First, random passwords are typically more secure than non-random ones. Second, by requiring you to log in using a password we send you, we can make sure that the email address is valid. This makes it harder for malicious users to abuse the account creation system by creating an arbitrary number of accounts and spamming the site with stories or comments. If you do not like your autogenerated password, you can easily change it after logging in.%%norm_font_end%%</P>\r\n\r\n<P>%%norm_font%%Ag!
ain, your password will be mailed to the email address you enter here, so it <B>must</B> work. Do NOT enter a spam-protected or fake email address.%%norm_font_end%%</P>\r\n\r\n<P>%%norm_font%%If you are concerned about privacy, this email does not have to be in any way traceable to you. We will never use the email you provide here for anything else, ever. All it needs to be is working, and accessible to you, at the time the account is created.%%norm_font_end%%</P>\r\n\r\n<P>%%norm_font%%Now get started, and we hope you enjoy %%sitename%%!%%norm_font_end%%</P>\r\n\r\n<FORM NAME=\"adduser\" METHOD=\"post\" ACTION=\"%%rootdir%%/\">\r\n <INPUT TYPE=\"hidden\" name=\"tool\" VALUE=\"writeuser\">\r\n <INPUT TYPE=\"hidden\" name=\"op\" VALUE=\"newuser\">\r\n <INPUT TYPE=\"hidden\" name=\"formkey\" VALUE=\"%%formkey%%\">\r\n\r\n<TABLE>\r\n <TR>\r\n <TD>%%norm_font%%Please enter your desired username:</TD>\r\n <TD>%%norm_font%%<INPUT TYPE=\"text\" NAME=\"nickname\" SIZE=30 VA!
LUE=\"%%uname%%\">%%norm_font_end%%</TD>\r\n </TR>\r\n\r\n <TR>\r\n
<TD COLSPAN=2>%%smallfont%%(Legal characters: a-z, A-Z, 0-9, space. Names may not start or end with a space, and may not contain more than one space in a row.)%%smallfont_end%%</TD>\r\n </TR>\r\n\r\n <TR>\r\n <TD>%%norm_font%%and a working email (this will never be made public!):\r\n <BR><B><FONT COLOR=\"#FF0000\">Check this for typos!</FONT></B>%%norm_font_end%%</TD>\r\n <TD>%%norm_font%%<INPUT TYPE=\"text\" NAME=\"email\" VALUE=\"%%email%%\" SIZE=30>%%norm_font_end%%</TD>\r\n </TR>\r\n <tr>\r\n <td colspan=2 align=\"right\">%%norm_font%%%%required_prefs%%<br><input type=\"submit\" value=\"Create Account!\" size=\"30\" />%%norm_font_end%%</td>\r\n </tr>\r\n</table>\r\n</form>\r\n','1','<P>This block contains the explanation of the account creation process as well as the form the user fills in to create an account. It should be reasonably self-contained. It must contain the following form elements:</P>\n<DL>\n <DT>FORM</DT>\n <DD>The form should post to yo!
ur site\'s rootdir.</DD>\n <DT>op</DT>\n <DD>This should be a hidden field with a value of \"newuser\".</DD>\n <DT>tool</DT>\n <DD>This should be a hidden field with a value of \"writeuser\".</DD>\n <DT>formkey</DT>\n <DD>This should be a hidden field with a value of \"|formkey|\" (see special keys, below).</DD>\n <DT>nickname</DT>\n <DD>This should be a text field with a default value of \"|uname|\" (see special keys, below).</DD>\n <DT>email</DT>\n <DD>This should be a text field with a default value of \"|email|\" (see special keys, below).</DD>\n <DT>button</DT>\n <DD>A submit button to send the fields in.</DD>\n</DL>\n<P>The following special keys are recognized:</P>\n<DL>\n <DT>error</DT>\n <DD>Any error messages (such as invalid characters in the nickname field).</DD>\n <DT>uname</DT>\n <DD>Usually blank; if there is an error with the email field, this is the nickname entered by the user.</DD>\n <DT>email</DT>\n <DD>Usually blank; if there is an error with t!
he nickname field, this is the email address entered by the user.</DD>
\n <DT>formkey</DT>\n <DD>A code-generated formkey used to hinder scripts trying to make large numbers of accounts.</DD>\n</DL>','General','default','en');
INSERT INTO blocks VALUES ('new_advertiser_html','%%title_font%%Upgrade to an Advertiser Account%%title_font_end%%\r\n<H3><CENTER>%%error_font%%%%error%%%%error_font_end%%</CENTER></H3>\r\n\r\n<P>%%norm_font%%Since you have expressed an interest in advertising on this site, I\'ll be needing a bit more information about you, for billing purposes.%%norm_font_end%%</P>\r\n<P>%%norm_font%% %%advertising_account_disclaimer%% %%norm_font_end%%</P>\r\n\r\n<form name=\"adduser\" method=\"post\" action=\"%%rootdir%%\">\r\n<input type=\"hidden\" name=\"tool\" value=\"writeuser\">\r\n<input type=\"hidden\" name=\"op\" value=\"newuser\">\r\n<input type=\"hidden\" name=\"formkey\" value=\"%%formkey%%\">\r\n<input type=\"hidden\" name=\"advertiser\" value=\"1\">\r\n\r\n<TABLE>\r\n <TR>\r\n <TD align=\"right\">%%norm_font%%Your Name:%%norm_font_end%%</TD>\r\n <TD align=\"left\"><input type=\"text\" name=\"realname\" value=\"%%yourname%%\" size=\"30\"></TD>\r\n </TR>\r\n <TR>\r\n <TD a!
lign=\"right\">%%norm_font%%Business name:%%norm_font_end%%</TD>\r\n <TD align=\"left\"><input type=\"text\" name=\"bizname\" value=\"%%bizname%%\" size=\"40\"></TD>\r\n </TR>\r\n <TR>\r\n <TD align=\"right\">%%norm_font%%Contact phone number:%%norm_font_end%%</TD>\r\n <TD align=\"left\"><input type=\"text\" name=\"bizphone\" value=\"%%bizphone%%\" size=\"12\"></TD>\r\n </TR>\r\n <TR>\r\n <TD align=\"right\">%%norm_font%%Mailing Address:%%norm_font_end%%</TD>\r\n <TD align=\"left\"><textarea cols=\"30\" rows=\"5\" name=\"snailmail\" value=\"%%snailmail%%\"></textarea></TD>\r\n </TR>\r\n <tr>\r\n <td colspan=2 align=\"right\">%%norm_font%%<input type=\"submit\" value=\"Create Account!\" size=\"30\">\r\n%%norm_font_end%%</td>\r\n </tr>\r\n</table>\r\n</form>','1','<P>This block is displayed on the account signup page if the user is creating an advertising account. This is yet another unimplemented ad feature. Advertising accounts are only partly implemented; for now, th!
ere is no automated way to collect extra information from advertisers.
</P>','Ads','default','en');
INSERT INTO blocks VALUES ('advertising_account_disclaimer','<P>Please remember the following with your new advertising account.</P>\r\n\r\n<P><b>Any stories posted to this site for purely advertising purposes will void your contract with us.</b> The articles and diaries on this site are <b>not for advertising purposes</b>. This account entitles you to submit ads for posting in specified places on the page only. If you are caught abusing this account, you\'re ads will be disabled, no money will be refunded, and your account will be disabled. If you have any questions about this send mail to %%local_email%%.\r\n</P>\r\n\r\n<P>Thank you for your understanding.</P>','1','<P>This block is displayed in the form that collects extra information from advertisers when they create an \"advertiser account\". It is only relevant if the variable <B>req_extra_advertiser_info</B> is set to 1. It should contain whatever extra terms your site requires of an advertising account, if the!
y are distinguished from regular accounts. There are no special keys.</P>','Ads','default','en');
--- 256,260 ----
INSERT INTO blocks VALUES ('spell_err','<font color=\"red\">','1','<P>This block is used to format misspelled words if the spellchecking system is installed and active. It should be a complete opening font tag or other formatting tag. It should match its closing tag set in the block <B>spell_err_end</B>.</P>','Fonts','default','en');
INSERT INTO blocks VALUES ('spell_err_end','</font>','1','<P>This block is used to format misspelled words if the spellchecking system is installed and active. It should be a closing tag for whatever is in the block <B>spell_err</B>.</P>','Fonts','default','en');
! INSERT INTO blocks VALUES ('new_user_html','%%title_font%%Create New User Account%%title_font_end%%\r\n<H3><CENTER>%%error_font%%%%error%%%%error_font_end%%</CENTER></H3>\r\n\r\n<P>%%norm_font%%In order to create an account (which is free), fill out this form. You will receive an email containing your username and autogenerated password, at the address you provide here. Use this data to login. It\'s that easy.%%norm_font_end%%</P>\r\n\r\n<P>%%norm_font%%Why is the password autogenerated? First, random passwords are typically more secure than non-random ones. Second, by requiring you to log in using a password we send you, we can make sure that the email address is valid. This makes it harder for malicious users to abuse the account creation system by creating an arbitrary number of accounts and spamming the site with stories or comments. If you do not like your autogenerated password, you can easily change it after logging in.%%norm_font_end%%</P>\r\n\r\n<P>%%norm_font%%Ag!
ain, your password will be mailed to the email address you enter here, so it <B>must</B> work. Do NOT enter a spam-protected or fake email address.%%norm_font_end%%</P>\r\n\r\n<P>%%norm_font%%If you are concerned about privacy, this email does not have to be in any way traceable to you. We will never use the email you provide here for anything else, ever. All it needs to be is working, and accessible to you, at the time the account is created.%%norm_font_end%%</P>\r\n\r\n<P>%%norm_font%%Now get started, and we hope you enjoy %%sitename%%!%%norm_font_end%%</P>\r\n\r\n<FORM NAME=\"adduser\" METHOD=\"post\" ACTION=\"%%rootdir%%/\">\r\n <INPUT TYPE=\"hidden\" name=\"tool\" VALUE=\"writeuser\">\r\n <INPUT TYPE=\"hidden\" name=\"op\" VALUE=\"newuser\">\r\n <INPUT TYPE=\"hidden\" name=\"formkey\" VALUE=\"%%formkey%%\">\r\n\r\n<TABLE>\r\n <TR>\r\n <TD>%%norm_font%%Please enter your desired username:</TD>\r\n <TD>%%norm_font%%<INPUT TYPE=\"text\" NAME=\"nickname\" SIZE=30 VA!
LUE=\"%%uname%%\">%%norm_font_end%%</TD>\r\n </TR>\r\n\r\n <TR>\r\n
<TD COLSPAN=2>%%smallfont%%(Legal characters: a-z, A-Z, 0-9, space. Names may not start or end with a space, and may not contain more than one space in a row.)%%smallfont_end%%</TD>\r\n </TR>\r\n\r\n <TR>\r\n <TD>%%norm_font%%and a working email (this will never be made public!):\r\n <BR><B><FONT COLOR=\"#FF0000\">Check this for typos!</FONT></B>%%norm_font_end%%</TD>\r\n <TD>%%norm_font%%<INPUT TYPE=\"text\" NAME=\"email\" VALUE=\"%%email%%\" SIZE=30>%%norm_font_end%%</TD>\r\n </TR>\r\n <tr>\r\n <td colspan=2 align=\"right\">%%norm_font%%%%signup_prefs%%<br><input type=\"submit\" value=\"Create Account!\" size=\"30\" />%%norm_font_end%%</td>\r\n </tr>\r\n</table>\r\n</form>\r\n','1','<P>This block contains the explanation of the account creation process as well as the form the user fills in to create an account. It should be reasonably self-contained. It must contain the following form elements:</P>\n<DL>\n <DT>FORM</DT>\n <DD>The form should post to your!
site\'s rootdir.</DD>\n <DT>op</DT>\n <DD>This should be a hidden field with a value of \"newuser\".</DD>\n <DT>tool</DT>\n <DD>This should be a hidden field with a value of \"writeuser\".</DD>\n <DT>formkey</DT>\n <DD>This should be a hidden field with a value of \"|formkey|\" (see special keys, below).</DD>\n <DT>nickname</DT>\n <DD>This should be a text field with a default value of \"|uname|\" (see special keys, below).</DD>\n <DT>email</DT>\n <DD>This should be a text field with a default value of \"|email|\" (see special keys, below).</DD>\n <DT>button</DT>\n <DD>A submit button to send the fields in.</DD>\n</DL>\n<P>The following special keys are recognized:</P>\n<DL>\n <DT>error</DT>\n <DD>Any error messages (such as invalid characters in the nickname field).</DD>\n <DT>uname</DT>\n <DD>Usually blank; if there is an error with the email field, this is the nickname entered by the user.</DD>\n <DT>email</DT>\n <DD>Usually blank; if there is an error with the!
nickname field, this is the email address entered by the user.</DD>\n
<DT>formkey</DT>\n <DD>A code-generated formkey used to hinder scripts trying to make large numbers of accounts.</DD>\n</DL>','General','default','en');
INSERT INTO blocks VALUES ('new_advertiser_html','%%title_font%%Upgrade to an Advertiser Account%%title_font_end%%\r\n<H3><CENTER>%%error_font%%%%error%%%%error_font_end%%</CENTER></H3>\r\n\r\n<P>%%norm_font%%Since you have expressed an interest in advertising on this site, I\'ll be needing a bit more information about you, for billing purposes.%%norm_font_end%%</P>\r\n<P>%%norm_font%% %%advertising_account_disclaimer%% %%norm_font_end%%</P>\r\n\r\n<form name=\"adduser\" method=\"post\" action=\"%%rootdir%%\">\r\n<input type=\"hidden\" name=\"tool\" value=\"writeuser\">\r\n<input type=\"hidden\" name=\"op\" value=\"newuser\">\r\n<input type=\"hidden\" name=\"formkey\" value=\"%%formkey%%\">\r\n<input type=\"hidden\" name=\"advertiser\" value=\"1\">\r\n\r\n<TABLE>\r\n <TR>\r\n <TD align=\"right\">%%norm_font%%Your Name:%%norm_font_end%%</TD>\r\n <TD align=\"left\"><input type=\"text\" name=\"realname\" value=\"%%yourname%%\" size=\"30\"></TD>\r\n </TR>\r\n <TR>\r\n <TD a!
lign=\"right\">%%norm_font%%Business name:%%norm_font_end%%</TD>\r\n <TD align=\"left\"><input type=\"text\" name=\"bizname\" value=\"%%bizname%%\" size=\"40\"></TD>\r\n </TR>\r\n <TR>\r\n <TD align=\"right\">%%norm_font%%Contact phone number:%%norm_font_end%%</TD>\r\n <TD align=\"left\"><input type=\"text\" name=\"bizphone\" value=\"%%bizphone%%\" size=\"12\"></TD>\r\n </TR>\r\n <TR>\r\n <TD align=\"right\">%%norm_font%%Mailing Address:%%norm_font_end%%</TD>\r\n <TD align=\"left\"><textarea cols=\"30\" rows=\"5\" name=\"snailmail\" value=\"%%snailmail%%\"></textarea></TD>\r\n </TR>\r\n <tr>\r\n <td colspan=2 align=\"right\">%%norm_font%%<input type=\"submit\" value=\"Create Account!\" size=\"30\">\r\n%%norm_font_end%%</td>\r\n </tr>\r\n</table>\r\n</form>','1','<P>This block is displayed on the account signup page if the user is creating an advertising account. This is yet another unimplemented ad feature. Advertising accounts are only partly implemented; for now, th!
ere is no automated way to collect extra information from advertisers.
</P>','Ads','default','en');
INSERT INTO blocks VALUES ('advertising_account_disclaimer','<P>Please remember the following with your new advertising account.</P>\r\n\r\n<P><b>Any stories posted to this site for purely advertising purposes will void your contract with us.</b> The articles and diaries on this site are <b>not for advertising purposes</b>. This account entitles you to submit ads for posting in specified places on the page only. If you are caught abusing this account, you\'re ads will be disabled, no money will be refunded, and your account will be disabled. If you have any questions about this send mail to %%local_email%%.\r\n</P>\r\n\r\n<P>Thank you for your understanding.</P>','1','<P>This block is displayed in the form that collects extra information from advertisers when they create an \"advertiser account\". It is only relevant if the variable <B>req_extra_advertiser_info</B> is set to 1. It should contain whatever extra terms your site requires of an advertising account, if the!
y are distinguished from regular accounts. There are no special keys.</P>','Ads','default','en');
***************
*** 366,370 ****
INSERT INTO blocks VALUES ('box_failed_msg','This box seems to be broken. Please <A href=\"mailto:%%local_email%%?subject=broken%20box%20on%20%%sitename%%\">email the site admin</A> and tell them the time and date (and your timezone) so it can be fixed.','1','<P>The message displayed inside the template <B>error_box</B> when a box fails with a fatal error. The actual error message generated will be printed to the site\'s error log. There are no special keys.</P>','Error Messages','default','en');
INSERT INTO blocks VALUES ('commentreply_display','<DIV>\r\n %%title_font%%Replying To:%%title_font_end%%\r\n %%replying_to%%\r\n %%post_form%%\r\n</div>','1','<P>This block lays out the comment post form. It recognises the following special keys:</P>\n<DL>\n <DT>replying_to</DT>\n <DD>The story or comment the user is replying to.</DD>\n <DT>post_form</DT>\n <DD>The actual comment posting form. This is laid out in the block <B>comment_post_form</B>.</DD>\n</DL>','Comments','default','en');
! INSERT INTO blocks VALUES ('comment_not_logged_in','<P>%%norm_font%%You are not logged in. If you don\'t have a user account yet, by all means <A HREF=\"%%rootdir%%/newuser\">go make one</A>! If you do have one, you can post as \"yourself\" by filling in your nickname and password below. Otherwise, your comment will be posted as <B>$anon</B>.%%norm_font_end%%</P>\r\n\r\n<P>%%norm_font%%<A HREF=\"%%rootdir%%/newuser\">Create Account</A>\r\n<BR>Nickname: <INPUT TYPE=\"text\" SIZE=\"30\" NAME=\"uname\">\r\n<BR>Password: <INPUT TYPE=\"password\" SIZE=\"30\" NAME=\"pass\">%%norm_font_end%%</P>\r\n','1','<P>This block contains the message and login form shown when an anonymous user tries to post a comment (if anonymous users can post comments). There are no special keys. The login form must have fields named \"uname\" and \"pass\".</P>','Comments','default','en');
INSERT INTO blocks VALUES ('comment_posted_display','%%comment_controls%%\r\n<div>\r\n %%post_msg%%\r\n %%new_comment%%\r\n</div>\r\n','1','<P>This block lays out the comment display after the comment has been posted. The special keys are:</P>\n<DL>\n <DT>comment_controls</DT>\n <DD>the comment display options</DD>\n <DT>post_msg</DT>\n <DD>If the user is untrusted (has a mojo below <B>rating_min</B>) the block <B>untrusted_post_message</B> is displayed here, otherwise the block <B>comment_posted_message</B></DD>\n <DT>new_comment</DT>\n <DD>The comment just posted.</DD>\n</DL>','Comments','default','en');
INSERT INTO blocks VALUES ('comment_post_form','<DIV>\r\n <FORM NAME=\"postcomment\" ACTION=\"%%rootdir%%/comments/%%sid%%/%%pid%%/post#here\" METHOD=\"POST\">\r\n %%title_font%%%%preview_msg%%%%title_font_end%%\r\n <P>%%COMM_ERR%%</P>\r\n %%PRE_COMMENT%%\r\n %%title_font%%<A NAME=\"%%here%%\"><B>Post Comment</B></A>%%title_font_end%%\r\n <P>%%norm_font%%%%not_logged_in%%%%norm_font_end%%</P>\r\n <P>%%norm_font%%%%commentdisclaimer%%%%norm_font_end%%</P>\r\n %%formkey_element%%\r\n <P>%%norm_font%%%%post_as%%%%norm_font_end%%</P>\r\n <P>%%norm_font%%Subject:%%norm_font_end%%%%pending_form%%<BR>\r\n %%norm_font%%<INPUT TYPE=\"text\" size=50 name=\"subject\" VALUE=\"%%subject%%\" maxlength=50>%%norm_font_end%%</P>\r\n <P>%%norm_font%%Comment:%%norm_font_end%%<BR>\r\n %%norm_font%%<TEXTAREA NAME=\"comment\" COLS=%%textarea_cols%% ROWS=%%textarea_rows%% WRAP=\"soft\">%%comment_body%%</TEXTAREA>%%norm_font_end%%</P>\r\n <P>%%spellcheck_form%%</P>\r\n <P>%%sig_beh!
avior_form%%</P>\r\n <P>%%norm_font%%\r\n <INPUT TYPE=\"submit\" NAME=\"preview\" VALUE=\"Preview\">\r\n %%post_opt%%\r\n <INPUT TYPE=\"submit\" NAME=\"post\" VALUE=\"Post\">%%norm_font_end%%</P>\r\n <P>%%norm_font%%%%allow_tags%%%%norm_font_end%%</P>\r\n </FORM>\r\n</DIV>','1','<P>This block lays out the comment post form. The following form elements are used:</P>\n<DL>\n <DT>subject</DT>\n <DD>The form field for the comment subject. Generally a regular text input.</DD>\n <DT>comment</DT>\n <DD>The form field for the comment body. Generally a textarea.</DD>\n <DT>preview</DT>\n <DD>The \"preview\" button. Value can be anything that isn\'t a perl false value (zero or empty string)</DD>\n <DT>post</DT>\n <DD>The \"post\" button. Value can be anything that isn\'t a perl false value (zero or empty string)</DD>\n</DL>\n<P>The following special keys are used:</P>\n<DL>\n <DT>sid</DT>\n <DD>The sid of the story the comment will be attached to</DD>\n <DT>pid</DT>\!
n <DD>The comment ID of the comment being replied to</DD>\n <DT>previ
ew_msg</DT>\n <DD>The contents of the block <B>comment_preview_msg</B>, if there\'s a comment currently being previewed.</DD>\n <DT>COMM_ERR</DT>\n <DD>Any error messages generated during the post or preview process.</DD>\n <DT>PRE_COMMENT</DT>\n <DD>The formatted comment being previewed</DD>\n <DT>here</DT>\n <DD>Either \"here\" (if there\'s no comment being previewed) or \"there\" (if there is) so that the anchors work out properly</DD>\n <DT>not_logged_in</DT>\n <DD>The contents of the block <B>comment_not_logged_in</B> if the user is not currently logged in</DD>\n <DT>formkey_element</DT>\n <DD>The formkey for the comment post form</DD>\n <DT>post_as</DT>\n <DD>If anonymous users are allowed to post and the user is logged in, this is a selectbox that allows the user to choose whether to post anonymously or not</DD>\n <DT>pending_form</DT>\n <DD>If the story is still in the queue, this is a selectbox that allows the user to choose whether to post an editorial or t!
opical comment.</DD>\n <DT>subject</DT>\n <DD>The comment\'s subject, used as a default value for the subject form element</DD>\n <DT>textarea_cols</DT>\n <DD>The user preference for size of the textarea</DD>\n <DT>textarea_rows</DT>\n <DD>The user preference for size of the textarea</DD>\n <DT>comment_body</DT>\n <DD>The comment\'s body, used as a default value for the comment form element</DD>\n <DT>spellcheck_form</DT>\n <DD>The contents of the block <B>spellcheck_form_item</B> if spellcheck is turned on</DD>\n <DT>sig_behavior_form</DT>\n <DD>A form element that allows users to choose whether or how to display their sig, if permitted and if they have a sig</DD>\n <DT>post_opt</DT>\n <DD>A form element that allows users to choose which post mode (plain text, autoformat, html) they want to use</DD>\n <DT>allow_tags</DT>\n <DD>The \"allowed HTML\"</DD>\n</DL>','Comments','default','en');
--- 366,370 ----
INSERT INTO blocks VALUES ('box_failed_msg','This box seems to be broken. Please <A href=\"mailto:%%local_email%%?subject=broken%20box%20on%20%%sitename%%\">email the site admin</A> and tell them the time and date (and your timezone) so it can be fixed.','1','<P>The message displayed inside the template <B>error_box</B> when a box fails with a fatal error. The actual error message generated will be printed to the site\'s error log. There are no special keys.</P>','Error Messages','default','en');
INSERT INTO blocks VALUES ('commentreply_display','<DIV>\r\n %%title_font%%Replying To:%%title_font_end%%\r\n %%replying_to%%\r\n %%post_form%%\r\n</div>','1','<P>This block lays out the comment post form. It recognises the following special keys:</P>\n<DL>\n <DT>replying_to</DT>\n <DD>The story or comment the user is replying to.</DD>\n <DT>post_form</DT>\n <DD>The actual comment posting form. This is laid out in the block <B>comment_post_form</B>.</DD>\n</DL>','Comments','default','en');
! INSERT INTO blocks VALUES ('comment_not_logged_in','<P>%%norm_font%%You are not logged in. If you don\'t have a user account yet, by all means <A HREF=\"%%rootdir%%/newuser\">go make one</A>! If you do have one, you can post as \"yourself\" by filling in your nickname and password below. Otherwise, your comment will be posted as <B>%%anon_user_nick%%</B>.%%norm_font_end%%</P>\r\n\r\n<P>%%norm_font%%<A HREF=\"%%rootdir%%/newuser\">Create Account</A>\r\n<BR>Nickname: <INPUT TYPE=\"text\" SIZE=\"30\" NAME=\"uname\">\r\n<BR>Password: <INPUT TYPE=\"password\" SIZE=\"30\" NAME=\"pass\">%%norm_font_end%%</P>\r\n','1','<P>This block contains the message and login form shown when an anonymous user tries to post a comment (if anonymous users can post comments). There are no special keys. The login form must have fields named \"uname\" and \"pass\".</P>','Comments','default','en');
INSERT INTO blocks VALUES ('comment_posted_display','%%comment_controls%%\r\n<div>\r\n %%post_msg%%\r\n %%new_comment%%\r\n</div>\r\n','1','<P>This block lays out the comment display after the comment has been posted. The special keys are:</P>\n<DL>\n <DT>comment_controls</DT>\n <DD>the comment display options</DD>\n <DT>post_msg</DT>\n <DD>If the user is untrusted (has a mojo below <B>rating_min</B>) the block <B>untrusted_post_message</B> is displayed here, otherwise the block <B>comment_posted_message</B></DD>\n <DT>new_comment</DT>\n <DD>The comment just posted.</DD>\n</DL>','Comments','default','en');
INSERT INTO blocks VALUES ('comment_post_form','<DIV>\r\n <FORM NAME=\"postcomment\" ACTION=\"%%rootdir%%/comments/%%sid%%/%%pid%%/post#here\" METHOD=\"POST\">\r\n %%title_font%%%%preview_msg%%%%title_font_end%%\r\n <P>%%COMM_ERR%%</P>\r\n %%PRE_COMMENT%%\r\n %%title_font%%<A NAME=\"%%here%%\"><B>Post Comment</B></A>%%title_font_end%%\r\n <P>%%norm_font%%%%not_logged_in%%%%norm_font_end%%</P>\r\n <P>%%norm_font%%%%commentdisclaimer%%%%norm_font_end%%</P>\r\n %%formkey_element%%\r\n <P>%%norm_font%%%%post_as%%%%norm_font_end%%</P>\r\n <P>%%norm_font%%Subject:%%norm_font_end%%%%pending_form%%<BR>\r\n %%norm_font%%<INPUT TYPE=\"text\" size=50 name=\"subject\" VALUE=\"%%subject%%\" maxlength=50>%%norm_font_end%%</P>\r\n <P>%%norm_font%%Comment:%%norm_font_end%%<BR>\r\n %%norm_font%%<TEXTAREA NAME=\"comment\" COLS=%%textarea_cols%% ROWS=%%textarea_rows%% WRAP=\"soft\">%%comment_body%%</TEXTAREA>%%norm_font_end%%</P>\r\n <P>%%spellcheck_form%%</P>\r\n <P>%%sig_beh!
avior_form%%</P>\r\n <P>%%norm_font%%\r\n <INPUT TYPE=\"submit\" NAME=\"preview\" VALUE=\"Preview\">\r\n %%post_opt%%\r\n <INPUT TYPE=\"submit\" NAME=\"post\" VALUE=\"Post\">%%norm_font_end%%</P>\r\n <P>%%norm_font%%%%allow_tags%%%%norm_font_end%%</P>\r\n </FORM>\r\n</DIV>','1','<P>This block lays out the comment post form. The following form elements are used:</P>\n<DL>\n <DT>subject</DT>\n <DD>The form field for the comment subject. Generally a regular text input.</DD>\n <DT>comment</DT>\n <DD>The form field for the comment body. Generally a textarea.</DD>\n <DT>preview</DT>\n <DD>The \"preview\" button. Value can be anything that isn\'t a perl false value (zero or empty string)</DD>\n <DT>post</DT>\n <DD>The \"post\" button. Value can be anything that isn\'t a perl false value (zero or empty string)</DD>\n</DL>\n<P>The following special keys are used:</P>\n<DL>\n <DT>sid</DT>\n <DD>The sid of the story the comment will be attached to</DD>\n <DT>pid</DT>\!
n <DD>The comment ID of the comment being replied to</DD>\n <DT>previ
ew_msg</DT>\n <DD>The contents of the block <B>comment_preview_msg</B>, if there\'s a comment currently being previewed.</DD>\n <DT>COMM_ERR</DT>\n <DD>Any error messages generated during the post or preview process.</DD>\n <DT>PRE_COMMENT</DT>\n <DD>The formatted comment being previewed</DD>\n <DT>here</DT>\n <DD>Either \"here\" (if there\'s no comment being previewed) or \"there\" (if there is) so that the anchors work out properly</DD>\n <DT>not_logged_in</DT>\n <DD>The contents of the block <B>comment_not_logged_in</B> if the user is not currently logged in</DD>\n <DT>formkey_element</DT>\n <DD>The formkey for the comment post form</DD>\n <DT>post_as</DT>\n <DD>If anonymous users are allowed to post and the user is logged in, this is a selectbox that allows the user to choose whether to post anonymously or not</DD>\n <DT>pending_form</DT>\n <DD>If the story is still in the queue, this is a selectbox that allows the user to choose whether to post an editorial or t!
opical comment.</DD>\n <DT>subject</DT>\n <DD>The comment\'s subject, used as a default value for the subject form element</DD>\n <DT>textarea_cols</DT>\n <DD>The user preference for size of the textarea</DD>\n <DT>textarea_rows</DT>\n <DD>The user preference for size of the textarea</DD>\n <DT>comment_body</DT>\n <DD>The comment\'s body, used as a default value for the comment form element</DD>\n <DT>spellcheck_form</DT>\n <DD>The contents of the block <B>spellcheck_form_item</B> if spellcheck is turned on</DD>\n <DT>sig_behavior_form</DT>\n <DD>A form element that allows users to choose whether or how to display their sig, if permitted and if they have a sig</DD>\n <DT>post_opt</DT>\n <DD>A form element that allows users to choose which post mode (plain text, autoformat, html) they want to use</DD>\n <DT>allow_tags</DT>\n <DD>The \"allowed HTML\"</DD>\n</DL>','Comments','default','en');
***************
*** 380,384 ****
INSERT INTO blocks VALUES ('firstlogin_message','<p><b>Welcome to %%sitename%%!</b> As this is your first login, you probably want to change your password below or some of the settings on the other preference pages. None of these changes are required, but we do recommend at least changing your password. Enjoy your stay.</p>\r\n<p>If you don\'t want to make any changes, you can <a href=\"%%rootdir%%/\">go to the front page</a>.</p>','1','<P>This block is displayed at the top of the Protected settings page the first time a user logs in, if the variable <B>show_prefs_on_first_login</B> is on. It should be self-contained HTML that encourages the new user to change his password and explore the other preference pages. There are no special keys.</P>','Accounts','default','en');
INSERT INTO blocks VALUES ('formkey_err','Invalid form key. You probably tried to save your settings more than once. Do not hit \"BACK\"! If you are certain that your settings have not been saved, try to save them from this screen.','1','<P>The error message displayed if there is a formkey error, such as a user double-clicking a button or going too long between loading the form and submitting it.</P>','Accounts','default','en');
! INSERT INTO blocks VALUES ('edit_prefs','%%title_font%%Edit User Preferences%%title_font_end%%\r\n\r\n<P>%%err_font%%%%update_msg%%%%err_font_end%%</P>\r\n\r\n<FORM action=\"%%rootdir%%/admin/prefs\" method=\"post\">\r\n<INPUT type=\"submit\" name=\"save\" value=\"Save\">\r\n<INPUT type=\"submit\" name=\"get\" value=\"Get\">\r\n\r\n<TABLE border=\"0\">\r\n <TR>\r\n <TD><B>Select Preference:</B></TD>\r\n <TD>%%pref_selectbox%%</TD>\r\n </TR>\r\n <TR>\r\n <TD colspan=\"2\"><B>Delete:</B> <INPUT type=\"checkbox\" name=\"delete\" value=\"1\"> Many prefs should be disabled (not deleted) if you want to prevent users from changing them, as Scoop requires their default values in order to run correctly.</TD>\r\n </TR>\r\n <TR>\r\n <TD><B>Name:</B></TD>\r\n <TD><INPUT type=\"text\" size=\"20\" maxlength=\"32\" name=\"prefname\" value=\"%%pref_name%%\"> <B>Enabled:</B><INPUT type=\"checkbox\" name=\"enabled\" value=\"1\"%%pref_enabled%%> <B>Required:</B><INPUT typ!
e=\"checkbox\" name=\"required\" value=\"1\"%%pref_required%%></TD>\r\n </TR>\r\n <TR>\r\n <TD><B>Title:</B></TD>\r\n <TD><INPUT type=\"text\" size=\"50\" maxlength=\"50\" name=\"title\" value=\"%%pref_title%%\"></TD>\r\n </TR>\r\n <TR>\r\n <TD><B>Description:</B>\r\n <BR>The description may contain any HTML or normal block reference.</TD>\r\n <TD><TEXTAREA rows=\"%%rows%%\" cols=\"%%cols%%\" name=\"description\">%%pref_desc%%</TEXTAREA></TD>\r\n </TR>\r\n <TR>\r\n <TD><B>Default Value:</B></TD>\r\n <TD><INPUT type=\"text\" size=\"30\" name=\"default_value\" value=\"%%pref_default%%\"></TD>\r\n </TR>\r\n <TR>\r\n <TD colspan=\"2\"> </TD>\r\n </TR>\r\n <TR>\r\n <TD colspan=\"2\"><B>Preference Display Settings</B></TD>\r\n </TR>\r\n <TR>\r\n <TD><B>Preferences page:</B></TD>\r\n <TD><INPUT type=\"text\" size=\"20\" maxlength=\"50\" name=\"page\" value=\"%%pref_page%%\"></TD>\r\n </TR>\r\n <TR>\r\n <TD><B>Order on page:<!
/B></TD>\r\n <TD><INPUT type=\"text\" size=\"5\" maxlength=\"5\" na
me=\"display_order\" value=\"%%pref_order%%\"></TD>\r\n </TR>\r\n <TR>\r\n <TD><B>Control to display:</B>\r\n <BR>Special key <I>value</I> is the current value of the preference</TD>\r\n <TD><INPUT type=\"text\" size=\"50\" name=\"field\" value=\"%%pref_field%%\"></TD>\r\n </TR>\r\n <TR>\r\n <TD><B>Template:</B></TD>\r\n <TD>%%pref_template%%</TD>\r\n </TR>\r\n <TR>\r\n <TD><B>Visible on public user info page?</B></TD>\r\n <TD><INPUT type=\"checkbox\" name=\"visible\" value=\"1\"%%pref_visible%%></TD>\r\n </TR>\r\n <TR>\r\n <TD><B>Formatting to apply to value</B></TD>\r\n <TD><INPUT type=\"text\" name=\"display_fmt\" value=\"%%pref_fmt%%\" size=\"50\"></TD>\r\n </TR>\r\n <TR>\r\n <TD colspan=\"2\"> </TD>\r\n </TR>\r\n <TR>\r\n <TD colspan=\"2\"><B>Requires</B></TD>\r\n </TR>\r\n <TR>\r\n <TD><B>Site Control:</B></TD>\r\n <TD>%%pref_var%%</TD>\r\n </TR>\r\n <TR>\r\n <TD><B>Perm to view:</B></TD>\r\n <TD>%%pre!
f_perm_view%%</TD>\r\n </TR>\r\n <TR>\r\n <TD><B>Perm to edit:</B></TD>\r\n <TD>%%pref_perm_edit%%</TD>\r\n </TR>\r\n <TR>\r\n <TD><B>Trusted User status:</B></TD>\r\n <TD><INPUT type=\"checkbox\" name=\"req_tu\" value=\"1\"%%pref_tu%%></TD>\r\n </TR>\r\n <TR>\r\n <TD colspan=\"2\"> </TD>\r\n </TR>\r\n <TR>\r\n <TD colspan=\"2\"><B>Validation</B> (blank to allow anything)</TD>\r\n </TR>\r\n <TR>\r\n <TD><B>HTML allowed?</B></TD>\r\n <TD><INPUT type=\"checkbox\" name=\"html\" value=\"1\"%%pref_html%%></TD>\r\n </TR>\r\n <TR>\r\n <TD><B>Field length:</B></TD>\r\n <TD><INPUT type=\"text\" size=\"5\" maxlength=\"5\" name=\"length\" value=\"%%pref_length%%\"></TD>\r\n </TR>\r\n <TR>\r\n <TD><B>Regular expression:</B>\r\n <BR>Perl regexp - but you must escape pipes</TD>\r\n <TD><INPUT type=\"text\" size=\"50\" name=\"regex\" value=\"%%pref_regex%%\"></TD>\r\n </TR>\r\n</TABLE>\r\n\r\n<INPUT type=\"submit\" name=\"save\" v!
alue=\"Save\">\r\n<INPUT type=\"submit\" name=\"get\" value=\"Get\">\r
\n</FORM>\r\n','1','','Admin Pages','default','en');
INSERT INTO blocks VALUES ('userpref_reset','<INPUT type=\"submit\" name=\"reset\" value=\"Reset Preferences\">','1','<P>This block contains the reset button for the userpref pages. The button must be named \"reset\" but you can otherwise change how it looks.</p>','Accounts','default','en');
INSERT INTO blocks VALUES ('userpref_oldpass_field','You must enter your account password to change protected settings.\r\n<BR><B>Password:</B><INPUT TYPE=\"password\" SIZE=\"30\" NAME=\"verify_me\"></P>\r\n','1','<P>This block is the description and form element in which the user enters his old password to change protected settings. On the user\'s first login, the block <B>userpref_oldpass_hidden</B> is used instead.</P>','Accounts','default','en');
--- 380,384 ----
INSERT INTO blocks VALUES ('firstlogin_message','<p><b>Welcome to %%sitename%%!</b> As this is your first login, you probably want to change your password below or some of the settings on the other preference pages. None of these changes are required, but we do recommend at least changing your password. Enjoy your stay.</p>\r\n<p>If you don\'t want to make any changes, you can <a href=\"%%rootdir%%/\">go to the front page</a>.</p>','1','<P>This block is displayed at the top of the Protected settings page the first time a user logs in, if the variable <B>show_prefs_on_first_login</B> is on. It should be self-contained HTML that encourages the new user to change his password and explore the other preference pages. There are no special keys.</P>','Accounts','default','en');
INSERT INTO blocks VALUES ('formkey_err','Invalid form key. You probably tried to save your settings more than once. Do not hit \"BACK\"! If you are certain that your settings have not been saved, try to save them from this screen.','1','<P>The error message displayed if there is a formkey error, such as a user double-clicking a button or going too long between loading the form and submitting it.</P>','Accounts','default','en');
! INSERT INTO blocks VALUES ('edit_prefs','%%title_font%%Edit User Preferences%%title_font_end%%\r\n\r\n<P>%%err_font%%%%update_msg%%%%err_font_end%%</P>\r\n\r\n<FORM action=\"%%rootdir%%/admin/prefs\" method=\"post\">\r\n<INPUT type=\"submit\" name=\"save\" value=\"Save\">\r\n<INPUT type=\"submit\" name=\"get\" value=\"Get\">\r\n\r\n<TABLE border=\"0\">\r\n <TR>\r\n <TD><B>Select Preference:</B></TD>\r\n <TD>%%pref_selectbox%%</TD>\r\n </TR>\r\n <TR>\r\n <TD colspan=\"2\"><B>Delete:</B> <INPUT type=\"checkbox\" name=\"delete\" value=\"1\"> Many prefs should be disabled (not deleted) if you want to prevent users from changing them, as Scoop requires their default values in order to run correctly.</TD>\r\n </TR>\r\n <TR>\r\n <TD><B>Name:</B></TD>\r\n <TD><INPUT type=\"text\" size=\"20\" maxlength=\"32\" name=\"prefname\" value=\"%%pref_name%%\"> <B>Enabled:</B><INPUT type=\"checkbox\" name=\"enabled\" value=\"1\"%%pref_enabled%%></TD>\r\n </TR>\r\n <TR>\!
r\n <TD><B>Title:</B></TD>\r\n <TD><INPUT type=\"text\" size=\"50\" maxlength=\"50\" name=\"title\" value=\"%%pref_title%%\"></TD>\r\n </TR>\r\n <TR>\r\n <TD><B>Description:</B>\r\n <BR>The description may contain any HTML or normal block reference.</TD>\r\n <TD><TEXTAREA rows=\"%%rows%%\" cols=\"%%cols%%\" name=\"description\">%%pref_desc%%</TEXTAREA></TD>\r\n </TR>\r\n <TR>\r\n <TD><B>Default Value:</B></TD>\r\n <TD><INPUT type=\"text\" size=\"30\" name=\"default_value\" value=\"%%pref_default%%\"></TD>\r\n </TR>\r\n <TR>\r\n <TD colspan=\"2\"> </TD>\r\n </TR>\r\n <TR>\r\n <TD colspan=\"2\"><B>Preference Display Settings</B></TD>\r\n </TR>\r\n <TR>\r\n <TD><B>Shown on signup page?</B></TD>\r\n <TD><INPUT type=\"radio\" name=\"signup\" value=\"normal\"%%pref_signup_normal%%> No\r\n <BR><INPUT type=\"radio\" name=\"signup\" value=\"signup\"%%pref_signup_signup%%> Yes\r\n <BR><INPUT type=\"radio\" name=\"signup\" value=!
\"required\"%%pref_signup_required%%> Yes, and it\'s required</TD>\r\n
</TR>\r\n <TR>\r\n <TD><B>Preferences page:</B></TD>\r\n <TD><INPUT type=\"text\" size=\"20\" maxlength=\"50\" name=\"page\" value=\"%%pref_page%%\"></TD>\r\n </TR>\r\n <TR>\r\n <TD><B>Order on page:</B></TD>\r\n <TD><INPUT type=\"text\" size=\"5\" maxlength=\"5\" name=\"display_order\" value=\"%%pref_order%%\"></TD>\r\n </TR>\r\n <TR>\r\n <TD><B>Control to display:</B>\r\n <BR>Special key <I>value</I> is the current value of the preference</TD>\r\n <TD><INPUT type=\"text\" size=\"50\" name=\"field\" value=\"%%pref_field%%\"></TD>\r\n </TR>\r\n <TR>\r\n <TD><B>Template:</B></TD>\r\n <TD>%%pref_template%%</TD>\r\n </TR>\r\n <TR>\r\n <TD><B>Visible on public user info page?</B></TD>\r\n <TD><INPUT type=\"checkbox\" name=\"visible\" value=\"1\"%%pref_visible%%></TD>\r\n </TR>\r\n <TR>\r\n <TD><B>Formatting to apply to value</B></TD>\r\n <TD><INPUT type=\"text\" name=\"display_fmt\" value=\"%%pref_fmt%%\" size=\"50\"></TD>\r\!
n </TR>\r\n <TR>\r\n <TD colspan=\"2\"> </TD>\r\n </TR>\r\n <TR>\r\n <TD colspan=\"2\"><B>Requires</B></TD>\r\n </TR>\r\n <TR>\r\n <TD><B>Site Control:</B></TD>\r\n <TD>%%pref_var%%</TD>\r\n </TR>\r\n <TR>\r\n <TD><B>Perm to view:</B></TD>\r\n <TD>%%pref_perm_view%%</TD>\r\n </TR>\r\n <TR>\r\n <TD><B>Perm to edit:</B></TD>\r\n <TD>%%pref_perm_edit%%</TD>\r\n </TR>\r\n <TR>\r\n <TD><B>Trusted User status:</B></TD>\r\n <TD><INPUT type=\"checkbox\" name=\"req_tu\" value=\"1\"%%pref_tu%%></TD>\r\n </TR>\r\n <TR>\r\n <TD colspan=\"2\"> </TD>\r\n </TR>\r\n <TR>\r\n <TD colspan=\"2\"><B>Validation</B> (blank to allow anything)</TD>\r\n </TR>\r\n <TR>\r\n <TD><B>HTML allowed?</B></TD>\r\n <TD><INPUT type=\"checkbox\" name=\"html\" value=\"1\"%%pref_html%%></TD>\r\n </TR>\r\n <TR>\r\n <TD><B>Field length:</B></TD>\r\n <TD><INPUT type=\"text\" size=\"5\" maxlength=\"5\" name=\"length\" value=\"%%pref_length%%!
\"></TD>\r\n </TR>\r\n <TR>\r\n <TD><B>Regular expression:</B>\r\
n <BR>Perl regexp - but you must escape pipes</TD>\r\n <TD><INPUT type=\"text\" size=\"50\" name=\"regex\" value=\"%%pref_regex%%\"></TD>\r\n </TR>\r\n</TABLE>\r\n\r\n<INPUT type=\"submit\" name=\"save\" value=\"Save\">\r\n<INPUT type=\"submit\" name=\"get\" value=\"Get\">\r\n</FORM>\r\n','1','','Admin Pages','default','en');
INSERT INTO blocks VALUES ('userpref_reset','<INPUT type=\"submit\" name=\"reset\" value=\"Reset Preferences\">','1','<P>This block contains the reset button for the userpref pages. The button must be named \"reset\" but you can otherwise change how it looks.</p>','Accounts','default','en');
INSERT INTO blocks VALUES ('userpref_oldpass_field','You must enter your account password to change protected settings.\r\n<BR><B>Password:</B><INPUT TYPE=\"password\" SIZE=\"30\" NAME=\"verify_me\"></P>\r\n','1','<P>This block is the description and form element in which the user enters his old password to change protected settings. On the user\'s first login, the block <B>userpref_oldpass_hidden</B> is used instead.</P>','Accounts','default','en');
***************
*** 449,453 ****
INSERT INTO box VALUES ('css','css','my $content;\r\n\r\nmy $file = $S->cgi->param(\'file\');\r\nmy $block = $file.\"_css\";\r\n\r\n$content = $S->{UI}->{BLOCKS}->{$block};\r\n$S->apache->content_type(\'text/css\');\r\n\r\nreturn {content => $content};','Returns a block with type text/css','empty_box',0);
INSERT INTO box VALUES ('admin_search','Search Admin Tools','# search terms?\r\nmy $query = $S->cgi->param(\'query\');\r\n\r\n# search where?\r\n# extract the chosen search locations\r\nmy $search_param = $S->cgi->param(\'search_in\');\r\nmy %search_in;\r\nmy $searches_selected = 0;\r\nforeach (ref($search_param) eq \'ARRAY\' ? @{$search_param} : ($search_param)) {\r\n next unless $_;\r\n $search_in{$_} = 1;\r\n $searches_selected++;\r\n}\r\n\r\n# if they didn\'t select any searches, or this is a fresh load, then select all\r\nunless ($searches_selected) {\r\n foreach (qw(blockval blockdesc boxval boxdesc specval vardesc)) {\r\n $search_in{$_} = 1;\r\n }\r\n}\r\n\r\nmy ($blockval, $blockdesc, $boxval, $boxdesc, $specval, $vardesc) = \"\";\r\nmy ($blocksearchwhere, $boxsearchwhere, $specsearchwhere, $varsearchwhere) = \"\";\r\nmy ($type_phrase, $type_any, $type_all) = \"\";\r\n\r\n# remember what was previously selected. yes, this is kind of ugly\r\n$blockval = \' selecte!
d=\"selected\"\' if $search_in{blockval};\r\n$blockdesc = \' selected=\"selected\"\' if $search_in{blockdesc};\r\n$boxval = \' selected=\"selected\"\' if $search_in{boxval};\r\n$boxdesc = \' selected=\"selected\"\' if $search_in{boxdesc};\r\n$specval = \' selected=\"selected\"\' if $search_in{specval};\r\n$vardesc = \' selected=\"selected\"\' if $search_in{vardesc};\r\n\r\n# same thing for search type, though set a default of all\r\nif ($S->cgi->param(\'search_type\') eq \'phrase\') {\r\n $type_phrase = \' checked=\"checked\"\';\r\n} elsif($S->cgi->param(\'search_type\') eq \'all\') {\r\n $type_all = \' checked=\"checked\"\';\r\n} elsif($S->cgi->param(\'search_type\') eq \'any\') {\r\n $type_any = \' checked=\"checked\"\';\r\n} else {\r\n $type_all = \' checked=\"checked\"\';\r\n}\r\n\r\n# set up search fields\r\nmy $search_for_field = qq{<input type=\"text\" name=\"query\" value=\"$query\" /><input type=\"submit\" value=\"Search\" />};\r\n\r\nmy $search_in_field =!
\'<select name=\"search_in\" multiple=\"multiple\" size=\"6\">\';\r\n
$search_in_field .= qq{\r\n <option value=\"blockval\"$blockval>Block values</option>\r\n <option value=\"blockdesc\"$blockdesc>Block descriptions</option>} if $S->have_perm(\'edit_blocks\');\r\n\r\n$search_in_field .= qq{\r\n <option value=\"boxval\"$boxval>Box code</option>\r\n <option value=\"boxdesc\"$boxdesc>Box descriptions</option>} if $S->have_perm(\'edit_boxes\');\r\n\r\n$search_in_field .= qq{\r\n <option value=\"specval\"$specval>Special Pages</option>} if $S->have_perm(\'edit_special\');\r\n\r\n$search_in_field .= qq{\r\n <option value=\"vardesc\"$vardesc>Site Controls descriptions</option>} if $S->have_perm(\'edit_vars\');\r\n\r\n$search_in_field .= \"\\n</select>\";\r\n\r\nmy $search_opt_field = qq{<input type=\"radio\" name=\"search_type\" value=\"all\"$type_all /> All words<br />\r\n<input type=\"radio\" name=\"search_type\" value=\"any\"$type_any /> Any words<br />\r\n<input type=\"radio\" name=\"search_type\" value=\"phrase\"$type_phrase /> Phrase};\r\n\r\n!
my $content .= qq{\r\n<form method=\"get\" action=\"%%rootdir%%/admin/search\">\r\n<table border=\"0\">\r\n <tr>\r\n <td valign=\"top\" rowspan=\"2\">%%norm_font%%Search in:<br />$search_in_field%%norm_font_end%%</td>\r\n <td>%%norm_font%%Search for:<br />$search_for_field%%norm_font_end%%</td>\r\n </tr>\r\n <tr>\r\n <td>%%norm_font%%$search_opt_field%%norm_font_end%%</td>\r\n </tr>\r\n</table>\r\n</form>\r\n };\r\n\r\nif ($query) {\r\n my ($blockresults, $boxresults, $specresults, $varresults) = (\"\",\"\",\"\",\"\");\r\n\r\n # of the three column names which might be needed, these are used\r\n # repeatedly, so stick them in a var instead of re-building them\r\n my $content_string = &search_string($S, $query, \'content\');\r\n my $desc_string = &search_string($S, $query, \'description\');\r\n\r\n $blocksearchwhere .= &search_string($S, $query, \'block\') if ($blockval);\r\n $blocksearchwhere .= \' OR \' if ($blockdesc && $blockval);\r\n $blocksearchwhere .= $desc_s!
tring if ($blockdesc);\r\n $boxsearchwhere .= $content_string if ($b
oxval);\r\n $boxsearchwhere .= \' OR \' if ($boxdesc && $boxval);\r\n $boxsearchwhere .= $desc_string if ($boxdesc);\r\n $specsearchwhere .= $content_string if ($specval);\r\n $varsearchwhere .= $desc_string if ($vardesc);\r\n\r\n if ($blocksearchwhere && $S->have_perm(\'edit_blocks\')) {\r\n my ($rv, $sth) = $S->db_select({\r\n WHAT => \'bid,description,theme\',\r\n FROM => \'blocks\',\r\n WHERE => $blocksearchwhere\r\n });\r\n while (my $rec = $sth->fetchrow_hashref) {\r\n my $desc = $rec->{description} || \"<i>(no description)</i>\";\r\n $blockresults .= qq{\r\n <dt><a href=\"%%rootdir%%/admin/blocks/edit/$rec->{theme}/$rec->{bid}\">$rec->{bid}</a></dt>\r\n <dd>$desc</dd>}\r\n }\r\n $blockresults = \"<dl> $blockresults </dl>\" if $blockresults;\r\n }\r\n\r\n if ($boxsearchwhere && $S->have_perm(\'edit_boxes\')) {\r\n my ($rv, $sth) = $S->db_select({\r\n WHAT => \'boxid, description\',\r\n FROM => \'box\',\r\n WHERE => $boxsearchwhere\r\n !
});\r\n while (my $rec = $sth->fetchrow_hashref) {\r\n my $desc = $rec->{description} || \"<i>(no description)</i>\";\r\n $boxresults .= qq{\r\n <dt><a href=\"%%rootdir%%/admin/boxes/$rec->{boxid}\">$rec->{boxid}</a></dt>\r\n <dd>$desc</dd>}\r\n }\r\n $boxresults = \"<dl> $boxresults </dl>\" if $boxresults;\r\n }\r\n\r\n if ($specsearchwhere && $S->have_perm(\'edit_special\')) {\r\n my ($rv, $sth) = $S->db_select({\r\n WHAT => \'pageid,title,description\',\r\n FROM => \'special\',\r\n WHERE => $specsearchwhere\r\n });\r\n while (my $rec = $sth->fetchrow_hashref) {\r\n my $desc = $rec->{description} || \"<i>(no description)</i>\";\r\n $specresults .= qq{\r\n <dt><a href=\"%%rootdir%%/admin/special?id=$rec->{pageid}\">$rec->{title}</a></dt>\r\n <dd>$desc</dd>}\r\n }\r\n $specresults = \"<dl> $specresults </dl>\" if $specresults;\r\n }\r\n\r\n if ($varsearchwhere && $S->have_perm(\'edit_vars\')) {\r\n my ($rv, $sth) = $S->db_select({\r\n WHAT => \'name!
,description\',\r\n FROM => \'vars\',\r\n WHERE => $varsearchwhere
\r\n });\r\n while (my $rec = $sth->fetchrow_hashref) {\r\n my $desc = $rec->{description} || \"<i>(no description)</i>\";\r\n $varresults .= qq{\r\n <dt><a href=\"%%rootdir%%/admin/vars/edit/$rec->{name}\">$rec->{name}</a></dt>\r\n <dd>$desc</dd>}\r\n }\r\n $varresults = \"<dl> $varresults </dl>\" if $varresults;\r\n }\r\n\r\n $content .= \"<H3>Blocks found:</H3>\\n%%norm_font%%$blockresults%%norm_font_end%%\" if $blockresults;\r\n $content .= \"<H3>Boxes found:</H3>\\n%%norm_font%%$boxresults%%norm_font_end%%\" if $boxresults;\r\n $content .= \"<H3>Special Pages found:</H3>\\n%%norm_font%%$specresults%%norm_font_end%%\" if $specresults;\r\n $content .= \"<H3>Site Controls found:</H3>\\n%%norm_font%%$varresults%%norm_font_end%%\" if $varresults;\r\n unless ($varresults || $blockresults || $boxresults || $specresults) {\r\n $content .= \"%%norm_font%%Nothing matching your search phrase was found in the selected tools.%%norm_font_end%%\";\r\n }\r\n}\r\n\r\n$content =!
\"<table width=\\\"100%\\\">\r\n <tr width=\\\"100%\\\" bgcolor=\\\"%%title_bgcolor%%\\\"><td>%%title_font%%Search Admin Tools%%title_font_end%%</td></tr>\r\n <tr><td>$content</td></tr>\r\n</table>\";\r\n\r\nreturn $content;\r\n\r\nsub search_string {\r\n my ($S, $query, $field) = @_;\r\n\r\n my $search_string;\r\n if ($S->cgi->param(\'search_type\') eq \'phrase\') {\r\n # easy enough\r\n $search_string = \"$field LIKE \" . $S->dbh->quote(\"%${query}%\");\r\n } else {\r\n while ($query =~ /([\\w-]+)/g) {\r\n if ($search_string) {\r\n $search_string .= \' AND \'\r\n if $S->cgi->param(\'search_type\') eq \'all\';\r\n $search_string .= \' OR \'\r\n if $S->cgi->param(\'search_type\') eq \'any\';\r\n }\r\n $search_string .= \"$field LIKE \" . $S->dbh->quote(\"%${1}%\");\r\n }\r\n }\r\n\r\n return \"($search_string)\";\r\n}\r\n','Simple admin search tool for locating blocks by content or description. This is called from the admin tools menu.','blank_box',!
0);
! INSERT INTO box VALUES ('userpref_menu','','my $edit = 0;\r\nmy $return = \'\';\r\nmy $nick = $S->param->{nick};\r\nmy $tool = $S->param->{tool} || \'info\';\r\nmy $admin_edit = \'\';\r\n\r\n# first, do we have permission to edit \r\n# this user\'s prefs?\r\n\r\nif ( $S->{UID} == $S->param->{uid} || $S->have_perm(\'edit_user\') ) {\r\n $edit = 1;\r\n}\r\n\r\n$admin_edit = qq{[<A href=\"%%rootdir%%/user/$nick/prefs\">edit user</A>]} if ($S->have_perm(\'edit_user\'));\r\n\r\n# links to create\r\nmy $links = \"<P>$admin_edit ${nick}\'s \";\r\n\r\n# user info pages\r\nif ( $tool eq \'info\' ) {\r\n $links .= qq{\r\n <A href=\"%%rootdir%%/user/$nick\">Info</A>};\r\n $links .= qq{\r\n <A href=\"%%rootdir%%/user/$nick/comments\">Comments</A>};\r\n $links .= qq{\r\n <A href=\"%%rootdir%%/user/$nick/stories\">Stories</A>};\r\n\r\n if ( $S->{UI}->{VARS}->{use_diaries} ) {\r\n $links .= qq{\r\n <A href=\"%%rootdir%%/user/$nick/diary\">Diary</A>};\r\n }\r\n\r\!
n if ( $S->{UI}->{VARS}->{use_ratings} ) {\r\n $links .= qq{\r\n <A href=\"%%rootdir%%/user/$nick/ratings\">Ratings</A>};\r\n }\r\n\r\n if ( $S->{UI}->{VARS}->{allow_uploads} ) {\r\n $links .= qq{\r\n <A href=\"%%rootdir%%/user/$nick/files\">Files</A>};\r\n }\r\n\r\n if ( $S->{UI}->{VARS}->{use_ads} ) {\r\n $links .= qq{\r\n <A href=\"%%rootdir%%/user/$nick/ads\">Ads</A>};\r\n }\r\n\r\n $return = $links . \"</P>\";\r\n} elsif ( $edit && $tool eq \'prefs\' ) {\r\n my %editlinks;\r\n my ($rv, $sth) = $S->db_select({\r\n WHAT => \'page\',\r\n FROM => \'pref_items\',\r\n GROUP_BY => \'page\'\r\n });\r\n while (my ($item) = $sth->fetchrow_array()) {\r\n $editlinks{\"$item\"} = \"%%rootdir%%/user/$nick/prefs/$item\";\r\n }\r\n $links .= qq{\r\n <A href=\"%%rootdir%%/user/$nick/prefs/Protected\">Protected</A>};\r\n\r\n foreach my $item (sort {$b cmp $a} keys %editlinks) {\r\n $links .= qq{\r\n !
<A href=\"$editlinks{$item}\">$item</A>};\r\n }\r\n $return = $link
s . \"</P>\";\r\n}\r\n\r\nreturn $return;\r\n','navigation for user pref pages','empty_box',0);
INSERT INTO box VALUES ('pref_selectbox','','my $prefname = shift @ARGS;\r\nmy $choice = shift @ARGS;\r\nmy @choices = @ARGS;\r\n\r\nmy $select = qq{\r\n <SELECT name=\"$prefname\" size=\"1\">};\r\n\r\nforeach my $c (@choices) {\r\n my $checked = ($c eq $choice) ? \' SELECTED\' : \'\';\r\n $select .= qq{\r\n <OPTION value=\"$c\"$checked>$c</OPTION>};\r\n}\r\n\r\n$select .= qq{\r\n </SELECT>};\r\n\r\nreturn $select;','Generic select box for user preferences. takes parameters name,value,option1,option2,...\r\nNot suitable for select boxes with code-generated option lists.','empty_box',0);
INSERT INTO box VALUES ('pref_checkbox','','my $prefname = $ARGS[0];\r\nmy $choice = $ARGS[1];\r\n\r\nmy $selected = ($choice eq \'on\') ? \' CHECKED\' : \'\';\r\n\r\nreturn qq{<INPUT type=\"checkbox\" name=\"$prefname\" value=\"on\"$selected>};','a generic checkbox. Takes two arguments, the pref name and the current pref value.','empty_box',0);
--- 449,453 ----
INSERT INTO box VALUES ('css','css','my $content;\r\n\r\nmy $file = $S->cgi->param(\'file\');\r\nmy $block = $file.\"_css\";\r\n\r\n$content = $S->{UI}->{BLOCKS}->{$block};\r\n$S->apache->content_type(\'text/css\');\r\n\r\nreturn {content => $content};','Returns a block with type text/css','empty_box',0);
INSERT INTO box VALUES ('admin_search','Search Admin Tools','# search terms?\r\nmy $query = $S->cgi->param(\'query\');\r\n\r\n# search where?\r\n# extract the chosen search locations\r\nmy $search_param = $S->cgi->param(\'search_in\');\r\nmy %search_in;\r\nmy $searches_selected = 0;\r\nforeach (ref($search_param) eq \'ARRAY\' ? @{$search_param} : ($search_param)) {\r\n next unless $_;\r\n $search_in{$_} = 1;\r\n $searches_selected++;\r\n}\r\n\r\n# if they didn\'t select any searches, or this is a fresh load, then select all\r\nunless ($searches_selected) {\r\n foreach (qw(blockval blockdesc boxval boxdesc specval vardesc)) {\r\n $search_in{$_} = 1;\r\n }\r\n}\r\n\r\nmy ($blockval, $blockdesc, $boxval, $boxdesc, $specval, $vardesc) = \"\";\r\nmy ($blocksearchwhere, $boxsearchwhere, $specsearchwhere, $varsearchwhere) = \"\";\r\nmy ($type_phrase, $type_any, $type_all) = \"\";\r\n\r\n# remember what was previously selected. yes, this is kind of ugly\r\n$blockval = \' selecte!
d=\"selected\"\' if $search_in{blockval};\r\n$blockdesc = \' selected=\"selected\"\' if $search_in{blockdesc};\r\n$boxval = \' selected=\"selected\"\' if $search_in{boxval};\r\n$boxdesc = \' selected=\"selected\"\' if $search_in{boxdesc};\r\n$specval = \' selected=\"selected\"\' if $search_in{specval};\r\n$vardesc = \' selected=\"selected\"\' if $search_in{vardesc};\r\n\r\n# same thing for search type, though set a default of all\r\nif ($S->cgi->param(\'search_type\') eq \'phrase\') {\r\n $type_phrase = \' checked=\"checked\"\';\r\n} elsif($S->cgi->param(\'search_type\') eq \'all\') {\r\n $type_all = \' checked=\"checked\"\';\r\n} elsif($S->cgi->param(\'search_type\') eq \'any\') {\r\n $type_any = \' checked=\"checked\"\';\r\n} else {\r\n $type_all = \' checked=\"checked\"\';\r\n}\r\n\r\n# set up search fields\r\nmy $search_for_field = qq{<input type=\"text\" name=\"query\" value=\"$query\" /><input type=\"submit\" value=\"Search\" />};\r\n\r\nmy $search_in_field =!
\'<select name=\"search_in\" multiple=\"multiple\" size=\"6\">\';\r\n
$search_in_field .= qq{\r\n <option value=\"blockval\"$blockval>Block values</option>\r\n <option value=\"blockdesc\"$blockdesc>Block descriptions</option>} if $S->have_perm(\'edit_blocks\');\r\n\r\n$search_in_field .= qq{\r\n <option value=\"boxval\"$boxval>Box code</option>\r\n <option value=\"boxdesc\"$boxdesc>Box descriptions</option>} if $S->have_perm(\'edit_boxes\');\r\n\r\n$search_in_field .= qq{\r\n <option value=\"specval\"$specval>Special Pages</option>} if $S->have_perm(\'edit_special\');\r\n\r\n$search_in_field .= qq{\r\n <option value=\"vardesc\"$vardesc>Site Controls descriptions</option>} if $S->have_perm(\'edit_vars\');\r\n\r\n$search_in_field .= \"\\n</select>\";\r\n\r\nmy $search_opt_field = qq{<input type=\"radio\" name=\"search_type\" value=\"all\"$type_all /> All words<br />\r\n<input type=\"radio\" name=\"search_type\" value=\"any\"$type_any /> Any words<br />\r\n<input type=\"radio\" name=\"search_type\" value=\"phrase\"$type_phrase /> Phrase};\r\n\r\n!
my $content .= qq{\r\n<form method=\"get\" action=\"%%rootdir%%/admin/search\">\r\n<table border=\"0\">\r\n <tr>\r\n <td valign=\"top\" rowspan=\"2\">%%norm_font%%Search in:<br />$search_in_field%%norm_font_end%%</td>\r\n <td>%%norm_font%%Search for:<br />$search_for_field%%norm_font_end%%</td>\r\n </tr>\r\n <tr>\r\n <td>%%norm_font%%$search_opt_field%%norm_font_end%%</td>\r\n </tr>\r\n</table>\r\n</form>\r\n };\r\n\r\nif ($query) {\r\n my ($blockresults, $boxresults, $specresults, $varresults) = (\"\",\"\",\"\",\"\");\r\n\r\n # of the three column names which might be needed, these are used\r\n # repeatedly, so stick them in a var instead of re-building them\r\n my $content_string = &search_string($S, $query, \'content\');\r\n my $desc_string = &search_string($S, $query, \'description\');\r\n\r\n $blocksearchwhere .= &search_string($S, $query, \'block\') if ($blockval);\r\n $blocksearchwhere .= \' OR \' if ($blockdesc && $blockval);\r\n $blocksearchwhere .= $desc_s!
tring if ($blockdesc);\r\n $boxsearchwhere .= $content_string if ($b
oxval);\r\n $boxsearchwhere .= \' OR \' if ($boxdesc && $boxval);\r\n $boxsearchwhere .= $desc_string if ($boxdesc);\r\n $specsearchwhere .= $content_string if ($specval);\r\n $varsearchwhere .= $desc_string if ($vardesc);\r\n\r\n if ($blocksearchwhere && $S->have_perm(\'edit_blocks\')) {\r\n my ($rv, $sth) = $S->db_select({\r\n WHAT => \'bid,description,theme\',\r\n FROM => \'blocks\',\r\n WHERE => $blocksearchwhere\r\n });\r\n while (my $rec = $sth->fetchrow_hashref) {\r\n my $desc = $rec->{description} || \"<i>(no description)</i>\";\r\n $blockresults .= qq{\r\n <dt><a href=\"%%rootdir%%/admin/blocks/edit/$rec->{theme}/$rec->{bid}\">$rec->{bid}</a></dt>\r\n <dd>$desc</dd>}\r\n }\r\n $blockresults = \"<dl> $blockresults </dl>\" if $blockresults;\r\n }\r\n\r\n if ($boxsearchwhere && $S->have_perm(\'edit_boxes\')) {\r\n my ($rv, $sth) = $S->db_select({\r\n WHAT => \'boxid, description\',\r\n FROM => \'box\',\r\n WHERE => $boxsearchwhere\r\n !
});\r\n while (my $rec = $sth->fetchrow_hashref) {\r\n my $desc = $rec->{description} || \"<i>(no description)</i>\";\r\n $boxresults .= qq{\r\n <dt><a href=\"%%rootdir%%/admin/boxes/$rec->{boxid}\">$rec->{boxid}</a></dt>\r\n <dd>$desc</dd>}\r\n }\r\n $boxresults = \"<dl> $boxresults </dl>\" if $boxresults;\r\n }\r\n\r\n if ($specsearchwhere && $S->have_perm(\'edit_special\')) {\r\n my ($rv, $sth) = $S->db_select({\r\n WHAT => \'pageid,title,description\',\r\n FROM => \'special\',\r\n WHERE => $specsearchwhere\r\n });\r\n while (my $rec = $sth->fetchrow_hashref) {\r\n my $desc = $rec->{description} || \"<i>(no description)</i>\";\r\n $specresults .= qq{\r\n <dt><a href=\"%%rootdir%%/admin/special?id=$rec->{pageid}\">$rec->{title}</a></dt>\r\n <dd>$desc</dd>}\r\n }\r\n $specresults = \"<dl> $specresults </dl>\" if $specresults;\r\n }\r\n\r\n if ($varsearchwhere && $S->have_perm(\'edit_vars\')) {\r\n my ($rv, $sth) = $S->db_select({\r\n WHAT => \'name!
,description\',\r\n FROM => \'vars\',\r\n WHERE => $varsearchwhere
\r\n });\r\n while (my $rec = $sth->fetchrow_hashref) {\r\n my $desc = $rec->{description} || \"<i>(no description)</i>\";\r\n $varresults .= qq{\r\n <dt><a href=\"%%rootdir%%/admin/vars/edit/$rec->{name}\">$rec->{name}</a></dt>\r\n <dd>$desc</dd>}\r\n }\r\n $varresults = \"<dl> $varresults </dl>\" if $varresults;\r\n }\r\n\r\n $content .= \"<H3>Blocks found:</H3>\\n%%norm_font%%$blockresults%%norm_font_end%%\" if $blockresults;\r\n $content .= \"<H3>Boxes found:</H3>\\n%%norm_font%%$boxresults%%norm_font_end%%\" if $boxresults;\r\n $content .= \"<H3>Special Pages found:</H3>\\n%%norm_font%%$specresults%%norm_font_end%%\" if $specresults;\r\n $content .= \"<H3>Site Controls found:</H3>\\n%%norm_font%%$varresults%%norm_font_end%%\" if $varresults;\r\n unless ($varresults || $blockresults || $boxresults || $specresults) {\r\n $content .= \"%%norm_font%%Nothing matching your search phrase was found in the selected tools.%%norm_font_end%%\";\r\n }\r\n}\r\n\r\n$content =!
\"<table width=\\\"100%\\\">\r\n <tr width=\\\"100%\\\" bgcolor=\\\"%%title_bgcolor%%\\\"><td>%%title_font%%Search Admin Tools%%title_font_end%%</td></tr>\r\n <tr><td>$content</td></tr>\r\n</table>\";\r\n\r\nreturn $content;\r\n\r\nsub search_string {\r\n my ($S, $query, $field) = @_;\r\n\r\n my $search_string;\r\n if ($S->cgi->param(\'search_type\') eq \'phrase\') {\r\n # easy enough\r\n $search_string = \"$field LIKE \" . $S->dbh->quote(\"%${query}%\");\r\n } else {\r\n while ($query =~ /([\\w-]+)/g) {\r\n if ($search_string) {\r\n $search_string .= \' AND \'\r\n if $S->cgi->param(\'search_type\') eq \'all\';\r\n $search_string .= \' OR \'\r\n if $S->cgi->param(\'search_type\') eq \'any\';\r\n }\r\n $search_string .= \"$field LIKE \" . $S->dbh->quote(\"%${1}%\");\r\n }\r\n }\r\n\r\n return \"($search_string)\";\r\n}\r\n','Simple admin search tool for locating blocks by content or description. This is called from the admin tools menu.','blank_box',!
0);
! INSERT INTO box VALUES ('userpref_menu','','my $edit = 0;\r\nmy $return = \'\';\r\nmy $nick = $S->param->{nick};\r\nmy $tool = $S->param->{tool} || \'info\';\r\nmy $admin_edit = \'\';\r\n\r\n# first, do we have permission to edit \r\n# this user\'s prefs?\r\n\r\nif ( $S->{UID} == $S->param->{uid} || $S->have_perm(\'edit_user\') ) {\r\n $edit = 1;\r\n}\r\n\r\n$admin_edit = qq{[<A href=\"%%rootdir%%/user/$nick/prefs\">edit user</A>]} if ($S->have_perm(\'edit_user\'));\r\n\r\n# links to create\r\nmy $links = \"<P>$admin_edit ${nick}\'s \";\r\n\r\n# user info pages\r\nif ( $tool eq \'info\' ) {\r\n $links .= qq{\r\n <A href=\"%%rootdir%%/user/$nick\">Info</A>};\r\n $links .= qq{\r\n <A href=\"%%rootdir%%/user/$nick/comments\">Comments</A>};\r\n $links .= qq{\r\n <A href=\"%%rootdir%%/user/$nick/stories\">Stories</A>};\r\n\r\n if ( $S->{UI}->{VARS}->{use_diaries} ) {\r\n $links .= qq{\r\n <A href=\"%%rootdir%%/user/$nick/diary\">Diary</A>};\r\n }\r\n\r\!
n if ( $S->{UI}->{VARS}->{use_ratings} ) {\r\n $links .= qq{\r\n <A href=\"%%rootdir%%/user/$nick/ratings\">Ratings</A>};\r\n }\r\n\r\n if ( $S->{UI}->{VARS}->{allow_uploads} ) {\r\n $links .= qq{\r\n <A href=\"%%rootdir%%/user/$nick/files\">Files</A>};\r\n }\r\n\r\n if ( $S->{UI}->{VARS}->{use_ads} ) {\r\n $links .= qq{\r\n <A href=\"%%rootdir%%/user/$nick/ads\">Ads</A>};\r\n }\r\n\r\n $return = $links . \"</P>\";\r\n} elsif ( $edit && $tool eq \'prefs\' ) {\r\n my %editlinks;\r\n my ($rv, $sth) = $S->db_select({\r\n WHAT => \'page\',\r\n FROM => \'pref_items\',\r\n GROUP_BY => \'page\'\r\n });\r\n while (my ($item) = $sth->fetchrow_array()) {\r\n $editlinks{\"$item\"} = \"%%rootdir%%/user/$nick/prefs/$item\";\r\n }\r\n $links .= qq{\r\n <A href=\"%%rootdir%%/user/$nick/prefs/Protected\">Email and Password</A>};\r\n\r\n foreach my $item (sort {$b cmp $a} keys %editlinks) {\r\n $links .= !
qq{\r\n <A href=\"$editlinks{$item}\">$item</A>};\r\n }\r\n $retur
n = $links . \"</P>\";\r\n}\r\n\r\nreturn $return;\r\n','navigation for user pref pages','empty_box',0);
INSERT INTO box VALUES ('pref_selectbox','','my $prefname = shift @ARGS;\r\nmy $choice = shift @ARGS;\r\nmy @choices = @ARGS;\r\n\r\nmy $select = qq{\r\n <SELECT name=\"$prefname\" size=\"1\">};\r\n\r\nforeach my $c (@choices) {\r\n my $checked = ($c eq $choice) ? \' SELECTED\' : \'\';\r\n $select .= qq{\r\n <OPTION value=\"$c\"$checked>$c</OPTION>};\r\n}\r\n\r\n$select .= qq{\r\n </SELECT>};\r\n\r\nreturn $select;','Generic select box for user preferences. takes parameters name,value,option1,option2,...\r\nNot suitable for select boxes with code-generated option lists.','empty_box',0);
INSERT INTO box VALUES ('pref_checkbox','','my $prefname = $ARGS[0];\r\nmy $choice = $ARGS[1];\r\n\r\nmy $selected = ($choice eq \'on\') ? \' CHECKED\' : \'\';\r\n\r\nreturn qq{<INPUT type=\"checkbox\" name=\"$prefname\" value=\"on\"$selected>};','a generic checkbox. Takes two arguments, the pref name and the current pref value.','empty_box',0);
***************
*** 923,926 ****
--- 923,928 ----
INSERT INTO patches VALUES ('1_1-dev',4,'UserPrefs','sql');
INSERT INTO patches VALUES ('1_1-dev',4,NULL,'post');
+ INSERT INTO patches VALUES ('1_1-dev',5,'UserPrefs2','sql');
+ INSERT INTO patches VALUES ('1_1-dev',5,NULL,'post');
#
***************
*** 1053,1057 ****
display_fmt text,
enabled int(1) default '1',
! required int(1) default '0',
PRIMARY KEY (prefname),
KEY page_idx (page)
--- 1055,1059 ----
display_fmt text,
enabled int(1) default '1',
! signup varchar(9) default NULL,
PRIMARY KEY (prefname),
KEY page_idx (page)
***************
*** 1062,1105 ****
#
! INSERT INTO pref_items VALUES ('admin_notes','Admin Notes','Information about the user that only site administrators can see',1,1,'edit_user','edit_user','allow_admin_notes',0,'',0,'','User Info','<textarea COLS=\"50\" ROWS=\"5\" NAME=\"admin_notes\" WRAP=\"soft\">%%value%%</textarea>',3,'text_pref','',1,0);
! INSERT INTO pref_items VALUES ('fakeemail','Email','This is the address that will be displayed in comments and in your user info. It will not be used to email forgotten passwords. You may want to add some kind of spam protection so that harvesters cannot parse it.',1,0,'','','',0,'',50,'','User Info','<input TYPE=\"text\" SIZE=\"50\" NAME=\"fakeemail\" VALUE=\"%%value%%\">',5,'text_pref','<A href=\"mailto:%%value%%\">%%value%%</A>',1,0);
! INSERT INTO pref_items VALUES ('homepage','Homepage','If you have a homepage, enter the address here and it will be added to your comments and user info. The full path is required: remember the \"http://\"!',1,0,'','','',0,'',100,'^http','User Info','<input TYPE=\"text\" SIZE=\"50\" NAME=\"homepage\" VALUE=\"%%value%%\">',6,'text_pref','<A href=\"%%value%%\">%%value%%</A>',1,0);
! INSERT INTO pref_items VALUES ('bio','Bio','Enter any kind of biographical information you want other users to see about yourself here.',1,1,'','','',0,'',255,'','User Info','<textarea COLS=\"50\" ROWS=\"5\" WRAP=\"soft\" NAME=\"bio\">%%value%%</textarea>',7,'text_pref','',1,0);
! INSERT INTO pref_items VALUES ('publickey','Public Key','If you have a PGP/GPG public key (used for encrypting and signing email), paste it in here.',1,0,'','','',0,'',0,'','User Info','<textarea COLS=\"50\" ROWS=\"5\" NAME=\"publickey\">%%value%%</textarea>',8,'text_pref','<pre>%%value%%</pre>',1,0);
! INSERT INTO pref_items VALUES ('upload_user_quota','Disk Quota','The maximum amount of space this user can take up with his uploaded files (in kb)',0,0,'','edit_user','allow_uploads',0,'0',0,'\\d+','Interface','<INPUT type=\"text\" name=\"upload_user_quota\" value=\"%%value%%\" size=\"5\">',0,'selectbox_pref','',1,0);
! INSERT INTO pref_items VALUES ('upload_max_file_size','Max File Size','The maximum size a single file can be (in kb)',0,0,'','edit_user','allow_uploads',0,'0',0,'\\d+','Interface','<INPUT type=\"text\" name=\"upload_max_file_size\" value=\"%%value%%\" size=\"5\">',0,'selectbox_pref','',1,0);
! INSERT INTO pref_items VALUES ('digest','Story Digest','Story headlines and intros can be emailed to you at your real email address on the schedule you choose.',0,0,'','','enable_story_digests',0,'Never',10,'(Never|Daily|Weekly|Monthly)','Interface','%%BOX,pref_selectbox,digest,%%value%%,Never,Daily,Weekly,Monthly%%',1,'selectbox_pref','',1,0);
! INSERT INTO pref_items VALUES ('time_zone','Your Time Zone','Setting your (non-daylight savings) time zone here will make the site display all times and dates in your local time',0,0,'','','',0,'EST',4,'[a-zA-z]+','Interface','%%BOX,time_zone_pref,%%value%%%%',2,'selectbox_pref','',1,0);
! INSERT INTO pref_items VALUES ('maxstories','Number of story summaries to show','(on front page)',0,0,'','','',0,'8',3,'\\d+','Interface','<input type=\"text\" size=\"5\" name=\"maxstories\" value=\"%%value%%\">',3,'text_pref','',1,0);
! INSERT INTO pref_items VALUES ('maxtitles','Number of story titles to show','(in \"older stories\" box)',0,0,'','','',0,'10',3,'\\d+','Interface','<input type=\"text\" size=\"5\" name=\"maxtitles\" value=\"%%value%%\">',4,'text_pref','',1,0);
! INSERT INTO pref_items VALUES ('textarea_cols','Text box width','This allows you to set how big of a text box you have to type stories and comments into.',0,0,'','','',0,'50',4,'\\d+','Interface','<input type=\"text\" size=\"5\" name=\"textarea_cols\" value=\"%%value%%\">',5,'text_pref','',1,0);
! INSERT INTO pref_items VALUES ('textarea_rows','Text box height','This allows you to set how big of a text box you have to type stories and comments into.',0,0,'','','',0,'15',4,'\\d+','Interface','<input type=\"text\" size=\"5\" name=\"textarea_rows\" value=\"%%value%%\">',6,'text_pref','',1,0);
! INSERT INTO pref_items VALUES ('norm_font_face','Font Face','',0,0,'','','',0,'verdana, arial, helvetica, sans-serif',0,'[a-zA-z,\\s]','Interface','<input type=\"text\" size=\"30\" name=\"norm_font_face\" value=\"%%value%%\" />',7,'text_pref','',1,0);
! INSERT INTO pref_items VALUES ('norm_font_size','Font Size','',0,0,'','','',0,'2',5,'\\w+','Interface','<input type=\"text\" size=\"5\" name=\"norm_font_size\" value=\"%%value%%\">',8,'text_pref','',1,0);
! INSERT INTO pref_items VALUES ('showad','Show ads','',0,0,'','ad_opt_out','use_ads',0,'All',16,'^(on|off)$','Interface','%%BOX,pref_checkbox,showad,%%value%%%%',9,'selectbox_pref','',1,0);
! INSERT INTO pref_items VALUES ('ad_open_new_win','Open advertisement clicks in new window','',0,0,'','','use_ads',0,'off',3,'^(on|off)$','Interface','%%BOX,pref_checkbox,ad_open_new_win,%%value%%%%',10,'selectbox_pref','',1,0);
! INSERT INTO pref_items VALUES ('show_topic','Show topic images with stories','',0,0,'','','use_topics',0,'on',3,'^(on|off)$','Interface','%%BOX,pref_checkbox,show_topic,%%value%%%%',11,'selectbox_pref','',1,0);
! INSERT INTO pref_items VALUES ('start_page','Start page','',0,0,'','','',0,'__main__',0,'\\w+','Interface','%%BOX,startpage_pref,%%value%%%%',12,'selectbox_pref','',1,0);
! INSERT INTO pref_items VALUES ('online_cloak','Hide yourself in the Who\'s Online box','',0,0,'','','use_whosonline',0,'off',3,'^(on|off)$','Interface','%%BOX,pref_checkbox,online_cloak,%%value%%%%',13,'selectbox_pref','',1,0);
! INSERT INTO pref_items VALUES ('dynamic_interface','Use dynamic interface elements','This turns on javascript-driven items such as dynamic comment mode',0,0,'','','allow_dynamic_comment_mode',0,'off',3,'^(on|off)$','Interface','%%BOX,pref_checkbox,dynamic_interface,%%value%%%%',14,'selectbox_pref','',1,0);
! INSERT INTO pref_items VALUES ('spellcheck_default','Spellcheck posts by default','',0,0,'','use_spellcheck','spellcheck_enabled',0,'off',3,'^(on|off)$','Interface','%%BOX,pref_checkbox,spellcheck_default,%%value%%%%',15,'selectbox_pref','',1,0);
! INSERT INTO pref_items VALUES ('speling','Spelling variant','',0,0,'','use_spellcheck','spellcheck_enabled',0,'american',8,'(American|Canadian|British)','Interface','%%BOX,pref_selectbox,speling,%%value%%,American,Canadian,British%%',16,'selectbox_pref','',1,0);
! INSERT INTO pref_items VALUES ('imagedir','Preferred image server','Choose an image server closest to you for the quickest page load times',0,0,'','','use_alt_image_servers',0,'/images',0,'','Interface','%%BOX,img_server_pref,%%value%%%%',17,'selectbox_pref','',1,0);
! INSERT INTO pref_items VALUES ('theme','Use which theme','',0,0,'','','allow_user_themes',0,'',0,'\\w+','Interface','%%BOX,user_theme_pref,%%value%%%%',18,'selectbox_pref','',1,0);
! INSERT INTO pref_items VALUES ('cookie_expire','Cookie Expiry','How long does your login cookie last?',0,0,'','','',0,'2592000',0,'','Interface','%%BOX,cookie_expire_pref,%%value%%%%',19,'selectbox_pref','',1,0);
! INSERT INTO pref_items VALUES ('displayed_boxes','Boxes','',0,0,'','','',0,'hotlist_box,poll_box,rdf_feeds,whos_online',0,'','Interface','%%BOX,box_pref,%%value%%%%',20,'text_pref','',1,0);
! INSERT INTO pref_items VALUES ('max_rdf_titles','Maximum headlines per feed','',0,0,'','','use_rdf_feeds',0,'15',2,'\\d+','Interface','<input type=\"text\" name=\"max_rdf_titles\" value=\"%%value%%\" size=\"5\">',21,'text_pref','',1,0);
! INSERT INTO pref_items VALUES ('rdf_feeds','External Feeds','[<a href=\"%%rootdir%%/submitrdf\">Submit New Feed</A>]',0,0,'','','use_rdf_feeds',0,'',0,'','Interface','%%BOX,rdf_pref,%%value%%%%',22,'text_pref','',1,0);
! INSERT INTO pref_items VALUES ('commentmode','Comment display mode','',0,0,'','','',0,'threaded',0,'(use_overflow|minimal|dminimal|threaded|dthreaded|nested|flat|flat_unthread)','Comments','%%BOX,commentmode_pref,%%value%%%%',1,'selectbox_pref','',1,0);
! INSERT INTO pref_items VALUES ('commentmode_overflow_at','Change to overflow mode at','',0,0,'','','',0,'200',0,'\\d+','Comments','<input type=\"text\" size=\"10\" name=\"commentmode_overflow_at\" value=\"%%value%%\">',2,'selectbox_pref','',1,0);
! INSERT INTO pref_items VALUES ('commentmode_overflow','Comment display mode (overflow)','Comment display modes:\n<UL>\n <LI>flat (unthreaded): straight chronological order</LI>\n <LI>flat: comments and replies grouped, but not indented</LI>\n <LI>minimal: titles only, replies indented</LI>\n <LI>threaded: top-level comments expanded, all other titles only, replies indented</LI>\n <LI>nested: all comments shown in full, replies indented</LI>\n</UL>',0,0,'','','',0,'threaded',0,'(minimal|dminimal|threaded|dthreaded|nested|flat|flat_unthread)','Comments','%%BOX,commentmode_overflow_pref,%%value%%%%',3,'selectbox_pref','',1,0);
! INSERT INTO pref_items VALUES ('commenttype','Types of comments to display','',0,0,'','','',0,'mixed',10,'(mixed|topical|editorial|all|none)','Comments','%%BOX,pref_selectbox,commenttype,%%value%%,mixed,topical,editorial,all,none%%',4,'selectbox_pref','',1,0);
! INSERT INTO pref_items VALUES ('commentrating','Sorting based on comment ratings','',0,0,'','','use_ratings',0,'highest',15,'(unrate_highest|highest|lowest|dontcare)','Comments','%%BOX,rating_order_pref,%%value%%%%',5,'selectbox_pref','',1,0);
! INSERT INTO pref_items VALUES ('commentorder','Sorting based on comment age','',0,0,'','','',0,'oldest',6,'(newest|oldest)','Comments','%%BOX,pref_selectbox,commentorder,%%value%%,newest,oldest%%',6,'selectbox_pref','',1,0);
! INSERT INTO pref_items VALUES ('ratingchoice','Rate comments','',0,0,'','comment_rate','use_ratings',0,'yes',4,'(yes|no|hide)','Comments','%%BOX,pref_selectbox,ratingchoice,%%value%%,yes,no,hide%%',7,'selectbox_pref','',1,0);
! INSERT INTO pref_items VALUES ('hidingchoice','Show hidden comments','',0,0,'','','use_ratings',1,'untilrating',11,'(yes|no|untilrating)','Comments','%%BOX,show_hidden_pref,%%value%%%%',8,'selectbox_pref','',1,0);
! INSERT INTO pref_items VALUES ('posttype','Post mode','',0,0,'','','',0,'auto',4,'(text|html|auto)','Comments','%%BOX,postmode_pref,%%value%%%%',9,'selectbox_pref','',1,0);
! INSERT INTO pref_items VALUES ('sig','Signature','This will get attached to your comments. Sigs are typically used for quotations or links',0,1,'','comment_post','',0,'',160,'','Comments','<textarea COLS=\"50\" ROWS=\"5\" WRAP=\"soft\" NAME=\"sig\">%%value%%</textarea>',10,'text_pref','',1,0);
! INSERT INTO pref_items VALUES ('sig_behavior','Signature type','',0,0,'','comment_post','allow_sig_behavior',0,'retroactive',11,'(retroactive|sticky|none)','Comments','%%BOX,pref_selectbox,sig_behavior,%%value%%,retroactive,sticky,none%%',11,'selectbox_pref','',1,0);
#
--- 1064,1107 ----
#
! INSERT INTO pref_items VALUES ('admin_notes','Admin Notes','Information about the user that only site administrators can see',1,1,'edit_user','edit_user','allow_admin_notes',0,'',0,'','User Info','<textarea COLS=\"50\" ROWS=\"5\" NAME=\"admin_notes\" WRAP=\"soft\">%%value%%</textarea>',3,'text_pref','',1,'normal');
! INSERT INTO pref_items VALUES ('fakeemail','Email','This is the address that will be displayed in comments and in your user info. It will not be used to email forgotten passwords. You may want to add some kind of spam protection so that harvesters cannot parse it.',1,0,'','','',0,'',50,'','User Info','<input TYPE=\"text\" SIZE=\"50\" NAME=\"fakeemail\" VALUE=\"%%value%%\">',5,'text_pref','<A href=\"mailto:%%value%%\">%%value%%</A>',1,'normal');
! INSERT INTO pref_items VALUES ('homepage','Homepage','If you have a homepage, enter the address here and it will be added to your comments and user info. The full path is required: remember the \"http://\"!',1,0,'','','',0,'',100,'^http','User Info','<input TYPE=\"text\" SIZE=\"50\" NAME=\"homepage\" VALUE=\"%%value%%\">',6,'text_pref','<A href=\"%%value%%\">%%value%%</A>',1,'normal');
! INSERT INTO pref_items VALUES ('bio','Bio','Enter any kind of biographical information you want other users to see about yourself here.',1,1,'','','',0,'',255,'','User Info','<textarea COLS=\"50\" ROWS=\"5\" WRAP=\"soft\" NAME=\"bio\">%%value%%</textarea>',7,'text_pref','',1,'normal');
! INSERT INTO pref_items VALUES ('publickey','Public Key','If you have a PGP/GPG public key (used for encrypting and signing email), paste it in here.',1,0,'','','',0,'',0,'','User Info','<textarea COLS=\"50\" ROWS=\"5\" NAME=\"publickey\">%%value%%</textarea>',8,'text_pref','<pre>%%value%%</pre>',1,'normal');
! INSERT INTO pref_items VALUES ('upload_user_quota','Disk Quota','The maximum amount of space this user can take up with his uploaded files (in kb)',0,0,'','edit_user','allow_uploads',0,'0',0,'\\d+','Interface','<INPUT type=\"text\" name=\"upload_user_quota\" value=\"%%value%%\" size=\"5\">',0,'selectbox_pref','',1,'normal');
! INSERT INTO pref_items VALUES ('upload_max_file_size','Max File Size','The maximum size a single file can be (in kb)',0,0,'','edit_user','allow_uploads',0,'0',0,'\\d+','Interface','<INPUT type=\"text\" name=\"upload_max_file_size\" value=\"%%value%%\" size=\"5\">',0,'selectbox_pref','',1,'normal');
! INSERT INTO pref_items VALUES ('digest','Story Digest','Story headlines and intros can be emailed to you at your real email address on the schedule you choose.',0,0,'','','enable_story_digests',0,'Never',10,'(Never|Daily|Weekly|Monthly)','Interface','%%BOX,pref_selectbox,digest,%%value%%,Never,Daily,Weekly,Monthly%%',1,'selectbox_pref','',1,'normal');
! INSERT INTO pref_items VALUES ('time_zone','Your Time Zone','Setting your (non-daylight savings) time zone here will make the site display all times and dates in your local time',0,0,'','','',0,'EST',4,'[a-zA-z]+','Interface','%%BOX,time_zone_pref,%%value%%%%',2,'selectbox_pref','',1,'normal');
! INSERT INTO pref_items VALUES ('maxstories','Number of story summaries to show','(on front page)',0,0,'','','',0,'8',3,'\\d+','Interface','<input type=\"text\" size=\"5\" name=\"maxstories\" value=\"%%value%%\">',3,'text_pref','',1,'normal');
! INSERT INTO pref_items VALUES ('maxtitles','Number of story titles to show','(in \"older stories\" box)',0,0,'','','',0,'10',3,'\\d+','Interface','<input type=\"text\" size=\"5\" name=\"maxtitles\" value=\"%%value%%\">',4,'text_pref','',1,'normal');
! INSERT INTO pref_items VALUES ('textarea_cols','Text box width','This allows you to set how big of a text box you have to type stories and comments into.',0,0,'','','',0,'50',4,'\\d+','Interface','<input type=\"text\" size=\"5\" name=\"textarea_cols\" value=\"%%value%%\">',5,'text_pref','',1,'normal');
! INSERT INTO pref_items VALUES ('textarea_rows','Text box height','This allows you to set how big of a text box you have to type stories and comments into.',0,0,'','','',0,'15',4,'\\d+','Interface','<input type=\"text\" size=\"5\" name=\"textarea_rows\" value=\"%%value%%\">',6,'text_pref','',1,'normal');
! INSERT INTO pref_items VALUES ('norm_font_face','Font Face','',0,0,'','','',0,'verdana, arial, helvetica, sans-serif',0,'[a-zA-z,\\s]','Interface','<input type=\"text\" size=\"30\" name=\"norm_font_face\" value=\"%%value%%\" />',7,'text_pref','',1,'normal');
! INSERT INTO pref_items VALUES ('norm_font_size','Font Size','',0,0,'','','',0,'2',5,'\\w+','Interface','<input type=\"text\" size=\"5\" name=\"norm_font_size\" value=\"%%value%%\">',8,'text_pref','',1,'normal');
! INSERT INTO pref_items VALUES ('showad','Show ads','',0,0,'','ad_opt_out','use_ads',0,'All',16,'^(on|off)$','Interface','%%BOX,pref_checkbox,showad,%%value%%%%',9,'selectbox_pref','',1,'normal');
! INSERT INTO pref_items VALUES ('ad_open_new_win','Open advertisement clicks in new window','',0,0,'','','use_ads',0,'off',3,'^(on|off)$','Interface','%%BOX,pref_checkbox,ad_open_new_win,%%value%%%%',10,'selectbox_pref','',1,'normal');
! INSERT INTO pref_items VALUES ('show_topic','Show topic images with stories','',0,0,'','','use_topics',0,'on',3,'^(on|off)$','Interface','%%BOX,pref_checkbox,show_topic,%%value%%%%',11,'selectbox_pref','',1,'normal');
! INSERT INTO pref_items VALUES ('start_page','Start page','',0,0,'','','',0,'__main__',0,'\\w+','Interface','%%BOX,startpage_pref,%%value%%%%',12,'selectbox_pref','',1,'normal');
! INSERT INTO pref_items VALUES ('online_cloak','Hide yourself in the Who\'s Online box','',0,0,'','','use_whosonline',0,'off',3,'^(on|off)$','Interface','%%BOX,pref_checkbox,online_cloak,%%value%%%%',13,'selectbox_pref','',1,'normal');
! INSERT INTO pref_items VALUES ('dynamic_interface','Use dynamic interface elements','This turns on javascript-driven items such as dynamic comment mode',0,0,'','','allow_dynamic_comment_mode',0,'off',3,'^(on|off)$','Interface','%%BOX,pref_checkbox,dynamic_interface,%%value%%%%',14,'selectbox_pref','',1,'normal');
! INSERT INTO pref_items VALUES ('spellcheck_default','Spellcheck posts by default','',0,0,'','use_spellcheck','spellcheck_enabled',0,'off',3,'^(on|off)$','Interface','%%BOX,pref_checkbox,spellcheck_default,%%value%%%%',15,'selectbox_pref','',1,'normal');
! INSERT INTO pref_items VALUES ('speling','Spelling variant','',0,0,'','use_spellcheck','spellcheck_enabled',0,'american',8,'(American|Canadian|British)','Interface','%%BOX,pref_selectbox,speling,%%value%%,American,Canadian,British%%',16,'selectbox_pref','',1,'normal');
! INSERT INTO pref_items VALUES ('imagedir','Preferred image server','Choose an image server closest to you for the quickest page load times',0,0,'','','use_alt_image_servers',0,'/images',0,'','Interface','%%BOX,img_server_pref,%%value%%%%',17,'selectbox_pref','',1,'normal');
! INSERT INTO pref_items VALUES ('theme','Use which theme','',0,0,'','','allow_user_themes',0,'',0,'\\w+','Interface','%%BOX,user_theme_pref,%%value%%%%',18,'selectbox_pref','',1,'normal');
! INSERT INTO pref_items VALUES ('cookie_expire','Cookie Expiry','How long does your login cookie last?',0,0,'','','',0,'2592000',0,'','Interface','%%BOX,cookie_expire_pref,%%value%%%%',19,'selectbox_pref','',1,'normal');
! INSERT INTO pref_items VALUES ('displayed_boxes','Boxes','',0,0,'','','',0,'hotlist_box,poll_box,rdf_feeds,whos_online',0,'','Interface','%%BOX,box_pref,%%value%%%%',20,'text_pref','',1,'normal');
! INSERT INTO pref_items VALUES ('max_rdf_titles','Maximum headlines per feed','',0,0,'','','use_rdf_feeds',0,'15',2,'\\d+','Interface','<input type=\"text\" name=\"max_rdf_titles\" value=\"%%value%%\" size=\"5\">',21,'text_pref','',1,'normal');
! INSERT INTO pref_items VALUES ('rdf_feeds','External Feeds','[<a href=\"%%rootdir%%/submitrdf\">Submit New Feed</A>]',0,0,'','','use_rdf_feeds',0,'',0,'','Interface','%%BOX,rdf_pref,%%value%%%%',22,'text_pref','',1,'normal');
! INSERT INTO pref_items VALUES ('commentmode','Comment display mode','',0,0,'','','',0,'threaded',0,'(use_overflow|minimal|dminimal|threaded|dthreaded|nested|flat|flat_unthread)','Comments','%%BOX,commentmode_pref,%%value%%%%',1,'selectbox_pref','',1,'normal');
! INSERT INTO pref_items VALUES ('commentmode_overflow_at','Change to overflow mode at','',0,0,'','','',0,'200',0,'\\d+','Comments','<input type=\"text\" size=\"10\" name=\"commentmode_overflow_at\" value=\"%%value%%\">',2,'selectbox_pref','',1,'normal');
! INSERT INTO pref_items VALUES ('commentmode_overflow','Comment display mode (overflow)','Comment display modes:\n<UL>\n <LI>flat (unthreaded): straight chronological order</LI>\n <LI>flat: comments and replies grouped, but not indented</LI>\n <LI>minimal: titles only, replies indented</LI>\n <LI>threaded: top-level comments expanded, all other titles only, replies indented</LI>\n <LI>nested: all comments shown in full, replies indented</LI>\n</UL>',0,0,'','','',0,'threaded',0,'(minimal|dminimal|threaded|dthreaded|nested|flat|flat_unthread)','Comments','%%BOX,commentmode_overflow_pref,%%value%%%%',3,'selectbox_pref','',1,'normal');
! INSERT INTO pref_items VALUES ('commenttype','Types of comments to display','',0,0,'','','',0,'mixed',10,'(mixed|topical|editorial|all|none)','Comments','%%BOX,pref_selectbox,commenttype,%%value%%,mixed,topical,editorial,all,none%%',4,'selectbox_pref','',1,'normal');
! INSERT INTO pref_items VALUES ('commentrating','Sorting based on comment ratings','',0,0,'','','use_ratings',0,'highest',15,'(unrate_highest|highest|lowest|dontcare)','Comments','%%BOX,rating_order_pref,%%value%%%%',5,'selectbox_pref','',1,'normal');
! INSERT INTO pref_items VALUES ('commentorder','Sorting based on comment age','',0,0,'','','',0,'oldest',6,'(newest|oldest)','Comments','%%BOX,pref_selectbox,commentorder,%%value%%,newest,oldest%%',6,'selectbox_pref','',1,'normal');
! INSERT INTO pref_items VALUES ('ratingchoice','Rate comments','',0,0,'','comment_rate','use_ratings',0,'yes',4,'(yes|no|hide)','Comments','%%BOX,pref_selectbox,ratingchoice,%%value%%,yes,no,hide%%',7,'selectbox_pref','',1,'normal');
! INSERT INTO pref_items VALUES ('hidingchoice','Show hidden comments','',0,0,'','','use_ratings',1,'untilrating',11,'(yes|no|untilrating)','Comments','%%BOX,show_hidden_pref,%%value%%%%',8,'selectbox_pref','',1,'normal');
! INSERT INTO pref_items VALUES ('posttype','Post mode','',0,0,'','','',0,'auto',4,'(text|html|auto)','Comments','%%BOX,postmode_pref,%%value%%%%',9,'selectbox_pref','',1,'normal');
! INSERT INTO pref_items VALUES ('sig','Signature','This will get attached to your comments. Sigs are typically used for quotations or links',0,1,'','comment_post','',0,'',160,'','Comments','<textarea COLS=\"50\" ROWS=\"5\" WRAP=\"soft\" NAME=\"sig\">%%value%%</textarea>',10,'text_pref','',1,'normal');
! INSERT INTO pref_items VALUES ('sig_behavior','Signature type','',0,0,'','comment_post','allow_sig_behavior',0,'retroactive',11,'(retroactive|sticky|none)','Comments','%%BOX,pref_selectbox,sig_behavior,%%value%%,retroactive,sticky,none%%',11,'selectbox_pref','',1,'normal');
#