Commit info for scoop/struct:

Modified Files:
	scoop.sql 
Log Message:
Some changes to the diary section handling. Removed the diary_uid in topic
from diaries. Removed some hard coding of diary section, so that
sections_excluded_from_all is now required to be filled in. Removed the
ads_in_everything var, as it's replaced by the above.
Topics for diaries are now supported. -- hulver.


Index: scoop.sql
===================================================================
RCS file: /cvs/scoop/scoop/struct/scoop.sql,v
retrieving revision 1.181
retrieving revision 1.182
diff -r1.181 -r1.182
673c673
< INSERT INTO ops VALUES ('user','default_template','edit_user',0,1,'','whois my ~.+','EVAL{\r\n  my $p = {};\r\n  if ($S->cgi->param(\'caller_op\') eq \'my\') {\r\n    unshift @path__COMMA__ $S->{NICK};\r\n  } elsif ($S->cgi->param(\'caller_op\') =~ m/^~(.+)$/) {\r\n    unshift @path__COMMA__ $1;\r\n  }\r\n  my $uid;\r\n  if ($path[0] =~ /uid:/) {\r\n    $path[0] =~ s/^uid://;\r\n    $uid = $path[0];\r\n    $path[0] = $S->get_nick_from_uid($uid);\r\n  } else {\r\n    $uid=$S->get_uid_from_nick($path[0]); \r\n  }\r\n  if ($path[1] eq \'edit\') { $path[1] = \'prefs\' }\r\n  if ($path[1] eq \'diary\') {\r\n    $p = {\r\n      op      => \'section\'__COMMA__\r\n      user    => \"diary_$uid\"__COMMA__\r\n      section => \'Diary\'__COMMA__\r\n      page    => $path[2]\r\n    };\r\n  } elsif ($path[1] =~ /comment/) {\r\n    $p->{op}      = \'search\';\r\n    $p->{type}    = \'comment_by\';\r\n    $p->{string}  = $path[0];\r\n  } elsif ($path[1] eq \'ads\') {\r\n    $p->{op}     !
  = \'adinfo\';\r\n    $p->{ad_id}   = \"uid:$uid\";\r\n  } elsif ($path[1] eq \'stories\' || $path[1] eq \'story\') {\r\n    $p->{op}      = \'search\';\r\n    $p->{type}    = \'author\';\r\n    $p->{string}  = $path[0];\r\n  } else {\r\n    $p->{op}      = \'user\';\r\n    $p->{tool}    = $path[1];\r\n    $p->{nick}    = $path[0];\r\n    $p->{uid}     = $uid;\n  }\r\n  return $p;\r\n}','Display and edit registered users.');
---
> INSERT INTO ops VALUES ('user','default_template','edit_user',0,1,'','whois my ~.+','EVAL{\r\n  my $p = {};\r\n  if ($S->cgi->param(\'caller_op\') eq \'my\') {\r\n    unshift @path__COMMA__ $S->{NICK};\r\n  } elsif ($S->cgi->param(\'caller_op\') =~ m/^~(.+)$/) {\r\n    unshift @path__COMMA__ $1;\r\n  }\r\n  my $uid;\r\n  if ($path[0] =~ /uid:/) {\r\n    $path[0] =~ s/^uid://;\r\n    $uid = $path[0];\r\n    $path[0] = $S->get_nick_from_uid($uid);\r\n  } else {\r\n    $uid=$S->get_uid_from_nick($path[0]); \r\n  }\r\n  if ($path[1] eq \'edit\') { $path[1] = \'prefs\' }\r\n  if ($path[1] eq \'diary\') {\r\n    $p = {\r\n      op      => \'section\'__COMMA__\r\n      user    => \"$path[0]\"__COMMA__\r\n      section => \'Diary\'__COMMA__\r\n      page    => $path[2]\r\n    };\r\n  } elsif ($path[1] =~ /comment/) {\r\n    $p->{op}      = \'search\';\r\n    $p->{type}    = \'comment_by\';\r\n    $p->{string}  = $path[0];\r\n  } elsif ($path[1] eq \'ads\') {\r\n    $p->{op}      =!
  \'adinfo\';\r\n    $p->{ad_id}   = \"uid:$uid\";\r\n  } elsif ($path[1] eq \'stories\' || $path[1] eq \'story\') {\r\n    $p->{op}      = \'search\';\r\n    $p->{type}    = \'author\';\r\n    $p->{string}  = $path[0];\r\n  } else {\r\n    $p->{op}      = \'user\';\n    $p->{action}  = $path[2];\r\n    $p->{tool}    = $path[1];\r\n    $p->{nick}    = $path[0];\r\n    $p->{uid}     = $uid;\r\n  }\r\n  return $p;\r\n}','Display and edit registered users.');
1003a1004,1009
> INSERT INTO section_perms VALUES ('Admins','advertisements',',norm_read_comments,norm_post_comments,norm_read_stories,hide_post_stories',0);
> INSERT INTO section_perms VALUES ('Advertisers','advertisements',',norm_read_comments,norm_post_comments,norm_read_stories,hide_post_stories',0);
> INSERT INTO section_perms VALUES ('Anonymous','advertisements',',norm_read_comments,norm_post_comments,norm_read_stories,hide_post_stories',0);
> INSERT INTO section_perms VALUES ('Editors','advertisements',',norm_read_comments,norm_post_comments,norm_read_stories,hide_post_stories',0);
> INSERT INTO section_perms VALUES ('Superuser','advertisements',',norm_read_comments,norm_post_comments,norm_read_stories,hide_post_stories',0);
> INSERT INTO section_perms VALUES ('Users','advertisements',',norm_read_comments,norm_post_comments,norm_read_stories,hide_post_stories',0);
1022a1029
> INSERT INTO sections VALUES ('advertisements','Adverts','Adverts you can comment on','');
1329d1335
< INSERT INTO vars VALUES ('ads_in_everything_sec','0','Turn this on to have the ads listed in the everything section alongside stories.  0 to not have them listed there','bool','Advertising');
1353c1359
< INSERT INTO vars VALUES ('default_post_type','html','<P>This variable determines the default format a poster uses when posting a comment or story.  The possible values are: text) plain text, all HTML tags rendered as literal text, and line breaks maintained; html) html tags rendered as html formatting instructions, line breaks must be marked with html formatting; and auto) autoformat, which extends plain text to allow simple formatting, links, and lists without requiring HTML.  The default value is html.<BR>\nThis variable can be overridden permanently (per user) by a user preference or temporarily by a user changing the comment post mode when posting a comment.  This variable should be set to reflect your site\'s planned audience.  The autoformat syntax is described in the special page \"Auto Format Mode Syntax\"; you may want to provide a link to that page to your users.</P>','text','Comments');
---
> INSERT INTO vars VALUES ('default_post_type','auto','<P>This variable determines the default format a poster uses when posting a comment or story.  The possible values are: text) plain text, all HTML tags rendered as literal text, and line breaks maintained; html) html tags rendered as html formatting instructions, line breaks must be marked with html formatting; and auto) autoformat, which extends plain text to allow simple formatting, links, and lists without requiring HTML.  The default value is html.<BR>\r\nThis variable can be overridden permanently (per user) by a user preference or temporarily by a user changing the comment post mode when posting a comment.  This variable should be set to reflect your site\'s planned audience.  The autoformat syntax is described in the special page \"Auto Format Mode Syntax\"; you may want to provide a link to that page to your users.</p>','text','Comments');
1465,1466d1470
< INSERT INTO vars VALUES ('op_aliases','queue=modsub,\r\nmoderate=modsub,\r\nforumzilla=fz,\r\nstory=displaystory,\r\nsubmit=submitstory,\r\nwhois=user,\r\nmy=user,\r\ncomment=comments,\r\nfind=search,\r\nviewpoll=view_poll,\r\npoll=view_poll,\n~.+=user','This is a list of aliases to various op codes: alias=real, one per line.','tarea','Ops');
< INSERT INTO vars VALUES ('op_templates','displaystory.length=6:/mode/sid{5}/,\r\ndisplaystory=/sid{5}/,\r\n\r\nuser=EVAL{\r\n  my $p = {};\r\n  if ($S->cgi->param(\'caller_op\') eq \'my\') {\r\n    unshift @path__COMMA__ $S->{NICK};\r\n  } elsif ($S->cgi->param(\'caller_op\') =~ m/^~(.+)$/) {\r\n    unshift @path__COMMA__ $1;\r\n  }\r\n  my $uid;\r\n  if ($path[0] =~ /uid:/) {\r\n    $path[0] =~ s/^uid://;\r\n    $uid = $path[0];\r\n    $path[0] = $S->get_nick_from_uid($uid);\r\n  } else {\r\n    $uid=$S->get_uid_from_nick($path[0]); \r\n  }\r\n  if ($path[1] eq \'edit\') { $path[1] = \'prefs\' }\r\n  if ($path[1] eq \'diary\') {\r\n    $p = {\r\n      op      => \'section\'__COMMA__\r\n      user    => \"diary_$uid\"__COMMA__\r\n      section => \'Diary\'__COMMA__\r\n      page    => $path[2]\r\n    };\r\n  } elsif ($path[1] =~ /comment/) {\r\n    $p->{op}      = \'search\';\r\n    $p->{type}    = \'comment_by\';\r\n    $p->{string}  = $path[0];\r\n  } elsif ($path[1] eq !
 \'ads\') {\r\n    $p->{op}      = \'adinfo\';\r\n    $p->{ad_id}   = \"uid:$uid\";\r\n  } elsif ($path[1] eq \'stories\' || $path[1] eq \'story\') {\r\n    $p->{op}      = \'search\';\r\n    $p->{type}    = \'author\';\r\n    $p->{string}  = $path[0];\r\n  } else {\r\n    $p->{op}      = \'user\';\r\n    $p->{tool}    = $path[1];\r\n    $p->{nick}    = $path[0];\r\n  }\r\n  return $p;\r\n},\r\n\r\nsearch.length=2:/type/string/,\r\nsearch=/string/,\r\n\r\nsection=/section/page/,\r\n\r\nspecial=/page/,\r\n\r\nsubmitstory=/section/,\r\n\r\ninterface=/tool/,\r\n\r\nview_poll=/qid/,\r\n\r\nhotlist=/tool/sid{5}/new_op/page/section/,\r\n\r\ncomments.1=poll:/null/sid/cid/tool/,\r\ncomments.length=2:/sid/cid/,\r\ncomments.length=3:/sid/cid/tool/,\r\ncomments=/sid{5}/cid/tool/,\r\n\r\n\r\nadmin.1=blocks:/tool/mode/theme/item/,\r\nadmin.1=story:/tool/sid{5}/,\r\nadmin.1=editpoll:/tool/editqid/option/,\r\nadmin.1=vars:/tool/cat/,\r\nadmin.1=topics:/tool/tid/,\r\nadmin.1=sections:/tool/!
 section/,\r\nadmin.1=special:/tool/id/,\r\nadmin.1=boxes:/tool!
 /id,\r\n
admin.1=optemplates:/tool/opcode,\r\nadmin.1=groups:/tool/perm_group_id/,\r\nadmin.1=rdf:/tool/action/,\r\nadmin.1=cron:/tool/action/which/,\r\nadmin.1=ads:/tool/type/which,\r\nadmin.1=ops:/tool/opcode/,\r\nadmin.1=log:/tool/log_type/page/log_id/,\nadmin=/tool/,\r\n\r\nprint=/sid{5}/,\r\n\r\nfzdisplay=/action/sid{5}/cid/,\r\n\r\nmain=/page/,\r\nshowad=/ad_id/,\r\nsubmitad=/step/,\r\nredirect=/ad_id/,\r\nadinfo=/ad_id/,\r\n\r\nads=/distribute,','This block sets the rules used for the new URL style. Unless you add an op, or want to tweak the rules, you won\'t need to change this.  For details on the format, see http://guide.kuro5hin.org.','tarea','Ops');
1494c1498,1500
< INSERT INTO vars VALUES ('sections_excluded_from_all','','<P>This variable determines which sections will not be shown in the \"Everything\" pseudo-section or the RDF feed.  The possible values are a comma-separated list of section names.  The default is blank.<BR>\nFIXME: diary and ad sections should be in here, not special cased in the code.  It\'s on the bug list.</P>','text','Stories');
---
> INSERT INTO vars VALUES ('sections_excluded_from_all','Diary, advertisements','<P>This variable determines which sections will not be shown in the \"Everything\" pseudo-section or the RDF feed.  The possible values are a comma-separated list of section names.  The default list contains the Diary and adverts sections.</p>','text','Stories');
> INSERT INTO vars VALUES ('story_nav_bar_sections','Diary, adverts','<P>Contains a comma separated list of sections.<br>This controls what stories are shown in the Next and Previous story positions if the story nav bar is shown (see the disable_story_navbar control)<br>When the story is displayed, if it is in one of the sections listed, only stories from the same section as the current story will be shown in the nav bar. IE. If a Diary story is displayed, then only another Diary story will be shown in the nav bar.<br>If the current story is not from one of the sections listed, then only stories that are not in the sections listed will be displayed. IE. If a story from the News section is displayed, then only stories from any section apart from diaries or adverts will be shown in the nav bar.</p>','text','Stories');
> INSERT INTO vars VALUES ('diary_topics','0','If this var is set, then users may select a different topic for their diaries.<p>\r\nThe default topic is \"Diary\".','text','Stories');