Update of /cvs/scoop/scoop/struct
In directory lithium.sabren.com:/tmp/cvs-serv14235/struct
Modified Files:
scoop.sql
Log Message:
Bug 165: Tag categories.
-janra
Index: scoop.sql
===================================================================
RCS file: /cvs/scoop/scoop/struct/scoop.sql,v
retrieving revision 1.216
retrieving revision 1.217
diff -C2 -d -r1.216 -r1.217
*** scoop.sql 28 May 2005 01:56:29 -0000 1.216
--- scoop.sql 10 Sep 2005 01:13:46 -0000 1.217
***************
*** 201,205 ****
INSERT INTO blocks VALUES ('admin_template','<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n<HTML>\r\n<HEAD>\r\n<TITLE>%%sitename%% %%bars%% %%subtitle%%</TITLE>\r\n%%css_includes%%\r\n</HEAD>\r\n<BODY>\r\n\r\n%%header%%\r\n\r\n<!-- Main layout table -->\r\n<TABLE id=\"main\">\r\n <!-- Main page block -->\r\n <TR>\r\n \r\n <!-- Center content section -->\r\n <TD VALIGN=\"top\" width=\"72%\">\r\n %%CONTENT%%\r\n </TD>\r\n <!-- X center content section -->\r\n \r\n <!-- Right boxes column -->\r\n <TD VALIGN=\"top\" WIDTH=\"25%\">\r\n\r\n %%BOX,main_menu%%\r\n %%BOX,hotlist_box%%\r\n %%BOX,user_box%%\r\n %%BOX,admin_tools%%\r\n \r\n </TD>\r\n <!-- X Right boxes column -->\r\n </TR>\r\n <!-- X main page block -->\r\n</TABLE>\r\n<!-- X Main layout table -->\r\n\r\n%%footer%%\r\n\r\n<CENTER>%%BOX,menu_footer%%</CENTER>\r\n</BODY>\r\n','1','This block is used to !
build most pages on the site. It must be a full HTML page; dynamic content is added through the use of special keys. The special keys recognised are:</P>\n<DL>\n <DT>subtitle</DT>\n <DD>This is replaced with an appropriate subtitle indicating which page is currently being viewed.</DD>\n <DT>CONTENT</DT>\n <DD>This is replaced with any other content specific to the page being requested. It is provided by the function or box named in the Ops Admin Tool which handles the op (the first pseudo-directory) of the page.</P>\n<P>This block is used to create the Admin Tools pages, including the Blocks Admin Tool, so be very careful when changing it. If you break this block, you will not be able to use any of the Admin Tools anymore and will not be able to fix it without going directly to the database.</P>','Page Templates','default','en');
INSERT INTO blocks VALUES ('story_info','<!-- Story info -->\r\n<DIV class=\"story_info\">\r\n %%smallfont%%%%story_info%%%%smallfont_end%%\r\n</DIV>\r\n<!-- X Story info -->\r\n\r\n','1','<P>This block displays information about the story and links to some of the things you can do. It recognizes one special key, story_info, which is replaced with the story name, number and type of comments, and the \'post a comment\' and \'edit\' links as permissions allow.</P>','Stories','default','en');
! INSERT INTO blocks VALUES ('story_summary','<DIV class=\"story_summary\">\r\n<DIV class=\"story_title\"><H2>%%title%%</H2>\r\n%%norm_font%%%%hotlist%%%%norm_font_end%%\r\n<BR>%%topic_img%%</DIV>\r\n\r\n<P>%%smallfont%%By %%info%%, Section %%section_link%%\r\n<BR>Posted on %%time%%%%smallfont_end%%</P>\r\n\r\n<DIV class=\"introtext\">\r\n%%norm_font%%%%introtext%%%%norm_font_end%%\r\n</DIV>\r\n<P>%%norm_font%%%%stats%% %%readmore%%%%norm_font_end%%</P>\r\n</DIV>','1','<P>This block is used to format the story headlines and introtext, both on the index pages and the story pages. It should be a self-contained bit of HTML that lays out the story\'s information. The following special keys are recognized:</P>\n<DL>\n <DT>info</DT>\n <DD>The author\'s name and the story\'s \"department\" (if used)</DD>\n <DT>title</DT>\n <DD>The story\'s title</DD>\n <DT>introtext</DT>\n <DD>The formatted contents of the story\'s introtext field</DD>\n <DT>hotlist</DT>\n <DD>The link to eithe!
r add or remove the story to the user\'s hotlist. Blank for anonymous users and stories that haven\'t been published yet.</DD>\n <DT>topic_img</DT>\n <DD>The topic image, linked to the search results for that topic.</DD>\n <DT>topic_text</DT>\n <DD>The alt text for the topic image as a text link, linked to the search results for that topic.</DD>\n <DT>time</DT>\n <DD>The localized time the story was posted.</DD>\n <DT>sid</DT>\n <DD>The story ID; can be used in custom links.</DD>\n <DT>section_icon</DT>\n <DD>The file name of the section icon; can be used in an IMG tag to display an icon.</DD>\n <DT>section_title</DT>\n <DD>The title of the section.</DD>\n <DT>aid</DT>\n <DD>The nickname of the story author</DD>\n <DT>section</DT>\n <DD>The title of the section.</DD>\n <DT>new</DT>\n <DD>The new story marker; displays the contents of the block <B>new_story_marker</B> if the logged-in user has not yet read the story, otherwise blank.</DD>\n <DT>readmore</DT>\n <DD>!
The link to the full story, drawing on either the block <B>readmore_tx
t</B> or <B>no_body_txt</B> as appropriate. Also the link to edit the story, if the user has the appropriate perms.</DD>\n <DT>stats</DT>\n <DD>The number of comments and unread comments, and the number of words in the story.</DD>\n <DT>section_link</DT>\n <DD>The section title as a link to the section index page</DD>\n</DL>','Stories','default','en');
INSERT INTO blocks VALUES ('box','<DIV class=\"box\">\r\n%%box_title_font%%%%title%%%%box_title_font_end%%\r\n%%smallfont%%\r\n%%content%%\r\n%%smallfont_end%%\r\n</DIV>','1','<P>This block is used to provide a container for box output, and is not used directly in the page templates. It should be self-contained HTML, and provide the frame seen around the boxes in the sidebar. The special keys recognised are:</P>\n<DL>\n <DT>title</DT>\n <DD>The title of the box; if the box code returns a value for the title, that is used, otherwise the title field set in the Boxes Admin Tool is used</DD>\n <DT>content</DT>\n <DD>The main body of the box. This is the only thing the box code must return; if the box returns nothing or an empty string, the entire box (and its template) is not displayed at all</DD>\n <DT>bid</DT>\n <DD>The internal name for the box.</DD>\n</DL>','Box Templates','default','en');
INSERT INTO blocks VALUES ('submission_message','<P><FONT =\"+1\">Thank you for your submission. This is a community-edited site, so hopefully your fellow readers will see fit to post your story. Good Luck!</FONT></P>','1','<P>This block is displayed below the story body when it has been submitted to the queue. It should be self-contained HTML and should explain what will happen to the user\'s story now that it has been submitted.</P>','Stories','default','en');
--- 201,205 ----
INSERT INTO blocks VALUES ('admin_template','<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n<HTML>\r\n<HEAD>\r\n<TITLE>%%sitename%% %%bars%% %%subtitle%%</TITLE>\r\n%%css_includes%%\r\n</HEAD>\r\n<BODY>\r\n\r\n%%header%%\r\n\r\n<!-- Main layout table -->\r\n<TABLE id=\"main\">\r\n <!-- Main page block -->\r\n <TR>\r\n \r\n <!-- Center content section -->\r\n <TD VALIGN=\"top\" width=\"72%\">\r\n %%CONTENT%%\r\n </TD>\r\n <!-- X center content section -->\r\n \r\n <!-- Right boxes column -->\r\n <TD VALIGN=\"top\" WIDTH=\"25%\">\r\n\r\n %%BOX,main_menu%%\r\n %%BOX,hotlist_box%%\r\n %%BOX,user_box%%\r\n %%BOX,admin_tools%%\r\n \r\n </TD>\r\n <!-- X Right boxes column -->\r\n </TR>\r\n <!-- X main page block -->\r\n</TABLE>\r\n<!-- X Main layout table -->\r\n\r\n%%footer%%\r\n\r\n<CENTER>%%BOX,menu_footer%%</CENTER>\r\n</BODY>\r\n','1','This block is used to !
build most pages on the site. It must be a full HTML page; dynamic content is added through the use of special keys. The special keys recognised are:</P>\n<DL>\n <DT>subtitle</DT>\n <DD>This is replaced with an appropriate subtitle indicating which page is currently being viewed.</DD>\n <DT>CONTENT</DT>\n <DD>This is replaced with any other content specific to the page being requested. It is provided by the function or box named in the Ops Admin Tool which handles the op (the first pseudo-directory) of the page.</P>\n<P>This block is used to create the Admin Tools pages, including the Blocks Admin Tool, so be very careful when changing it. If you break this block, you will not be able to use any of the Admin Tools anymore and will not be able to fix it without going directly to the database.</P>','Page Templates','default','en');
INSERT INTO blocks VALUES ('story_info','<!-- Story info -->\r\n<DIV class=\"story_info\">\r\n %%smallfont%%%%story_info%%%%smallfont_end%%\r\n</DIV>\r\n<!-- X Story info -->\r\n\r\n','1','<P>This block displays information about the story and links to some of the things you can do. It recognizes one special key, story_info, which is replaced with the story name, number and type of comments, and the \'post a comment\' and \'edit\' links as permissions allow.</P>','Stories','default','en');
! INSERT INTO blocks VALUES ('story_summary','<DIV class=\"story_summary\">\r\n<DIV class=\"story_title\"><H2>%%title%%</H2>\r\n%%norm_font%%%%hotlist%%%%norm_font_end%%\r\n<BR>%%topic_img%%</DIV>\r\n\r\n<P>%%smallfont%%By %%info%%, Section %%section_link%%\r\n<BR>Posted on %%time%%\r\n%%tags%%%%smallfont_end%%</P>\r\n\r\n<DIV class=\"introtext\">\r\n%%norm_font%%%%introtext%%%%norm_font_end%%\r\n</DIV>\r\n<P>%%norm_font%%%%stats%% %%readmore%%%%norm_font_end%%</P>\r\n</DIV>','1','<P>This block is used to format the story headlines and introtext, both on the index pages and the story pages. It should be a self-contained bit of HTML that lays out the story\'s information. The following special keys are recognized:</P>\n<DL>\n <DT>info</DT>\n <DD>The author\'s name and the story\'s \"department\" (if used)</DD>\n <DT>title</DT>\n <DD>The story\'s title</DD>\n <DT>introtext</DT>\n <DD>The formatted contents of the story\'s introtext field</DD>\n <DT>hotlist</DT>\n <DD>The l!
ink to either add or remove the story to the user\'s hotlist. Blank for anonymous users and stories that haven\'t been published yet.</DD>\n <DT>topic_img</DT>\n <DD>The topic image, linked to the search results for that topic.</DD>\n <DT>topic_text</DT>\n <DD>The alt text for the topic image as a text link, linked to the search results for that topic.</DD>\n <DT>time</DT>\n <DD>The localized time the story was posted.</DD>\n <DT>sid</DT>\n <DD>The story ID; can be used in custom links.</DD>\n <DT>section_icon</DT>\n <DD>The file name of the section icon; can be used in an IMG tag to display an icon.</DD>\n <DT>section_title</DT>\n <DD>The title of the section.</DD>\n <DT>aid</DT>\n <DD>The nickname of the story author</DD>\n <DT>section</DT>\n <DD>The title of the section.</DD>\n <DT>new</DT>\n <DD>The new story marker; displays the contents of the block <B>new_story_marker</B> if the logged-in user has not yet read the story, otherwise blank.</DD>\n <DT>readmore<!
/DT>\n <DD>The link to the full story, drawing on either the block <B
>readmore_txt</B> or <B>no_body_txt</B> as appropriate. Also the link to edit the story, if the user has the appropriate perms.</DD>\n <DT>stats</DT>\n <DD>The number of comments and unread comments, and the number of words in the story.</DD>\n <DT>section_link</DT>\n <DD>The section title as a link to the section index page</DD>\n</DL>','Stories','default','en');
INSERT INTO blocks VALUES ('box','<DIV class=\"box\">\r\n%%box_title_font%%%%title%%%%box_title_font_end%%\r\n%%smallfont%%\r\n%%content%%\r\n%%smallfont_end%%\r\n</DIV>','1','<P>This block is used to provide a container for box output, and is not used directly in the page templates. It should be self-contained HTML, and provide the frame seen around the boxes in the sidebar. The special keys recognised are:</P>\n<DL>\n <DT>title</DT>\n <DD>The title of the box; if the box code returns a value for the title, that is used, otherwise the title field set in the Boxes Admin Tool is used</DD>\n <DT>content</DT>\n <DD>The main body of the box. This is the only thing the box code must return; if the box returns nothing or an empty string, the entire box (and its template) is not displayed at all</DD>\n <DT>bid</DT>\n <DD>The internal name for the box.</DD>\n</DL>','Box Templates','default','en');
INSERT INTO blocks VALUES ('submission_message','<P><FONT =\"+1\">Thank you for your submission. This is a community-edited site, so hopefully your fellow readers will see fit to post your story. Good Luck!</FONT></P>','1','<P>This block is displayed below the story body when it has been submitted to the queue. It should be self-contained HTML and should explain what will happen to the user\'s story now that it has been submitted.</P>','Stories','default','en');
***************
*** 219,223 ****
INSERT INTO blocks VALUES ('story_template','<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n<HTML>\r\n<HEAD>\r\n<TITLE>%%sitename%% %%bars%% %%subtitle%%</TITLE>\r\n%%css_includes%%\r\n</HEAD>\r\n%%dynamicmode_javascript%%\r\n<BODY>\r\n\r\n%%header%%\r\n\r\n<!-- Main layout table -->\r\n<TABLE id=\"main\">\r\n <!-- Main page block -->\r\n <TR>\r\n \r\n <!-- Center content section -->\r\n <TD VALIGN=\"top\" width=\"75%\">\r\n <!-- Story stuff -->\r\n %%STORY%%\r\n <!-- X story stuff -->\r\n </TD>\r\n <!-- X center content section -->\r\n \r\n <!-- Right boxes column -->\r\n <TD VALIGN=\"top\" WIDTH=\"25%\">\r\n %%BOX,main_menu%%\r\n %%BOX,user_box%%\r\n %%BOX,hotlist_box%%\r\n %%BOX,admin_tools%%\r\n %%BOX,poll_box%%\r\n %%BOX,related_links%%\r\n %%BOX,mod_stats%%\r\n </TD>\r\n <!-- X Right boxes column -->\r\n </TR>\r\n <!-- X main !
page block -->\r\n</TABLE>\r\n<!-- X Main layout table -->\r\n\r\n<!-- comments -->\r\n%%CONTENT%%\r\n%%BOX,comment_controls%%\r\n%%COMMENTS%%\r\n%%BOX,comment_controls%%\r\n<!-- X comments -->\r\n\r\n%%footer%%\r\n\r\n<CENTER>%%BOX,menu_footer%%</CENTER>\r\n</BODY>\r\n</HTML>\r\n','1','<P>This block is used to build the story and comment display pages. It must be a full HTML page. The special keys recognised are:</P>\n<DL>\n <DT>subtitle</DT>\n <DD>This is replaced with an appropriate subtitle indicating which page is currently being viewed.</DD>\n <DT>dynamicmode_javascript</DT>\n <DD>This is replaced with javascript for the dynamic comment display if the page template is being used for comment display.</DD>\n <DT>STORY</DT>\n <DD>This is replaced with either the poll display or the story display, if either are being viewed.</DD>\n <DT>CONTENT</DT>\n <DD>This is replaced with any other content specific to the page being requested. It is provided by the function or b!
ox named in the Ops Admin Tool which handles the op (the first pseudo-
directory) of the page.</DD>\n</DL>','Page Templates','default','en');
INSERT INTO blocks VALUES ('attach_poll_message','poll:<br><br>\r\nPolls are not required, but if you want one, fill in a question and some answers.','1','<P>This block is displayed below the story submission form and above the attached poll submission form. It should be self-contained HTML and should contain an explanation of polls attached to stories. There are no special keys.</P>','Polls,Stories','default','en');
! INSERT INTO blocks VALUES ('edit_story_form','<FORM NAME=\"editstory\" ACTION=\"%%rootdir%%/\" METHOD=\"POST\" enctype=\"multipart/form-data\">\r\n%%hidden_form_data%%\r\n<table width=\"100%\" border=0 cellpadding=\"8\" cellspacing=0>\r\n<tr>\r\n<td valign=\"top\" colspan=\"2\">%%guidelines%%</td>\r\n</tr>\r\n<tr>\r\n<td valign=\"top\" colspan=\"2\">%%all_buttons%%</td>\r\n</tr>\r\n<tr>\r\n<td valign=\"top\">post to:</td>\r\n<td valign=\"top\">%%section_select%% %%topic_select%% %%postmode_select%%</td>\r\n</tr>\r\n%%edit_queue%%\r\n<tr>\r\n<td valign=\"top\">title:</td>\r\n<td valign=\"top\"><INPUT TYPE=\"text\" NAME=\"title\" VALUE=\"%%title%%\" SIZE=50><br>\r\n%%dept%%</td>\r\n</tr>\r\n%%notes%%\r\n<tr>\r\n<td valign=\"top\">intro:</td>\r\n<td valign=\"top\"><TEXTAREA NAME=\"introtext\" COLS=\"%%textarea_cols%%\" ROWS=\"%%textarea_rows%%\" WRAP=\"soft\">%%introtext%%</TEXTAREA></td>\r\n</tr>\r\n<tr>\r\n<td valign=\"top\">body:</td>\r\n<td valign=\"top\"><TEXTAREA N!
AME=\"bodytext\" COLS=\"%%textarea_cols%%\" ROWS=\"%%textarea_rows%%\" WRAP=\"soft\">%%bodytext%%</TEXTAREA></td>\r\n</tr>\r\n%%upload_page%%\r\n%%spellcheck%%\r\n<tr>\r\n<td></td>\r\n<td valign=\"top\">%%displaystatus_select%% %%commentstatus_select%% %%edit_category_select%%\r\n</td>\r\n</tr>\r\n%%time_update%%\r\n<tr>\r\n<td>%%poll_message%%</td>\r\n<td>%%poll_form%%</td>\r\n</tr>\r\n<tr>\r\n<td valign=\"top\" colspan=\"2\">%%all_buttons%%</td>\r\n</tr>\r\n</table>\r\n</FORM>','1','The main form for submitting and editing stories. This one has a lot of permitted special keys. Here goes:\r\n\r\n<ul>\r\n<li> allowed_html_intro: the string for what html is allowed in intro. Optional.\r\n<li> allowed_html_body: likewise, for the body field\r\n<li> notes: Block \"story_edit_notes\" -- traditionally for the ED and UPDATE explanations\r\n<li> tid: Topic id of story\r\n<li> section: section id of story\r\n<li> parent: section id of parent section, if there is one\r\n<li> topic_s!
elect: The selector for topics. Generated internally based on perms an
d vars. REQUIRED -- it will be a hidden field if you\'re not using topics, but you must have it.\r\n<li> displaystatus_select: Selector for displaystatus. Generated based on perms\r\n<li> commentstatus_select: Obvious\r\n<li> edit_category_select: If you\'re using edit categories, this\'ll be the selector\r\n<li> postmode_select: Selector for posting mode, like \"front page\", \"editing\" etc\r\n<li> all_buttons: The set of currently allowed and relevant buttons. Very required.\r\n<li> aid: uid of author\r\n<li> hidden_form_data: various bits of hdden stuff for the form that scoop needs to track. Very required.\r\n<li> title: Text of the title -- use your own html form element, just include this for \"value\"\r\n<li> dept: Dept field, formatted by block \"story_edit_dept\". Included if show_dept is turned on\r\n<li> upload_page: Story upload form, if you\'re using that.\r\n<li> spellcheck: Spellcheck element, if used. Formatted in block story_edit_spellcheck\r\n<li> edit_que!
ue: Post to edit queue element, if you\'re using that. Formatted in block story_edit_editqueue\r\n<li> time_update: Update timestamp to now button, if you have permission. Formatted in block story_edit_timeupdate, subject to perm \"story_time_update\"\r\n<li> update_txt: block story_edit_updatetxt\r\n<li> edit_txt: block story_edit_edittxt\r\n<li> textarea_cols: textarea columns, based on perfs and stuff\r\n<li> textarea_rows: textarea rows, likewise\r\n<li> poll_message: Poll into message, from attach_poll_message, if you\'re using polls\r\n<li> poll_form: Poll form, if you\'re using polls\r\n<li> introtext: introtext of the story\r\n<li> bodytext: body text of the story\r\n<li> guidelines: The block \"submission_guidelines\", included for user-level story submit\r\n</ul>','Admin Pages','default','en');
INSERT INTO blocks VALUES ('default_template','<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n<HTML>\r\n<HEAD>\r\n<TITLE>%%sitename%% %%bars%% %%subtitle%%</TITLE>\r\n%%dynamicmode_javascript%%\r\n%%css_includes%%\r\n</HEAD>\r\n<BODY>\r\n\r\n%%header%%\r\n\r\n<!-- Main layout table -->\r\n<TABLE id=\"main\">\r\n <!-- Main page block -->\r\n <TR>\r\n \r\n <!-- Center content section -->\r\n <TD VALIGN=\"top\" width=\"72%\">\r\n %%STORY%%\r\n %%BOX,comment_controls%%\r\n %%CONTENT%%\r\n %%BOX,comment_controls%%\r\n </TD>\r\n <!-- X center content section -->\r\n \r\n <!-- Right boxes column -->\r\n <TD VALIGN=\"top\" WIDTH=\"25%\">\r\n\r\n %%BOX,main_menu%%\r\n %%BOX,hotlist_box%%\r\n %%BOX,user_box%%\r\n %%BOX,admin_tools%%\r\n \r\n </TD>\r\n <!-- X Right boxes column -->\r\n </TR>\r\n <!-- X main page block -->\r\n</TABLE>\r\n<!-- X Main lay!
out table -->\r\n\r\n%%footer%%\r\n\r\n<CENTER>%%BOX,menu_footer%%</CENTER>\r\n</BODY>\r\n','1','<P>This block is used to build most pages on the site. It must be a full HTML page; dynamic content is added through the use of special keys. The special keys recognised are:</P>\n<DL>\n <DT>subtitle</DT>\n <DD>This is replaced with an appropriate subtitle indicating which page is currently being viewed.</DD>\n <DT>dynamicmode_javascript</DT>\n <DD>This is replaced with javascript for the dynamic comment display if the page template is being used for comment display.</DD>\n <DT>STORY</DT>\n <DD>This is replaced with either the poll display or the story display, if either are being viewed.</DD>\n <DT>CONTENT</DT>\n <DD>This is replaced with any other content specific to the page being requested. It is provided by the function or box named in the Ops Admin Tool which handles the op (the first pseudo-directory) of the page. This can be forms, comments, special pages, or cus!
tom content from your own boxes.</DD>\n</DL>','Page Templates','defaul
t','en');
INSERT INTO blocks VALUES ('submit_template','<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n<HTML>\r\n<HEAD>\r\n<TITLE>%%sitename%% %%bars%% %%subtitle%%</TITLE>\r\n%%css_includes%%\r\n</HEAD>\r\n<BODY>\r\n\r\n%%header%%\r\n\r\n<!-- Main layout table -->\r\n<TABLE id=\"main\">\r\n <!-- Main page block -->\r\n <TR>\r\n <!-- Center content section -->\r\n <TD VALIGN=\"top\" width=\"75%\">\r\n %%STORY%%\r\n %%CONTENT%%\r\n </TD>\r\n <!-- X center content section -->\r\n \r\n <!-- Right boxes column -->\r\n <TD VALIGN=\"top\" WIDTH=\"25%\">\r\n %%BOX,main_menu%%\r\n %%BOX,hotlist_box%%\r\n %%BOX,user_box%%\r\n %%BOX,admin_tools%%\r\n %%BOX,poll_box%%\r\n </TD>\r\n <!-- X Right boxes column -->\r\n </TR>\r\n <!-- X main page block -->\r\n</TABLE>\r\n<!-- X Main layout table -->\r\n\r\n%%footer%%\r\n\r\n<CENTER>%%BOX,menu_footer%%</CENTER>\r\n</BODY>\r\!
n</HTML>\r\n','1','<P>This block is the page template used to build the story and ad submission forms. It must be a full HTML page. The special keys recognised are:</P>\n<DL>\n <DT>subtitle</DT>\n <DD>This is replaced with an appropriate subtitle indicating which page is currently being viewed.</DD>\n <DT>STORY</DT>\n <DD>This is replaced with either the poll display or the story display, if either are being viewed.</DD>\n <DT>CONTENT</DT>\n <DD>This is replaced with any other content specific to the page being requested. It is provided by the function or box named in the Ops Admin Tool which handles the op (the first pseudo-directory) of the page.</DD>\n</DL>','Page Templates','default','en');
--- 219,223 ----
INSERT INTO blocks VALUES ('story_template','<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n<HTML>\r\n<HEAD>\r\n<TITLE>%%sitename%% %%bars%% %%subtitle%%</TITLE>\r\n%%css_includes%%\r\n</HEAD>\r\n%%dynamicmode_javascript%%\r\n<BODY>\r\n\r\n%%header%%\r\n\r\n<!-- Main layout table -->\r\n<TABLE id=\"main\">\r\n <!-- Main page block -->\r\n <TR>\r\n \r\n <!-- Center content section -->\r\n <TD VALIGN=\"top\" width=\"75%\">\r\n <!-- Story stuff -->\r\n %%STORY%%\r\n <!-- X story stuff -->\r\n </TD>\r\n <!-- X center content section -->\r\n \r\n <!-- Right boxes column -->\r\n <TD VALIGN=\"top\" WIDTH=\"25%\">\r\n %%BOX,main_menu%%\r\n %%BOX,user_box%%\r\n %%BOX,hotlist_box%%\r\n %%BOX,admin_tools%%\r\n %%BOX,poll_box%%\r\n %%BOX,related_links%%\r\n %%BOX,mod_stats%%\r\n </TD>\r\n <!-- X Right boxes column -->\r\n </TR>\r\n <!-- X main !
page block -->\r\n</TABLE>\r\n<!-- X Main layout table -->\r\n\r\n<!-- comments -->\r\n%%CONTENT%%\r\n%%BOX,comment_controls%%\r\n%%COMMENTS%%\r\n%%BOX,comment_controls%%\r\n<!-- X comments -->\r\n\r\n%%footer%%\r\n\r\n<CENTER>%%BOX,menu_footer%%</CENTER>\r\n</BODY>\r\n</HTML>\r\n','1','<P>This block is used to build the story and comment display pages. It must be a full HTML page. The special keys recognised are:</P>\n<DL>\n <DT>subtitle</DT>\n <DD>This is replaced with an appropriate subtitle indicating which page is currently being viewed.</DD>\n <DT>dynamicmode_javascript</DT>\n <DD>This is replaced with javascript for the dynamic comment display if the page template is being used for comment display.</DD>\n <DT>STORY</DT>\n <DD>This is replaced with either the poll display or the story display, if either are being viewed.</DD>\n <DT>CONTENT</DT>\n <DD>This is replaced with any other content specific to the page being requested. It is provided by the function or b!
ox named in the Ops Admin Tool which handles the op (the first pseudo-
directory) of the page.</DD>\n</DL>','Page Templates','default','en');
INSERT INTO blocks VALUES ('attach_poll_message','poll:<br><br>\r\nPolls are not required, but if you want one, fill in a question and some answers.','1','<P>This block is displayed below the story submission form and above the attached poll submission form. It should be self-contained HTML and should contain an explanation of polls attached to stories. There are no special keys.</P>','Polls,Stories','default','en');
! INSERT INTO blocks VALUES ('edit_story_form','<FORM NAME=\"editstory\" ACTION=\"%%rootdir%%/\" METHOD=\"POST\" enctype=\"multipart/form-data\">\r\n%%hidden_form_data%%\r\n<table width=\"100%\" border=0 cellpadding=\"8\" cellspacing=0>\r\n<tr>\r\n<td valign=\"top\" colspan=\"2\">%%guidelines%%</td>\r\n</tr>\r\n<tr>\r\n<td valign=\"top\" colspan=\"2\">%%all_buttons%%</td>\r\n</tr>\r\n<tr>\r\n<td valign=\"top\">post to:</td>\r\n<td valign=\"top\">%%section_select%% %%topic_select%% %%postmode_select%%</td>\r\n</tr>\r\n%%edit_queue%%\r\n<tr>\r\n<td valign=\"top\">title:</td>\r\n<td valign=\"top\"><INPUT TYPE=\"text\" NAME=\"title\" VALUE=\"%%title%%\" SIZE=50><br>\r\n%%dept%%</td>\r\n</tr>\r\n%%notes%%\r\n<tr>\r\n<td valign=\"top\">intro:</td>\r\n<td valign=\"top\"><TEXTAREA NAME=\"introtext\" COLS=\"%%textarea_cols%%\" ROWS=\"%%textarea_rows%%\" WRAP=\"soft\">%%introtext%%</TEXTAREA></td>\r\n</tr>\r\n<tr>\r\n<td valign=\"top\">body:</td>\r\n<td valign=\"top\"><TEXTAREA N!
AME=\"bodytext\" COLS=\"%%textarea_cols%%\" ROWS=\"%%textarea_rows%%\" WRAP=\"soft\">%%bodytext%%</TEXTAREA></td>\r\n</tr>\r\n%%upload_page%%\r\n%%spellcheck%%\r\n%%tags%%\r\n<tr>\r\n<td></td>\r\n<td valign=\"top\">%%displaystatus_select%% %%commentstatus_select%% %%edit_category_select%%\r\n</td>\r\n</tr>\r\n%%time_update%%\r\n<tr>\r\n<td>%%poll_message%%</td>\r\n<td>%%poll_form%%</td>\r\n</tr>\r\n<tr>\r\n<td valign=\"top\" colspan=\"2\">%%all_buttons%%</td>\r\n</tr>\r\n</table>\r\n</FORM>','1','The main form for submitting and editing stories. This one has a lot of permitted special keys. Here goes:\r\n\r\n<ul>\r\n<li> allowed_html_intro: the string for what html is allowed in intro. Optional.\r\n<li> allowed_html_body: likewise, for the body field\r\n<li> notes: Block \"story_edit_notes\" -- traditionally for the ED and UPDATE explanations\r\n<li> tid: Topic id of story\r\n<li> section: section id of story\r\n<li> parent: section id of parent section, if there is one\r\n!
<li> topic_select: The selector for topics. Generated internally based
on perms and vars. REQUIRED -- it will be a hidden field if you\'re not using topics, but you must have it.\r\n<li> displaystatus_select: Selector for displaystatus. Generated based on perms\r\n<li> commentstatus_select: Obvious\r\n<li> edit_category_select: If you\'re using edit categories, this\'ll be the selector\r\n<li> postmode_select: Selector for posting mode, like \"front page\", \"editing\" etc\r\n<li> all_buttons: The set of currently allowed and relevant buttons. Very required.\r\n<li> aid: uid of author\r\n<li> hidden_form_data: various bits of hdden stuff for the form that scoop needs to track. Very required.\r\n<li> title: Text of the title -- use your own html form element, just include this for \"value\"\r\n<li> dept: Dept field, formatted by block \"story_edit_dept\". Included if show_dept is turned on\r\n<li> upload_page: Story upload form, if you\'re using that.\r\n<li> spellcheck: Spellcheck element, if used. Formatted in block story_edit_spellcheck\r\n<!
li> edit_queue: Post to edit queue element, if you\'re using that. Formatted in block story_edit_editqueue\r\n<li> time_update: Update timestamp to now button, if you have permission. Formatted in block story_edit_timeupdate, subject to perm \"story_time_update\"\r\n<li> update_txt: block story_edit_updatetxt\r\n<li> edit_txt: block story_edit_edittxt\r\n<li> textarea_cols: textarea columns, based on perfs and stuff\r\n<li> textarea_rows: textarea rows, likewise\r\n<li> poll_message: Poll into message, from attach_poll_message, if you\'re using polls\r\n<li> poll_form: Poll form, if you\'re using polls\r\n<li> introtext: introtext of the story\r\n<li> bodytext: body text of the story\r\n<li> guidelines: The block \"submission_guidelines\", included for user-level story submit\r\n</ul>','Admin Pages','default','en');
INSERT INTO blocks VALUES ('default_template','<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n<HTML>\r\n<HEAD>\r\n<TITLE>%%sitename%% %%bars%% %%subtitle%%</TITLE>\r\n%%dynamicmode_javascript%%\r\n%%css_includes%%\r\n</HEAD>\r\n<BODY>\r\n\r\n%%header%%\r\n\r\n<!-- Main layout table -->\r\n<TABLE id=\"main\">\r\n <!-- Main page block -->\r\n <TR>\r\n \r\n <!-- Center content section -->\r\n <TD VALIGN=\"top\" width=\"72%\">\r\n %%STORY%%\r\n %%BOX,comment_controls%%\r\n %%CONTENT%%\r\n %%BOX,comment_controls%%\r\n </TD>\r\n <!-- X center content section -->\r\n \r\n <!-- Right boxes column -->\r\n <TD VALIGN=\"top\" WIDTH=\"25%\">\r\n\r\n %%BOX,main_menu%%\r\n %%BOX,hotlist_box%%\r\n %%BOX,user_box%%\r\n %%BOX,admin_tools%%\r\n \r\n </TD>\r\n <!-- X Right boxes column -->\r\n </TR>\r\n <!-- X main page block -->\r\n</TABLE>\r\n<!-- X Main lay!
out table -->\r\n\r\n%%footer%%\r\n\r\n<CENTER>%%BOX,menu_footer%%</CENTER>\r\n</BODY>\r\n','1','<P>This block is used to build most pages on the site. It must be a full HTML page; dynamic content is added through the use of special keys. The special keys recognised are:</P>\n<DL>\n <DT>subtitle</DT>\n <DD>This is replaced with an appropriate subtitle indicating which page is currently being viewed.</DD>\n <DT>dynamicmode_javascript</DT>\n <DD>This is replaced with javascript for the dynamic comment display if the page template is being used for comment display.</DD>\n <DT>STORY</DT>\n <DD>This is replaced with either the poll display or the story display, if either are being viewed.</DD>\n <DT>CONTENT</DT>\n <DD>This is replaced with any other content specific to the page being requested. It is provided by the function or box named in the Ops Admin Tool which handles the op (the first pseudo-directory) of the page. This can be forms, comments, special pages, or cus!
tom content from your own boxes.</DD>\n</DL>','Page Templates','defaul
t','en');
INSERT INTO blocks VALUES ('submit_template','<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n<HTML>\r\n<HEAD>\r\n<TITLE>%%sitename%% %%bars%% %%subtitle%%</TITLE>\r\n%%css_includes%%\r\n</HEAD>\r\n<BODY>\r\n\r\n%%header%%\r\n\r\n<!-- Main layout table -->\r\n<TABLE id=\"main\">\r\n <!-- Main page block -->\r\n <TR>\r\n <!-- Center content section -->\r\n <TD VALIGN=\"top\" width=\"75%\">\r\n %%STORY%%\r\n %%CONTENT%%\r\n </TD>\r\n <!-- X center content section -->\r\n \r\n <!-- Right boxes column -->\r\n <TD VALIGN=\"top\" WIDTH=\"25%\">\r\n %%BOX,main_menu%%\r\n %%BOX,hotlist_box%%\r\n %%BOX,user_box%%\r\n %%BOX,admin_tools%%\r\n %%BOX,poll_box%%\r\n </TD>\r\n <!-- X Right boxes column -->\r\n </TR>\r\n <!-- X main page block -->\r\n</TABLE>\r\n<!-- X Main layout table -->\r\n\r\n%%footer%%\r\n\r\n<CENTER>%%BOX,menu_footer%%</CENTER>\r\n</BODY>\r\!
n</HTML>\r\n','1','<P>This block is the page template used to build the story and ad submission forms. It must be a full HTML page. The special keys recognised are:</P>\n<DL>\n <DT>subtitle</DT>\n <DD>This is replaced with an appropriate subtitle indicating which page is currently being viewed.</DD>\n <DT>STORY</DT>\n <DD>This is replaced with either the poll display or the story display, if either are being viewed.</DD>\n <DT>CONTENT</DT>\n <DD>This is replaced with any other content specific to the page being requested. It is provided by the function or box named in the Ops Admin Tool which handles the op (the first pseudo-directory) of the page.</DD>\n</DL>','Page Templates','default','en');
***************
*** 354,358 ****
INSERT INTO blocks VALUES ('ad_pay_paypal_msg','<p>%%norm_font%%<a\r\nhref=\"%%secure_site_url%%%%rootdir%%/special/adpay?type=paypal%%payment_args%%\"><img\r\nsrc=\"%%imagedir%%/paypal.gif\" width=\"87\" height=\"27\"\r\nborder=0 ALT=\"Pay with Paypal\">\r\n<br>Pay with Paypal</a>%%norm_font_end%%</p>','1','This message is displayed as part of the advert submission process. See the block ad_submitted_message for more information on where it will appear.\r\nThere are three special variables concerned with this. |num_impressions| will be replaced by the number of impressions ordered.\r\n|price| will be replace by the total cost of the order.\r\n|payment_args| must be present somewhere in the link url to correctly pass arguments to the payment method.','Ads','default','en');
INSERT INTO blocks VALUES ('ad_free_msg','<p>This ad is free, you don\'t have to pay for it.','1','This message is displayed as part of the advert submission process. See the block ad_submitted_message for more information on where it will appear.\r\nThere are two special variables concerned with this. |num_impressions| will be replaced by the number of impressions ordered.\r\n|price| will be replace by the total cost of the order.','Ads','default','en');
! INSERT INTO blocks VALUES ('main_css','/* this makes IE6 not act retarded */\r\nh1, h2, h3, h4, h5, h6, p, div {\r\n position: relative;\r\n}\r\n/* main page stuff */\r\nBODY { background-color: #ffffff;\r\n color: #000000; }\r\n\r\n:link { color: #006699; }\r\n:visited { color: #003366; }\r\n\r\n#main { width: 100%;\r\n border-spacing: 7px; }\r\n\r\n#main TD { vertical-align: top; }\r\n\r\nH1 { background-color: %%title_bgcolor%%;\r\n font-size: 1.6em;\r\n padding: 3px;\r\n margin: 0px; }\r\n\r\n.advert { border: 1px solid #ff0000; }\r\n\r\n.loginform { text-align: right; }\r\n\r\n/* header and footer */\r\n\r\n#section_links { float: right;\r\n padding: 0.5em; }\r\n\r\n#footer { text-align: center; }\r\n\r\n#footer FORM { display: inline; \r\n vertical-align: top; }\r\n\r\n/* sidebar boxes */\r\n\r\n.box { border: 1px solid black;\r\n !
padding: 3px;\r\n margin-bottom: 8px; }\r\n\r\n.box H2 { background-color: %%box_title_bg%%;\r\n color: #ffffff;\r\n font-size: 1.2em;\r\n padding: 5px;\r\n margin: -3px;\r\n margin-bottom: 3px; }\r\n\r\n/* sections admin tool */\r\n/* this is because box_title_font is used in the code */\r\n/* and not in a DIV.box - this will be fixed in later */\r\n/* releases of Scoop as HTML is moved out of the code */\r\n\r\nTH H2 { color: #ffffff;\r\n font-size: 1em; }\r\n\r\nTD H2 { color: #ffffff;\r\n font-size: 1em; }\r\n\r\n/* story stuff */\r\n\r\n.story_title H2 { font-size: 1.2em;\r\n color: #000000;\r\n display: inline; }\r\n\r\n.story_summary { border-bottom: 1px dashed black;\r\n padding-top: 0.5em; }\r\n\r\n.story_body { padding-top: 0.5em; }\r\n\r\n.story_info { background-color: %%story_mod_bg%%;!
\r\n text-align: center; }\r\n\r\n#author_console { borde
r: 1px solid #006699;\r\n background-color: %%story_mod_bg%% }\r\n\r\n#vote_console { border: 1px solid #006699;\r\n background-color: %%story_mod_bg%% }\r\n\r\n/* comment stuff */\r\n\r\n.commenthead { border: 1px solid #006699;\r\n background-color: %%comment_head_bg%%; }\r\n\r\n.editorialhead { border: 1px solid #FF0000;\r\n background-color: %%comment_head_bg%%; }\r\n\r\n\r\n/* misc css */\r\n\r\n.title { font-size: 1.2em;\r\n fint-weight: bold;\r\n }','1','<P>This block contains the CSS stylesheet for the site. It should be what you\'d expect to find in a .css file on the filesystem, except it recognizes the standard keys for interpolation. There are no special keys. This is sent to the client via the URL |rootdir|/css/main - any other stylesheets you create must also have _css at the end of their name if you want them accessible via the css op.</p>','CSS','default','en');
INSERT INTO blocks VALUES ('sub_paypal_finished','Thank you, your PayPal payment has been recieved.',NULL,'Message displayed in the body of the page after a user returns from making a paypal payment.','Ads,Subscriptions','default','en');
INSERT INTO blocks VALUES ('new_user_email_subject','Welcome to %%sitename%%','1','<P>This block defines the subject line for the email sent to new accounts. It should be short and not have any HTML. Because this is an email it is not processed the way web pages are and the only key recognized is the special key sitename, which is replaced with the contents of the site control <B>sitename</B></P>','Accounts,Emails','default','en');
--- 354,358 ----
INSERT INTO blocks VALUES ('ad_pay_paypal_msg','<p>%%norm_font%%<a\r\nhref=\"%%secure_site_url%%%%rootdir%%/special/adpay?type=paypal%%payment_args%%\"><img\r\nsrc=\"%%imagedir%%/paypal.gif\" width=\"87\" height=\"27\"\r\nborder=0 ALT=\"Pay with Paypal\">\r\n<br>Pay with Paypal</a>%%norm_font_end%%</p>','1','This message is displayed as part of the advert submission process. See the block ad_submitted_message for more information on where it will appear.\r\nThere are three special variables concerned with this. |num_impressions| will be replaced by the number of impressions ordered.\r\n|price| will be replace by the total cost of the order.\r\n|payment_args| must be present somewhere in the link url to correctly pass arguments to the payment method.','Ads','default','en');
INSERT INTO blocks VALUES ('ad_free_msg','<p>This ad is free, you don\'t have to pay for it.','1','This message is displayed as part of the advert submission process. See the block ad_submitted_message for more information on where it will appear.\r\nThere are two special variables concerned with this. |num_impressions| will be replaced by the number of impressions ordered.\r\n|price| will be replace by the total cost of the order.','Ads','default','en');
! INSERT INTO blocks VALUES ('main_css','/* this makes IE6 not act retarded */\r\nh1, h2, h3, h4, h5, h6, p, div {\r\n position: relative;\r\n}\r\n/* main page stuff */\r\nBODY { background-color: #ffffff;\r\n color: #000000; }\r\n\r\n:link { color: #006699; }\r\n:visited { color: #003366; }\r\n\r\n#main { width: 100%;\r\n border-spacing: 7px; }\r\n\r\n#main TD { vertical-align: top; }\r\n\r\nH1 { background-color: %%title_bgcolor%%;\r\n font-size: 1.6em;\r\n padding: 3px;\r\n margin: 0px; }\r\n\r\n.advert { border: 1px solid #ff0000; }\r\n\r\n.loginform { text-align: right; }\r\n\r\n/* header and footer */\r\n\r\n#section_links { float: right;\r\n padding: 0.5em; }\r\n\r\n#footer { text-align: center; }\r\n\r\n#footer FORM { display: inline; \r\n vertical-align: top; }\r\n\r\n/* sidebar boxes */\r\n\r\n.box { border: 1px solid black;\r\n !
padding: 3px;\r\n margin-bottom: 8px; }\r\n\r\n.box H2 { background-color: %%box_title_bg%%;\r\n color: #ffffff;\r\n font-size: 1.2em;\r\n padding: 5px;\r\n margin: -3px;\r\n margin-bottom: 3px; }\r\n\r\n/* sections admin tool */\r\n/* this is because box_title_font is used in the code */\r\n/* and not in a DIV.box - this will be fixed in later */\r\n/* releases of Scoop as HTML is moved out of the code */\r\n\r\nTH H2 { color: #ffffff;\r\n font-size: 1em; }\r\n\r\nTD H2 { color: #ffffff;\r\n font-size: 1em; }\r\n\r\n/* story stuff */\r\n\r\n.story_title H2 { font-size: 1.2em;\r\n color: #000000;\r\n display: inline; }\r\n\r\n.story_summary { border-bottom: 1px dashed black;\r\n padding-top: 0.5em; }\r\n\r\n.story_body { padding-top: 0.5em; }\r\n\r\n.story_info { background-color: %%story_mod_bg%%;!
\r\n text-align: center; }\r\n\r\n#author_console { borde
r: 1px solid #006699;\r\n background-color: %%story_mod_bg%% }\r\n\r\n#vote_console { border: 1px solid #006699;\r\n background-color: %%story_mod_bg%% }\r\n\r\n/* comment stuff */\r\n\r\n.commenthead { border: 1px solid #006699;\r\n background-color: %%comment_head_bg%%; }\r\n\r\n.editorialhead { border: 1px solid #FF0000;\r\n background-color: %%comment_head_bg%%; }\r\n\r\n\r\n/* misc css */\r\n\r\n.title { font-size: 1.2em;\r\n fint-weight: bold;\r\n }\r\n\r\n/* tag-cloud styles */\r\n\r\n.cloud li { list-style-type: none; display: inline; margin-right: 8px; }\r\n\r\n.cloud .tag-popularity-1 { font-size: 80%; }\r\n\r\n.cloud .tag-popularity-5 { font-size: 90%; }\r\n\r\n.cloud .tag-popularity-10 { font-size: 100%; }\r\n\r\n.cloud .tag-popularity-15 { font-size: 110%; }','1','<P>This block contains the CSS stylesheet for the site. It should be what you\'d expect to find in a .css file on the filesys!
tem, except it recognizes the standard keys for interpolation. There are no special keys. This is sent to the client via the URL |rootdir|/css/main - any other stylesheets you create must also have _css at the end of their name if you want them accessible via the css op.</p>','CSS','default','en');
INSERT INTO blocks VALUES ('sub_paypal_finished','Thank you, your PayPal payment has been recieved.',NULL,'Message displayed in the body of the page after a user returns from making a paypal payment.','Ads,Subscriptions','default','en');
INSERT INTO blocks VALUES ('new_user_email_subject','Welcome to %%sitename%%','1','<P>This block defines the subject line for the email sent to new accounts. It should be short and not have any HTML. Because this is an email it is not processed the way web pages are and the only key recognized is the special key sitename, which is replaced with the contents of the site control <B>sitename</B></P>','Accounts,Emails','default','en');
***************
*** 498,501 ****
--- 498,508 ----
INSERT INTO blocks VALUES ('story_vote_msg','<P><B>Your vote (%%vote%%) was recorded.</B><BR>This story currently has a total score of %%curr_score%%.</P>','1','<P>This message is displayed when a user votes on a story. There are two special keys:</P>\n<DL>\n <DT>vote</DT>\n <DD>The vote cast by the user.</DD>\n <DT>curr_score</DT>\n <DD>The story\'s current score.</DD>\n</DL>','Stories','default','en');
INSERT INTO blocks VALUES ('post_message','<P><FONT SIZE=\"+1\">Your entry has been automatically posted</FONT></P>','1','<P>This block is displayed below the story body when it has been auto-posted. It should be self-contained HTML.</P>','Stories','default','en');
+ INSERT INTO blocks VALUES ('story_edit_tags','<tr>\r\n<td valign=\"top\">tags:</td>\r\n<td valign=\"top\"><input type=\"text\" name=\"tags\" value=\"%%value%%\" size=\"50\"></td>\r\n</tr>','1','Field for tag input in story edit form. This only shows up if the Site Control <B>use_tags</B> is set. \r\n<p>\r\nSpecial keys:\r\n<ul><li> value: the list of tags, as a comma-delimited string</ul>','Stories,Tags','default','en');
+ INSERT INTO blocks VALUES ('tag_item_format','<a href=\"%%rootdir%%/tag/%%urltag%%\">%%tag%%</a>','1','A single item in the list of tags. \r\n<p>\r\nSpecial keys:\r\n<ul>\r\n<li> tag: the tag\r\n<li> urltag: the tag, escaped for use in a url\r\n</ul>','Stories,Tags','default','en');
+ INSERT INTO blocks VALUES ('tag_list_format','<br>Tags: %%tags_list%% (<a href=\"%%rootdir%%/tag\">all tags</a>)','1','The overall formatting for the tag display list, used in story_summary. Only appears if the Site Control <B>use_tags</B> is set.\r\n<p>\r\nSpecial keys:\r\n<ul><li> list: The list of tags, formatted according to <B>tag_item_format</B> and joined together with <B>tag_list_joinwith</B>.</ul>','Stories,Tags','default','en');
+ INSERT INTO blocks VALUES ('tag_list_joinwith',', ','1','When the tag list is built for display, the formatted tag items will be joined together with this block. Especially useful for commas and such, but whatever you can think of to do with it.','Stories,Tags','default','en');
+ INSERT INTO blocks VALUES ('tag_page_format','%%title_font%%All Tags:%%title_font_end%%\r\n<ul class=\"cloud\">\r\n%%tags_list%%\r\n</ul>','1','Page formatting for the tags cloud page generated by the tag OP. The only special key found here is <b>tags_list</b>','Tags','default','en');
+ INSERT INTO blocks VALUES ('tag_page_item','<li class=\"%%cssclass%%\"><a href=\"/tag/%%urltag%%\">%%tag%%</a> (%%num%%)</li>','1','A single item on the tags cloud page. Special keys:\n<ul><li>cssclass: the CSS class name taken from the site control <B>tag_threshold_classes</B></li>\n<li>tag: the tag</li>\n<li>urltag: the tag, filtered for use in a URL</li></ul>','Tags','default','en');
+ INSERT INTO blocks VALUES ('tag_page_joinwith',' ','1','When the list of tags on the tags cloud page is built, the formatted tags will be joined together with this block.','Tags','default','en');
#
***************
*** 528,532 ****
INSERT INTO box VALUES ('comment_controls','Comment Controls','my $op = $S->{CGI}->param(\'op\');\r\nmy $tool = $S->{CGI}->param(\'tool\');\r\nreturn \'\' unless ($op eq \'displaystory\' || \r\n $op eq \'comments\' ||\r\n $op eq \'view_poll\' ||\r\n $op eq \'poll_vote\' );\r\nreturn \'\' if( $op eq \'comments\' && $tool eq \'post\' );\r\n\r\nmy $sid = $S->{CGI}->param(\'sid\');\r\nmy $pid = $S->{CGI}->param(\'pid\');\r\nmy $cid = $S->{CGI}->param(\'cid\');\r\nmy $qid = $S->{CGI}->param(\'qid\');\r\n\nreturn \'\' unless ($S->{STORIES}->{$sid}->{commentstatus} == 0);\n\r\nreturn \'\' unless( $S->have_section_perm(\'norm_read_comments\',$S->_get_story_section($sid)));\r\n\r\nmy $form_extra;\r\nmy $anchor = qq{#$cid};\r\nif ($cid) {\r\n $form_extra = qq{\r\n <INPUT TYPE=\"hidden\" NAME=\"cid\" VALUE=\"$cid\">};\r\n} elsif ($pid) {\r\n $form_extra = qq{\r\n <INPUT TYPE=\"hidden\" NAME=\"pid\!
" VALUE=\"$pid\">};\r\n}\r\n\r\nmy $commentmode_select = $S->_comment_mode_select();\r\nmy $comment_order_select = $S->_comment_order_select();\r\nmy $comment_rating_select = $S->_comment_rating_select();\r\nmy $rating_choice = $S->_comment_rating_choice();\r\nmy $comment_type_select = $S->_comment_type_select();\r\n\r\nmy $form_op = \'op\';\r\nmy $form_op_value = $op;\r\nmy $id = \'sid\';\r\n\r\nif ( $qid ) {\r\n $form_op = \'op\';\r\n $form_op_value = \'view_poll\';\r\n $id = \'qid\';\r\n $sid = $qid;\r\n}\r\n \r\nmy $comment_sort = qq|\r\n <FORM NAME=\"commentmode\" ACTION=\"%%rootdir%%/$anchor\" METHOD=\"post\">\r\n <INPUT TYPE=\"hidden\" NAME=\"$form_op\" VALUE=\"$form_op_value\">\r\n <INPUT TYPE=\"hidden\" NAME=\"$id\" VALUE=\"$sid\">\r\n $form_extra\r\n <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"%%box_content_bg%%\" align=\"center\">\r\n \r\n <TR>\r\n <TD VALIGN=\"middle\">\r\n %%smallfont%%|;\nif ($comment_type_select) {\n $comment_sort .= qq|\n!
View:\r\n <SMALL>\r\n $comment_type_select\r\n </SMALL>|;\n}
\n$comment_sort .= qq|\r\n Display:\r\n <SMALL>\r\n $commentmode_select\r\n </SMALL>\r\n Sort:\r\n <SMALL>\r\n $comment_rating_select\r\n </SMALL>\r\n <SMALL>\r\n $comment_order_select\r\n </SMALL>\r\n|;\r\n \r\n \r\nif ($S->have_perm( \'comment_rate\' )) {\r\n $comment_sort .= qq|\r\n Rate?\r\n <SMALL>$rating_choice</SMALL>|;\r\n}\r\n\r\n$comment_sort .= qq|\r\n<INPUT TYPE=\"submit\" NAME=\"setcomments\" VALUE=\"Set\">\r\n%%smallfont_end%%\r\n</TD></TR>\r\n</TABLE>\r\n</FORM>|;\r\n\r\n$template =~ s/CELLSPACING=0>/CELLSPACING=0 ALIGN=\"center\">/;\r\n\r\nreturn { content => $comment_sort, template => $template };','Comment display prefs','blank_box',0);
INSERT INTO box VALUES ('mod_stats','Moderation Stats','my $sid = $ARGS[0];\r\n$sid = $S->{CGI}->param(\'sid\') unless $sid;\r\nreturn unless $sid;\r\n\r\nmy $q_sid = $S->{DBH}->quote($sid);\r\n\r\nmy ($rv, $t_sth) = $S->db_select({\r\n WHAT => \'displaystatus\',\r\n FROM => \'stories\',\r\n WHERE => qq{sid = $q_sid}});\r\n\r\nmy $disp = $t_sth->fetchrow();\r\n\r\nreturn unless ($disp == \'-2\');\r\n\r\nmy ($stat, $trash) = $S->_mod_or_show($sid);\r\nreturn \'\' unless ($stat eq \'show\');\r\n\r\nmy ($totalvotes, $score) = $S->_get_total_votes($sid);\r\nmy $sth = $S->_get_story_mods($sid);\r\n\r\nmy $head = $S->{UI}->{BLOCKS}->{moderate_head};\r\n\r\n$head =~ s/%%votes%%/$totalvotes/g;\r\n$head =~ s/%%score%%/$score/g;\r\n\r\nmy ($this_row, $user);\r\n\r\nmy $for = qq{<FORM NAME=\"mod_stat_show\" ACTION=\"%%rootdir%%/\" METHOD=\"get\">\r\n<INPUT TYPE=\"hidden\" NAME=\"op\" VALUE=\"user\">\r\n<INPUT TYPE=\"hidden\" NAME=\"tool\" VALUE=\"info\">};\r\nmy $against = q!
q{<FORM NAME=\"mod_stat_show\" ACTION=\"%%rootdir%%/\" METHOD=\"get\">\r\n<INPUT TYPE=\"hidden\" NAME=\"op\" VALUE=\"user\">\r\n<INPUT TYPE=\"hidden\" NAME=\"tool\" VALUE=\"info\">};\r\nmy $neutral = qq{<FORM NAME=\"mod_stat_show\" ACTION=\"%%rootdir%%/\" METHOD=\"get\">\r\n<INPUT TYPE=\"hidden\" NAME=\"op\" VALUE=\"user\">\r\n<INPUT TYPE=\"hidden\" NAME=\"tool\" VALUE=\"info\">};\r\n#\'\r\nmy $f = 0;\r\nmy $a = 0;\r\nmy $n = 0;\r\n\r\n$for .= qq{<small>\r\n <SELECT NAME=\"uid\" SIZE=1>\r\n <OPTION VALUE=\"\">Voted for: (%%for%%)};\r\n$against .= qq{<small>\r\n <SELECT NAME=\"uid\" SIZE=1>\r\n <OPTION VALUE=\"\">Voted against: (%%against%%)};\r\n$neutral .= qq{<small>\r\n <SELECT NAME=\"uid\" SIZE=1>\r\n <OPTION VALUE=\"\">Didn\'t care: (%%neutral%%)}; \r\n\r\nwhile (my $mod_rec = $sth->fetchrow_hashref) {\r\n my $nick = $S->get_nick($mod_rec->{uid});\r\n $nick =~ s/^(.{0,20})/$1/;\r\n my $link = qq{\r\n <OPTION VALUE=\"$mod_rec->{uid}\">$nick};\r\n if ($mod_rec->{vote} == !
1) {\r\n $for .= qq|\r\n $link|;\r\n $f++;\r\n } elsif ($mod_rec->{
vote} == 0) {\r\n $neutral .= qq|\r\n $link|;\r\n $n++;\r\n } elsif ($mod_rec->{vote} == -1) {\r\n $against .= qq|\r\n $link|;\r\n $a++;\r\n }\r\n}\r\n$sth->finish;\r\n\r\n$for .= qq{</SELECT> <INPUT TYPE=\"submit\" NAME=\"get\" VALUE=\"Get User Info\"></small></FORM>};\r\n$against .= qq{</SELECT> <INPUT TYPE=\"submit\" NAME=\"get\" VALUE=\"Get User Info\"></small></FORM>};\r\n$neutral .= qq{</SELECT> <INPUT TYPE=\"submit\" NAME=\"get\" VALUE=\"Get User Info\"></small></FORM>};\r\n\r\n$for =~ s/%%for%%/$f/;\r\n$against =~ s/%%against%%/$a/;\r\n$neutral =~ s/%%neutral%%/$n/;\r\n\r\nmy $content = $head.\'%%smallfont%%\'.$for.$against.$neutral.\'%%smallfont_end%%\';\r\n\r\nreturn { content => $content };','Show the stats for story mod','box',0);
! INSERT INTO box VALUES ('section_title','null','my $content = \'Latest News\';\r\n\r\nmy $op = $S->{CGI}->param(\'op\');\r\nmy $page_num = $S->cgi->param(\'page\');\r\nmy $page = \'\';\r\nif ($page_num && $page_num != 1) {\r\n $page = \"(page $page_num)\";\r\n}\r\n\r\nif ($op eq \'section\') {\r\n my $section = $S->{CGI}->param(\'section\');\r\n unless($S->have_section_perm(\'hide_read_stories\',$section)) {\r\n $content = $S->{SECTION_DATA}->{$section}->{title} || \'All Stories\';\r\n } else {\r\n $content = \'\';\r\n }\r\n}\r\n\r\nreturn {\'content\' => \"%%title_font%%$content $page%%title_font_end%%\" };','Display title of current section','blank_box',0);
INSERT INTO box VALUES ('show_comment_raters','Others have rated this comment as follows:','my $content = qq{\r\n <table width=\"100%\" border=0 cellpadding=2 cellspacing=0>};\r\n\r\nmy $cid = $S->{CGI}->param(\'cid\');\r\nmy $sid = $S->{CGI}->param(\'sid\');\nmy $archive = $S->_check_archivestatus($sid);\r\n\r\nmy $f_cid = $S->{DBH}->quote($cid);\r\nmy $f_sid = $S->{DBH}->quote($sid);\r\n\r\n#Check for hidden\r\nmy ($rv, $sth) = $S->db_select({\n ARCHIVE => $archive,\r\n WHAT => \'points\',\r\n FROM => \'comments\',\r\n WHERE => qq{sid = $f_sid AND cid = $f_cid}});\r\n\r\nmy $points = $sth->fetchrow();\r\n$sth->finish();\r\n\r\nif (($points < $S->{UI}->{VARS}->{rating_min}) && ($S->{TRUSTLEV} != 2)) {\r\n return \'\';\r\n}\r\n\r\nmy ($rv, $sth) = $S->db_select({\n ARCHIVE => $archive,\r\n WHAT => \'uid, rating\',\r\n FROM => \'commentratings\',\r\n WHERE => qq{sid = $f_sid AND cid = $f_cid}});\r\n\r\nmy $zeros = 0;\r\n\r\nwhile (my $rating = $sth->fetchrow_hashref()) {\r\!
n my $user = $S->user_data($rating->{uid});\r\n \r\n if (($rating->{\'rating\'} < $S->{UI}->{VARS}->{rating_min}) && ($S->{TRUSTLEV} != 2)) {\r\n $zeros++;\r\n } else {\r\n $content .= qq{\r\n <tr>\r\n <td>%%norm_font%%<A HREF=\"%%rootdir%%/user/uid:$rating->{uid}\">$user->{nickname}</A>%%norm_font_end%%</td>\r\n <td>%%norm_font%%$rating->{rating}%%norm_font_end%%</td>\r\n </tr>};\r\n }\r\n}\r\n\r\n$sth->finish();\r\n\r\nif ($zeros) {\r\n my $word = ($zeros == 1) ? \"Rating\" : \"Ratings\";\r\n \r\n $content .= qq{\r\n <tr>\r\n <td colspan=2>%%norm_font%%Zero $word: $zeros%%norm_font_end%%</td>\r\n </tr>};\r\n}\r\n\r\n$content .= qq{\r\n </table>};\r\n\r\nreturn {\'content\' => $content};','Display who rated a comment what','',0);
INSERT INTO box VALUES ('rdf_feeds','External Feeds','return unless $S->{UI}->{VARS}->{use_rdf_feeds} || $S->have_perm(\'rdf_admin\');\r\n\r\nmy $to_display = {};\r\nif (@ARGS || $S->{CGI}->param(\'rdf\')) {\r\n my $rdf_arg = $S->{CGI}->param(\'rdf\');\r\n if ($rdf_arg eq \'all\') {\r\n $to_display->{\'all\'} = 1;\r\n } else {\r\n @ARGS = split(/,/, $rdf_arg) if $rdf_arg;\r\n foreach (@ARGS) {\r\n $to_display->{$_} = 1;\r\n }\r\n }\r\n}\r\n\r\nmy $content;\r\nmy $channels = $S->rdf_channels();\r\nmy $user_feeds = $S->rdf_get_prefs() unless @ARGS;\r\nmy $item_limit = defined($S->{prefs}->{rdf_max_headlines}) ?\r\n $S->{prefs}->{rdf_max_headlines} :\r\n defined($S->{UI}->{VARS}->{rdf_max_headlines}) ?\r\n $S->{UI}->{VARS}->{rdf_max_headlines} : 15;\r\n\r\nforeach my $c (@{$channels}) {\r\n unless ($to_display->{all} == 1) {\r\n if (@ARGS) {\r\n next unless $to_display->{ $c->{rid} };\r\n } else {\r\n next unless $user_feeds->{ $c->{rid} };\r\n }\r\n }\r\n next u!
nless $c->{title};\r\n unless ($S->have_perm(\'rdf_admin\')) {\r\n next if $c->{submitted} || !$c->{enabled};\r\n }\r\n\r\n if ($S->{UI}->{VARS}->{rdf_use_images} && $c->{image_url}) {\r\n $content .= qq|<a href=\"$c->{image_link}\"><img src=\"$c->{image_url}\" alt=\"$c->{image_title}\" border=\"1\"></a><br>\\n|;\r\n } else {\r\n $content .= qq|<b><a class=\"light\" href=\"$c->{link}\">$c->{title}</a></b><br />\\n|;\r\n }\r\n\r\n my $items = $S->rdf_items($c->{rid}, $item_limit);\r\n foreach my $i (@{$items}) {\r\n $content .= qq|%%dot%% <a class=\"light\" href=\"$i->{link}\">$i->{title}</a><br />\\n|;\r\n }\r\n\r\n if ($S->{UI}->{VARS}->{rdf_use_forms} && $c->{form_link}) {\r\n $content .= qq|<form action=\"$c->{form_link}\" method=\"GET\">$c->{form_title}: <input type=\"text\" name=\"$c->{form_name}\"></form><br />\\n|;\r\n }\r\n\r\n $content .= \"<br />\\n\";\r\n}\r\n\r\nif ($content && $S->have_perm(\'submit_rdf\')) {\r\n $content = qq|<a class=\"light\" href=\"%%r!
ootdir%%/submitrdf\">Submit Feed</a><br /><br />\\n| . $content;\r\n}\
r\n\r\nreturn $content;\r\n','contains RDF feeds from other sites','box',1);
--- 535,539 ----
INSERT INTO box VALUES ('comment_controls','Comment Controls','my $op = $S->{CGI}->param(\'op\');\r\nmy $tool = $S->{CGI}->param(\'tool\');\r\nreturn \'\' unless ($op eq \'displaystory\' || \r\n $op eq \'comments\' ||\r\n $op eq \'view_poll\' ||\r\n $op eq \'poll_vote\' );\r\nreturn \'\' if( $op eq \'comments\' && $tool eq \'post\' );\r\n\r\nmy $sid = $S->{CGI}->param(\'sid\');\r\nmy $pid = $S->{CGI}->param(\'pid\');\r\nmy $cid = $S->{CGI}->param(\'cid\');\r\nmy $qid = $S->{CGI}->param(\'qid\');\r\n\nreturn \'\' unless ($S->{STORIES}->{$sid}->{commentstatus} == 0);\n\r\nreturn \'\' unless( $S->have_section_perm(\'norm_read_comments\',$S->_get_story_section($sid)));\r\n\r\nmy $form_extra;\r\nmy $anchor = qq{#$cid};\r\nif ($cid) {\r\n $form_extra = qq{\r\n <INPUT TYPE=\"hidden\" NAME=\"cid\" VALUE=\"$cid\">};\r\n} elsif ($pid) {\r\n $form_extra = qq{\r\n <INPUT TYPE=\"hidden\" NAME=\"pid\!
" VALUE=\"$pid\">};\r\n}\r\n\r\nmy $commentmode_select = $S->_comment_mode_select();\r\nmy $comment_order_select = $S->_comment_order_select();\r\nmy $comment_rating_select = $S->_comment_rating_select();\r\nmy $rating_choice = $S->_comment_rating_choice();\r\nmy $comment_type_select = $S->_comment_type_select();\r\n\r\nmy $form_op = \'op\';\r\nmy $form_op_value = $op;\r\nmy $id = \'sid\';\r\n\r\nif ( $qid ) {\r\n $form_op = \'op\';\r\n $form_op_value = \'view_poll\';\r\n $id = \'qid\';\r\n $sid = $qid;\r\n}\r\n \r\nmy $comment_sort = qq|\r\n <FORM NAME=\"commentmode\" ACTION=\"%%rootdir%%/$anchor\" METHOD=\"post\">\r\n <INPUT TYPE=\"hidden\" NAME=\"$form_op\" VALUE=\"$form_op_value\">\r\n <INPUT TYPE=\"hidden\" NAME=\"$id\" VALUE=\"$sid\">\r\n $form_extra\r\n <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"%%box_content_bg%%\" align=\"center\">\r\n \r\n <TR>\r\n <TD VALIGN=\"middle\">\r\n %%smallfont%%|;\nif ($comment_type_select) {\n $comment_sort .= qq|\n!
View:\r\n <SMALL>\r\n $comment_type_select\r\n </SMALL>|;\n}
\n$comment_sort .= qq|\r\n Display:\r\n <SMALL>\r\n $commentmode_select\r\n </SMALL>\r\n Sort:\r\n <SMALL>\r\n $comment_rating_select\r\n </SMALL>\r\n <SMALL>\r\n $comment_order_select\r\n </SMALL>\r\n|;\r\n \r\n \r\nif ($S->have_perm( \'comment_rate\' )) {\r\n $comment_sort .= qq|\r\n Rate?\r\n <SMALL>$rating_choice</SMALL>|;\r\n}\r\n\r\n$comment_sort .= qq|\r\n<INPUT TYPE=\"submit\" NAME=\"setcomments\" VALUE=\"Set\">\r\n%%smallfont_end%%\r\n</TD></TR>\r\n</TABLE>\r\n</FORM>|;\r\n\r\n$template =~ s/CELLSPACING=0>/CELLSPACING=0 ALIGN=\"center\">/;\r\n\r\nreturn { content => $comment_sort, template => $template };','Comment display prefs','blank_box',0);
INSERT INTO box VALUES ('mod_stats','Moderation Stats','my $sid = $ARGS[0];\r\n$sid = $S->{CGI}->param(\'sid\') unless $sid;\r\nreturn unless $sid;\r\n\r\nmy $q_sid = $S->{DBH}->quote($sid);\r\n\r\nmy ($rv, $t_sth) = $S->db_select({\r\n WHAT => \'displaystatus\',\r\n FROM => \'stories\',\r\n WHERE => qq{sid = $q_sid}});\r\n\r\nmy $disp = $t_sth->fetchrow();\r\n\r\nreturn unless ($disp == \'-2\');\r\n\r\nmy ($stat, $trash) = $S->_mod_or_show($sid);\r\nreturn \'\' unless ($stat eq \'show\');\r\n\r\nmy ($totalvotes, $score) = $S->_get_total_votes($sid);\r\nmy $sth = $S->_get_story_mods($sid);\r\n\r\nmy $head = $S->{UI}->{BLOCKS}->{moderate_head};\r\n\r\n$head =~ s/%%votes%%/$totalvotes/g;\r\n$head =~ s/%%score%%/$score/g;\r\n\r\nmy ($this_row, $user);\r\n\r\nmy $for = qq{<FORM NAME=\"mod_stat_show\" ACTION=\"%%rootdir%%/\" METHOD=\"get\">\r\n<INPUT TYPE=\"hidden\" NAME=\"op\" VALUE=\"user\">\r\n<INPUT TYPE=\"hidden\" NAME=\"tool\" VALUE=\"info\">};\r\nmy $against = q!
q{<FORM NAME=\"mod_stat_show\" ACTION=\"%%rootdir%%/\" METHOD=\"get\">\r\n<INPUT TYPE=\"hidden\" NAME=\"op\" VALUE=\"user\">\r\n<INPUT TYPE=\"hidden\" NAME=\"tool\" VALUE=\"info\">};\r\nmy $neutral = qq{<FORM NAME=\"mod_stat_show\" ACTION=\"%%rootdir%%/\" METHOD=\"get\">\r\n<INPUT TYPE=\"hidden\" NAME=\"op\" VALUE=\"user\">\r\n<INPUT TYPE=\"hidden\" NAME=\"tool\" VALUE=\"info\">};\r\n#\'\r\nmy $f = 0;\r\nmy $a = 0;\r\nmy $n = 0;\r\n\r\n$for .= qq{<small>\r\n <SELECT NAME=\"uid\" SIZE=1>\r\n <OPTION VALUE=\"\">Voted for: (%%for%%)};\r\n$against .= qq{<small>\r\n <SELECT NAME=\"uid\" SIZE=1>\r\n <OPTION VALUE=\"\">Voted against: (%%against%%)};\r\n$neutral .= qq{<small>\r\n <SELECT NAME=\"uid\" SIZE=1>\r\n <OPTION VALUE=\"\">Didn\'t care: (%%neutral%%)}; \r\n\r\nwhile (my $mod_rec = $sth->fetchrow_hashref) {\r\n my $nick = $S->get_nick($mod_rec->{uid});\r\n $nick =~ s/^(.{0,20})/$1/;\r\n my $link = qq{\r\n <OPTION VALUE=\"$mod_rec->{uid}\">$nick};\r\n if ($mod_rec->{vote} == !
1) {\r\n $for .= qq|\r\n $link|;\r\n $f++;\r\n } elsif ($mod_rec->{
vote} == 0) {\r\n $neutral .= qq|\r\n $link|;\r\n $n++;\r\n } elsif ($mod_rec->{vote} == -1) {\r\n $against .= qq|\r\n $link|;\r\n $a++;\r\n }\r\n}\r\n$sth->finish;\r\n\r\n$for .= qq{</SELECT> <INPUT TYPE=\"submit\" NAME=\"get\" VALUE=\"Get User Info\"></small></FORM>};\r\n$against .= qq{</SELECT> <INPUT TYPE=\"submit\" NAME=\"get\" VALUE=\"Get User Info\"></small></FORM>};\r\n$neutral .= qq{</SELECT> <INPUT TYPE=\"submit\" NAME=\"get\" VALUE=\"Get User Info\"></small></FORM>};\r\n\r\n$for =~ s/%%for%%/$f/;\r\n$against =~ s/%%against%%/$a/;\r\n$neutral =~ s/%%neutral%%/$n/;\r\n\r\nmy $content = $head.\'%%smallfont%%\'.$for.$against.$neutral.\'%%smallfont_end%%\';\r\n\r\nreturn { content => $content };','Show the stats for story mod','box',0);
! INSERT INTO box VALUES ('section_title','null','my $content = \'Latest News\';\r\n\r\nmy $op = $S->{CGI}->param(\'op\');\r\nmy $page_num = $S->cgi->param(\'page\');\r\nmy $page = \'\';\r\nif ($page_num && $page_num != 1) {\r\n $page = \"(page $page_num)\";\r\n}\r\n\r\nif ($op eq \'section\') {\r\n my $section = $S->{CGI}->param(\'section\');\r\n unless($S->have_section_perm(\'hide_read_stories\',$section)) {\r\n $content = $S->{SECTION_DATA}->{$section}->{title} || \'All Stories\';\r\n } else {\r\n $content = \'\';\r\n }\r\n} elsif ($op eq \'tag\') {\r\n my $tag = $S->cgi->param(\'tag\');\r\n $content = ($tag) ? qq{Tag: $tag} : \'\';\r\n}\r\n\r\nreturn {\'content\' => \"%%title_font%%$content $page%%title_font_end%%\" };','Display title of current section','blank_box',0);
INSERT INTO box VALUES ('show_comment_raters','Others have rated this comment as follows:','my $content = qq{\r\n <table width=\"100%\" border=0 cellpadding=2 cellspacing=0>};\r\n\r\nmy $cid = $S->{CGI}->param(\'cid\');\r\nmy $sid = $S->{CGI}->param(\'sid\');\nmy $archive = $S->_check_archivestatus($sid);\r\n\r\nmy $f_cid = $S->{DBH}->quote($cid);\r\nmy $f_sid = $S->{DBH}->quote($sid);\r\n\r\n#Check for hidden\r\nmy ($rv, $sth) = $S->db_select({\n ARCHIVE => $archive,\r\n WHAT => \'points\',\r\n FROM => \'comments\',\r\n WHERE => qq{sid = $f_sid AND cid = $f_cid}});\r\n\r\nmy $points = $sth->fetchrow();\r\n$sth->finish();\r\n\r\nif (($points < $S->{UI}->{VARS}->{rating_min}) && ($S->{TRUSTLEV} != 2)) {\r\n return \'\';\r\n}\r\n\r\nmy ($rv, $sth) = $S->db_select({\n ARCHIVE => $archive,\r\n WHAT => \'uid, rating\',\r\n FROM => \'commentratings\',\r\n WHERE => qq{sid = $f_sid AND cid = $f_cid}});\r\n\r\nmy $zeros = 0;\r\n\r\nwhile (my $rating = $sth->fetchrow_hashref()) {\r\!
n my $user = $S->user_data($rating->{uid});\r\n \r\n if (($rating->{\'rating\'} < $S->{UI}->{VARS}->{rating_min}) && ($S->{TRUSTLEV} != 2)) {\r\n $zeros++;\r\n } else {\r\n $content .= qq{\r\n <tr>\r\n <td>%%norm_font%%<A HREF=\"%%rootdir%%/user/uid:$rating->{uid}\">$user->{nickname}</A>%%norm_font_end%%</td>\r\n <td>%%norm_font%%$rating->{rating}%%norm_font_end%%</td>\r\n </tr>};\r\n }\r\n}\r\n\r\n$sth->finish();\r\n\r\nif ($zeros) {\r\n my $word = ($zeros == 1) ? \"Rating\" : \"Ratings\";\r\n \r\n $content .= qq{\r\n <tr>\r\n <td colspan=2>%%norm_font%%Zero $word: $zeros%%norm_font_end%%</td>\r\n </tr>};\r\n}\r\n\r\n$content .= qq{\r\n </table>};\r\n\r\nreturn {\'content\' => $content};','Display who rated a comment what','',0);
INSERT INTO box VALUES ('rdf_feeds','External Feeds','return unless $S->{UI}->{VARS}->{use_rdf_feeds} || $S->have_perm(\'rdf_admin\');\r\n\r\nmy $to_display = {};\r\nif (@ARGS || $S->{CGI}->param(\'rdf\')) {\r\n my $rdf_arg = $S->{CGI}->param(\'rdf\');\r\n if ($rdf_arg eq \'all\') {\r\n $to_display->{\'all\'} = 1;\r\n } else {\r\n @ARGS = split(/,/, $rdf_arg) if $rdf_arg;\r\n foreach (@ARGS) {\r\n $to_display->{$_} = 1;\r\n }\r\n }\r\n}\r\n\r\nmy $content;\r\nmy $channels = $S->rdf_channels();\r\nmy $user_feeds = $S->rdf_get_prefs() unless @ARGS;\r\nmy $item_limit = defined($S->{prefs}->{rdf_max_headlines}) ?\r\n $S->{prefs}->{rdf_max_headlines} :\r\n defined($S->{UI}->{VARS}->{rdf_max_headlines}) ?\r\n $S->{UI}->{VARS}->{rdf_max_headlines} : 15;\r\n\r\nforeach my $c (@{$channels}) {\r\n unless ($to_display->{all} == 1) {\r\n if (@ARGS) {\r\n next unless $to_display->{ $c->{rid} };\r\n } else {\r\n next unless $user_feeds->{ $c->{rid} };\r\n }\r\n }\r\n next u!
nless $c->{title};\r\n unless ($S->have_perm(\'rdf_admin\')) {\r\n next if $c->{submitted} || !$c->{enabled};\r\n }\r\n\r\n if ($S->{UI}->{VARS}->{rdf_use_images} && $c->{image_url}) {\r\n $content .= qq|<a href=\"$c->{image_link}\"><img src=\"$c->{image_url}\" alt=\"$c->{image_title}\" border=\"1\"></a><br>\\n|;\r\n } else {\r\n $content .= qq|<b><a class=\"light\" href=\"$c->{link}\">$c->{title}</a></b><br />\\n|;\r\n }\r\n\r\n my $items = $S->rdf_items($c->{rid}, $item_limit);\r\n foreach my $i (@{$items}) {\r\n $content .= qq|%%dot%% <a class=\"light\" href=\"$i->{link}\">$i->{title}</a><br />\\n|;\r\n }\r\n\r\n if ($S->{UI}->{VARS}->{rdf_use_forms} && $c->{form_link}) {\r\n $content .= qq|<form action=\"$c->{form_link}\" method=\"GET\">$c->{form_title}: <input type=\"text\" name=\"$c->{form_name}\"></form><br />\\n|;\r\n }\r\n\r\n $content .= \"<br />\\n\";\r\n}\r\n\r\nif ($content && $S->have_perm(\'submit_rdf\')) {\r\n $content = qq|<a class=\"light\" href=\"%%r!
ootdir%%/submitrdf\">Submit Feed</a><br /><br />\\n| . $content;\r\n}\
r\n\r\nreturn $content;\r\n','contains RDF feeds from other sites','box',1);
***************
*** 1071,1074 ****
--- 1078,1082 ----
INSERT INTO ops VALUES ('activate','default_template','activate',1,1,'','','/key/','');
INSERT INTO ops VALUES ('iplookup','default_template','iplookup',1,1,'edit_user','','/iplook/','');
+ INSERT INTO ops VALUES ('tag','index_template','show_storiesbytag',0,1,'','tags','/tag/page/','Lists the stories, with intros, that are in a specified tag');
#
***************
*** 1247,1250 ****
--- 1255,1259 ----
INSERT INTO patches VALUES ('1_1-dev',19,'StoryVoteMessage','sql');
INSERT INTO patches VALUES ('1_1-dev',20,'StoryPosting','sql');
+ INSERT INTO patches VALUES ('1_1-dev',21,'Tags','sql');
#
***************
*** 1427,1430 ****
--- 1436,1440 ----
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');
INSERT INTO pref_items VALUES ('calendar_view','Default calendar view','When first loading a calendar, if the view is not explicitly set, this view will be used.',0,0,'','','use_calendars',0,'monthly',0,'(daily|weekly|monthly)','Interface','%%BOX,pref_selectbox,calendar_view,%%value%%,daily,weekly,monthly%%',9,'selectbox_pref','',1,'normal');
+ INSERT INTO pref_items VALUES ('tag_sort','Story tag sorting','Choose between sorting tags by popularity (count) or name (alpha)',0,0,'','','use_tags',0,'count',5,'^(alpha|count)$','Interface','%%BOX,pref_selectbox,tag_sort,%%value%%,alpha,count%%',22,'selectbox_pref','',0,'normal');
#
***************
*** 1669,1672 ****
--- 1679,1700 ----
#
+ # Table structure for table 'story_tags'
+ #
+
+ CREATE TABLE story_tags (
+ sid varchar(20) NOT NULL default '',
+ tag varchar(255) NOT NULL default '',
+ tag_order int(11) NOT NULL default '0',
+ PRIMARY KEY (sid,tag),
+ KEY sid_idx (sid),
+ KEY tag_idx (tag)
+ ) TYPE=MyISAM;
+
+ #
+ # Dumping data for table 'story_tags'
+ #
+
+
+ #
# Table structure for table 'storymoderate'
#
***************
*** 2045,2048 ****
--- 2073,2078 ----
INSERT INTO vars VALUES ('signup_with_password','1','Collect a user\'s desired password on signup? If set to 1, the signup form will also include a password field. The initial account email will send a link which includes a key rather than a random password. This link will take a user directly to their prefs page (logging them in and activating the account) without the user needing to explicitly log in, and will also enable the password they chose on signup for future logins.\r\n<p>\r\nThis should actually be more secure than the random password method, since if the initial email is intercepted, the attacker still won\'t know the actual account password, and thus will be unable to hijack the account. It should also be easier for users to deal with.\r\n<p>\r\nIf you are upgrading from an older version of Scoop, and wish to enable this feature, you\'ll want to edit several of the blocks in the Accounts category, to remove the references to changing your password. You\'ll als!
o need to add the box \"signup_password\" to the block new_user_html, and replace the username and password lines in the new_user_email block with the link \"|url|/activate/|pass|\".\r\n','bool','Security');
INSERT INTO vars VALUES ('use_diaries','1','Set to one to use diaries on this site.','bool','Stories');
+ INSERT INTO vars VALUES ('tag_threshold_classes','1,tag-popularity-1\r\n5,tag-popularity-5\r\n10,tag-popularity-10\r\n15,tag-popularity-15\r\n','Tag Count Threshholds for altering the font styling for each tag on the all tags page depending on what story count threshold it meets. Each threshold is on a line by itself, and consists of two parts: the number of stories associated with a given tag, and the CSS class name used for that tag. The styling of the CSS classes named here is done in the block <B>main_css</B>.','tarea','Tags');
+ INSERT INTO vars VALUES ('use_tags','0','Turns the \"tag\" categorization system on or off. Tags are user-input freeform story categories. Any story can have any number of associated tags. Tags are input as a simple comma-delimited string of words, and can only consist of alphanumeric characters (a-z, A-Z, 0-9).','bool','Tags');
#