<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.soylentnews.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=50.45.173.59</id>
	<title>SoylentNews - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.soylentnews.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=50.45.173.59"/>
	<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/wiki/Special:Contributions/50.45.173.59"/>
	<updated>2026-05-31T01:39:50Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.4</generator>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=Historic:CssWork&amp;diff=5448</id>
		<title>Historic:CssWork</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=Historic:CssWork&amp;diff=5448"/>
		<updated>2014-03-04T21:23:19Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h2&amp;gt;Related pages  &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Official docs&lt;br /&gt;
** [[InstallDoc]] - original INSTALL document&lt;br /&gt;
** [[SlashGuide]] - this is the guide (from htdocs) you are supposed to read immediately after installing slashcode&lt;br /&gt;
** [[SectionTopics]] - This is the 'new' sections and topics rewrite and is more important to read than it first appears, explains what a skin is. Sort of.&lt;br /&gt;
** [[SlashChart]] Png chart of slashcode organization&lt;br /&gt;
** [[SlashManPages]] Man pages available by typing man PAGENAME&lt;br /&gt;
** [[TemplateManPages]] Man pages for the template library used to deliver the html&lt;br /&gt;
&lt;br /&gt;
* [[SlashHelperProgramsInBin]] - provided admin helpers in slash/bin&lt;br /&gt;
* [[SlashGlossary]] Glossary of terms used in Slash code&lt;br /&gt;
* [[FileLocations]] Locations of important files on disk. Has Main Libraries called by all routines&lt;br /&gt;
* [[FileLocations2]] Locations of files on disk continued. This is the stuff in local/slash.&lt;br /&gt;
* [[FileLocations3]] Locations of files on disk continued. This is the stuff in /usr/local/share/perl5/Slash/&lt;br /&gt;
* [[FileLocationsMisc]] Has Apache, Man pages,... &lt;br /&gt;
* [[MySql]]&lt;br /&gt;
** [[SqlSchema]] - tables used in the database&lt;br /&gt;
** [[SqlDefaults]] - defaults for those tables&lt;br /&gt;
* [[PageScriptList]] - scripts (= 'pages') in /slash/site/slashcott.org/htdocs with routines listed&lt;br /&gt;
* [[PerlModuleDisplay]] - this is what actually sends a single template out to the broswer (through Apache)&lt;br /&gt;
* [[PerlModuleUsers]] - this is what handles the users home page and similar user functions.&lt;br /&gt;
* [[SlashJavaScript]] -  javascript used on site.&lt;br /&gt;
* [[AvailableThemes]] and how they are organized &lt;br /&gt;
* [[ThemesAnatomy]] Overview - &amp;quot;A theme is a website design.&amp;quot; (includes HOWTO-THemes doc)&lt;br /&gt;
** [[TemplateAnatomy]] - All html in these. &amp;quot;parsed by Perl Template Toolkit&amp;quot; (HOWTO-Templates)&lt;br /&gt;
***  [[TemplateTutorialWeb]] - man page&lt;br /&gt;
*** [[TemplateManualDirective]] - man page, has all the keywords used by template library&lt;br /&gt;
*** [[ThePartsOfTemplateLibraryActuallyUsedInSlashCode]] - knowing this can save time reading docs&lt;br /&gt;
*** [[TemplateLists]] - lists of the template in our Theme, some descriptions fm src&lt;br /&gt;
**[[TasksAnatomy]] -&lt;br /&gt;
&lt;br /&gt;
* [[TagboxesAnatomy]] - I don't realy know what these are yet. But there are a lot of them ;-)&lt;br /&gt;
* [[PluginsAnatomy]] - (HOWTO-plugins)&lt;br /&gt;
&lt;br /&gt;
* [[ChangelogForCss]] - Put final finished change here &lt;br /&gt;
* [[HowSlashCssWorks]] Overview&lt;br /&gt;
* [[CssFilesUsedEachPage]] Which css files are used on different pages&lt;br /&gt;
&lt;br /&gt;
* [[http://dev.soylentnews.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=soylentnews/soylentnews.git;a=tree;f=themes;hb=refs/heads/master]] git - themes&lt;br /&gt;
&lt;br /&gt;
http://www.mediawiki.org/wiki/Help:Images&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Unanswered Questions&amp;lt;/h2&amp;gt;&lt;br /&gt;
* The templates are individually output by routine slashDisplay(), but how is the order of delivery determined, and how does one insure a new template goes to the right place on the page?&lt;br /&gt;
* The users home page link goes to /my/homepage. I can find no apache redirect for this nor is there a 'my' folder anywhere. I am guessing this is done in the apache perl module, through some redirects that hook into Apache innards. It is hard to be sure what script is actually being called first. I am assuming it is users. Once an edit is made, you are in /users.pl without /my/&lt;br /&gt;
* Two users scripts, users,users2 Am guesssing users2 is for the d2 interface we are not using, since the forms on the page call users.pl&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Got tired of scrolling through pages of perl code just to see what subs were in a module&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So wrote this, now in /usr/local/sbin/listsubs.sh:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[root@slashcode Slash]# listsubs.sh Admin.pm&lt;br /&gt;
Admin.pm:&lt;br /&gt;
    addSpriteForSid, ajax_authorbox, ajax_learnword, ajax_neverdisplay, &lt;br /&gt;
    ajax_perfbox, ajax_signoff, ajax_signoffbox, ajax_slashdbox, &lt;br /&gt;
    ajax_storyadminbox, ajax_sub_memory, DESTROY, extractRelatedStoriesFromForm, &lt;br /&gt;
    findTheTime, getAccesslogAbusersByID, getAccesslogMaxID, get_ispell_comments, &lt;br /&gt;
    getRecentSubs, getRecentWebheads, getRelated, getSignoffData, &lt;br /&gt;
    getStorySignoffs, getStoryThumbLargeLink, grantStoryPostingAchievements, otherLinks, &lt;br /&gt;
    relatedLinks, showAdminTodo, showAuthorActivityBox, showPerformanceBox, &lt;br /&gt;
    showSignoffBox, showSlashdBox, showStoryAdminBox, write_to_temp_file, &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also will work from a list, as in&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ls *.pm &amp;gt; list.tst&lt;br /&gt;
listsubs.sh &amp;lt; list.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Maybe someone else will find it useful as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Order css files are loaded when simple switch on user prefs page is selected viewing main page main page&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* base.css?T_2_5_0_272 The numbers are the slash verion number (from one of the docs).&lt;br /&gt;
* slashcode.css?T_2_5__0_272&lt;br /&gt;
* slashcode_lite.css?T_2_5__0_272&lt;br /&gt;
* slashcode_lite.css?T_2_5__0_272 (appears to be loading this twice,why?)&lt;br /&gt;
* print.cssT_2_5__0_272&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow a page link from the main page to an individual article page &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Link: http://soylentnews.org/article.pl?sid=14/02/18/0336229&lt;br /&gt;
* article.pl is foind in slash/themes/slashcode/htdocs/article.pl So 'slashcode' is treated as a theme.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;article.pl&amp;lt;/h2&amp;gt;&lt;br /&gt;
The stuff of interest to us&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
use Slash;  -------- located in /local/lib64/perl5/slash.pm&lt;br /&gt;
use Slash::Display;     &lt;br /&gt;
use Slash::Utility;&lt;br /&gt;
&lt;br /&gt;
sub main {&lt;br /&gt;
        my $slashdb   = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user      = getCurrentUser();&lt;br /&gt;
        my $form      = getCurrentForm();&lt;br /&gt;
        my $gSkin     = getCurrentSkin();&lt;br /&gt;
         &lt;br /&gt;
        my $story;&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
                # Make sure the reader is viewing this story in the&lt;br /&gt;
                # proper skin.&lt;br /&gt;
                my $cur_skid = determineCurrentSkin();&lt;br /&gt;
                if ($story-&amp;gt;{primaryskid} != $cur_skid) {&lt;br /&gt;
                        my $cur_skin = $reader-&amp;gt;getSkin($cur_skid);&lt;br /&gt;
                        my $story_skin = $reader-&amp;gt;getSkin($story-&amp;gt;{primaryskid});&lt;br /&gt;
                        if ($story_skin &amp;amp;&amp;amp; $story_skin-&amp;gt;{rootdir}&lt;br /&gt;
                                &amp;amp;&amp;amp; $story_skin-&amp;gt;{rootdir} ne $cur_skin-&amp;gt;{rootdir})$&lt;br /&gt;
                                redirect(&amp;quot;$story_skin-&amp;gt;{rootdir}$ENV{REQUEST_URI}&amp;quot;$&lt;br /&gt;
                                return;&lt;br /&gt;
&lt;br /&gt;
               # XXXSECTIONTOPICS this needs to be updated&lt;br /&gt;
                my $SECT = $reader-&amp;gt;getSection($story-&amp;gt;{section});&lt;br /&gt;
                # This should be a getData call for title&lt;br /&gt;
                my $title = &amp;quot;$constants-&amp;gt;{sitename} | $story-&amp;gt;{title}&amp;quot;;&lt;br /&gt;
                if ($gSkin-&amp;gt;{name} &amp;amp;&amp;amp; $gSkin-&amp;gt;{name} eq &amp;quot;idle&amp;quot;) {&lt;br /&gt;
                        $title = &amp;quot;$gSkin-&amp;gt;{hostname} | $story-&amp;gt;{title}&amp;quot;;&lt;br /&gt;
                &lt;br /&gt;
if (my $pollbooth_db = getObject('Slash::PollBooth')) {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
slashDisplay('display', {&lt;br /&gt;
                        poll                    =&amp;gt; $pollbooth,&lt;br /&gt;
                        section                 =&amp;gt; $SECT,&lt;br /&gt;
                        section_block           =&amp;gt; $reader-&amp;gt;getBlock($SECT-&amp;gt;{secti$&lt;br /&gt;
                        show_poll               =&amp;gt; $pollbooth ? 1 : 0,&lt;br /&gt;
                        story                   =&amp;gt; $story,&lt;br /&gt;
                        stories                 =&amp;gt; \%stories,&lt;br /&gt;
                });&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
               my $called_pc = 0;&lt;br /&gt;
                if ($story-&amp;gt;{discussion}) {&lt;br /&gt;
                        # Still not happy with this logic -Brian&lt;br /&gt;
                        my $discussion = $reader-&amp;gt;getDiscussion($story-&amp;gt;{discussio$&lt;br /&gt;
&lt;br /&gt;
                        }&lt;br /&gt;
                        # If no comments ever have existed and commentstatus is di$&lt;br /&gt;
                        # just skip the display of the comment header bar -Brian&lt;br /&gt;
&lt;br /&gt;
                               &amp;amp;&amp;amp;  $discussion-&amp;gt;{commentstatus} eq 'disabled'&lt;br /&gt;
                        )) {&lt;br /&gt;
                                printComments($discussion);&lt;br /&gt;
                                $called_pc = 1;&lt;br /&gt;
                        }&lt;br /&gt;
                 if (!$called_pc &amp;amp;&amp;amp; $form-&amp;gt;{ssi} &amp;amp;&amp;amp; $form-&amp;gt;{ssi} eq 'yes' &amp;amp;&amp;amp; $form-$&lt;br /&gt;
                        # This is a real hack, we're kind of skipping down&lt;br /&gt;
                        # two levels of code.  But the cchp printing is an&lt;br /&gt;
                        # important optimization;  we avoid having to do&lt;br /&gt;
                        # multiple expensive comment selects.  One problem&lt;br /&gt;
                        # is that if there's no discussion with a story,&lt;br /&gt;
                        # printComments() doesn't get called, which means&lt;br /&gt;
                        # selectComments() doesn't get called, which means&lt;br /&gt;
                        # the cchp file won't be written.  If article.pl&lt;br /&gt;
                       # is being called by slashd, and we need to write&lt;br /&gt;
                        # that file, then here's where we print an empty&lt;br /&gt;
                        # file that will satisfy slashd. - Jamie&lt;br /&gt;
&lt;br /&gt;
                        Slash::Utility::Comments::_print_cchp({ stoid =&amp;gt; &amp;quot;dummy&amp;quot; }$&lt;br /&gt;
                }&lt;br /&gt;
        } else {&lt;br /&gt;
                header('Error', $form-&amp;gt;{section}) or return;&lt;br /&gt;
       &lt;br /&gt;
       my $plugins = $slashdb-&amp;gt;getDescriptions('plugins');&lt;br /&gt;
        if (!$user-&amp;gt;{is_anon} &amp;amp;&amp;amp; $plugins-&amp;gt;{Tags} &amp;amp;&amp;amp; $story) {&lt;br /&gt;
                my $tagsdb = getObject('Slash::Tags');&lt;br /&gt;
                $tagsdb-&amp;gt;markViewed($user-&amp;gt;{uid},&lt;br /&gt;
                        $reader-&amp;gt;getGlobjidCreate('stories', $story-&amp;gt;{stoid}));&lt;br /&gt;
        }&lt;br /&gt;
                        &lt;br /&gt;
        footer();&lt;br /&gt;
        if ($story) {&lt;br /&gt;
                writeLog($story-&amp;gt;{sid} || $sid);&lt;br /&gt;
        } else { &lt;br /&gt;
                writeLog($sid);&lt;br /&gt;
&lt;br /&gt;
               &lt;br /&gt;
createEnvironment();&lt;br /&gt;
main();  &lt;br /&gt;
1; &lt;br /&gt;
&lt;br /&gt;
(EOF)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Slash/DB/MySQL/MySQL.pm&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
479 sub getCSS {&lt;br /&gt;
480         my($self, $layout) = @_;&lt;br /&gt;
481         my $user = getCurrentUser();&lt;br /&gt;
482         my $page = $user-&amp;gt;{currentPage};&lt;br /&gt;
483         my $skin = getCurrentSkin('name');&lt;br /&gt;
484         my $admin = $user-&amp;gt;{is_admin};&lt;br /&gt;
485         my $theme = ($user-&amp;gt;{simpledesign} || $user-&amp;gt;{pda}) ? &amp;quot;light&amp;quot; : $user-&amp;gt;{css_theme};&lt;br /&gt;
486         my $secure = apacheConnectionSSL();&lt;br /&gt;
487         $layout ||= '';&lt;br /&gt;
488         my $constants = getCurrentStatic();&lt;br /&gt;
489&lt;br /&gt;
490         my $expire_time = $constants-&amp;gt;{css_expire} || 3600;&lt;br /&gt;
491         $expire_time += int(rand(60)) if $expire_time;&lt;br /&gt;
492         _genericCacheRefresh($self, 'css', $expire_time);&lt;br /&gt;
493         _genericCacheRefresh($self, 'css_pages', $expire_time);&lt;br /&gt;
494         _genericCacheRefresh($self, 'css_skins', $expire_time);&lt;br /&gt;
495         _genericCacheRefresh($self, 'css_themes', $expire_time);&lt;br /&gt;
496&lt;br /&gt;
497         my $css_ref             = $self-&amp;gt;{_css_cache} ||= {};&lt;br /&gt;
498         my $css_pages_ref       = $self-&amp;gt;{_css_pages_cache};&lt;br /&gt;
499         my $css_skins_ref       = $self-&amp;gt;{_css_skins_cache};&lt;br /&gt;
500         my $css_themes_ref      = $self-&amp;gt;{_css_themes_cache};&lt;br /&gt;
501         my $css_layouts_ref     = $self-&amp;gt;{_css_layouts_cache};&lt;br /&gt;
502&lt;br /&gt;
503         $css_pages_ref = $self-&amp;gt;getCSSValuesHashForCol('page') if !$css_pages_ref;&lt;br /&gt;
504         $css_skins_ref = $self-&amp;gt;getCSSValuesHashForCol('skin') if !$css_skins_ref;&lt;br /&gt;
505         $css_themes_ref = $self-&amp;gt;getCSSValuesHashForCol('theme') if !$css_themes_ref;&lt;br /&gt;
506         $css_layouts_ref = $self-&amp;gt;getCSSValuesHashForCol('layout') if !$css_layouts_ref;&lt;br /&gt;
507&lt;br /&gt;
508         my $lowbandwidth = ($user-&amp;gt;{lowbandwidth} || $user-&amp;gt;{pda}) ? &amp;quot;yes&amp;quot; : &amp;quot;no&amp;quot;;&lt;br /&gt;
509&lt;br /&gt;
510         $page   = '' if !$css_pages_ref-&amp;gt;{$page};&lt;br /&gt;
511         $skin   = '' if !$css_skins_ref-&amp;gt;{$skin};&lt;br /&gt;
512         $theme  = '' if !$css_themes_ref-&amp;gt;{$theme};&lt;br /&gt;
513         $layout = '' if !$css_layouts_ref-&amp;gt;{$layout};&lt;br /&gt;
514&lt;br /&gt;
515         return $css_ref-&amp;gt;{$skin}{$page}{$admin}{$theme}{$lowbandwidth}{$layout}{$secure}&lt;br /&gt;
516                 if exists $css_ref-&amp;gt;{$skin}{$page}{$admin}{$theme}{$lowbandwidth}{$layout}{$secure};&lt;br /&gt;
517&lt;br /&gt;
518         my @clauses;&lt;br /&gt;
519&lt;br /&gt;
520         my $page_q = $self-&amp;gt;sqlQuote($page);&lt;br /&gt;
521         my $page_in = $page ? &amp;quot;(page = '' or page = $page_q)&amp;quot; : &amp;quot;page = ''&amp;quot;;&lt;br /&gt;
522         push @clauses, $page_in;&lt;br /&gt;
523&lt;br /&gt;
524         my $skin_in = $skin ? &amp;quot;(skin = '' or skin = '$skin')&amp;quot; : &amp;quot;skin = ''&amp;quot;;&lt;br /&gt;
525         push @clauses, $skin_in;&lt;br /&gt;
526&lt;br /&gt;
527         push @clauses, &amp;quot;admin='no'&amp;quot; if !$admin;&lt;br /&gt;
528&lt;br /&gt;
529         my $theme_q  = $self-&amp;gt;sqlQuote($theme);&lt;br /&gt;
530         my $theme_in = $theme ? &amp;quot;(theme='' or theme=$theme_q)&amp;quot; : &amp;quot;theme=''&amp;quot;;&lt;br /&gt;
531         push @clauses, $theme_in;&lt;br /&gt;
532&lt;br /&gt;
533         push @clauses, &amp;quot;lowbandwidth='$lowbandwidth'&amp;quot; if $lowbandwidth eq &amp;quot;no&amp;quot;;&lt;br /&gt;
534&lt;br /&gt;
535         my $layout_q = $self-&amp;gt;sqlQuote($layout);&lt;br /&gt;
536         push @clauses, &amp;quot;layout=$layout_q&amp;quot;;&lt;br /&gt;
537&lt;br /&gt;
538         my $where = &amp;quot;css.ctid=css_type.ctid AND &amp;quot;;&lt;br /&gt;
539         $where .= join ' AND ', @clauses;&lt;br /&gt;
540&lt;br /&gt;
541         my $css = $self-&amp;gt;sqlSelectAllHashrefArray(&amp;quot;rel,type,media,file,title,ie_cond,skin&amp;quot;,&lt;br /&gt;
542                 &amp;quot;css, css_type&amp;quot;, $where, &amp;quot;ORDER BY css_type.ordernum, css.ordernum&amp;quot;);&lt;br /&gt;
543         if ($secure) {&lt;br /&gt;
544                 for my $hr (@$css) { $hr-&amp;gt;{file} =~ s/\.css/.ssl.css/ }&lt;br /&gt;
545         }&lt;br /&gt;
546         &lt;br /&gt;
547         $css_ref-&amp;gt;{$skin}{$page}{$admin}{$theme}{$lowbandwidth}{$layout}{$secure} = $css;&lt;br /&gt;
548         return $css;&lt;br /&gt;
549 }&lt;br /&gt;
550 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Slash/Apache/User/User.pm&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
548 {&lt;br /&gt;
549 my %ops_my = (&lt;br /&gt;
550         inbox           =&amp;gt; { args =&amp;gt; 'op=list', uri =&amp;gt; 'messages.pl' },&lt;br /&gt;
551         # XXX change messages to be same as /inbox, move this to /my/preferences/messages&lt;br /&gt;
552         messages        =&amp;gt; { args =&amp;gt; 'op=display_prefs', uri =&amp;gt; 'messages.pl' },&lt;br /&gt;
553         comments        =&amp;gt; { args =&amp;gt; 'op=editcomm' },&lt;br /&gt;
554         homepage        =&amp;gt; { args =&amp;gt; 'op=edithome' },&lt;br /&gt;
555         password        =&amp;gt; { args =&amp;gt; 'op=changeprefs', uri =&amp;gt; 'login.pl' },&lt;br /&gt;
556         logout          =&amp;gt; { args =&amp;gt; 'op=userclose', uri =&amp;gt; 'login.pl' },&lt;br /&gt;
557         misc            =&amp;gt; { args =&amp;gt; 'op=editmiscopts' },&lt;br /&gt;
558         amigos          =&amp;gt; { args =&amp;gt; 'op=friendview', uri =&amp;gt; 'journal.pl' },&lt;br /&gt;
559         bookmarks       =&amp;gt; { args =&amp;gt; 'op=showbookmarks' },&lt;br /&gt;
560         firehose        =&amp;gt; { args =&amp;gt; 'op=userfirehose' },&lt;br /&gt;
561         preferences     =&amp;gt; { args =&amp;gt; 'op=displayprefs', uri =&amp;gt; 'preferences.pl' },&lt;br /&gt;
562         tags            =&amp;gt; { args =&amp;gt; 'op=showtags' },&lt;br /&gt;
563         journal         =&amp;gt; { args =&amp;gt; 'op=list', uri =&amp;gt; 'journal.pl' },&lt;br /&gt;
564&lt;br /&gt;
565         friends         =&amp;gt; { args =&amp;gt; 'op=friends', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
566         fans            =&amp;gt; { args =&amp;gt; 'op=fans', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
567         freaks          =&amp;gt; { args =&amp;gt; 'op=freaks', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
568         foes            =&amp;gt; { args =&amp;gt; 'op=foes', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
569         zoo             =&amp;gt; { args =&amp;gt; 'op=all', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
570&lt;br /&gt;
571         default         =&amp;gt; { args =&amp;gt; 'op=edituser' }&lt;br /&gt;
572 );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;sql/mysql/defaults.sql&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 134 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','base.css','','','','no','',1,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
135 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','comments','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
136 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','article','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
137 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','print','print.css','','','','no','',5,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
138 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','admin.css','','','','yes','',1,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
139 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','pollBooth','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
140 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode_lite.css','','','','no','light',4,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
141 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','journal','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
142 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode_lite.css','','','','no','light',4,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
143 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','journal','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
144 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode.css','','','','no','',3,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
145 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','metamod','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
146 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode_low_bw.css','','','','no','',4,99, &amp;quot;&amp;quot;,&amp;quot;yes&amp;quot;);&lt;br /&gt;
147&lt;br /&gt;
148 #&lt;br /&gt;
149 # Dumping data for table 'css_type'&lt;br /&gt;
150 #&lt;br /&gt;
151 INSERT INTO css_type (ctid, name, ordernum) VALUES (1,'base',1);&lt;br /&gt;
152 INSERT INTO css_type (ctid, name, ordernum) VALUES (2,'page',2);&lt;br /&gt;
153 INSERT INTO css_type (ctid, name, ordernum) VALUES (3,'theme',3);&lt;br /&gt;
154 INSERT INTO css_type (ctid, name, ordernum) VALUES (4,'user_theme',5);&lt;br /&gt;
155 INSERT INTO css_type (ctid, name, ordernum) VALUES (5,'print',6);&lt;br /&gt;
156 INSERT INTO css_type (ctid, name, ordernum) VALUES (6,'skin',4);&lt;br /&gt;
157 INSERT INTO css_type (ctid, name, ordernum) VALUES (7,'handheld',7);&lt;br /&gt;
158 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;plugins/FireHose/mysql_dump.sql &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','firehose','no','',2,0, '');&lt;br /&gt;
==&amp;gt; INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','users','no','',2,0, '');&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','calendar.css','','','firehose','no','',2,0, '');&lt;br /&gt;
==&amp;gt; INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','users','no','',2,0, '');&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','firehose','no','',2,0, '');&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','index2','no','',2,0, ''); &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;I believe that we are not using FireHose but it was needed to make the site work.  As can be seen in the db dump above, it adds the firehose.css file to any of the user pages. Need to verify and then see if we can get the db purged of these values.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Good work. The question in my mind is why the heck css for one module has any effect *at all* on any other module. Talk about lack of localization...-AG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;I think there was some firehose slashboxes that showed up in the users pages.  They needed to be wider than the default, so they patched those pages with the firehose.css. Next step is to get a current dump of the two css tables. The important part is I know what files are for what parts of the code.  Slashcode.css is the theme css file slashcode-lite.css is the style file that is called by a user pref.  This means I need to fix comments.css to remove the theme elements I inserted and put them in the theme file.  I still need to make sure that the changes that benefited the Simplified theme stay intact. -EP&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;fonts&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
This is what I usually start with:&lt;br /&gt;
   font-family: Helvetica,Geneva,Arial,Verdana,sans-serif;&lt;br /&gt;
&lt;br /&gt;
Too many can lead to a LOT of testing being required. As can the wrong order. ;-)&lt;br /&gt;
&lt;br /&gt;
Others I have used in the past:&lt;br /&gt;
font-family: Geneva,Arial,Verdana,Helvetica,Chicago,sans-serif;&lt;br /&gt;
font-family: Helvetica,Arial,Geneva,Chicago,Verdana,sans-serif;&lt;br /&gt;
font-family: Helvetica,Geneva,Arial,Verdana,sans-serif;&lt;br /&gt;
-AG&lt;br /&gt;
&lt;br /&gt;
I have used:&lt;br /&gt;
font-family: Verdana, Geneva, &amp;quot;Bitstream Vera Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif;&lt;br /&gt;
&lt;br /&gt;
Note this has Linux fonts as well to help with these users.&lt;br /&gt;
-EP&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;User Menu&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','Logout','logout','/my/logout',1,0,10);&lt;br /&gt;
124 INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','Preferences','preferences','/users.pl?op=edituser',1,0,20);&lt;br /&gt;
125 INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','Password','password','[% constants.real_rootdir %]/my/password',1,0,40);&lt;br /&gt;
126 INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','~[% user.nickname | strip_literal %] ([% user.uid %])','me','/~[% user.nickname | fixparam %]',1,0,50);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; This code sets up the upper menu on http://slashcott.org/users.pl which is linked from your userid on the home page.  The Preferences is wrong, as it needs to be all three links: Info, Homepage, Comments.  This will allow users with low-bandwidth option set to easily get to the setting to unset low-bandwidth. -EP&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Refernces to css in the man pages in /usr/local/share/man/man3&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
grep -i css *&lt;br /&gt;
&lt;br /&gt;
HTML::CalendarMonth.3pm:.IP &amp;quot;enable_css&amp;quot; 4&lt;br /&gt;
HTML::CalendarMonth.3pm:.IX Item &amp;quot;enable_css&amp;quot;&lt;br /&gt;
HTML::CalendarMonth.3pm:Set some handy \s-1CSS\s0 class attributes on elements, enabled by default.&lt;br /&gt;
HTML::CalendarMonth.3pm:.IP &amp;quot;semantic_css&amp;quot; 4&lt;br /&gt;
HTML::CalendarMonth.3pm:.IX Item &amp;quot;semantic_css&amp;quot;&lt;br /&gt;
HTML::CalendarMonth.3pm:Sets some additional \s-1CSS\s0 class attributes on elements, disabled by&lt;br /&gt;
HTML::CalendarMonth.3pm:.IP &amp;quot;\fIdefault_css()\fR&amp;quot; 4&lt;br /&gt;
HTML::CalendarMonth.3pm:.IX Item &amp;quot;default_css()&amp;quot;&lt;br /&gt;
HTML::CalendarMonth.3pm:document in conjunction with the classes assigned to elements when css&lt;br /&gt;
HTML::ElementSuper.3pm:might be when you'd like to assign multiple \s-1CSS\s0 classes to a single&lt;br /&gt;
HTML::PopupTreeSelect.3pm:.IP &amp;quot;include_css (optional)&amp;quot; 4&lt;br /&gt;
HTML::PopupTreeSelect.3pm:.IX Item &amp;quot;include_css (optional)&amp;quot;&lt;br /&gt;
HTML::PopupTreeSelect.3pm:Set this to 0 and the default \s-1CSS\s0 will not be included in the widget&lt;br /&gt;
HTML::PopupTreeSelect.3pm:output.  This allows you to include your own \s-1CSS\s0 which will be used by&lt;br /&gt;
HTML::PopupTreeSelect.3pm:your widget.  Modifying the \s-1CSS\s0 will allow you to control the fonts,&lt;br /&gt;
HTML::PopupTreeSelect.3pm:If you run the widget with include_css set to 1 then you can use that&lt;br /&gt;
HTML::Tree::Scanning.3pm:tagging, such is as useful in \s-1CSS\s0 \*(-- note the&lt;br /&gt;
Module::Build::API.3pm:.IP &amp;quot;\fIhtml_css()\fR&amp;quot; 4&lt;br /&gt;
Module::Build::API.3pm:.IX Item &amp;quot;html_css()&amp;quot;&lt;br /&gt;
TAP::Parser::YAMLish::Reader.3pm:YAML::Tiny, \s-1YAML\s0, YAML::Syck, Config::Tiny, CSS::Tiny,&lt;br /&gt;
TAP::Parser::YAMLish::Writer.3pm:YAML::Tiny, \s-1YAML\s0, YAML::Syck, Config::Tiny, CSS::Tiny,&lt;br /&gt;
Template::Iterator.3pm:You can then style the \f(CW\*(C`tr.odd\*(C'\fR and \f(CW\*(C`tr.even\*(C'\fR elements using \s-1CSS:\s0&lt;br /&gt;
Template::Toolkit.3pm:kind of text documents: \s-1HTML\s0, \s-1XML\s0, \s-1CSS\s0, Javascript, Perl code, plain text,&lt;br /&gt;
Template::Tutorial::Web.3pm:kind of content they contain.  So you can use \s-1TT\s0 to generate \s-1HTML\s0, \s-1XML\s0, \s-1CSS\s0,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;CSS commit for Feb 23&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Changes to most of the css files to set all sizes to em (some were in px and broke flow). Changed the font-family to a more friendly chain for all platforms, and remove all other font-faimily calls from the code. Changed font sizes from % to ems and adjusted size for some of the main elements. Fix a issue with the middle column size caused by firehose.css. Many small fixes to spacing over many places.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moved all of the slashcode theme items into the slashcode.cssraw file. Some were in comments.cssraw due to some previous work I did.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On article body and comment body, made the font size a bit smaller. Also on comments body set the margins to be smaller.&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;-EP&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=Historic:CssWork&amp;diff=5447</id>
		<title>Historic:CssWork</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=Historic:CssWork&amp;diff=5447"/>
		<updated>2014-03-04T21:22:23Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h2&amp;gt;Related pages  &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Official docs&lt;br /&gt;
** [[InstallDoc]] - original INSTALL document&lt;br /&gt;
** [[SlashGuide]] - this is the guide (from htdocs) you are supposed to read immediately after installing slashcode&lt;br /&gt;
** [[SectionTopics]] - This is the 'new' sections and topics rewrite and is more important to read than it first appears, explains what a skin is. Sort of.&lt;br /&gt;
** [[SlashChart]] Png chart of slashcode organization&lt;br /&gt;
** [[SlashManPages]] Man pages available by typing man PAGENAME&lt;br /&gt;
** [[TemplateManPages]] Man pages for the template library used to deliver the html&lt;br /&gt;
&lt;br /&gt;
* [[SlashHelperProgramsInBin]] - provided admin helpers in slash/bin&lt;br /&gt;
* [[SlashGlossary]] Glossary of terms used in Slash code&lt;br /&gt;
* [[FileLocations]] Locations of important files on disk. Has Main Libraries called by all routines&lt;br /&gt;
* [[FileLocations2]] Locations of files on disk continued. This is the stuff in local/slash.&lt;br /&gt;
* [[FileLocations3]] Locations of files on disk continued. This is the stuff in /usr/local/share/perl5/Slash/&lt;br /&gt;
* [[FileLocationsMisc]] Has Apache, Man pages,... &lt;br /&gt;
* [[MySql]]&lt;br /&gt;
** [[SqlSchema]] - tables used in the database&lt;br /&gt;
** [[SqlDefaults]] - defaults for those tables&lt;br /&gt;
* [[PageScriptList]] - scripts (= 'pages') in /slash/site/slashcott.org/htdocs with routines listed&lt;br /&gt;
* [[PerlModuleDisplay]] - this is what actually sends a single template out to the broswer (through Apache)&lt;br /&gt;
* [[PerlModuleUsers]] - this is what handles the users home page and similar user functions.&lt;br /&gt;
* [[SlashJavasScript]] -  javascript used on site.&lt;br /&gt;
* [[AvailableThemes]] and how they are organized &lt;br /&gt;
* [[ThemesAnatomy]] Overview - &amp;quot;A theme is a website design.&amp;quot; (includes HOWTO-THemes doc)&lt;br /&gt;
** [[TemplateAnatomy]] - All html in these. &amp;quot;parsed by Perl Template Toolkit&amp;quot; (HOWTO-Templates)&lt;br /&gt;
***  [[TemplateTutorialWeb]] - man page&lt;br /&gt;
*** [[TemplateManualDirective]] - man page, has all the keywords used by template library&lt;br /&gt;
*** [[ThePartsOfTemplateLibraryActuallyUsedInSlashCode]] - knowing this can save time reading docs&lt;br /&gt;
*** [[TemplateLists]] - lists of the template in our Theme, some descriptions fm src&lt;br /&gt;
**[[TasksAnatomy]] -&lt;br /&gt;
&lt;br /&gt;
* [[TagboxesAnatomy]] - I don't realy know what these are yet. But there are a lot of them ;-)&lt;br /&gt;
* [[PluginsAnatomy]] - (HOWTO-plugins)&lt;br /&gt;
&lt;br /&gt;
* [[ChangelogForCss]] - Put final finished change here &lt;br /&gt;
* [[HowSlashCssWorks]] Overview&lt;br /&gt;
* [[CssFilesUsedEachPage]] Which css files are used on different pages&lt;br /&gt;
&lt;br /&gt;
* [[http://dev.soylentnews.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=soylentnews/soylentnews.git;a=tree;f=themes;hb=refs/heads/master]] git - themes&lt;br /&gt;
&lt;br /&gt;
http://www.mediawiki.org/wiki/Help:Images&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Unanswered Questions&amp;lt;/h2&amp;gt;&lt;br /&gt;
* The templates are individually output by routine slashDisplay(), but how is the order of delivery determined, and how does one insure a new template goes to the right place on the page?&lt;br /&gt;
* The users home page link goes to /my/homepage. I can find no apache redirect for this nor is there a 'my' folder anywhere. I am guessing this is done in the apache perl module, through some redirects that hook into Apache innards. It is hard to be sure what script is actually being called first. I am assuming it is users. Once an edit is made, you are in /users.pl without /my/&lt;br /&gt;
* Two users scripts, users,users2 Am guesssing users2 is for the d2 interface we are not using, since the forms on the page call users.pl&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Got tired of scrolling through pages of perl code just to see what subs were in a module&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So wrote this, now in /usr/local/sbin/listsubs.sh:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[root@slashcode Slash]# listsubs.sh Admin.pm&lt;br /&gt;
Admin.pm:&lt;br /&gt;
    addSpriteForSid, ajax_authorbox, ajax_learnword, ajax_neverdisplay, &lt;br /&gt;
    ajax_perfbox, ajax_signoff, ajax_signoffbox, ajax_slashdbox, &lt;br /&gt;
    ajax_storyadminbox, ajax_sub_memory, DESTROY, extractRelatedStoriesFromForm, &lt;br /&gt;
    findTheTime, getAccesslogAbusersByID, getAccesslogMaxID, get_ispell_comments, &lt;br /&gt;
    getRecentSubs, getRecentWebheads, getRelated, getSignoffData, &lt;br /&gt;
    getStorySignoffs, getStoryThumbLargeLink, grantStoryPostingAchievements, otherLinks, &lt;br /&gt;
    relatedLinks, showAdminTodo, showAuthorActivityBox, showPerformanceBox, &lt;br /&gt;
    showSignoffBox, showSlashdBox, showStoryAdminBox, write_to_temp_file, &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also will work from a list, as in&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ls *.pm &amp;gt; list.tst&lt;br /&gt;
listsubs.sh &amp;lt; list.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Maybe someone else will find it useful as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Order css files are loaded when simple switch on user prefs page is selected viewing main page main page&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* base.css?T_2_5_0_272 The numbers are the slash verion number (from one of the docs).&lt;br /&gt;
* slashcode.css?T_2_5__0_272&lt;br /&gt;
* slashcode_lite.css?T_2_5__0_272&lt;br /&gt;
* slashcode_lite.css?T_2_5__0_272 (appears to be loading this twice,why?)&lt;br /&gt;
* print.cssT_2_5__0_272&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow a page link from the main page to an individual article page &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Link: http://soylentnews.org/article.pl?sid=14/02/18/0336229&lt;br /&gt;
* article.pl is foind in slash/themes/slashcode/htdocs/article.pl So 'slashcode' is treated as a theme.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;article.pl&amp;lt;/h2&amp;gt;&lt;br /&gt;
The stuff of interest to us&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
use Slash;  -------- located in /local/lib64/perl5/slash.pm&lt;br /&gt;
use Slash::Display;     &lt;br /&gt;
use Slash::Utility;&lt;br /&gt;
&lt;br /&gt;
sub main {&lt;br /&gt;
        my $slashdb   = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user      = getCurrentUser();&lt;br /&gt;
        my $form      = getCurrentForm();&lt;br /&gt;
        my $gSkin     = getCurrentSkin();&lt;br /&gt;
         &lt;br /&gt;
        my $story;&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
                # Make sure the reader is viewing this story in the&lt;br /&gt;
                # proper skin.&lt;br /&gt;
                my $cur_skid = determineCurrentSkin();&lt;br /&gt;
                if ($story-&amp;gt;{primaryskid} != $cur_skid) {&lt;br /&gt;
                        my $cur_skin = $reader-&amp;gt;getSkin($cur_skid);&lt;br /&gt;
                        my $story_skin = $reader-&amp;gt;getSkin($story-&amp;gt;{primaryskid});&lt;br /&gt;
                        if ($story_skin &amp;amp;&amp;amp; $story_skin-&amp;gt;{rootdir}&lt;br /&gt;
                                &amp;amp;&amp;amp; $story_skin-&amp;gt;{rootdir} ne $cur_skin-&amp;gt;{rootdir})$&lt;br /&gt;
                                redirect(&amp;quot;$story_skin-&amp;gt;{rootdir}$ENV{REQUEST_URI}&amp;quot;$&lt;br /&gt;
                                return;&lt;br /&gt;
&lt;br /&gt;
               # XXXSECTIONTOPICS this needs to be updated&lt;br /&gt;
                my $SECT = $reader-&amp;gt;getSection($story-&amp;gt;{section});&lt;br /&gt;
                # This should be a getData call for title&lt;br /&gt;
                my $title = &amp;quot;$constants-&amp;gt;{sitename} | $story-&amp;gt;{title}&amp;quot;;&lt;br /&gt;
                if ($gSkin-&amp;gt;{name} &amp;amp;&amp;amp; $gSkin-&amp;gt;{name} eq &amp;quot;idle&amp;quot;) {&lt;br /&gt;
                        $title = &amp;quot;$gSkin-&amp;gt;{hostname} | $story-&amp;gt;{title}&amp;quot;;&lt;br /&gt;
                &lt;br /&gt;
if (my $pollbooth_db = getObject('Slash::PollBooth')) {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
slashDisplay('display', {&lt;br /&gt;
                        poll                    =&amp;gt; $pollbooth,&lt;br /&gt;
                        section                 =&amp;gt; $SECT,&lt;br /&gt;
                        section_block           =&amp;gt; $reader-&amp;gt;getBlock($SECT-&amp;gt;{secti$&lt;br /&gt;
                        show_poll               =&amp;gt; $pollbooth ? 1 : 0,&lt;br /&gt;
                        story                   =&amp;gt; $story,&lt;br /&gt;
                        stories                 =&amp;gt; \%stories,&lt;br /&gt;
                });&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
               my $called_pc = 0;&lt;br /&gt;
                if ($story-&amp;gt;{discussion}) {&lt;br /&gt;
                        # Still not happy with this logic -Brian&lt;br /&gt;
                        my $discussion = $reader-&amp;gt;getDiscussion($story-&amp;gt;{discussio$&lt;br /&gt;
&lt;br /&gt;
                        }&lt;br /&gt;
                        # If no comments ever have existed and commentstatus is di$&lt;br /&gt;
                        # just skip the display of the comment header bar -Brian&lt;br /&gt;
&lt;br /&gt;
                               &amp;amp;&amp;amp;  $discussion-&amp;gt;{commentstatus} eq 'disabled'&lt;br /&gt;
                        )) {&lt;br /&gt;
                                printComments($discussion);&lt;br /&gt;
                                $called_pc = 1;&lt;br /&gt;
                        }&lt;br /&gt;
                 if (!$called_pc &amp;amp;&amp;amp; $form-&amp;gt;{ssi} &amp;amp;&amp;amp; $form-&amp;gt;{ssi} eq 'yes' &amp;amp;&amp;amp; $form-$&lt;br /&gt;
                        # This is a real hack, we're kind of skipping down&lt;br /&gt;
                        # two levels of code.  But the cchp printing is an&lt;br /&gt;
                        # important optimization;  we avoid having to do&lt;br /&gt;
                        # multiple expensive comment selects.  One problem&lt;br /&gt;
                        # is that if there's no discussion with a story,&lt;br /&gt;
                        # printComments() doesn't get called, which means&lt;br /&gt;
                        # selectComments() doesn't get called, which means&lt;br /&gt;
                        # the cchp file won't be written.  If article.pl&lt;br /&gt;
                       # is being called by slashd, and we need to write&lt;br /&gt;
                        # that file, then here's where we print an empty&lt;br /&gt;
                        # file that will satisfy slashd. - Jamie&lt;br /&gt;
&lt;br /&gt;
                        Slash::Utility::Comments::_print_cchp({ stoid =&amp;gt; &amp;quot;dummy&amp;quot; }$&lt;br /&gt;
                }&lt;br /&gt;
        } else {&lt;br /&gt;
                header('Error', $form-&amp;gt;{section}) or return;&lt;br /&gt;
       &lt;br /&gt;
       my $plugins = $slashdb-&amp;gt;getDescriptions('plugins');&lt;br /&gt;
        if (!$user-&amp;gt;{is_anon} &amp;amp;&amp;amp; $plugins-&amp;gt;{Tags} &amp;amp;&amp;amp; $story) {&lt;br /&gt;
                my $tagsdb = getObject('Slash::Tags');&lt;br /&gt;
                $tagsdb-&amp;gt;markViewed($user-&amp;gt;{uid},&lt;br /&gt;
                        $reader-&amp;gt;getGlobjidCreate('stories', $story-&amp;gt;{stoid}));&lt;br /&gt;
        }&lt;br /&gt;
                        &lt;br /&gt;
        footer();&lt;br /&gt;
        if ($story) {&lt;br /&gt;
                writeLog($story-&amp;gt;{sid} || $sid);&lt;br /&gt;
        } else { &lt;br /&gt;
                writeLog($sid);&lt;br /&gt;
&lt;br /&gt;
               &lt;br /&gt;
createEnvironment();&lt;br /&gt;
main();  &lt;br /&gt;
1; &lt;br /&gt;
&lt;br /&gt;
(EOF)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Slash/DB/MySQL/MySQL.pm&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
479 sub getCSS {&lt;br /&gt;
480         my($self, $layout) = @_;&lt;br /&gt;
481         my $user = getCurrentUser();&lt;br /&gt;
482         my $page = $user-&amp;gt;{currentPage};&lt;br /&gt;
483         my $skin = getCurrentSkin('name');&lt;br /&gt;
484         my $admin = $user-&amp;gt;{is_admin};&lt;br /&gt;
485         my $theme = ($user-&amp;gt;{simpledesign} || $user-&amp;gt;{pda}) ? &amp;quot;light&amp;quot; : $user-&amp;gt;{css_theme};&lt;br /&gt;
486         my $secure = apacheConnectionSSL();&lt;br /&gt;
487         $layout ||= '';&lt;br /&gt;
488         my $constants = getCurrentStatic();&lt;br /&gt;
489&lt;br /&gt;
490         my $expire_time = $constants-&amp;gt;{css_expire} || 3600;&lt;br /&gt;
491         $expire_time += int(rand(60)) if $expire_time;&lt;br /&gt;
492         _genericCacheRefresh($self, 'css', $expire_time);&lt;br /&gt;
493         _genericCacheRefresh($self, 'css_pages', $expire_time);&lt;br /&gt;
494         _genericCacheRefresh($self, 'css_skins', $expire_time);&lt;br /&gt;
495         _genericCacheRefresh($self, 'css_themes', $expire_time);&lt;br /&gt;
496&lt;br /&gt;
497         my $css_ref             = $self-&amp;gt;{_css_cache} ||= {};&lt;br /&gt;
498         my $css_pages_ref       = $self-&amp;gt;{_css_pages_cache};&lt;br /&gt;
499         my $css_skins_ref       = $self-&amp;gt;{_css_skins_cache};&lt;br /&gt;
500         my $css_themes_ref      = $self-&amp;gt;{_css_themes_cache};&lt;br /&gt;
501         my $css_layouts_ref     = $self-&amp;gt;{_css_layouts_cache};&lt;br /&gt;
502&lt;br /&gt;
503         $css_pages_ref = $self-&amp;gt;getCSSValuesHashForCol('page') if !$css_pages_ref;&lt;br /&gt;
504         $css_skins_ref = $self-&amp;gt;getCSSValuesHashForCol('skin') if !$css_skins_ref;&lt;br /&gt;
505         $css_themes_ref = $self-&amp;gt;getCSSValuesHashForCol('theme') if !$css_themes_ref;&lt;br /&gt;
506         $css_layouts_ref = $self-&amp;gt;getCSSValuesHashForCol('layout') if !$css_layouts_ref;&lt;br /&gt;
507&lt;br /&gt;
508         my $lowbandwidth = ($user-&amp;gt;{lowbandwidth} || $user-&amp;gt;{pda}) ? &amp;quot;yes&amp;quot; : &amp;quot;no&amp;quot;;&lt;br /&gt;
509&lt;br /&gt;
510         $page   = '' if !$css_pages_ref-&amp;gt;{$page};&lt;br /&gt;
511         $skin   = '' if !$css_skins_ref-&amp;gt;{$skin};&lt;br /&gt;
512         $theme  = '' if !$css_themes_ref-&amp;gt;{$theme};&lt;br /&gt;
513         $layout = '' if !$css_layouts_ref-&amp;gt;{$layout};&lt;br /&gt;
514&lt;br /&gt;
515         return $css_ref-&amp;gt;{$skin}{$page}{$admin}{$theme}{$lowbandwidth}{$layout}{$secure}&lt;br /&gt;
516                 if exists $css_ref-&amp;gt;{$skin}{$page}{$admin}{$theme}{$lowbandwidth}{$layout}{$secure};&lt;br /&gt;
517&lt;br /&gt;
518         my @clauses;&lt;br /&gt;
519&lt;br /&gt;
520         my $page_q = $self-&amp;gt;sqlQuote($page);&lt;br /&gt;
521         my $page_in = $page ? &amp;quot;(page = '' or page = $page_q)&amp;quot; : &amp;quot;page = ''&amp;quot;;&lt;br /&gt;
522         push @clauses, $page_in;&lt;br /&gt;
523&lt;br /&gt;
524         my $skin_in = $skin ? &amp;quot;(skin = '' or skin = '$skin')&amp;quot; : &amp;quot;skin = ''&amp;quot;;&lt;br /&gt;
525         push @clauses, $skin_in;&lt;br /&gt;
526&lt;br /&gt;
527         push @clauses, &amp;quot;admin='no'&amp;quot; if !$admin;&lt;br /&gt;
528&lt;br /&gt;
529         my $theme_q  = $self-&amp;gt;sqlQuote($theme);&lt;br /&gt;
530         my $theme_in = $theme ? &amp;quot;(theme='' or theme=$theme_q)&amp;quot; : &amp;quot;theme=''&amp;quot;;&lt;br /&gt;
531         push @clauses, $theme_in;&lt;br /&gt;
532&lt;br /&gt;
533         push @clauses, &amp;quot;lowbandwidth='$lowbandwidth'&amp;quot; if $lowbandwidth eq &amp;quot;no&amp;quot;;&lt;br /&gt;
534&lt;br /&gt;
535         my $layout_q = $self-&amp;gt;sqlQuote($layout);&lt;br /&gt;
536         push @clauses, &amp;quot;layout=$layout_q&amp;quot;;&lt;br /&gt;
537&lt;br /&gt;
538         my $where = &amp;quot;css.ctid=css_type.ctid AND &amp;quot;;&lt;br /&gt;
539         $where .= join ' AND ', @clauses;&lt;br /&gt;
540&lt;br /&gt;
541         my $css = $self-&amp;gt;sqlSelectAllHashrefArray(&amp;quot;rel,type,media,file,title,ie_cond,skin&amp;quot;,&lt;br /&gt;
542                 &amp;quot;css, css_type&amp;quot;, $where, &amp;quot;ORDER BY css_type.ordernum, css.ordernum&amp;quot;);&lt;br /&gt;
543         if ($secure) {&lt;br /&gt;
544                 for my $hr (@$css) { $hr-&amp;gt;{file} =~ s/\.css/.ssl.css/ }&lt;br /&gt;
545         }&lt;br /&gt;
546         &lt;br /&gt;
547         $css_ref-&amp;gt;{$skin}{$page}{$admin}{$theme}{$lowbandwidth}{$layout}{$secure} = $css;&lt;br /&gt;
548         return $css;&lt;br /&gt;
549 }&lt;br /&gt;
550 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Slash/Apache/User/User.pm&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
548 {&lt;br /&gt;
549 my %ops_my = (&lt;br /&gt;
550         inbox           =&amp;gt; { args =&amp;gt; 'op=list', uri =&amp;gt; 'messages.pl' },&lt;br /&gt;
551         # XXX change messages to be same as /inbox, move this to /my/preferences/messages&lt;br /&gt;
552         messages        =&amp;gt; { args =&amp;gt; 'op=display_prefs', uri =&amp;gt; 'messages.pl' },&lt;br /&gt;
553         comments        =&amp;gt; { args =&amp;gt; 'op=editcomm' },&lt;br /&gt;
554         homepage        =&amp;gt; { args =&amp;gt; 'op=edithome' },&lt;br /&gt;
555         password        =&amp;gt; { args =&amp;gt; 'op=changeprefs', uri =&amp;gt; 'login.pl' },&lt;br /&gt;
556         logout          =&amp;gt; { args =&amp;gt; 'op=userclose', uri =&amp;gt; 'login.pl' },&lt;br /&gt;
557         misc            =&amp;gt; { args =&amp;gt; 'op=editmiscopts' },&lt;br /&gt;
558         amigos          =&amp;gt; { args =&amp;gt; 'op=friendview', uri =&amp;gt; 'journal.pl' },&lt;br /&gt;
559         bookmarks       =&amp;gt; { args =&amp;gt; 'op=showbookmarks' },&lt;br /&gt;
560         firehose        =&amp;gt; { args =&amp;gt; 'op=userfirehose' },&lt;br /&gt;
561         preferences     =&amp;gt; { args =&amp;gt; 'op=displayprefs', uri =&amp;gt; 'preferences.pl' },&lt;br /&gt;
562         tags            =&amp;gt; { args =&amp;gt; 'op=showtags' },&lt;br /&gt;
563         journal         =&amp;gt; { args =&amp;gt; 'op=list', uri =&amp;gt; 'journal.pl' },&lt;br /&gt;
564&lt;br /&gt;
565         friends         =&amp;gt; { args =&amp;gt; 'op=friends', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
566         fans            =&amp;gt; { args =&amp;gt; 'op=fans', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
567         freaks          =&amp;gt; { args =&amp;gt; 'op=freaks', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
568         foes            =&amp;gt; { args =&amp;gt; 'op=foes', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
569         zoo             =&amp;gt; { args =&amp;gt; 'op=all', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
570&lt;br /&gt;
571         default         =&amp;gt; { args =&amp;gt; 'op=edituser' }&lt;br /&gt;
572 );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;sql/mysql/defaults.sql&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 134 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','base.css','','','','no','',1,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
135 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','comments','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
136 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','article','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
137 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','print','print.css','','','','no','',5,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
138 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','admin.css','','','','yes','',1,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
139 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','pollBooth','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
140 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode_lite.css','','','','no','light',4,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
141 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','journal','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
142 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode_lite.css','','','','no','light',4,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
143 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','journal','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
144 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode.css','','','','no','',3,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
145 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','metamod','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
146 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode_low_bw.css','','','','no','',4,99, &amp;quot;&amp;quot;,&amp;quot;yes&amp;quot;);&lt;br /&gt;
147&lt;br /&gt;
148 #&lt;br /&gt;
149 # Dumping data for table 'css_type'&lt;br /&gt;
150 #&lt;br /&gt;
151 INSERT INTO css_type (ctid, name, ordernum) VALUES (1,'base',1);&lt;br /&gt;
152 INSERT INTO css_type (ctid, name, ordernum) VALUES (2,'page',2);&lt;br /&gt;
153 INSERT INTO css_type (ctid, name, ordernum) VALUES (3,'theme',3);&lt;br /&gt;
154 INSERT INTO css_type (ctid, name, ordernum) VALUES (4,'user_theme',5);&lt;br /&gt;
155 INSERT INTO css_type (ctid, name, ordernum) VALUES (5,'print',6);&lt;br /&gt;
156 INSERT INTO css_type (ctid, name, ordernum) VALUES (6,'skin',4);&lt;br /&gt;
157 INSERT INTO css_type (ctid, name, ordernum) VALUES (7,'handheld',7);&lt;br /&gt;
158 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;plugins/FireHose/mysql_dump.sql &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','firehose','no','',2,0, '');&lt;br /&gt;
==&amp;gt; INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','users','no','',2,0, '');&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','calendar.css','','','firehose','no','',2,0, '');&lt;br /&gt;
==&amp;gt; INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','users','no','',2,0, '');&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','firehose','no','',2,0, '');&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','index2','no','',2,0, ''); &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;I believe that we are not using FireHose but it was needed to make the site work.  As can be seen in the db dump above, it adds the firehose.css file to any of the user pages. Need to verify and then see if we can get the db purged of these values.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Good work. The question in my mind is why the heck css for one module has any effect *at all* on any other module. Talk about lack of localization...-AG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;I think there was some firehose slashboxes that showed up in the users pages.  They needed to be wider than the default, so they patched those pages with the firehose.css. Next step is to get a current dump of the two css tables. The important part is I know what files are for what parts of the code.  Slashcode.css is the theme css file slashcode-lite.css is the style file that is called by a user pref.  This means I need to fix comments.css to remove the theme elements I inserted and put them in the theme file.  I still need to make sure that the changes that benefited the Simplified theme stay intact. -EP&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;fonts&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
This is what I usually start with:&lt;br /&gt;
   font-family: Helvetica,Geneva,Arial,Verdana,sans-serif;&lt;br /&gt;
&lt;br /&gt;
Too many can lead to a LOT of testing being required. As can the wrong order. ;-)&lt;br /&gt;
&lt;br /&gt;
Others I have used in the past:&lt;br /&gt;
font-family: Geneva,Arial,Verdana,Helvetica,Chicago,sans-serif;&lt;br /&gt;
font-family: Helvetica,Arial,Geneva,Chicago,Verdana,sans-serif;&lt;br /&gt;
font-family: Helvetica,Geneva,Arial,Verdana,sans-serif;&lt;br /&gt;
-AG&lt;br /&gt;
&lt;br /&gt;
I have used:&lt;br /&gt;
font-family: Verdana, Geneva, &amp;quot;Bitstream Vera Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif;&lt;br /&gt;
&lt;br /&gt;
Note this has Linux fonts as well to help with these users.&lt;br /&gt;
-EP&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;User Menu&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','Logout','logout','/my/logout',1,0,10);&lt;br /&gt;
124 INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','Preferences','preferences','/users.pl?op=edituser',1,0,20);&lt;br /&gt;
125 INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','Password','password','[% constants.real_rootdir %]/my/password',1,0,40);&lt;br /&gt;
126 INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','~[% user.nickname | strip_literal %] ([% user.uid %])','me','/~[% user.nickname | fixparam %]',1,0,50);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; This code sets up the upper menu on http://slashcott.org/users.pl which is linked from your userid on the home page.  The Preferences is wrong, as it needs to be all three links: Info, Homepage, Comments.  This will allow users with low-bandwidth option set to easily get to the setting to unset low-bandwidth. -EP&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Refernces to css in the man pages in /usr/local/share/man/man3&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
grep -i css *&lt;br /&gt;
&lt;br /&gt;
HTML::CalendarMonth.3pm:.IP &amp;quot;enable_css&amp;quot; 4&lt;br /&gt;
HTML::CalendarMonth.3pm:.IX Item &amp;quot;enable_css&amp;quot;&lt;br /&gt;
HTML::CalendarMonth.3pm:Set some handy \s-1CSS\s0 class attributes on elements, enabled by default.&lt;br /&gt;
HTML::CalendarMonth.3pm:.IP &amp;quot;semantic_css&amp;quot; 4&lt;br /&gt;
HTML::CalendarMonth.3pm:.IX Item &amp;quot;semantic_css&amp;quot;&lt;br /&gt;
HTML::CalendarMonth.3pm:Sets some additional \s-1CSS\s0 class attributes on elements, disabled by&lt;br /&gt;
HTML::CalendarMonth.3pm:.IP &amp;quot;\fIdefault_css()\fR&amp;quot; 4&lt;br /&gt;
HTML::CalendarMonth.3pm:.IX Item &amp;quot;default_css()&amp;quot;&lt;br /&gt;
HTML::CalendarMonth.3pm:document in conjunction with the classes assigned to elements when css&lt;br /&gt;
HTML::ElementSuper.3pm:might be when you'd like to assign multiple \s-1CSS\s0 classes to a single&lt;br /&gt;
HTML::PopupTreeSelect.3pm:.IP &amp;quot;include_css (optional)&amp;quot; 4&lt;br /&gt;
HTML::PopupTreeSelect.3pm:.IX Item &amp;quot;include_css (optional)&amp;quot;&lt;br /&gt;
HTML::PopupTreeSelect.3pm:Set this to 0 and the default \s-1CSS\s0 will not be included in the widget&lt;br /&gt;
HTML::PopupTreeSelect.3pm:output.  This allows you to include your own \s-1CSS\s0 which will be used by&lt;br /&gt;
HTML::PopupTreeSelect.3pm:your widget.  Modifying the \s-1CSS\s0 will allow you to control the fonts,&lt;br /&gt;
HTML::PopupTreeSelect.3pm:If you run the widget with include_css set to 1 then you can use that&lt;br /&gt;
HTML::Tree::Scanning.3pm:tagging, such is as useful in \s-1CSS\s0 \*(-- note the&lt;br /&gt;
Module::Build::API.3pm:.IP &amp;quot;\fIhtml_css()\fR&amp;quot; 4&lt;br /&gt;
Module::Build::API.3pm:.IX Item &amp;quot;html_css()&amp;quot;&lt;br /&gt;
TAP::Parser::YAMLish::Reader.3pm:YAML::Tiny, \s-1YAML\s0, YAML::Syck, Config::Tiny, CSS::Tiny,&lt;br /&gt;
TAP::Parser::YAMLish::Writer.3pm:YAML::Tiny, \s-1YAML\s0, YAML::Syck, Config::Tiny, CSS::Tiny,&lt;br /&gt;
Template::Iterator.3pm:You can then style the \f(CW\*(C`tr.odd\*(C'\fR and \f(CW\*(C`tr.even\*(C'\fR elements using \s-1CSS:\s0&lt;br /&gt;
Template::Toolkit.3pm:kind of text documents: \s-1HTML\s0, \s-1XML\s0, \s-1CSS\s0, Javascript, Perl code, plain text,&lt;br /&gt;
Template::Tutorial::Web.3pm:kind of content they contain.  So you can use \s-1TT\s0 to generate \s-1HTML\s0, \s-1XML\s0, \s-1CSS\s0,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;CSS commit for Feb 23&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Changes to most of the css files to set all sizes to em (some were in px and broke flow). Changed the font-family to a more friendly chain for all platforms, and remove all other font-faimily calls from the code. Changed font sizes from % to ems and adjusted size for some of the main elements. Fix a issue with the middle column size caused by firehose.css. Many small fixes to spacing over many places.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moved all of the slashcode theme items into the slashcode.cssraw file. Some were in comments.cssraw due to some previous work I did.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On article body and comment body, made the font size a bit smaller. Also on comments body set the margins to be smaller.&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;-EP&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=WhosWho&amp;diff=5437</id>
		<title>WhosWho</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=WhosWho&amp;diff=5437"/>
		<updated>2014-03-03T23:08:18Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In the interest of getting questions to the right people on IRC and general organization, this is a summary of who is involved in SoylentNews. '''Please add yourself''' (or others) if you are actively working on the project. Also you can skip to the [[#Overlords|Overlord Contacts]].&lt;br /&gt;
&lt;br /&gt;
See also: [[http://wiki.soylentnews.org/wiki/index.php/Staff_list]Staff List]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The Man Behind The Curtain==&lt;br /&gt;
&lt;br /&gt;
* Barrabas&lt;br /&gt;
&lt;br /&gt;
==Administration==&lt;br /&gt;
&lt;br /&gt;
* mattie_p - Overlord/General Manager&lt;br /&gt;
* mrcoolbp&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
* NCommander&lt;br /&gt;
* robinld&lt;br /&gt;
* zford&lt;br /&gt;
* mechanicjay&lt;br /&gt;
&lt;br /&gt;
==Style==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;MrBluze - Overlord&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;shogun - HTML&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;moo_kuh - Testing&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;PrestonL - CSS / Bug Testing&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;mtrycz - User Interface&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CynicGalahad - Website Design&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;FrogBlast - Art&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
Correspondence: [mailto:style@soylentnews.org style@soylentnews.org]&lt;br /&gt;
&lt;br /&gt;
==Frontend: CSS\HTML issues that pertain to look and feel==&lt;br /&gt;
&lt;br /&gt;
* paulej72 - (working on mods to comments.css)&lt;br /&gt;
* AudioGuy - documentation of system and cleanup of css to get things into a ste that new templates and Themes can be made&lt;br /&gt;
* martyb&lt;br /&gt;
&lt;br /&gt;
==Content==&lt;br /&gt;
* Dopefish - Overlord&lt;br /&gt;
&lt;br /&gt;
Editors include:&lt;br /&gt;
&lt;br /&gt;
* LaminatorX&lt;br /&gt;
* mattie_p&lt;br /&gt;
* janrinok&lt;br /&gt;
* girlwhowaspluggedout&lt;br /&gt;
&lt;br /&gt;
Misc:&lt;br /&gt;
&lt;br /&gt;
* Cactus&lt;br /&gt;
* [[User:Mrcoolbp|mrcoolbp]] ([[User talk:Mrcoolbp|talk]]) 13:17, 26 February 2014 (MST) - only rewriting about.shtml, moderation.shtml, FAQ.shtml &amp;lt;- the FAQ is in to be done: what should this look like??&lt;br /&gt;
&lt;br /&gt;
==Forums==&lt;br /&gt;
* applesmasher - Overlord&lt;br /&gt;
* Dopefish&lt;br /&gt;
* LaminatorX&lt;br /&gt;
* mattie_p - I'm just an active user and in the Editor Group.  I'm nobody official on the forums, though.&lt;br /&gt;
&lt;br /&gt;
==Wiki==&lt;br /&gt;
* FunPika - Overlord&lt;br /&gt;
* Cactus&lt;br /&gt;
* sfm&lt;br /&gt;
* cosurgi&lt;br /&gt;
* [[User:Mrcoolbp|mrcoolbp]] ([[User talk:Mrcoolbp|talk]]) 13:16, 26 February 2014 (MST) - working on re-organization and clean up&lt;br /&gt;
&lt;br /&gt;
==IRC==&lt;br /&gt;
* Landon - Overlord&lt;br /&gt;
* Xlefay - Technical lead&lt;br /&gt;
* MrBluze&lt;br /&gt;
&lt;br /&gt;
==Bugs==&lt;br /&gt;
* paulej72 - currently scraping SoylentNews comments for bug reports and posting them to the bug tracker&lt;br /&gt;
* martyb - QA and testing&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Overlords==&lt;br /&gt;
&lt;br /&gt;
We're have overlords that manage various features. An overlord is responsible for granting access - it's '''intended''' to be a ''no work'' position, so that it can be held for long periods without requiring much time.&lt;br /&gt;
 &lt;br /&gt;
So for example, Applesmasher is the overlord of forums. He grants access to people and recovers access when people leave, but he doesn't ''have'' to do any work himself (although he can if he wants). He ensures that the people with access are reliable.&lt;br /&gt;
 	&lt;br /&gt;
If you need a forum for your group, ask the overlord of forums. If you want a set of wiki pages, ask the overlord of the wiki, and so on.	&lt;br /&gt;
	&lt;br /&gt;
The current overlords originally agreed to hold the position until Mar 1, that date has already passed. Going forward we can choose overlords via some formal process. (And the current overlords might ask to continue.)&lt;br /&gt;
 	&lt;br /&gt;
The current overlords can be contacted here:&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
art@SoylentNews.org&lt;br /&gt;
 	&lt;br /&gt;
editors@SoylentNews.org	&lt;br /&gt;
	&lt;br /&gt;
forums@SoylentNews.org	&lt;br /&gt;
 &lt;br /&gt;
wiki@SoylentNews.org	&lt;br /&gt;
 &lt;br /&gt;
chat@SoylentNews.org&lt;br /&gt;
 &lt;br /&gt;
style@soylentnews.org&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
There will be more to come. This is temporary to get us going - the community can change the structure later, but for now things seem to naturally separate into these areas of interest.&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=WhosWho&amp;diff=5436</id>
		<title>WhosWho</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=WhosWho&amp;diff=5436"/>
		<updated>2014-03-03T23:07:27Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In the interest of getting questions to the right people on IRC and general organization, this is a summary of who is involved in SoylentNews. '''Please add yourself''' (or others) if you are actively working on the project. Also you can skip to the [[#Overlords|Overlord Contacts]].&lt;br /&gt;
&lt;br /&gt;
See also: [[http://wiki.soylentnews.org/wiki/index.php/Staff_list]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The Man Behind The Curtain==&lt;br /&gt;
&lt;br /&gt;
* Barrabas&lt;br /&gt;
&lt;br /&gt;
==Administration==&lt;br /&gt;
&lt;br /&gt;
* mattie_p - Overlord/General Manager&lt;br /&gt;
* mrcoolbp&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
* NCommander&lt;br /&gt;
* robinld&lt;br /&gt;
* zford&lt;br /&gt;
* mechanicjay&lt;br /&gt;
&lt;br /&gt;
==Style==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;MrBluze - Overlord&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;shogun - HTML&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;moo_kuh - Testing&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;PrestonL - CSS / Bug Testing&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;mtrycz - User Interface&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CynicGalahad - Website Design&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;FrogBlast - Art&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
Correspondence: [mailto:style@soylentnews.org style@soylentnews.org]&lt;br /&gt;
&lt;br /&gt;
==Frontend: CSS\HTML issues that pertain to look and feel==&lt;br /&gt;
&lt;br /&gt;
* paulej72 - (working on mods to comments.css)&lt;br /&gt;
* AudioGuy - documentation of system and cleanup of css to get things into a ste that new templates and Themes can be made&lt;br /&gt;
* martyb&lt;br /&gt;
&lt;br /&gt;
==Content==&lt;br /&gt;
* Dopefish - Overlord&lt;br /&gt;
&lt;br /&gt;
Editors include:&lt;br /&gt;
&lt;br /&gt;
* LaminatorX&lt;br /&gt;
* mattie_p&lt;br /&gt;
* janrinok&lt;br /&gt;
* girlwhowaspluggedout&lt;br /&gt;
&lt;br /&gt;
Misc:&lt;br /&gt;
&lt;br /&gt;
* Cactus&lt;br /&gt;
* [[User:Mrcoolbp|mrcoolbp]] ([[User talk:Mrcoolbp|talk]]) 13:17, 26 February 2014 (MST) - only rewriting about.shtml, moderation.shtml, FAQ.shtml &amp;lt;- the FAQ is in to be done: what should this look like??&lt;br /&gt;
&lt;br /&gt;
==Forums==&lt;br /&gt;
* applesmasher - Overlord&lt;br /&gt;
* Dopefish&lt;br /&gt;
* LaminatorX&lt;br /&gt;
* mattie_p - I'm just an active user and in the Editor Group.  I'm nobody official on the forums, though.&lt;br /&gt;
&lt;br /&gt;
==Wiki==&lt;br /&gt;
* FunPika - Overlord&lt;br /&gt;
* Cactus&lt;br /&gt;
* sfm&lt;br /&gt;
* cosurgi&lt;br /&gt;
* [[User:Mrcoolbp|mrcoolbp]] ([[User talk:Mrcoolbp|talk]]) 13:16, 26 February 2014 (MST) - working on re-organization and clean up&lt;br /&gt;
&lt;br /&gt;
==IRC==&lt;br /&gt;
* Landon - Overlord&lt;br /&gt;
* Xlefay - Technical lead&lt;br /&gt;
* MrBluze&lt;br /&gt;
&lt;br /&gt;
==Bugs==&lt;br /&gt;
* paulej72 - currently scraping SoylentNews comments for bug reports and posting them to the bug tracker&lt;br /&gt;
* martyb - QA and testing&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Overlords==&lt;br /&gt;
&lt;br /&gt;
We're have overlords that manage various features. An overlord is responsible for granting access - it's '''intended''' to be a ''no work'' position, so that it can be held for long periods without requiring much time.&lt;br /&gt;
 &lt;br /&gt;
So for example, Applesmasher is the overlord of forums. He grants access to people and recovers access when people leave, but he doesn't ''have'' to do any work himself (although he can if he wants). He ensures that the people with access are reliable.&lt;br /&gt;
 	&lt;br /&gt;
If you need a forum for your group, ask the overlord of forums. If you want a set of wiki pages, ask the overlord of the wiki, and so on.	&lt;br /&gt;
	&lt;br /&gt;
The current overlords originally agreed to hold the position until Mar 1, that date has already passed. Going forward we can choose overlords via some formal process. (And the current overlords might ask to continue.)&lt;br /&gt;
 	&lt;br /&gt;
The current overlords can be contacted here:&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
art@SoylentNews.org&lt;br /&gt;
 	&lt;br /&gt;
editors@SoylentNews.org	&lt;br /&gt;
	&lt;br /&gt;
forums@SoylentNews.org	&lt;br /&gt;
 &lt;br /&gt;
wiki@SoylentNews.org	&lt;br /&gt;
 &lt;br /&gt;
chat@SoylentNews.org&lt;br /&gt;
 &lt;br /&gt;
style@soylentnews.org&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
There will be more to come. This is temporary to get us going - the community can change the structure later, but for now things seem to naturally separate into these areas of interest.&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=WhosWho&amp;diff=5435</id>
		<title>WhosWho</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=WhosWho&amp;diff=5435"/>
		<updated>2014-03-03T23:05:42Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In the interest of getting questions to the right people on IRC and general organization, this is a summary of who is involved in SoylentNews. '''Please add yourself''' (or others) if you are actively working on the project. Also you can skip to the [[#Overlords|Overlord Contacts]].&lt;br /&gt;
&lt;br /&gt;
See also: [[Staff_list]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The Man Behind The Curtain==&lt;br /&gt;
&lt;br /&gt;
* Barrabas&lt;br /&gt;
&lt;br /&gt;
==Administration==&lt;br /&gt;
&lt;br /&gt;
* mattie_p - Overlord/General Manager&lt;br /&gt;
* mrcoolbp&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
* NCommander&lt;br /&gt;
* robinld&lt;br /&gt;
* zford&lt;br /&gt;
* mechanicjay&lt;br /&gt;
&lt;br /&gt;
==Style==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;MrBluze - Overlord&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;shogun - HTML&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;moo_kuh - Testing&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;PrestonL - CSS / Bug Testing&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;mtrycz - User Interface&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CynicGalahad - Website Design&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;FrogBlast - Art&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
Correspondence: [mailto:style@soylentnews.org style@soylentnews.org]&lt;br /&gt;
&lt;br /&gt;
==Frontend: CSS\HTML issues that pertain to look and feel==&lt;br /&gt;
&lt;br /&gt;
* paulej72 - (working on mods to comments.css)&lt;br /&gt;
* AudioGuy - documentation of system and cleanup of css to get things into a ste that new templates and Themes can be made&lt;br /&gt;
* martyb&lt;br /&gt;
&lt;br /&gt;
==Content==&lt;br /&gt;
* Dopefish - Overlord&lt;br /&gt;
&lt;br /&gt;
Editors include:&lt;br /&gt;
&lt;br /&gt;
* LaminatorX&lt;br /&gt;
* mattie_p&lt;br /&gt;
* janrinok&lt;br /&gt;
* girlwhowaspluggedout&lt;br /&gt;
&lt;br /&gt;
Misc:&lt;br /&gt;
&lt;br /&gt;
* Cactus&lt;br /&gt;
* [[User:Mrcoolbp|mrcoolbp]] ([[User talk:Mrcoolbp|talk]]) 13:17, 26 February 2014 (MST) - only rewriting about.shtml, moderation.shtml, FAQ.shtml &amp;lt;- the FAQ is in to be done: what should this look like??&lt;br /&gt;
&lt;br /&gt;
==Forums==&lt;br /&gt;
* applesmasher - Overlord&lt;br /&gt;
* Dopefish&lt;br /&gt;
* LaminatorX&lt;br /&gt;
* mattie_p - I'm just an active user and in the Editor Group.  I'm nobody official on the forums, though.&lt;br /&gt;
&lt;br /&gt;
==Wiki==&lt;br /&gt;
* FunPika - Overlord&lt;br /&gt;
* Cactus&lt;br /&gt;
* sfm&lt;br /&gt;
* cosurgi&lt;br /&gt;
* [[User:Mrcoolbp|mrcoolbp]] ([[User talk:Mrcoolbp|talk]]) 13:16, 26 February 2014 (MST) - working on re-organization and clean up&lt;br /&gt;
&lt;br /&gt;
==IRC==&lt;br /&gt;
* Landon - Overlord&lt;br /&gt;
* Xlefay - Technical lead&lt;br /&gt;
* MrBluze&lt;br /&gt;
&lt;br /&gt;
==Bugs==&lt;br /&gt;
* paulej72 - currently scraping SoylentNews comments for bug reports and posting them to the bug tracker&lt;br /&gt;
* martyb - QA and testing&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Overlords==&lt;br /&gt;
&lt;br /&gt;
We're have overlords that manage various features. An overlord is responsible for granting access - it's '''intended''' to be a ''no work'' position, so that it can be held for long periods without requiring much time.&lt;br /&gt;
 &lt;br /&gt;
So for example, Applesmasher is the overlord of forums. He grants access to people and recovers access when people leave, but he doesn't ''have'' to do any work himself (although he can if he wants). He ensures that the people with access are reliable.&lt;br /&gt;
 	&lt;br /&gt;
If you need a forum for your group, ask the overlord of forums. If you want a set of wiki pages, ask the overlord of the wiki, and so on.	&lt;br /&gt;
	&lt;br /&gt;
The current overlords originally agreed to hold the position until Mar 1, that date has already passed. Going forward we can choose overlords via some formal process. (And the current overlords might ask to continue.)&lt;br /&gt;
 	&lt;br /&gt;
The current overlords can be contacted here:&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
art@SoylentNews.org&lt;br /&gt;
 	&lt;br /&gt;
editors@SoylentNews.org	&lt;br /&gt;
	&lt;br /&gt;
forums@SoylentNews.org	&lt;br /&gt;
 &lt;br /&gt;
wiki@SoylentNews.org	&lt;br /&gt;
 &lt;br /&gt;
chat@SoylentNews.org&lt;br /&gt;
 &lt;br /&gt;
style@soylentnews.org&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
There will be more to come. This is temporary to get us going - the community can change the structure later, but for now things seem to naturally separate into these areas of interest.&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=MySql&amp;diff=5428</id>
		<title>MySql</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=MySql&amp;diff=5428"/>
		<updated>2014-03-03T19:35:08Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[CssWork]] - parent&lt;br /&gt;
* [[SqlSchema]] - tables used in the database &lt;br /&gt;
* [[SqlDefaults]] - defaults for those tables&lt;br /&gt;
&lt;br /&gt;
* http://dev.mysql.com/doc/refman/5.5/en/index.html&lt;br /&gt;
* http://dev.mysql.com/doc/refman/5.5/en/tutorial.html&lt;br /&gt;
&lt;br /&gt;
as root: mysqldump altslashdot css &amp;gt; zz.txt&lt;br /&gt;
&lt;br /&gt;
mysqldump -T '/var/lib/mysql/test'  altslashdot css&lt;br /&gt;
&lt;br /&gt;
Information about mysql as used for slash&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Database Name: altslashdot&lt;br /&gt;
Database user: mysql&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Version&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql-5.5.36&lt;br /&gt;
db4-devel-4.7.25                     mysql-libs-5.5.36&lt;br /&gt;
db4-utils-4.7.25                     mysql-server-5.5.36&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;mysqldump&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
mysqldump http://dev.mysql.com/doc/refman/5.5/en/mysqldump.html&lt;br /&gt;
&lt;br /&gt;
A client that dumps a MySQL database into a file as SQL, text, or XML.&lt;br /&gt;
&lt;br /&gt;
The mysqldump client is a utility that performs logical backups, producing a set of SQL statements that can be run to reproduce the original schema objects, table data, or both. It dumps one or more MySQL database for backup or transfer to another SQL server. The mysqldump command can also generate output in CSV, other delimited text, or XML format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Syntax &lt;br /&gt;
&lt;br /&gt;
There are in general three ways to use mysqldump—in order to dump a set of one or more tables, a set of one or more complete databases, or an entire MySQL server—as shown here: &lt;br /&gt;
shell&amp;gt; mysqldump [options] db_name [tbl_name ...]&lt;br /&gt;
shell&amp;gt; mysqldump [options] --databases db_name ...&lt;br /&gt;
shell&amp;gt; mysqldump [options] --all-databases&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To dump entire databases, do not name any tables following db_name, or use the --databases or --all-databases option. &lt;br /&gt;
&lt;br /&gt;
mysqldump does not dump the INFORMATION_SCHEMA database by default. mysqldump dumps INFORMATION_SCHEMA only if you name it explicitly on the command line, although currently you must also use the --skip-lock-tables option. Before MySQL 5.5 mysqldump silently ignores INFORMATION_SCHEMA even if you name it explicitly on the command line. &lt;br /&gt;
&lt;br /&gt;
mysqldump does not dump the performance_schema database. &lt;br /&gt;
&lt;br /&gt;
Before MySQL 5.5.25, mysqldump does not dump the general_log or slow_query_log tables for dumps of the mysql database. As of 5.5.25, the dump includes statements to recreate those tables so that they are not missing after reloading the dump file. Log table contents are not dumped. &lt;br /&gt;
&lt;br /&gt;
mysqldump also does not dump the MySQL Cluster ndbinfo information database. &lt;br /&gt;
&lt;br /&gt;
To see a list of the options your version of mysqldump supports, execute mysqldump --help.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;table dump for size deletemelater&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[root@slashcode test]# ls -l | cut -b 28-  | grep -v '\.sql' | sort -g&lt;br /&gt;
&lt;br /&gt;
     0 Mar  2 20:56 accesslog_artcom.txt&lt;br /&gt;
     0 Mar  2 20:56 accesslog_temp_subscriber.txt&lt;br /&gt;
     0 Mar  2 20:56 al2_log_comments.txt&lt;br /&gt;
     0 Mar  2 20:56 al2_log.txt&lt;br /&gt;
     0 Mar  2 20:56 auto_poll.txt&lt;br /&gt;
     0 Mar  2 20:56 backup_blocks.txt&lt;br /&gt;
     0 Mar  2 20:56 blobs.txt&lt;br /&gt;
     0 Mar  2 20:56 bookmark_feeds.txt&lt;br /&gt;
     0 Mar  2 20:56 bookmarks.txt&lt;br /&gt;
     0 Mar  2 20:56 classes.txt&lt;br /&gt;
     0 Mar  2 20:56 comment_log.txt&lt;br /&gt;
     0 Mar  2 20:56 comment_promote_log.txt&lt;br /&gt;
     0 Mar  2 20:56 comment_vote.txt&lt;br /&gt;
     0 Mar  2 20:56 dbs_readerstatus_queries.txt&lt;br /&gt;
     0 Mar  2 20:56 dbs_readerstatus.txt&lt;br /&gt;
     0 Mar  2 20:56 dbs.txt&lt;br /&gt;
     0 Mar  2 20:56 discussion_rating.txt&lt;br /&gt;
     0 Mar  2 20:56 email_optout.txt&lt;br /&gt;
     0 Mar  2 20:56 file_queue.txt&lt;br /&gt;
     0 Mar  2 20:56 firehose_history.txt&lt;br /&gt;
     0 Mar  2 20:56 firehose_section_settings.txt&lt;br /&gt;
     0 Mar  2 20:56 firehose_section.txt&lt;br /&gt;
     0 Mar  2 20:56 firehose_setting_log.txt&lt;br /&gt;
     0 Mar  2 20:56 firehose_skin_volume.txt&lt;br /&gt;
     0 Mar  2 20:56 firehose_view_settings.txt&lt;br /&gt;
     0 Mar  2 20:56 globj_adminnotes.txt&lt;br /&gt;
     0 Mar  2 20:56 globjs_viewed_archived.txt&lt;br /&gt;
     0 Mar  2 20:56 globjs_viewed.txt&lt;br /&gt;
     0 Mar  2 20:56 globj_urls.txt&lt;br /&gt;
     0 Mar  2 20:56 humanconf_pool.txt&lt;br /&gt;
     0 Mar  2 20:56 humanconf.txt&lt;br /&gt;
     0 Mar  2 20:56 journal_transfer.txt&lt;br /&gt;
     0 Mar  2 20:56 message_drop.txt&lt;br /&gt;
     0 Mar  2 20:56 metamodlog.txt&lt;br /&gt;
     0 Mar  2 20:56 misc_user_opts.txt&lt;br /&gt;
     0 Mar  2 20:56 newsvac_keywords.txt&lt;br /&gt;
     0 Mar  2 20:56 nugget_sub.txt&lt;br /&gt;
     0 Mar  2 20:56 pagemark.txt&lt;br /&gt;
     0 Mar  2 20:56 preview.txt&lt;br /&gt;
     0 Mar  2 20:56 projects.txt&lt;br /&gt;
     0 Mar  2 20:56 querylog.txt&lt;br /&gt;
     0 Mar  2 20:56 related_stories.txt&lt;br /&gt;
     0 Mar  2 20:56 rel.txt&lt;br /&gt;
     0 Mar  2 20:56 remarks.txt&lt;br /&gt;
     0 Mar  2 20:56 reskey_failures.txt&lt;br /&gt;
     0 Mar  2 20:56 reskey_sessions.txt&lt;br /&gt;
     0 Mar  2 20:56 robosubmitlock.txt&lt;br /&gt;
     0 Mar  2 20:56 rss_raw.txt&lt;br /&gt;
     0 Mar  2 20:56 sphinx_counter_archived.txt&lt;br /&gt;
     0 Mar  2 20:56 sphinx_counter.txt&lt;br /&gt;
     0 Mar  2 20:56 sphinx_search.txt&lt;br /&gt;
     0 Mar  2 20:56 spiderlock.txt&lt;br /&gt;
     0 Mar  2 20:56 spider_timespec.txt&lt;br /&gt;
     0 Mar  2 20:56 static_files.txt&lt;br /&gt;
     0 Mar  2 20:56 stats_graphs_index.txt&lt;br /&gt;
     0 Mar  2 20:56 story_dirty.txt&lt;br /&gt;
     0 Mar  2 20:56 story_files.txt&lt;br /&gt;
     0 Mar  2 20:56 story_render_dirty.txt&lt;br /&gt;
     0 Mar  2 20:56 submissions_notes.txt&lt;br /&gt;
     0 Mar  2 20:56 subscribe_payments.txt&lt;br /&gt;
     0 Mar  2 20:56 tagboxes.txt&lt;br /&gt;
     0 Mar  2 20:56 tagboxlog_feeder.txt&lt;br /&gt;
     0 Mar  2 20:56 tagcommand_adminlog_sfnet.txt&lt;br /&gt;
     0 Mar  2 20:56 tagcommand_adminlog.txt&lt;br /&gt;
     0 Mar  2 20:56 tagname_cache.txt&lt;br /&gt;
     0 Mar  2 20:56 tagname_params.txt&lt;br /&gt;
     0 Mar  2 20:56 tagnames_similarity_rendered.txt&lt;br /&gt;
     0 Mar  2 20:56 tagnames_synonyms_chosen.txt&lt;br /&gt;
     0 Mar  2 20:56 tag_params.txt&lt;br /&gt;
     0 Mar  2 20:56 tags_dayofweek.txt&lt;br /&gt;
     0 Mar  2 20:56 tags_deactivated.txt&lt;br /&gt;
     0 Mar  2 20:56 tags_hourofday.txt&lt;br /&gt;
     0 Mar  2 20:56 tags_peerweight.txt&lt;br /&gt;
     0 Mar  2 20:56 tags_searched.txt&lt;br /&gt;
     0 Mar  2 20:56 tags.txt&lt;br /&gt;
     0 Mar  2 20:56 tags_userchange.txt&lt;br /&gt;
     0 Mar  2 20:56 topic_nexus_dirty.txt&lt;br /&gt;
     0 Mar  2 20:56 topic_nexus_extras.txt&lt;br /&gt;
     0 Mar  2 20:56 topic_param.txt&lt;br /&gt;
     0 Mar  2 20:56 url_content.txt&lt;br /&gt;
     0 Mar  2 20:56 url_message_body.txt&lt;br /&gt;
     0 Mar  2 20:56 url_plaintext.txt&lt;br /&gt;
     0 Mar  2 20:56 urls.txt&lt;br /&gt;
     0 Mar  2 20:56 users_acl.txt&lt;br /&gt;
     0 Mar  2 20:56 users_clout.txt&lt;br /&gt;
     0 Mar  2 20:56 users_comments_read_log.txt&lt;br /&gt;
     0 Mar  2 20:56 users_openid_reskeys.txt&lt;br /&gt;
     0 Mar  2 20:56 users_openid.txt&lt;br /&gt;
     0 Mar  2 20:56 wow_char_armorylog.txt&lt;br /&gt;
     0 Mar  2 20:56 wow_char_data.txt&lt;br /&gt;
     0 Mar  2 20:56 wow_chars.txt&lt;br /&gt;
     0 Mar  2 20:56 wow_guilds.txt&lt;br /&gt;
     0 Mar  2 20:56 xsite_auth_log.txt&lt;br /&gt;
    12 Mar  2 20:56 tagnames.txt&lt;br /&gt;
    14 Mar  2 20:56 topic_nexus.txt&lt;br /&gt;
    20 Mar  2 20:56 shill_ids.txt&lt;br /&gt;
    22 Mar  2 20:56 accesslog_build_unique_uid.txt&lt;br /&gt;
    36 Mar  2 20:56 message_deliverymodes.txt&lt;br /&gt;
    41 Mar  2 20:56 al2.txt&lt;br /&gt;
    42 Mar  2 20:56 journal_themes.txt&lt;br /&gt;
    49 Mar  2 20:56 topic_parents.txt&lt;br /&gt;
    66 Mar  2 20:56 commentmodes.txt&lt;br /&gt;
    69 Mar  2 20:56 dynamic_blocks.txt&lt;br /&gt;
    69 Mar  2 20:56 wow_char_types.txt&lt;br /&gt;
    73 Mar  2 20:56 accesslog_temp_host_addr.txt&lt;br /&gt;
    74 Mar  2 20:56 globj_types.txt&lt;br /&gt;
    75 Mar  2 20:56 css_type.txt&lt;br /&gt;
    81 Mar  2 20:56 open_proxies.txt&lt;br /&gt;
    83 Mar  2 20:56 people.txt&lt;br /&gt;
    86 Mar  2 20:56 discussion_kinds.txt&lt;br /&gt;
    94 Mar  2 20:56 clout_types.txt&lt;br /&gt;
   103 Mar  2 20:56 sphinx_index.txt&lt;br /&gt;
   111 Mar  2 20:56 sessions.txt&lt;br /&gt;
   114 Mar  2 20:56 dst.txt&lt;br /&gt;
   116 Mar  2 20:56 pollvoters.txt&lt;br /&gt;
   121 Mar  2 20:56 hooks.txt&lt;br /&gt;
   136 Mar  2 20:56 authors_cache.txt&lt;br /&gt;
   138 Mar  2 20:56 globjs.txt&lt;br /&gt;
   144 Mar  2 20:56 story_topics_rendered.txt&lt;br /&gt;
   163 Mar  2 20:56 humanconf_questions.txt&lt;br /&gt;
   176 Mar  2 20:56 tags_udc.txt&lt;br /&gt;
   187 Mar  2 20:56 story_topics_chosen.txt&lt;br /&gt;
   198 Mar  2 20:56 url_info.txt&lt;br /&gt;
   230 Mar  2 20:56 spamarmors.txt&lt;br /&gt;
   272 Mar  2 20:56 al2_types.txt&lt;br /&gt;
   280 Mar  2 20:56 modreasons.txt&lt;br /&gt;
   311 Mar  2 20:56 bpn_sources.txt&lt;br /&gt;
   333 Mar  2 20:56 skins.txt&lt;br /&gt;
   344 Mar  2 20:56 moderatorlog.txt&lt;br /&gt;
   353 Mar  2 20:56 submission_param.txt&lt;br /&gt;
   371 Mar  2 20:56 pollquestions.txt&lt;br /&gt;
   422 Mar  2 20:56 topics.txt&lt;br /&gt;
   435 Mar  2 20:56 soap_methods.txt&lt;br /&gt;
   468 Mar  2 20:56 reskey_resources.txt&lt;br /&gt;
   488 Mar  2 20:56 journals.txt&lt;br /&gt;
   489 Mar  2 20:56 preview_param.txt&lt;br /&gt;
   495 Mar  2 20:56 accesslog_build_uidip.txt&lt;br /&gt;
   540 Mar  2 20:56 skin_colors.txt&lt;br /&gt;
   607 Mar  2 20:56 pollanswers.txt&lt;br /&gt;
   616 Mar  2 20:56 badpasswords.txt&lt;br /&gt;
   638 Mar  2 20:56 story_param.txt&lt;br /&gt;
   658 Mar  2 20:56 message_codes.txt&lt;br /&gt;
   706 Mar  2 20:56 related_links.txt&lt;br /&gt;
   743 Mar  2 20:56 dateformats.txt&lt;br /&gt;
   859 Mar  2 20:56 reskeys.txt&lt;br /&gt;
   890 Mar  2 20:56 achievements.txt&lt;br /&gt;
   972 Mar  2 20:56 signoff.txt&lt;br /&gt;
  1018 Mar  2 20:56 users_prefs.txt&lt;br /&gt;
  1122 Mar  2 20:56 css.txt&lt;br /&gt;
  1294 Mar  2 20:56 ajax_ops.txt&lt;br /&gt;
  1303 Mar  2 20:56 tzcodes.txt&lt;br /&gt;
  1312 Mar  2 20:56 users_index.txt&lt;br /&gt;
  1316 Mar  2 20:56 users_hits.txt&lt;br /&gt;
  1529 Mar  2 20:56 message_web.txt&lt;br /&gt;
  1543 Mar  2 20:56 user_achievement_streaks.txt&lt;br /&gt;
  1778 Mar  2 20:56 code_param.txt&lt;br /&gt;
  2047 Mar  2 20:56 content_filters.txt&lt;br /&gt;
  2132 Mar  2 20:56 reskey_hourlysalt.txt&lt;br /&gt;
  2163 Mar  2 20:56 stories.txt&lt;br /&gt;
  2430 Mar  2 20:56 users_comments.txt&lt;br /&gt;
  2951 Mar  2 20:56 site_info.txt&lt;br /&gt;
  3180 Mar  2 20:56 users_messages.txt&lt;br /&gt;
  3385 Mar  2 20:56 slashd_status.txt&lt;br /&gt;
  3595 Mar  2 20:56 menus.txt&lt;br /&gt;
  3784 Mar  2 20:56 discussions.txt&lt;br /&gt;
  4048 Mar  2 20:56 abusers.txt&lt;br /&gt;
  4087 Mar  2 20:56 user_achievements.txt&lt;br /&gt;
  4507 Mar  2 20:56 uncommonstorywords.txt&lt;br /&gt;
  5099 Mar  2 20:56 accesslog_temp_rss.txt&lt;br /&gt;
  5330 Mar  2 20:56 users.txt&lt;br /&gt;
  6469 Mar  2 20:56 reskey_vars.txt&lt;br /&gt;
  6619 Mar  2 20:56 blocks.txt&lt;br /&gt;
  7016 Mar  2 20:56 reskey_resource_checks.txt&lt;br /&gt;
  7373 Mar  2 20:56 journals_text.txt&lt;br /&gt;
  7613 Mar  2 20:56 users_logtokens.txt&lt;br /&gt;
  9144 Mar  2 20:56 formkeys.txt&lt;br /&gt;
 10087 Mar  2 20:56 users_param.txt&lt;br /&gt;
 10099 Mar  2 20:56 message_web_text.txt&lt;br /&gt;
 10570 Mar  2 20:56 string_param.txt&lt;br /&gt;
 10691 Mar  2 20:56 users_info.txt&lt;br /&gt;
 10809 Mar  2 20:56 wow_realms.txt&lt;br /&gt;
 11398 Mar  2 20:56 comments.txt&lt;br /&gt;
 13957 Mar  2 20:56 message_log.txt&lt;br /&gt;
 14980 Mar  2 20:56 comment_text.txt&lt;br /&gt;
018561 Mar  2 20:56 accesslog_admin.txt&lt;br /&gt;
 24852 Mar  2 20:56 accesslog_temp_other.txt&lt;br /&gt;
 50104 Mar  2 20:56 vars.txt&lt;br /&gt;
 57261 Mar  2 20:56 submissions.txt&lt;br /&gt;
 68640 Mar  2 20:56 dynamic_user_blocks.txt&lt;br /&gt;
 84260 Mar  2 20:56 story_text.txt&lt;br /&gt;
256371 Mar  2 20:56 slashd_errnotes.txt&lt;br /&gt;
283635 Mar  2 20:56 accesslog_temp_errors.txt&lt;br /&gt;
431983 Mar  2 20:56 accesslog_temp.txt&lt;br /&gt;
579455 Mar  2 20:56 accesslog.txt&lt;br /&gt;
869491 Mar  2 20:56 stats_daily.txt&lt;br /&gt;
917375 Mar  2 20:56 templates.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Mysql programs&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All these try PROGNAME --help for details&lt;br /&gt;
&lt;br /&gt;
also  http://dev.mysql.com/doc/refman/5.5/en/programs-overview.html&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
The MySQL server, mysqld, is the main program that does most of the work in a MySQL installation. The server is accompanied by several related scripts that assist you in starting and stopping the server: &lt;br /&gt;
&lt;br /&gt;
mysqld &lt;br /&gt;
&lt;br /&gt;
The SQL daemon (that is, the MySQL server). To use client programs, mysqld must be running, because clients gain access to databases by connecting to the server. See Section 4.3.1, “mysqld — The MySQL Server”. &lt;br /&gt;
&lt;br /&gt;
mysqld_safe &lt;br /&gt;
&lt;br /&gt;
A server startup script. mysqld_safe attempts to start mysqld. See Section 4.3.2, “mysqld_safe — MySQL Server Startup Script”. &lt;br /&gt;
&lt;br /&gt;
mysql.server &lt;br /&gt;
&lt;br /&gt;
A server startup script. This script is used on systems that use System V-style run directories containing scripts that start system services for particular run levels. It invokes mysqld_safe to start the MySQL server. See Section 4.3.3, “mysql.server — MySQL Server Startup Script”. &lt;br /&gt;
&lt;br /&gt;
mysqld_multi &lt;br /&gt;
&lt;br /&gt;
A server startup script that can start or stop multiple servers installed on the system. See Section 4.3.4, “mysqld_multi — Manage Multiple MySQL Servers”. &lt;br /&gt;
&lt;br /&gt;
Several programs perform setup operations during MySQL installation or upgrading: &lt;br /&gt;
&lt;br /&gt;
comp_err &lt;br /&gt;
&lt;br /&gt;
This program is used during the MySQL build/installation process. It compiles error message files from the error source files. See Section 4.4.1, “comp_err — Compile MySQL Error Message File”. &lt;br /&gt;
&lt;br /&gt;
mysql_install_db &lt;br /&gt;
&lt;br /&gt;
This script creates the MySQL database and initializes the grant tables with default privileges. It is usually executed only once, when first installing MySQL on a system. See Section 4.4.3, “mysql_install_db — Initialize MySQL Data Directory”, Section 2.10.1, “Postinstallation Procedures for Unix-like Systems”, and Section 4.4.3, “mysql_install_db — Initialize MySQL Data Directory”. &lt;br /&gt;
&lt;br /&gt;
mysql_plugin &lt;br /&gt;
&lt;br /&gt;
This program configures MySQL server plugins. See Section 4.4.4, “mysql_plugin — Configure MySQL Server Plugins”. &lt;br /&gt;
&lt;br /&gt;
mysql_secure_installation &lt;br /&gt;
&lt;br /&gt;
This program enables you to improve the security of your MySQL installation. SQL. See Section 4.4.5, “mysql_secure_installation — Improve MySQL Installation Security”. &lt;br /&gt;
&lt;br /&gt;
mysql_tzinfo_to_sql &lt;br /&gt;
&lt;br /&gt;
This program loads the time zone tables in the mysql database using the contents of the host system zoneinfo database (the set of files describing time zones). SQL. See Section 4.4.6, “mysql_tzinfo_to_sql — Load the Time Zone Tables”. &lt;br /&gt;
&lt;br /&gt;
mysql_upgrade &lt;br /&gt;
&lt;br /&gt;
This program is used after a MySQL upgrade operation. It checks tables for incompatibilities and repairs them if necessary, and updates the grant tables with any changes that have been made in newer versions of MySQL. See Section 4.4.7, “mysql_upgrade — Check and Upgrade MySQL Tables”. &lt;br /&gt;
&lt;br /&gt;
MySQL client programs that connect to the MySQL server: &lt;br /&gt;
&lt;br /&gt;
mysql &lt;br /&gt;
&lt;br /&gt;
The command-line tool for interactively entering SQL statements or executing them from a file in batch mode. See Section 4.5.1, “mysql — The MySQL Command-Line Tool”. &lt;br /&gt;
&lt;br /&gt;
mysqladmin &lt;br /&gt;
&lt;br /&gt;
A client that performs administrative operations, such as creating or dropping databases, reloading the grant tables, flushing tables to disk, and reopening log files. mysqladmin can also be used to retrieve version, process, and status information from the server. See Section 4.5.2, “mysqladmin — Client for Administering a MySQL Server”. &lt;br /&gt;
&lt;br /&gt;
mysqlcheck &lt;br /&gt;
&lt;br /&gt;
A table-maintenance client that checks, repairs, analyzes, and optimizes tables. See Section 4.5.3, “mysqlcheck — A Table Maintenance Program”. &lt;br /&gt;
&lt;br /&gt;
mysqldump &lt;br /&gt;
&lt;br /&gt;
A client that dumps a MySQL database into a file as SQL, text, or XML. See Section 4.5.4, “mysqldump — A Database Backup Program”. &lt;br /&gt;
&lt;br /&gt;
mysqlimport &lt;br /&gt;
&lt;br /&gt;
A client that imports text files into their respective tables using LOAD DATA INFILE. See Section 4.5.5, “mysqlimport — A Data Import Program”. &lt;br /&gt;
&lt;br /&gt;
mysqlshow &lt;br /&gt;
&lt;br /&gt;
A client that displays information about databases, tables, columns, and indexes. See Section 4.5.6, “mysqlshow — Display Database, Table, and Column Information”. &lt;br /&gt;
&lt;br /&gt;
mysqlslap &lt;br /&gt;
&lt;br /&gt;
A client that is designed to emulate client load for a MySQL server and report the timing of each stage. It works as if multiple clients are accessing the server. See Section 4.5.7, “mysqlslap — Load Emulation Client”. &lt;br /&gt;
&lt;br /&gt;
MySQL administrative and utility programs: &lt;br /&gt;
&lt;br /&gt;
innochecksum &lt;br /&gt;
&lt;br /&gt;
An offline InnoDB offline file checksum utility. See Section 4.6.1, “innochecksum — Offline InnoDB File Checksum Utility”. &lt;br /&gt;
&lt;br /&gt;
myisam_ftdump &lt;br /&gt;
&lt;br /&gt;
A utility that displays information about full-text indexes in MyISAM tables. See Section 4.6.2, “myisam_ftdump — Display Full-Text Index information”. &lt;br /&gt;
&lt;br /&gt;
myisamchk &lt;br /&gt;
&lt;br /&gt;
A utility to describe, check, optimize, and repair MyISAM tables. See Section 4.6.3, “myisamchk — MyISAM Table-Maintenance Utility”. &lt;br /&gt;
&lt;br /&gt;
myisamlog &lt;br /&gt;
&lt;br /&gt;
A utility that processes the contents of a MyISAM log file. See Section 4.6.4, “myisamlog — Display MyISAM Log File Contents”. &lt;br /&gt;
&lt;br /&gt;
myisampack &lt;br /&gt;
&lt;br /&gt;
A utility that compresses MyISAM tables to produce smaller read-only tables. See Section 4.6.5, “myisampack — Generate Compressed, Read-Only MyISAM Tables”. &lt;br /&gt;
&lt;br /&gt;
mysqlaccess &lt;br /&gt;
&lt;br /&gt;
A script that checks the access privileges for a host name, user name, and database combination. See Section 4.6.6, “mysqlaccess — Client for Checking Access Privileges”. &lt;br /&gt;
&lt;br /&gt;
mysqlbinlog &lt;br /&gt;
&lt;br /&gt;
A utility for reading statements from a binary log. The log of executed statements contained in the binary log files can be used to help recover from a crash. See Section 4.6.7, “mysqlbinlog — Utility for Processing Binary Log Files”. &lt;br /&gt;
&lt;br /&gt;
mysqldumpslow &lt;br /&gt;
&lt;br /&gt;
A utility to read and summarize the contents of a slow query log. See Section 4.6.8, “mysqldumpslow — Summarize Slow Query Log Files”. &lt;br /&gt;
&lt;br /&gt;
mysqlhotcopy &lt;br /&gt;
&lt;br /&gt;
A utility that quickly makes backups of MyISAM tables while the server is running. See Section 4.6.9, “mysqlhotcopy — A Database Backup Program”. &lt;br /&gt;
&lt;br /&gt;
mysql_convert_table_format &lt;br /&gt;
&lt;br /&gt;
A utility that converts tables in a database to use a given storage engine. See Section 4.6.10, “mysql_convert_table_format — Convert Tables to Use a Given Storage Engine”. &lt;br /&gt;
&lt;br /&gt;
mysql_find_rows &lt;br /&gt;
&lt;br /&gt;
A utility that reads files containing SQL statements (such as update logs) and extracts statements that match a given regular expression. See Section 4.6.11, “mysql_find_rows — Extract SQL Statements from Files”. &lt;br /&gt;
&lt;br /&gt;
mysql_fix_extensions &lt;br /&gt;
&lt;br /&gt;
A utility that converts the extensions for MyISAM table files to lowercase. This can be useful after transferring the files from a system with case-insensitive file names to a system with case-sensitive file names. See Section 4.6.12, “mysql_fix_extensions — Normalize Table File Name Extensions”. &lt;br /&gt;
&lt;br /&gt;
mysql_setpermission &lt;br /&gt;
&lt;br /&gt;
A utility for interactively setting permissions in the MySQL grant tables. See Section 4.6.13, “mysql_setpermission — Interactively Set Permissions in Grant Tables”. &lt;br /&gt;
&lt;br /&gt;
mysql_waitpid &lt;br /&gt;
&lt;br /&gt;
A utility that kills the process with a given process ID. See Section 4.6.14, “mysql_waitpid — Kill Process and Wait for Its Termination”. &lt;br /&gt;
&lt;br /&gt;
mysql_zap &lt;br /&gt;
&lt;br /&gt;
A utility that kills processes that match a pattern. See Section 4.6.15, “mysql_zap — Kill Processes That Match a Pattern”. &lt;br /&gt;
&lt;br /&gt;
MySQL program-development utilities: &lt;br /&gt;
&lt;br /&gt;
msql2mysql &lt;br /&gt;
&lt;br /&gt;
A shell script that converts mSQL programs to MySQL. It doesn't handle every case, but it gives a good start when converting. See Section 4.7.1, “msql2mysql — Convert mSQL Programs for Use with MySQL”. &lt;br /&gt;
&lt;br /&gt;
mysql_config &lt;br /&gt;
&lt;br /&gt;
A shell script that produces the option values needed when compiling MySQL programs. See Section 4.7.2, “mysql_config — Display Options for Compiling Clients”. &lt;br /&gt;
&lt;br /&gt;
my_print_defaults &lt;br /&gt;
&lt;br /&gt;
A utility that shows which options are present in option groups of option files. See Section 4.7.3, “my_print_defaults — Display Options from Option Files”. &lt;br /&gt;
&lt;br /&gt;
resolve_stack_dump &lt;br /&gt;
&lt;br /&gt;
A utility program that resolves a numeric stack trace dump to symbols. See Section 4.7.4, “resolve_stack_dump — Resolve Numeric Stack Trace Dump to Symbols”. &lt;br /&gt;
&lt;br /&gt;
Miscellaneous utilities: &lt;br /&gt;
&lt;br /&gt;
perror &lt;br /&gt;
&lt;br /&gt;
A utility that displays the meaning of system or MySQL error codes. See Section 4.8.1, “perror — Explain Error Codes”. &lt;br /&gt;
&lt;br /&gt;
replace &lt;br /&gt;
&lt;br /&gt;
A utility program that performs string replacement in the input text. See Section 4.8.2, “replace — A String-Replacement Utility”. &lt;br /&gt;
&lt;br /&gt;
resolveip &lt;br /&gt;
&lt;br /&gt;
A utility program that resolves a host name to an IP address or vice versa. See Section 4.8.3, “resolveip — Resolve Host name to IP Address or Vice Versa”. &lt;br /&gt;
&lt;br /&gt;
Oracle Corporation also provides the MySQL Workbench GUI tool, which is used to administer MySQL servers and databases, to create, execute, and evaluate queries, and to migrate schemas and data from other relational database management systems for use with MySQL. Additional GUI tools include MySQL Notifier for Microsoft Windows MySQL for Excel. &lt;br /&gt;
&lt;br /&gt;
MySQL client programs that communicate with the server using the MySQL client/server library use the following environment variables. &lt;br /&gt;
Environment Variable	Meaning&lt;br /&gt;
MYSQL_UNIX_PORT	The default Unix socket file; used for connections to localhost&lt;br /&gt;
MYSQL_TCP_PORT	The default port number; used for TCP/IP connections&lt;br /&gt;
MYSQL_PWD	The default password&lt;br /&gt;
MYSQL_DEBUG	Debug trace options when debugging&lt;br /&gt;
TMPDIR	The directory where temporary tables and files are created&lt;br /&gt;
&lt;br /&gt;
For a full list of environment variables used by MySQL programs, see Section 2.12, “Environment Variables”.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Mysql configuration file in /etc/my.cnf&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[mysqld]&lt;br /&gt;
datadir=/var/lib/mysql&lt;br /&gt;
socket=/var/lib/mysql/mysql.sock&lt;br /&gt;
&lt;br /&gt;
# Disabling symbolic-links is recommended to prevent assorted security risks&lt;br /&gt;
symbolic-links=0&lt;br /&gt;
&lt;br /&gt;
# Settings user and group are ignored when systemd is used (fedora &amp;gt;= 15).&lt;br /&gt;
# If you need to run mysqld under a different user or group,&lt;br /&gt;
# customize your systemd unit file for mysqld according to the&lt;br /&gt;
# instructions in http://fedoraproject.org/wiki/Systemd&lt;br /&gt;
user=mysql&lt;br /&gt;
&lt;br /&gt;
# Semisynchronous Replication&lt;br /&gt;
# http://dev.mysql.com/doc/refman/5.5/en/replication-semisync.html&lt;br /&gt;
# uncomment next line on MASTER&lt;br /&gt;
;plugin-load=rpl_semi_sync_master=semisync_master.so&lt;br /&gt;
# uncomment next line on SLAVE&lt;br /&gt;
;plugin-load=rpl_semi_sync_slave=semisync_slave.so&lt;br /&gt;
&lt;br /&gt;
# Others options for Semisynchronous Replication&lt;br /&gt;
;rpl_semi_sync_master_enabled=1&lt;br /&gt;
;rpl_semi_sync_master_timeout=10&lt;br /&gt;
;rpl_semi_sync_slave_enabled=1&lt;br /&gt;
&lt;br /&gt;
# http://dev.mysql.com/doc/refman/5.5/en/performance-schema.html&lt;br /&gt;
;performance_schema&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[mysqld_safe]&lt;br /&gt;
log-error=/var/log/mysqld.log&lt;br /&gt;
pid-file=/var/run/mysqld/mysqld.pid&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;mysql --help&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql  Ver 14.14 Distrib 5.5.36, for Linux (x86_64) using readline 5.1&lt;br /&gt;
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.&lt;br /&gt;
&lt;br /&gt;
Oracle is a registered trademark of Oracle Corporation and/or its&lt;br /&gt;
affiliates. Other names may be trademarks of their respective&lt;br /&gt;
owners.&lt;br /&gt;
&lt;br /&gt;
Usage: mysql [OPTIONS] [database]&lt;br /&gt;
  -?, --help          Display this help and exit.&lt;br /&gt;
  -I, --help          Synonym for -?&lt;br /&gt;
  --auto-rehash       Enable automatic rehashing. One doesn't need to use&lt;br /&gt;
                      'rehash' to get table and field completion, but startup&lt;br /&gt;
                      and reconnecting may take a longer time. Disable with&lt;br /&gt;
                      --disable-auto-rehash.&lt;br /&gt;
                      (Defaults to on; use --skip-auto-rehash to disable.)&lt;br /&gt;
  -A, --no-auto-rehash &lt;br /&gt;
                      No automatic rehashing. One has to use 'rehash' to get&lt;br /&gt;
                      table and field completion. This gives a quicker start of&lt;br /&gt;
                      mysql and disables rehashing on reconnect.&lt;br /&gt;
  --auto-vertical-output &lt;br /&gt;
                      Automatically switch to vertical output mode if the&lt;br /&gt;
                      result is wider than the terminal width.&lt;br /&gt;
  -B, --batch         Don't use history file. Disable interactive behavior.&lt;br /&gt;
                      (Enables --silent.)&lt;br /&gt;
  --character-sets-dir=name &lt;br /&gt;
                      Directory for character set files.&lt;br /&gt;
  --column-type-info  Display column type information.&lt;br /&gt;
  -c, --comments      Preserve comments. Send comments to the server. The&lt;br /&gt;
                      default is --skip-comments (discard comments), enable&lt;br /&gt;
                      with --comments.&lt;br /&gt;
  -C, --compress      Use compression in server/client protocol.&lt;br /&gt;
  -#, --debug[=#]     This is a non-debug version. Catch this and exit.&lt;br /&gt;
  --debug-check       Check memory and open file usage at exit.&lt;br /&gt;
  -T, --debug-info    Print some debug info at exit.&lt;br /&gt;
  -D, --database=name Database to use.&lt;br /&gt;
  --default-character-set=name &lt;br /&gt;
                      Set the default character set.&lt;br /&gt;
  --delimiter=name    Delimiter to be used.&lt;br /&gt;
  --enable-cleartext-plugin &lt;br /&gt;
                      Enable/disable the clear text authentication plugin.&lt;br /&gt;
  -e, --execute=name  Execute command and quit. (Disables --force and history&lt;br /&gt;
                      file.)&lt;br /&gt;
  -E, --vertical      Print the output of a query (rows) vertically.&lt;br /&gt;
  -f, --force         Continue even if we get an SQL error.&lt;br /&gt;
  -G, --named-commands &lt;br /&gt;
                      Enable named commands. Named commands mean this program's&lt;br /&gt;
                      internal commands; see mysql&amp;gt; help . When enabled, the&lt;br /&gt;
                      named commands can be used from any line of the query,&lt;br /&gt;
                      otherwise only from the first line, before an enter.&lt;br /&gt;
                      Disable with --disable-named-commands. This option is&lt;br /&gt;
                      disabled by default.&lt;br /&gt;
  -i, --ignore-spaces Ignore space after function names.&lt;br /&gt;
  --init-command=name SQL Command to execute when connecting to MySQL server.&lt;br /&gt;
                      Will automatically be re-executed when reconnecting.&lt;br /&gt;
  --local-infile      Enable/disable LOAD DATA LOCAL INFILE.&lt;br /&gt;
  -b, --no-beep       Turn off beep on error.&lt;br /&gt;
  -h, --host=name     Connect to host.&lt;br /&gt;
  -H, --html          Produce HTML output.&lt;br /&gt;
  -X, --xml           Produce XML output.&lt;br /&gt;
  --line-numbers      Write line numbers for errors.&lt;br /&gt;
                      (Defaults to on; use --skip-line-numbers to disable.)&lt;br /&gt;
  -L, --skip-line-numbers &lt;br /&gt;
                      Don't write line number for errors.&lt;br /&gt;
  -n, --unbuffered    Flush buffer after each query.&lt;br /&gt;
  --column-names      Write column names in results.&lt;br /&gt;
                      (Defaults to on; use --skip-column-names to disable.)&lt;br /&gt;
  -N, --skip-column-names &lt;br /&gt;
                      Don't write column names in results.&lt;br /&gt;
  --sigint-ignore     Ignore SIGINT (CTRL-C).&lt;br /&gt;
  -o, --one-database  Ignore statements except those that occur while the&lt;br /&gt;
                      default database is the one named at the command line.&lt;br /&gt;
  --pager[=name]      Pager to use to display results. If you don't supply an&lt;br /&gt;
                      option, the default pager is taken from your ENV variable&lt;br /&gt;
                      PAGER. Valid pagers are less, more, cat [&amp;gt; filename],&lt;br /&gt;
                      etc. See interactive help (\h) also. This option does not&lt;br /&gt;
                      work in batch mode. Disable with --disable-pager. This&lt;br /&gt;
                      option is disabled by default.&lt;br /&gt;
  -p, --password[=name] &lt;br /&gt;
                      Password to use when connecting to server. If password is&lt;br /&gt;
                      not given it's asked from the tty.&lt;br /&gt;
  -P, --port=#        Port number to use for connection or 0 for default to, in&lt;br /&gt;
                      order of preference, my.cnf, $MYSQL_TCP_PORT,&lt;br /&gt;
                      /etc/services, built-in default (3306).&lt;br /&gt;
  --prompt=name       Set the mysql prompt to this value.&lt;br /&gt;
  --protocol=name     The protocol to use for connection (tcp, socket, pipe,&lt;br /&gt;
                      memory).&lt;br /&gt;
  -q, --quick         Don't cache result, print it row by row. This may slow&lt;br /&gt;
                      down the server if the output is suspended. Doesn't use&lt;br /&gt;
                      history file.&lt;br /&gt;
  -r, --raw           Write fields without conversion. Used with --batch.&lt;br /&gt;
  --reconnect         Reconnect if the connection is lost. Disable with&lt;br /&gt;
                      --disable-reconnect. This option is enabled by default.&lt;br /&gt;
                      (Defaults to on; use --skip-reconnect to disable.)&lt;br /&gt;
  -s, --silent        Be more silent. Print results with a tab as separator,&lt;br /&gt;
                      each row on new line.&lt;br /&gt;
  -S, --socket=name   The socket file to use for connection.&lt;br /&gt;
  --ssl               Enable SSL for connection (automatically enabled with&lt;br /&gt;
                      other flags).&lt;br /&gt;
  --ssl-ca=name       CA file in PEM format (check OpenSSL docs, implies&lt;br /&gt;
                      --ssl).&lt;br /&gt;
  --ssl-capath=name   CA directory (check OpenSSL docs, implies --ssl).&lt;br /&gt;
  --ssl-cert=name     X509 cert in PEM format (implies --ssl).&lt;br /&gt;
  --ssl-cipher=name   SSL cipher to use (implies --ssl).&lt;br /&gt;
  --ssl-key=name      X509 key in PEM format (implies --ssl).&lt;br /&gt;
  --ssl-verify-server-cert &lt;br /&gt;
                      Verify server's &amp;quot;Common Name&amp;quot; in its cert against&lt;br /&gt;
                      hostname used when connecting. This option is disabled by&lt;br /&gt;
                      default.&lt;br /&gt;
  -t, --table         Output in table format.&lt;br /&gt;
  --tee=name          Append everything into outfile. See interactive help (\h)&lt;br /&gt;
                      also. Does not work in batch mode. Disable with&lt;br /&gt;
                      --disable-tee. This option is disabled by default.&lt;br /&gt;
  -u, --user=name     User for login if not current user.&lt;br /&gt;
  -U, --safe-updates  Only allow UPDATE and DELETE that uses keys.&lt;br /&gt;
  -U, --i-am-a-dummy  Synonym for option --safe-updates, -U.&lt;br /&gt;
  -v, --verbose       Write more. (-v -v -v gives the table output format).&lt;br /&gt;
  -V, --version       Output version information and exit.&lt;br /&gt;
  -w, --wait          Wait and retry if connection is down.&lt;br /&gt;
  --connect-timeout=# Number of seconds before connection timeout.&lt;br /&gt;
  --max-allowed-packet=# &lt;br /&gt;
                      The maximum packet length to send to or receive from&lt;br /&gt;
                      server.&lt;br /&gt;
  --net-buffer-length=# &lt;br /&gt;
                      The buffer size for TCP/IP and socket communication.&lt;br /&gt;
  --select-limit=#    Automatic limit for SELECT when using --safe-updates.&lt;br /&gt;
  --max-join-size=#   Automatic limit for rows in a join when using&lt;br /&gt;
                      --safe-updates.&lt;br /&gt;
  --secure-auth       Refuse client connecting to server if it uses old&lt;br /&gt;
                      (pre-4.1.1) protocol.&lt;br /&gt;
  --server-arg=name   Send embedded server this as a parameter.&lt;br /&gt;
  --show-warnings     Show warnings after every statement.&lt;br /&gt;
  --plugin-dir=name   Directory for client-side plugins.&lt;br /&gt;
  --default-auth=name Default authentication client-side plugin to use.&lt;br /&gt;
&lt;br /&gt;
Default options are read from the following files in the given order:&lt;br /&gt;
/etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf &lt;br /&gt;
The following groups are read: mysql client&lt;br /&gt;
The following options may be given as the first argument:&lt;br /&gt;
--print-defaults        Print the program argument list and exit.&lt;br /&gt;
--no-defaults           Don't read default options from any option file.&lt;br /&gt;
--defaults-file=#       Only read default options from the given file #.&lt;br /&gt;
--defaults-extra-file=# Read this file after the global files are read.&lt;br /&gt;
&lt;br /&gt;
Variables (--variable-name=value)&lt;br /&gt;
and boolean options {FALSE|TRUE}  Value (after reading options)&lt;br /&gt;
--------------------------------- ----------------------------------------&lt;br /&gt;
auto-rehash                       TRUE&lt;br /&gt;
auto-vertical-output              FALSE&lt;br /&gt;
character-sets-dir                (No default value)&lt;br /&gt;
column-type-info                  FALSE&lt;br /&gt;
comments                          FALSE&lt;br /&gt;
compress                          FALSE&lt;br /&gt;
debug-check                       FALSE&lt;br /&gt;
debug-info                        FALSE&lt;br /&gt;
database                          (No default value)&lt;br /&gt;
default-character-set             auto&lt;br /&gt;
delimiter                         ;&lt;br /&gt;
enable-cleartext-plugin           FALSE&lt;br /&gt;
vertical                          FALSE&lt;br /&gt;
force                             FALSE&lt;br /&gt;
named-commands                    FALSE&lt;br /&gt;
ignore-spaces                     FALSE&lt;br /&gt;
init-command                      (No default value)&lt;br /&gt;
local-infile                      FALSE&lt;br /&gt;
no-beep                           FALSE&lt;br /&gt;
host                              (No default value)&lt;br /&gt;
html                              FALSE&lt;br /&gt;
xml                               FALSE&lt;br /&gt;
line-numbers                      TRUE&lt;br /&gt;
unbuffered                        FALSE&lt;br /&gt;
column-names                      TRUE&lt;br /&gt;
sigint-ignore                     FALSE&lt;br /&gt;
port                              0&lt;br /&gt;
prompt                            mysql&amp;gt; &lt;br /&gt;
quick                             FALSE&lt;br /&gt;
raw                               FALSE&lt;br /&gt;
reconnect                         TRUE&lt;br /&gt;
socket                            (No default value)&lt;br /&gt;
ssl                               FALSE&lt;br /&gt;
ssl-ca                            (No default value)&lt;br /&gt;
ssl-capath                        (No default value)&lt;br /&gt;
ssl-cert                          (No default value)&lt;br /&gt;
ssl-cipher                        (No default value)&lt;br /&gt;
ssl-key                           (No default value)&lt;br /&gt;
ssl-verify-server-cert            FALSE&lt;br /&gt;
table                             FALSE&lt;br /&gt;
user                              (No default value)&lt;br /&gt;
safe-updates                      FALSE&lt;br /&gt;
i-am-a-dummy                      FALSE&lt;br /&gt;
connect-timeout                   0&lt;br /&gt;
max-allowed-packet                16777216&lt;br /&gt;
net-buffer-length                 16384&lt;br /&gt;
select-limit                      1000&lt;br /&gt;
max-join-size                     1000000&lt;br /&gt;
secure-auth                       FALSE&lt;br /&gt;
show-warnings                     FALSE&lt;br /&gt;
plugin-dir                        (No default value)&lt;br /&gt;
default-auth                      (No default value)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=MySql&amp;diff=5417</id>
		<title>MySql</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=MySql&amp;diff=5417"/>
		<updated>2014-03-03T05:00:14Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[CssWork]] - parent&lt;br /&gt;
* [[SqlSchema]] - tables used in the database &lt;br /&gt;
* [[SqlDefaults]] - defaults for those tables&lt;br /&gt;
&lt;br /&gt;
* http://dev.mysql.com/doc/refman/5.5/en/index.html&lt;br /&gt;
* http://dev.mysql.com/doc/refman/5.5/en/tutorial.html&lt;br /&gt;
&lt;br /&gt;
as root: mysqldump altslashdot css &amp;gt; zz.txt&lt;br /&gt;
&lt;br /&gt;
mysqldump -T '/var/lib/mysql/test'  altslashdot css&lt;br /&gt;
&lt;br /&gt;
Information about mysql as used for slash&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Database Name: altslashdot&lt;br /&gt;
Database user: mysql&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Version&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql-5.5.36&lt;br /&gt;
db4-devel-4.7.25                     mysql-libs-5.5.36&lt;br /&gt;
db4-utils-4.7.25                     mysql-server-5.5.36&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;mysqldump&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
mysqldump http://dev.mysql.com/doc/refman/5.5/en/mysqldump.html&lt;br /&gt;
&lt;br /&gt;
A client that dumps a MySQL database into a file as SQL, text, or XML.&lt;br /&gt;
&lt;br /&gt;
The mysqldump client is a utility that performs logical backups, producing a set of SQL statements that can be run to reproduce the original schema objects, table data, or both. It dumps one or more MySQL database for backup or transfer to another SQL server. The mysqldump command can also generate output in CSV, other delimited text, or XML format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Syntax &lt;br /&gt;
&lt;br /&gt;
There are in general three ways to use mysqldump—in order to dump a set of one or more tables, a set of one or more complete databases, or an entire MySQL server—as shown here: &lt;br /&gt;
shell&amp;gt; mysqldump [options] db_name [tbl_name ...]&lt;br /&gt;
shell&amp;gt; mysqldump [options] --databases db_name ...&lt;br /&gt;
shell&amp;gt; mysqldump [options] --all-databases&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To dump entire databases, do not name any tables following db_name, or use the --databases or --all-databases option. &lt;br /&gt;
&lt;br /&gt;
mysqldump does not dump the INFORMATION_SCHEMA database by default. mysqldump dumps INFORMATION_SCHEMA only if you name it explicitly on the command line, although currently you must also use the --skip-lock-tables option. Before MySQL 5.5 mysqldump silently ignores INFORMATION_SCHEMA even if you name it explicitly on the command line. &lt;br /&gt;
&lt;br /&gt;
mysqldump does not dump the performance_schema database. &lt;br /&gt;
&lt;br /&gt;
Before MySQL 5.5.25, mysqldump does not dump the general_log or slow_query_log tables for dumps of the mysql database. As of 5.5.25, the dump includes statements to recreate those tables so that they are not missing after reloading the dump file. Log table contents are not dumped. &lt;br /&gt;
&lt;br /&gt;
mysqldump also does not dump the MySQL Cluster ndbinfo information database. &lt;br /&gt;
&lt;br /&gt;
To see a list of the options your version of mysqldump supports, execute mysqldump --help.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;tabl;e dump for size deletemelater&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[root@slashcode test]# ls -l | cut -b 28-  | grep -v '\.sql' | sort -g&lt;br /&gt;
&lt;br /&gt;
     0 Mar  2 20:56 accesslog_artcom.txt&lt;br /&gt;
     0 Mar  2 20:56 accesslog_temp_subscriber.txt&lt;br /&gt;
     0 Mar  2 20:56 al2_log_comments.txt&lt;br /&gt;
     0 Mar  2 20:56 al2_log.txt&lt;br /&gt;
     0 Mar  2 20:56 auto_poll.txt&lt;br /&gt;
     0 Mar  2 20:56 backup_blocks.txt&lt;br /&gt;
     0 Mar  2 20:56 blobs.txt&lt;br /&gt;
     0 Mar  2 20:56 bookmark_feeds.txt&lt;br /&gt;
     0 Mar  2 20:56 bookmarks.txt&lt;br /&gt;
     0 Mar  2 20:56 classes.txt&lt;br /&gt;
     0 Mar  2 20:56 comment_log.txt&lt;br /&gt;
     0 Mar  2 20:56 comment_promote_log.txt&lt;br /&gt;
     0 Mar  2 20:56 comment_vote.txt&lt;br /&gt;
     0 Mar  2 20:56 dbs_readerstatus_queries.txt&lt;br /&gt;
     0 Mar  2 20:56 dbs_readerstatus.txt&lt;br /&gt;
     0 Mar  2 20:56 dbs.txt&lt;br /&gt;
     0 Mar  2 20:56 discussion_rating.txt&lt;br /&gt;
     0 Mar  2 20:56 email_optout.txt&lt;br /&gt;
     0 Mar  2 20:56 file_queue.txt&lt;br /&gt;
     0 Mar  2 20:56 firehose_history.txt&lt;br /&gt;
     0 Mar  2 20:56 firehose_section_settings.txt&lt;br /&gt;
     0 Mar  2 20:56 firehose_section.txt&lt;br /&gt;
     0 Mar  2 20:56 firehose_setting_log.txt&lt;br /&gt;
     0 Mar  2 20:56 firehose_skin_volume.txt&lt;br /&gt;
     0 Mar  2 20:56 firehose_view_settings.txt&lt;br /&gt;
     0 Mar  2 20:56 globj_adminnotes.txt&lt;br /&gt;
     0 Mar  2 20:56 globjs_viewed_archived.txt&lt;br /&gt;
     0 Mar  2 20:56 globjs_viewed.txt&lt;br /&gt;
     0 Mar  2 20:56 globj_urls.txt&lt;br /&gt;
     0 Mar  2 20:56 humanconf_pool.txt&lt;br /&gt;
     0 Mar  2 20:56 humanconf.txt&lt;br /&gt;
     0 Mar  2 20:56 journal_transfer.txt&lt;br /&gt;
     0 Mar  2 20:56 message_drop.txt&lt;br /&gt;
     0 Mar  2 20:56 metamodlog.txt&lt;br /&gt;
     0 Mar  2 20:56 misc_user_opts.txt&lt;br /&gt;
     0 Mar  2 20:56 newsvac_keywords.txt&lt;br /&gt;
     0 Mar  2 20:56 nugget_sub.txt&lt;br /&gt;
     0 Mar  2 20:56 pagemark.txt&lt;br /&gt;
     0 Mar  2 20:56 preview.txt&lt;br /&gt;
     0 Mar  2 20:56 projects.txt&lt;br /&gt;
     0 Mar  2 20:56 querylog.txt&lt;br /&gt;
     0 Mar  2 20:56 related_stories.txt&lt;br /&gt;
     0 Mar  2 20:56 rel.txt&lt;br /&gt;
     0 Mar  2 20:56 remarks.txt&lt;br /&gt;
     0 Mar  2 20:56 reskey_failures.txt&lt;br /&gt;
     0 Mar  2 20:56 reskey_sessions.txt&lt;br /&gt;
     0 Mar  2 20:56 robosubmitlock.txt&lt;br /&gt;
     0 Mar  2 20:56 rss_raw.txt&lt;br /&gt;
     0 Mar  2 20:56 sphinx_counter_archived.txt&lt;br /&gt;
     0 Mar  2 20:56 sphinx_counter.txt&lt;br /&gt;
     0 Mar  2 20:56 sphinx_search.txt&lt;br /&gt;
     0 Mar  2 20:56 spiderlock.txt&lt;br /&gt;
     0 Mar  2 20:56 spider_timespec.txt&lt;br /&gt;
     0 Mar  2 20:56 static_files.txt&lt;br /&gt;
     0 Mar  2 20:56 stats_graphs_index.txt&lt;br /&gt;
     0 Mar  2 20:56 story_dirty.txt&lt;br /&gt;
     0 Mar  2 20:56 story_files.txt&lt;br /&gt;
     0 Mar  2 20:56 story_render_dirty.txt&lt;br /&gt;
     0 Mar  2 20:56 submissions_notes.txt&lt;br /&gt;
     0 Mar  2 20:56 subscribe_payments.txt&lt;br /&gt;
     0 Mar  2 20:56 tagboxes.txt&lt;br /&gt;
     0 Mar  2 20:56 tagboxlog_feeder.txt&lt;br /&gt;
     0 Mar  2 20:56 tagcommand_adminlog_sfnet.txt&lt;br /&gt;
     0 Mar  2 20:56 tagcommand_adminlog.txt&lt;br /&gt;
     0 Mar  2 20:56 tagname_cache.txt&lt;br /&gt;
     0 Mar  2 20:56 tagname_params.txt&lt;br /&gt;
     0 Mar  2 20:56 tagnames_similarity_rendered.txt&lt;br /&gt;
     0 Mar  2 20:56 tagnames_synonyms_chosen.txt&lt;br /&gt;
     0 Mar  2 20:56 tag_params.txt&lt;br /&gt;
     0 Mar  2 20:56 tags_dayofweek.txt&lt;br /&gt;
     0 Mar  2 20:56 tags_deactivated.txt&lt;br /&gt;
     0 Mar  2 20:56 tags_hourofday.txt&lt;br /&gt;
     0 Mar  2 20:56 tags_peerweight.txt&lt;br /&gt;
     0 Mar  2 20:56 tags_searched.txt&lt;br /&gt;
     0 Mar  2 20:56 tags.txt&lt;br /&gt;
     0 Mar  2 20:56 tags_userchange.txt&lt;br /&gt;
     0 Mar  2 20:56 topic_nexus_dirty.txt&lt;br /&gt;
     0 Mar  2 20:56 topic_nexus_extras.txt&lt;br /&gt;
     0 Mar  2 20:56 topic_param.txt&lt;br /&gt;
     0 Mar  2 20:56 url_content.txt&lt;br /&gt;
     0 Mar  2 20:56 url_message_body.txt&lt;br /&gt;
     0 Mar  2 20:56 url_plaintext.txt&lt;br /&gt;
     0 Mar  2 20:56 urls.txt&lt;br /&gt;
     0 Mar  2 20:56 users_acl.txt&lt;br /&gt;
     0 Mar  2 20:56 users_clout.txt&lt;br /&gt;
     0 Mar  2 20:56 users_comments_read_log.txt&lt;br /&gt;
     0 Mar  2 20:56 users_openid_reskeys.txt&lt;br /&gt;
     0 Mar  2 20:56 users_openid.txt&lt;br /&gt;
     0 Mar  2 20:56 wow_char_armorylog.txt&lt;br /&gt;
     0 Mar  2 20:56 wow_char_data.txt&lt;br /&gt;
     0 Mar  2 20:56 wow_chars.txt&lt;br /&gt;
     0 Mar  2 20:56 wow_guilds.txt&lt;br /&gt;
     0 Mar  2 20:56 xsite_auth_log.txt&lt;br /&gt;
    12 Mar  2 20:56 tagnames.txt&lt;br /&gt;
    14 Mar  2 20:56 topic_nexus.txt&lt;br /&gt;
    20 Mar  2 20:56 shill_ids.txt&lt;br /&gt;
    22 Mar  2 20:56 accesslog_build_unique_uid.txt&lt;br /&gt;
    36 Mar  2 20:56 message_deliverymodes.txt&lt;br /&gt;
    41 Mar  2 20:56 al2.txt&lt;br /&gt;
    42 Mar  2 20:56 journal_themes.txt&lt;br /&gt;
    49 Mar  2 20:56 topic_parents.txt&lt;br /&gt;
    66 Mar  2 20:56 commentmodes.txt&lt;br /&gt;
    69 Mar  2 20:56 dynamic_blocks.txt&lt;br /&gt;
    69 Mar  2 20:56 wow_char_types.txt&lt;br /&gt;
    73 Mar  2 20:56 accesslog_temp_host_addr.txt&lt;br /&gt;
    74 Mar  2 20:56 globj_types.txt&lt;br /&gt;
    75 Mar  2 20:56 css_type.txt&lt;br /&gt;
    81 Mar  2 20:56 open_proxies.txt&lt;br /&gt;
    83 Mar  2 20:56 people.txt&lt;br /&gt;
    86 Mar  2 20:56 discussion_kinds.txt&lt;br /&gt;
    94 Mar  2 20:56 clout_types.txt&lt;br /&gt;
   103 Mar  2 20:56 sphinx_index.txt&lt;br /&gt;
   111 Mar  2 20:56 sessions.txt&lt;br /&gt;
   114 Mar  2 20:56 dst.txt&lt;br /&gt;
   116 Mar  2 20:56 pollvoters.txt&lt;br /&gt;
   121 Mar  2 20:56 hooks.txt&lt;br /&gt;
   136 Mar  2 20:56 authors_cache.txt&lt;br /&gt;
   138 Mar  2 20:56 globjs.txt&lt;br /&gt;
   144 Mar  2 20:56 story_topics_rendered.txt&lt;br /&gt;
   163 Mar  2 20:56 humanconf_questions.txt&lt;br /&gt;
   176 Mar  2 20:56 tags_udc.txt&lt;br /&gt;
   187 Mar  2 20:56 story_topics_chosen.txt&lt;br /&gt;
   198 Mar  2 20:56 url_info.txt&lt;br /&gt;
   230 Mar  2 20:56 spamarmors.txt&lt;br /&gt;
   272 Mar  2 20:56 al2_types.txt&lt;br /&gt;
   280 Mar  2 20:56 modreasons.txt&lt;br /&gt;
   311 Mar  2 20:56 bpn_sources.txt&lt;br /&gt;
   333 Mar  2 20:56 skins.txt&lt;br /&gt;
   344 Mar  2 20:56 moderatorlog.txt&lt;br /&gt;
   353 Mar  2 20:56 submission_param.txt&lt;br /&gt;
   371 Mar  2 20:56 pollquestions.txt&lt;br /&gt;
   422 Mar  2 20:56 topics.txt&lt;br /&gt;
   435 Mar  2 20:56 soap_methods.txt&lt;br /&gt;
   468 Mar  2 20:56 reskey_resources.txt&lt;br /&gt;
   488 Mar  2 20:56 journals.txt&lt;br /&gt;
   489 Mar  2 20:56 preview_param.txt&lt;br /&gt;
   495 Mar  2 20:56 accesslog_build_uidip.txt&lt;br /&gt;
   540 Mar  2 20:56 skin_colors.txt&lt;br /&gt;
   607 Mar  2 20:56 pollanswers.txt&lt;br /&gt;
   616 Mar  2 20:56 badpasswords.txt&lt;br /&gt;
   638 Mar  2 20:56 story_param.txt&lt;br /&gt;
   658 Mar  2 20:56 message_codes.txt&lt;br /&gt;
   706 Mar  2 20:56 related_links.txt&lt;br /&gt;
   743 Mar  2 20:56 dateformats.txt&lt;br /&gt;
   859 Mar  2 20:56 reskeys.txt&lt;br /&gt;
   890 Mar  2 20:56 achievements.txt&lt;br /&gt;
   972 Mar  2 20:56 signoff.txt&lt;br /&gt;
  1018 Mar  2 20:56 users_prefs.txt&lt;br /&gt;
  1122 Mar  2 20:56 css.txt&lt;br /&gt;
  1294 Mar  2 20:56 ajax_ops.txt&lt;br /&gt;
  1303 Mar  2 20:56 tzcodes.txt&lt;br /&gt;
  1312 Mar  2 20:56 users_index.txt&lt;br /&gt;
  1316 Mar  2 20:56 users_hits.txt&lt;br /&gt;
  1529 Mar  2 20:56 message_web.txt&lt;br /&gt;
  1543 Mar  2 20:56 user_achievement_streaks.txt&lt;br /&gt;
  1778 Mar  2 20:56 code_param.txt&lt;br /&gt;
  2047 Mar  2 20:56 content_filters.txt&lt;br /&gt;
  2132 Mar  2 20:56 reskey_hourlysalt.txt&lt;br /&gt;
  2163 Mar  2 20:56 stories.txt&lt;br /&gt;
  2430 Mar  2 20:56 users_comments.txt&lt;br /&gt;
  2951 Mar  2 20:56 site_info.txt&lt;br /&gt;
  3180 Mar  2 20:56 users_messages.txt&lt;br /&gt;
  3385 Mar  2 20:56 slashd_status.txt&lt;br /&gt;
  3595 Mar  2 20:56 menus.txt&lt;br /&gt;
  3784 Mar  2 20:56 discussions.txt&lt;br /&gt;
  4048 Mar  2 20:56 abusers.txt&lt;br /&gt;
  4087 Mar  2 20:56 user_achievements.txt&lt;br /&gt;
  4507 Mar  2 20:56 uncommonstorywords.txt&lt;br /&gt;
  5099 Mar  2 20:56 accesslog_temp_rss.txt&lt;br /&gt;
  5330 Mar  2 20:56 users.txt&lt;br /&gt;
  6469 Mar  2 20:56 reskey_vars.txt&lt;br /&gt;
  6619 Mar  2 20:56 blocks.txt&lt;br /&gt;
  7016 Mar  2 20:56 reskey_resource_checks.txt&lt;br /&gt;
  7373 Mar  2 20:56 journals_text.txt&lt;br /&gt;
  7613 Mar  2 20:56 users_logtokens.txt&lt;br /&gt;
  9144 Mar  2 20:56 formkeys.txt&lt;br /&gt;
 10087 Mar  2 20:56 users_param.txt&lt;br /&gt;
 10099 Mar  2 20:56 message_web_text.txt&lt;br /&gt;
 10570 Mar  2 20:56 string_param.txt&lt;br /&gt;
 10691 Mar  2 20:56 users_info.txt&lt;br /&gt;
 10809 Mar  2 20:56 wow_realms.txt&lt;br /&gt;
 11398 Mar  2 20:56 comments.txt&lt;br /&gt;
 13957 Mar  2 20:56 message_log.txt&lt;br /&gt;
 14980 Mar  2 20:56 comment_text.txt&lt;br /&gt;
018561 Mar  2 20:56 accesslog_admin.txt&lt;br /&gt;
 24852 Mar  2 20:56 accesslog_temp_other.txt&lt;br /&gt;
 50104 Mar  2 20:56 vars.txt&lt;br /&gt;
 57261 Mar  2 20:56 submissions.txt&lt;br /&gt;
 68640 Mar  2 20:56 dynamic_user_blocks.txt&lt;br /&gt;
 84260 Mar  2 20:56 story_text.txt&lt;br /&gt;
256371 Mar  2 20:56 slashd_errnotes.txt&lt;br /&gt;
283635 Mar  2 20:56 accesslog_temp_errors.txt&lt;br /&gt;
431983 Mar  2 20:56 accesslog_temp.txt&lt;br /&gt;
579455 Mar  2 20:56 accesslog.txt&lt;br /&gt;
869491 Mar  2 20:56 stats_daily.txt&lt;br /&gt;
917375 Mar  2 20:56 templates.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Mysql programs&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All these try PROGNAME --help for details&lt;br /&gt;
&lt;br /&gt;
also  http://dev.mysql.com/doc/refman/5.5/en/programs-overview.html&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
The MySQL server, mysqld, is the main program that does most of the work in a MySQL installation. The server is accompanied by several related scripts that assist you in starting and stopping the server: &lt;br /&gt;
&lt;br /&gt;
mysqld &lt;br /&gt;
&lt;br /&gt;
The SQL daemon (that is, the MySQL server). To use client programs, mysqld must be running, because clients gain access to databases by connecting to the server. See Section 4.3.1, “mysqld — The MySQL Server”. &lt;br /&gt;
&lt;br /&gt;
mysqld_safe &lt;br /&gt;
&lt;br /&gt;
A server startup script. mysqld_safe attempts to start mysqld. See Section 4.3.2, “mysqld_safe — MySQL Server Startup Script”. &lt;br /&gt;
&lt;br /&gt;
mysql.server &lt;br /&gt;
&lt;br /&gt;
A server startup script. This script is used on systems that use System V-style run directories containing scripts that start system services for particular run levels. It invokes mysqld_safe to start the MySQL server. See Section 4.3.3, “mysql.server — MySQL Server Startup Script”. &lt;br /&gt;
&lt;br /&gt;
mysqld_multi &lt;br /&gt;
&lt;br /&gt;
A server startup script that can start or stop multiple servers installed on the system. See Section 4.3.4, “mysqld_multi — Manage Multiple MySQL Servers”. &lt;br /&gt;
&lt;br /&gt;
Several programs perform setup operations during MySQL installation or upgrading: &lt;br /&gt;
&lt;br /&gt;
comp_err &lt;br /&gt;
&lt;br /&gt;
This program is used during the MySQL build/installation process. It compiles error message files from the error source files. See Section 4.4.1, “comp_err — Compile MySQL Error Message File”. &lt;br /&gt;
&lt;br /&gt;
mysql_install_db &lt;br /&gt;
&lt;br /&gt;
This script creates the MySQL database and initializes the grant tables with default privileges. It is usually executed only once, when first installing MySQL on a system. See Section 4.4.3, “mysql_install_db — Initialize MySQL Data Directory”, Section 2.10.1, “Postinstallation Procedures for Unix-like Systems”, and Section 4.4.3, “mysql_install_db — Initialize MySQL Data Directory”. &lt;br /&gt;
&lt;br /&gt;
mysql_plugin &lt;br /&gt;
&lt;br /&gt;
This program configures MySQL server plugins. See Section 4.4.4, “mysql_plugin — Configure MySQL Server Plugins”. &lt;br /&gt;
&lt;br /&gt;
mysql_secure_installation &lt;br /&gt;
&lt;br /&gt;
This program enables you to improve the security of your MySQL installation. SQL. See Section 4.4.5, “mysql_secure_installation — Improve MySQL Installation Security”. &lt;br /&gt;
&lt;br /&gt;
mysql_tzinfo_to_sql &lt;br /&gt;
&lt;br /&gt;
This program loads the time zone tables in the mysql database using the contents of the host system zoneinfo database (the set of files describing time zones). SQL. See Section 4.4.6, “mysql_tzinfo_to_sql — Load the Time Zone Tables”. &lt;br /&gt;
&lt;br /&gt;
mysql_upgrade &lt;br /&gt;
&lt;br /&gt;
This program is used after a MySQL upgrade operation. It checks tables for incompatibilities and repairs them if necessary, and updates the grant tables with any changes that have been made in newer versions of MySQL. See Section 4.4.7, “mysql_upgrade — Check and Upgrade MySQL Tables”. &lt;br /&gt;
&lt;br /&gt;
MySQL client programs that connect to the MySQL server: &lt;br /&gt;
&lt;br /&gt;
mysql &lt;br /&gt;
&lt;br /&gt;
The command-line tool for interactively entering SQL statements or executing them from a file in batch mode. See Section 4.5.1, “mysql — The MySQL Command-Line Tool”. &lt;br /&gt;
&lt;br /&gt;
mysqladmin &lt;br /&gt;
&lt;br /&gt;
A client that performs administrative operations, such as creating or dropping databases, reloading the grant tables, flushing tables to disk, and reopening log files. mysqladmin can also be used to retrieve version, process, and status information from the server. See Section 4.5.2, “mysqladmin — Client for Administering a MySQL Server”. &lt;br /&gt;
&lt;br /&gt;
mysqlcheck &lt;br /&gt;
&lt;br /&gt;
A table-maintenance client that checks, repairs, analyzes, and optimizes tables. See Section 4.5.3, “mysqlcheck — A Table Maintenance Program”. &lt;br /&gt;
&lt;br /&gt;
mysqldump &lt;br /&gt;
&lt;br /&gt;
A client that dumps a MySQL database into a file as SQL, text, or XML. See Section 4.5.4, “mysqldump — A Database Backup Program”. &lt;br /&gt;
&lt;br /&gt;
mysqlimport &lt;br /&gt;
&lt;br /&gt;
A client that imports text files into their respective tables using LOAD DATA INFILE. See Section 4.5.5, “mysqlimport — A Data Import Program”. &lt;br /&gt;
&lt;br /&gt;
mysqlshow &lt;br /&gt;
&lt;br /&gt;
A client that displays information about databases, tables, columns, and indexes. See Section 4.5.6, “mysqlshow — Display Database, Table, and Column Information”. &lt;br /&gt;
&lt;br /&gt;
mysqlslap &lt;br /&gt;
&lt;br /&gt;
A client that is designed to emulate client load for a MySQL server and report the timing of each stage. It works as if multiple clients are accessing the server. See Section 4.5.7, “mysqlslap — Load Emulation Client”. &lt;br /&gt;
&lt;br /&gt;
MySQL administrative and utility programs: &lt;br /&gt;
&lt;br /&gt;
innochecksum &lt;br /&gt;
&lt;br /&gt;
An offline InnoDB offline file checksum utility. See Section 4.6.1, “innochecksum — Offline InnoDB File Checksum Utility”. &lt;br /&gt;
&lt;br /&gt;
myisam_ftdump &lt;br /&gt;
&lt;br /&gt;
A utility that displays information about full-text indexes in MyISAM tables. See Section 4.6.2, “myisam_ftdump — Display Full-Text Index information”. &lt;br /&gt;
&lt;br /&gt;
myisamchk &lt;br /&gt;
&lt;br /&gt;
A utility to describe, check, optimize, and repair MyISAM tables. See Section 4.6.3, “myisamchk — MyISAM Table-Maintenance Utility”. &lt;br /&gt;
&lt;br /&gt;
myisamlog &lt;br /&gt;
&lt;br /&gt;
A utility that processes the contents of a MyISAM log file. See Section 4.6.4, “myisamlog — Display MyISAM Log File Contents”. &lt;br /&gt;
&lt;br /&gt;
myisampack &lt;br /&gt;
&lt;br /&gt;
A utility that compresses MyISAM tables to produce smaller read-only tables. See Section 4.6.5, “myisampack — Generate Compressed, Read-Only MyISAM Tables”. &lt;br /&gt;
&lt;br /&gt;
mysqlaccess &lt;br /&gt;
&lt;br /&gt;
A script that checks the access privileges for a host name, user name, and database combination. See Section 4.6.6, “mysqlaccess — Client for Checking Access Privileges”. &lt;br /&gt;
&lt;br /&gt;
mysqlbinlog &lt;br /&gt;
&lt;br /&gt;
A utility for reading statements from a binary log. The log of executed statements contained in the binary log files can be used to help recover from a crash. See Section 4.6.7, “mysqlbinlog — Utility for Processing Binary Log Files”. &lt;br /&gt;
&lt;br /&gt;
mysqldumpslow &lt;br /&gt;
&lt;br /&gt;
A utility to read and summarize the contents of a slow query log. See Section 4.6.8, “mysqldumpslow — Summarize Slow Query Log Files”. &lt;br /&gt;
&lt;br /&gt;
mysqlhotcopy &lt;br /&gt;
&lt;br /&gt;
A utility that quickly makes backups of MyISAM tables while the server is running. See Section 4.6.9, “mysqlhotcopy — A Database Backup Program”. &lt;br /&gt;
&lt;br /&gt;
mysql_convert_table_format &lt;br /&gt;
&lt;br /&gt;
A utility that converts tables in a database to use a given storage engine. See Section 4.6.10, “mysql_convert_table_format — Convert Tables to Use a Given Storage Engine”. &lt;br /&gt;
&lt;br /&gt;
mysql_find_rows &lt;br /&gt;
&lt;br /&gt;
A utility that reads files containing SQL statements (such as update logs) and extracts statements that match a given regular expression. See Section 4.6.11, “mysql_find_rows — Extract SQL Statements from Files”. &lt;br /&gt;
&lt;br /&gt;
mysql_fix_extensions &lt;br /&gt;
&lt;br /&gt;
A utility that converts the extensions for MyISAM table files to lowercase. This can be useful after transferring the files from a system with case-insensitive file names to a system with case-sensitive file names. See Section 4.6.12, “mysql_fix_extensions — Normalize Table File Name Extensions”. &lt;br /&gt;
&lt;br /&gt;
mysql_setpermission &lt;br /&gt;
&lt;br /&gt;
A utility for interactively setting permissions in the MySQL grant tables. See Section 4.6.13, “mysql_setpermission — Interactively Set Permissions in Grant Tables”. &lt;br /&gt;
&lt;br /&gt;
mysql_waitpid &lt;br /&gt;
&lt;br /&gt;
A utility that kills the process with a given process ID. See Section 4.6.14, “mysql_waitpid — Kill Process and Wait for Its Termination”. &lt;br /&gt;
&lt;br /&gt;
mysql_zap &lt;br /&gt;
&lt;br /&gt;
A utility that kills processes that match a pattern. See Section 4.6.15, “mysql_zap — Kill Processes That Match a Pattern”. &lt;br /&gt;
&lt;br /&gt;
MySQL program-development utilities: &lt;br /&gt;
&lt;br /&gt;
msql2mysql &lt;br /&gt;
&lt;br /&gt;
A shell script that converts mSQL programs to MySQL. It doesn't handle every case, but it gives a good start when converting. See Section 4.7.1, “msql2mysql — Convert mSQL Programs for Use with MySQL”. &lt;br /&gt;
&lt;br /&gt;
mysql_config &lt;br /&gt;
&lt;br /&gt;
A shell script that produces the option values needed when compiling MySQL programs. See Section 4.7.2, “mysql_config — Display Options for Compiling Clients”. &lt;br /&gt;
&lt;br /&gt;
my_print_defaults &lt;br /&gt;
&lt;br /&gt;
A utility that shows which options are present in option groups of option files. See Section 4.7.3, “my_print_defaults — Display Options from Option Files”. &lt;br /&gt;
&lt;br /&gt;
resolve_stack_dump &lt;br /&gt;
&lt;br /&gt;
A utility program that resolves a numeric stack trace dump to symbols. See Section 4.7.4, “resolve_stack_dump — Resolve Numeric Stack Trace Dump to Symbols”. &lt;br /&gt;
&lt;br /&gt;
Miscellaneous utilities: &lt;br /&gt;
&lt;br /&gt;
perror &lt;br /&gt;
&lt;br /&gt;
A utility that displays the meaning of system or MySQL error codes. See Section 4.8.1, “perror — Explain Error Codes”. &lt;br /&gt;
&lt;br /&gt;
replace &lt;br /&gt;
&lt;br /&gt;
A utility program that performs string replacement in the input text. See Section 4.8.2, “replace — A String-Replacement Utility”. &lt;br /&gt;
&lt;br /&gt;
resolveip &lt;br /&gt;
&lt;br /&gt;
A utility program that resolves a host name to an IP address or vice versa. See Section 4.8.3, “resolveip — Resolve Host name to IP Address or Vice Versa”. &lt;br /&gt;
&lt;br /&gt;
Oracle Corporation also provides the MySQL Workbench GUI tool, which is used to administer MySQL servers and databases, to create, execute, and evaluate queries, and to migrate schemas and data from other relational database management systems for use with MySQL. Additional GUI tools include MySQL Notifier for Microsoft Windows MySQL for Excel. &lt;br /&gt;
&lt;br /&gt;
MySQL client programs that communicate with the server using the MySQL client/server library use the following environment variables. &lt;br /&gt;
Environment Variable	Meaning&lt;br /&gt;
MYSQL_UNIX_PORT	The default Unix socket file; used for connections to localhost&lt;br /&gt;
MYSQL_TCP_PORT	The default port number; used for TCP/IP connections&lt;br /&gt;
MYSQL_PWD	The default password&lt;br /&gt;
MYSQL_DEBUG	Debug trace options when debugging&lt;br /&gt;
TMPDIR	The directory where temporary tables and files are created&lt;br /&gt;
&lt;br /&gt;
For a full list of environment variables used by MySQL programs, see Section 2.12, “Environment Variables”.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Mysql configuration file in /etc/my.cnf&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[mysqld]&lt;br /&gt;
datadir=/var/lib/mysql&lt;br /&gt;
socket=/var/lib/mysql/mysql.sock&lt;br /&gt;
&lt;br /&gt;
# Disabling symbolic-links is recommended to prevent assorted security risks&lt;br /&gt;
symbolic-links=0&lt;br /&gt;
&lt;br /&gt;
# Settings user and group are ignored when systemd is used (fedora &amp;gt;= 15).&lt;br /&gt;
# If you need to run mysqld under a different user or group,&lt;br /&gt;
# customize your systemd unit file for mysqld according to the&lt;br /&gt;
# instructions in http://fedoraproject.org/wiki/Systemd&lt;br /&gt;
user=mysql&lt;br /&gt;
&lt;br /&gt;
# Semisynchronous Replication&lt;br /&gt;
# http://dev.mysql.com/doc/refman/5.5/en/replication-semisync.html&lt;br /&gt;
# uncomment next line on MASTER&lt;br /&gt;
;plugin-load=rpl_semi_sync_master=semisync_master.so&lt;br /&gt;
# uncomment next line on SLAVE&lt;br /&gt;
;plugin-load=rpl_semi_sync_slave=semisync_slave.so&lt;br /&gt;
&lt;br /&gt;
# Others options for Semisynchronous Replication&lt;br /&gt;
;rpl_semi_sync_master_enabled=1&lt;br /&gt;
;rpl_semi_sync_master_timeout=10&lt;br /&gt;
;rpl_semi_sync_slave_enabled=1&lt;br /&gt;
&lt;br /&gt;
# http://dev.mysql.com/doc/refman/5.5/en/performance-schema.html&lt;br /&gt;
;performance_schema&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[mysqld_safe]&lt;br /&gt;
log-error=/var/log/mysqld.log&lt;br /&gt;
pid-file=/var/run/mysqld/mysqld.pid&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;mysql --help&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql  Ver 14.14 Distrib 5.5.36, for Linux (x86_64) using readline 5.1&lt;br /&gt;
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.&lt;br /&gt;
&lt;br /&gt;
Oracle is a registered trademark of Oracle Corporation and/or its&lt;br /&gt;
affiliates. Other names may be trademarks of their respective&lt;br /&gt;
owners.&lt;br /&gt;
&lt;br /&gt;
Usage: mysql [OPTIONS] [database]&lt;br /&gt;
  -?, --help          Display this help and exit.&lt;br /&gt;
  -I, --help          Synonym for -?&lt;br /&gt;
  --auto-rehash       Enable automatic rehashing. One doesn't need to use&lt;br /&gt;
                      'rehash' to get table and field completion, but startup&lt;br /&gt;
                      and reconnecting may take a longer time. Disable with&lt;br /&gt;
                      --disable-auto-rehash.&lt;br /&gt;
                      (Defaults to on; use --skip-auto-rehash to disable.)&lt;br /&gt;
  -A, --no-auto-rehash &lt;br /&gt;
                      No automatic rehashing. One has to use 'rehash' to get&lt;br /&gt;
                      table and field completion. This gives a quicker start of&lt;br /&gt;
                      mysql and disables rehashing on reconnect.&lt;br /&gt;
  --auto-vertical-output &lt;br /&gt;
                      Automatically switch to vertical output mode if the&lt;br /&gt;
                      result is wider than the terminal width.&lt;br /&gt;
  -B, --batch         Don't use history file. Disable interactive behavior.&lt;br /&gt;
                      (Enables --silent.)&lt;br /&gt;
  --character-sets-dir=name &lt;br /&gt;
                      Directory for character set files.&lt;br /&gt;
  --column-type-info  Display column type information.&lt;br /&gt;
  -c, --comments      Preserve comments. Send comments to the server. The&lt;br /&gt;
                      default is --skip-comments (discard comments), enable&lt;br /&gt;
                      with --comments.&lt;br /&gt;
  -C, --compress      Use compression in server/client protocol.&lt;br /&gt;
  -#, --debug[=#]     This is a non-debug version. Catch this and exit.&lt;br /&gt;
  --debug-check       Check memory and open file usage at exit.&lt;br /&gt;
  -T, --debug-info    Print some debug info at exit.&lt;br /&gt;
  -D, --database=name Database to use.&lt;br /&gt;
  --default-character-set=name &lt;br /&gt;
                      Set the default character set.&lt;br /&gt;
  --delimiter=name    Delimiter to be used.&lt;br /&gt;
  --enable-cleartext-plugin &lt;br /&gt;
                      Enable/disable the clear text authentication plugin.&lt;br /&gt;
  -e, --execute=name  Execute command and quit. (Disables --force and history&lt;br /&gt;
                      file.)&lt;br /&gt;
  -E, --vertical      Print the output of a query (rows) vertically.&lt;br /&gt;
  -f, --force         Continue even if we get an SQL error.&lt;br /&gt;
  -G, --named-commands &lt;br /&gt;
                      Enable named commands. Named commands mean this program's&lt;br /&gt;
                      internal commands; see mysql&amp;gt; help . When enabled, the&lt;br /&gt;
                      named commands can be used from any line of the query,&lt;br /&gt;
                      otherwise only from the first line, before an enter.&lt;br /&gt;
                      Disable with --disable-named-commands. This option is&lt;br /&gt;
                      disabled by default.&lt;br /&gt;
  -i, --ignore-spaces Ignore space after function names.&lt;br /&gt;
  --init-command=name SQL Command to execute when connecting to MySQL server.&lt;br /&gt;
                      Will automatically be re-executed when reconnecting.&lt;br /&gt;
  --local-infile      Enable/disable LOAD DATA LOCAL INFILE.&lt;br /&gt;
  -b, --no-beep       Turn off beep on error.&lt;br /&gt;
  -h, --host=name     Connect to host.&lt;br /&gt;
  -H, --html          Produce HTML output.&lt;br /&gt;
  -X, --xml           Produce XML output.&lt;br /&gt;
  --line-numbers      Write line numbers for errors.&lt;br /&gt;
                      (Defaults to on; use --skip-line-numbers to disable.)&lt;br /&gt;
  -L, --skip-line-numbers &lt;br /&gt;
                      Don't write line number for errors.&lt;br /&gt;
  -n, --unbuffered    Flush buffer after each query.&lt;br /&gt;
  --column-names      Write column names in results.&lt;br /&gt;
                      (Defaults to on; use --skip-column-names to disable.)&lt;br /&gt;
  -N, --skip-column-names &lt;br /&gt;
                      Don't write column names in results.&lt;br /&gt;
  --sigint-ignore     Ignore SIGINT (CTRL-C).&lt;br /&gt;
  -o, --one-database  Ignore statements except those that occur while the&lt;br /&gt;
                      default database is the one named at the command line.&lt;br /&gt;
  --pager[=name]      Pager to use to display results. If you don't supply an&lt;br /&gt;
                      option, the default pager is taken from your ENV variable&lt;br /&gt;
                      PAGER. Valid pagers are less, more, cat [&amp;gt; filename],&lt;br /&gt;
                      etc. See interactive help (\h) also. This option does not&lt;br /&gt;
                      work in batch mode. Disable with --disable-pager. This&lt;br /&gt;
                      option is disabled by default.&lt;br /&gt;
  -p, --password[=name] &lt;br /&gt;
                      Password to use when connecting to server. If password is&lt;br /&gt;
                      not given it's asked from the tty.&lt;br /&gt;
  -P, --port=#        Port number to use for connection or 0 for default to, in&lt;br /&gt;
                      order of preference, my.cnf, $MYSQL_TCP_PORT,&lt;br /&gt;
                      /etc/services, built-in default (3306).&lt;br /&gt;
  --prompt=name       Set the mysql prompt to this value.&lt;br /&gt;
  --protocol=name     The protocol to use for connection (tcp, socket, pipe,&lt;br /&gt;
                      memory).&lt;br /&gt;
  -q, --quick         Don't cache result, print it row by row. This may slow&lt;br /&gt;
                      down the server if the output is suspended. Doesn't use&lt;br /&gt;
                      history file.&lt;br /&gt;
  -r, --raw           Write fields without conversion. Used with --batch.&lt;br /&gt;
  --reconnect         Reconnect if the connection is lost. Disable with&lt;br /&gt;
                      --disable-reconnect. This option is enabled by default.&lt;br /&gt;
                      (Defaults to on; use --skip-reconnect to disable.)&lt;br /&gt;
  -s, --silent        Be more silent. Print results with a tab as separator,&lt;br /&gt;
                      each row on new line.&lt;br /&gt;
  -S, --socket=name   The socket file to use for connection.&lt;br /&gt;
  --ssl               Enable SSL for connection (automatically enabled with&lt;br /&gt;
                      other flags).&lt;br /&gt;
  --ssl-ca=name       CA file in PEM format (check OpenSSL docs, implies&lt;br /&gt;
                      --ssl).&lt;br /&gt;
  --ssl-capath=name   CA directory (check OpenSSL docs, implies --ssl).&lt;br /&gt;
  --ssl-cert=name     X509 cert in PEM format (implies --ssl).&lt;br /&gt;
  --ssl-cipher=name   SSL cipher to use (implies --ssl).&lt;br /&gt;
  --ssl-key=name      X509 key in PEM format (implies --ssl).&lt;br /&gt;
  --ssl-verify-server-cert &lt;br /&gt;
                      Verify server's &amp;quot;Common Name&amp;quot; in its cert against&lt;br /&gt;
                      hostname used when connecting. This option is disabled by&lt;br /&gt;
                      default.&lt;br /&gt;
  -t, --table         Output in table format.&lt;br /&gt;
  --tee=name          Append everything into outfile. See interactive help (\h)&lt;br /&gt;
                      also. Does not work in batch mode. Disable with&lt;br /&gt;
                      --disable-tee. This option is disabled by default.&lt;br /&gt;
  -u, --user=name     User for login if not current user.&lt;br /&gt;
  -U, --safe-updates  Only allow UPDATE and DELETE that uses keys.&lt;br /&gt;
  -U, --i-am-a-dummy  Synonym for option --safe-updates, -U.&lt;br /&gt;
  -v, --verbose       Write more. (-v -v -v gives the table output format).&lt;br /&gt;
  -V, --version       Output version information and exit.&lt;br /&gt;
  -w, --wait          Wait and retry if connection is down.&lt;br /&gt;
  --connect-timeout=# Number of seconds before connection timeout.&lt;br /&gt;
  --max-allowed-packet=# &lt;br /&gt;
                      The maximum packet length to send to or receive from&lt;br /&gt;
                      server.&lt;br /&gt;
  --net-buffer-length=# &lt;br /&gt;
                      The buffer size for TCP/IP and socket communication.&lt;br /&gt;
  --select-limit=#    Automatic limit for SELECT when using --safe-updates.&lt;br /&gt;
  --max-join-size=#   Automatic limit for rows in a join when using&lt;br /&gt;
                      --safe-updates.&lt;br /&gt;
  --secure-auth       Refuse client connecting to server if it uses old&lt;br /&gt;
                      (pre-4.1.1) protocol.&lt;br /&gt;
  --server-arg=name   Send embedded server this as a parameter.&lt;br /&gt;
  --show-warnings     Show warnings after every statement.&lt;br /&gt;
  --plugin-dir=name   Directory for client-side plugins.&lt;br /&gt;
  --default-auth=name Default authentication client-side plugin to use.&lt;br /&gt;
&lt;br /&gt;
Default options are read from the following files in the given order:&lt;br /&gt;
/etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf &lt;br /&gt;
The following groups are read: mysql client&lt;br /&gt;
The following options may be given as the first argument:&lt;br /&gt;
--print-defaults        Print the program argument list and exit.&lt;br /&gt;
--no-defaults           Don't read default options from any option file.&lt;br /&gt;
--defaults-file=#       Only read default options from the given file #.&lt;br /&gt;
--defaults-extra-file=# Read this file after the global files are read.&lt;br /&gt;
&lt;br /&gt;
Variables (--variable-name=value)&lt;br /&gt;
and boolean options {FALSE|TRUE}  Value (after reading options)&lt;br /&gt;
--------------------------------- ----------------------------------------&lt;br /&gt;
auto-rehash                       TRUE&lt;br /&gt;
auto-vertical-output              FALSE&lt;br /&gt;
character-sets-dir                (No default value)&lt;br /&gt;
column-type-info                  FALSE&lt;br /&gt;
comments                          FALSE&lt;br /&gt;
compress                          FALSE&lt;br /&gt;
debug-check                       FALSE&lt;br /&gt;
debug-info                        FALSE&lt;br /&gt;
database                          (No default value)&lt;br /&gt;
default-character-set             auto&lt;br /&gt;
delimiter                         ;&lt;br /&gt;
enable-cleartext-plugin           FALSE&lt;br /&gt;
vertical                          FALSE&lt;br /&gt;
force                             FALSE&lt;br /&gt;
named-commands                    FALSE&lt;br /&gt;
ignore-spaces                     FALSE&lt;br /&gt;
init-command                      (No default value)&lt;br /&gt;
local-infile                      FALSE&lt;br /&gt;
no-beep                           FALSE&lt;br /&gt;
host                              (No default value)&lt;br /&gt;
html                              FALSE&lt;br /&gt;
xml                               FALSE&lt;br /&gt;
line-numbers                      TRUE&lt;br /&gt;
unbuffered                        FALSE&lt;br /&gt;
column-names                      TRUE&lt;br /&gt;
sigint-ignore                     FALSE&lt;br /&gt;
port                              0&lt;br /&gt;
prompt                            mysql&amp;gt; &lt;br /&gt;
quick                             FALSE&lt;br /&gt;
raw                               FALSE&lt;br /&gt;
reconnect                         TRUE&lt;br /&gt;
socket                            (No default value)&lt;br /&gt;
ssl                               FALSE&lt;br /&gt;
ssl-ca                            (No default value)&lt;br /&gt;
ssl-capath                        (No default value)&lt;br /&gt;
ssl-cert                          (No default value)&lt;br /&gt;
ssl-cipher                        (No default value)&lt;br /&gt;
ssl-key                           (No default value)&lt;br /&gt;
ssl-verify-server-cert            FALSE&lt;br /&gt;
table                             FALSE&lt;br /&gt;
user                              (No default value)&lt;br /&gt;
safe-updates                      FALSE&lt;br /&gt;
i-am-a-dummy                      FALSE&lt;br /&gt;
connect-timeout                   0&lt;br /&gt;
max-allowed-packet                16777216&lt;br /&gt;
net-buffer-length                 16384&lt;br /&gt;
select-limit                      1000&lt;br /&gt;
max-join-size                     1000000&lt;br /&gt;
secure-auth                       FALSE&lt;br /&gt;
show-warnings                     FALSE&lt;br /&gt;
plugin-dir                        (No default value)&lt;br /&gt;
default-auth                      (No default value)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=MySql&amp;diff=5416</id>
		<title>MySql</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=MySql&amp;diff=5416"/>
		<updated>2014-03-03T04:55:38Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[CssWork]] - parent&lt;br /&gt;
* [[SqlSchema]] - tables used in the database &lt;br /&gt;
* [[SqlDefaults]] - defaults for those tables&lt;br /&gt;
&lt;br /&gt;
* http://dev.mysql.com/doc/refman/5.5/en/index.html&lt;br /&gt;
* http://dev.mysql.com/doc/refman/5.5/en/tutorial.html&lt;br /&gt;
&lt;br /&gt;
as root: mysqldump altslashdot css &amp;gt; zz.txt&lt;br /&gt;
&lt;br /&gt;
mysqldump -T '/var/lib/mysql/test'  altslashdot css&lt;br /&gt;
&lt;br /&gt;
Information about mysql as used for slash&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Database Name: altslashdot&lt;br /&gt;
Database user: mysql&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Version&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql-5.5.36&lt;br /&gt;
db4-devel-4.7.25                     mysql-libs-5.5.36&lt;br /&gt;
db4-utils-4.7.25                     mysql-server-5.5.36&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;mysqldump&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
mysqldump http://dev.mysql.com/doc/refman/5.5/en/mysqldump.html&lt;br /&gt;
&lt;br /&gt;
A client that dumps a MySQL database into a file as SQL, text, or XML.&lt;br /&gt;
&lt;br /&gt;
The mysqldump client is a utility that performs logical backups, producing a set of SQL statements that can be run to reproduce the original schema objects, table data, or both. It dumps one or more MySQL database for backup or transfer to another SQL server. The mysqldump command can also generate output in CSV, other delimited text, or XML format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Syntax &lt;br /&gt;
&lt;br /&gt;
There are in general three ways to use mysqldump—in order to dump a set of one or more tables, a set of one or more complete databases, or an entire MySQL server—as shown here: &lt;br /&gt;
shell&amp;gt; mysqldump [options] db_name [tbl_name ...]&lt;br /&gt;
shell&amp;gt; mysqldump [options] --databases db_name ...&lt;br /&gt;
shell&amp;gt; mysqldump [options] --all-databases&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To dump entire databases, do not name any tables following db_name, or use the --databases or --all-databases option. &lt;br /&gt;
&lt;br /&gt;
mysqldump does not dump the INFORMATION_SCHEMA database by default. mysqldump dumps INFORMATION_SCHEMA only if you name it explicitly on the command line, although currently you must also use the --skip-lock-tables option. Before MySQL 5.5 mysqldump silently ignores INFORMATION_SCHEMA even if you name it explicitly on the command line. &lt;br /&gt;
&lt;br /&gt;
mysqldump does not dump the performance_schema database. &lt;br /&gt;
&lt;br /&gt;
Before MySQL 5.5.25, mysqldump does not dump the general_log or slow_query_log tables for dumps of the mysql database. As of 5.5.25, the dump includes statements to recreate those tables so that they are not missing after reloading the dump file. Log table contents are not dumped. &lt;br /&gt;
&lt;br /&gt;
mysqldump also does not dump the MySQL Cluster ndbinfo information database. &lt;br /&gt;
&lt;br /&gt;
To see a list of the options your version of mysqldump supports, execute mysqldump --help.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Mysql programs&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All these try PROGNAME --help for details&lt;br /&gt;
&lt;br /&gt;
also  http://dev.mysql.com/doc/refman/5.5/en/programs-overview.html&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
The MySQL server, mysqld, is the main program that does most of the work in a MySQL installation. The server is accompanied by several related scripts that assist you in starting and stopping the server: &lt;br /&gt;
&lt;br /&gt;
mysqld &lt;br /&gt;
&lt;br /&gt;
The SQL daemon (that is, the MySQL server). To use client programs, mysqld must be running, because clients gain access to databases by connecting to the server. See Section 4.3.1, “mysqld — The MySQL Server”. &lt;br /&gt;
&lt;br /&gt;
mysqld_safe &lt;br /&gt;
&lt;br /&gt;
A server startup script. mysqld_safe attempts to start mysqld. See Section 4.3.2, “mysqld_safe — MySQL Server Startup Script”. &lt;br /&gt;
&lt;br /&gt;
mysql.server &lt;br /&gt;
&lt;br /&gt;
A server startup script. This script is used on systems that use System V-style run directories containing scripts that start system services for particular run levels. It invokes mysqld_safe to start the MySQL server. See Section 4.3.3, “mysql.server — MySQL Server Startup Script”. &lt;br /&gt;
&lt;br /&gt;
mysqld_multi &lt;br /&gt;
&lt;br /&gt;
A server startup script that can start or stop multiple servers installed on the system. See Section 4.3.4, “mysqld_multi — Manage Multiple MySQL Servers”. &lt;br /&gt;
&lt;br /&gt;
Several programs perform setup operations during MySQL installation or upgrading: &lt;br /&gt;
&lt;br /&gt;
comp_err &lt;br /&gt;
&lt;br /&gt;
This program is used during the MySQL build/installation process. It compiles error message files from the error source files. See Section 4.4.1, “comp_err — Compile MySQL Error Message File”. &lt;br /&gt;
&lt;br /&gt;
mysql_install_db &lt;br /&gt;
&lt;br /&gt;
This script creates the MySQL database and initializes the grant tables with default privileges. It is usually executed only once, when first installing MySQL on a system. See Section 4.4.3, “mysql_install_db — Initialize MySQL Data Directory”, Section 2.10.1, “Postinstallation Procedures for Unix-like Systems”, and Section 4.4.3, “mysql_install_db — Initialize MySQL Data Directory”. &lt;br /&gt;
&lt;br /&gt;
mysql_plugin &lt;br /&gt;
&lt;br /&gt;
This program configures MySQL server plugins. See Section 4.4.4, “mysql_plugin — Configure MySQL Server Plugins”. &lt;br /&gt;
&lt;br /&gt;
mysql_secure_installation &lt;br /&gt;
&lt;br /&gt;
This program enables you to improve the security of your MySQL installation. SQL. See Section 4.4.5, “mysql_secure_installation — Improve MySQL Installation Security”. &lt;br /&gt;
&lt;br /&gt;
mysql_tzinfo_to_sql &lt;br /&gt;
&lt;br /&gt;
This program loads the time zone tables in the mysql database using the contents of the host system zoneinfo database (the set of files describing time zones). SQL. See Section 4.4.6, “mysql_tzinfo_to_sql — Load the Time Zone Tables”. &lt;br /&gt;
&lt;br /&gt;
mysql_upgrade &lt;br /&gt;
&lt;br /&gt;
This program is used after a MySQL upgrade operation. It checks tables for incompatibilities and repairs them if necessary, and updates the grant tables with any changes that have been made in newer versions of MySQL. See Section 4.4.7, “mysql_upgrade — Check and Upgrade MySQL Tables”. &lt;br /&gt;
&lt;br /&gt;
MySQL client programs that connect to the MySQL server: &lt;br /&gt;
&lt;br /&gt;
mysql &lt;br /&gt;
&lt;br /&gt;
The command-line tool for interactively entering SQL statements or executing them from a file in batch mode. See Section 4.5.1, “mysql — The MySQL Command-Line Tool”. &lt;br /&gt;
&lt;br /&gt;
mysqladmin &lt;br /&gt;
&lt;br /&gt;
A client that performs administrative operations, such as creating or dropping databases, reloading the grant tables, flushing tables to disk, and reopening log files. mysqladmin can also be used to retrieve version, process, and status information from the server. See Section 4.5.2, “mysqladmin — Client for Administering a MySQL Server”. &lt;br /&gt;
&lt;br /&gt;
mysqlcheck &lt;br /&gt;
&lt;br /&gt;
A table-maintenance client that checks, repairs, analyzes, and optimizes tables. See Section 4.5.3, “mysqlcheck — A Table Maintenance Program”. &lt;br /&gt;
&lt;br /&gt;
mysqldump &lt;br /&gt;
&lt;br /&gt;
A client that dumps a MySQL database into a file as SQL, text, or XML. See Section 4.5.4, “mysqldump — A Database Backup Program”. &lt;br /&gt;
&lt;br /&gt;
mysqlimport &lt;br /&gt;
&lt;br /&gt;
A client that imports text files into their respective tables using LOAD DATA INFILE. See Section 4.5.5, “mysqlimport — A Data Import Program”. &lt;br /&gt;
&lt;br /&gt;
mysqlshow &lt;br /&gt;
&lt;br /&gt;
A client that displays information about databases, tables, columns, and indexes. See Section 4.5.6, “mysqlshow — Display Database, Table, and Column Information”. &lt;br /&gt;
&lt;br /&gt;
mysqlslap &lt;br /&gt;
&lt;br /&gt;
A client that is designed to emulate client load for a MySQL server and report the timing of each stage. It works as if multiple clients are accessing the server. See Section 4.5.7, “mysqlslap — Load Emulation Client”. &lt;br /&gt;
&lt;br /&gt;
MySQL administrative and utility programs: &lt;br /&gt;
&lt;br /&gt;
innochecksum &lt;br /&gt;
&lt;br /&gt;
An offline InnoDB offline file checksum utility. See Section 4.6.1, “innochecksum — Offline InnoDB File Checksum Utility”. &lt;br /&gt;
&lt;br /&gt;
myisam_ftdump &lt;br /&gt;
&lt;br /&gt;
A utility that displays information about full-text indexes in MyISAM tables. See Section 4.6.2, “myisam_ftdump — Display Full-Text Index information”. &lt;br /&gt;
&lt;br /&gt;
myisamchk &lt;br /&gt;
&lt;br /&gt;
A utility to describe, check, optimize, and repair MyISAM tables. See Section 4.6.3, “myisamchk — MyISAM Table-Maintenance Utility”. &lt;br /&gt;
&lt;br /&gt;
myisamlog &lt;br /&gt;
&lt;br /&gt;
A utility that processes the contents of a MyISAM log file. See Section 4.6.4, “myisamlog — Display MyISAM Log File Contents”. &lt;br /&gt;
&lt;br /&gt;
myisampack &lt;br /&gt;
&lt;br /&gt;
A utility that compresses MyISAM tables to produce smaller read-only tables. See Section 4.6.5, “myisampack — Generate Compressed, Read-Only MyISAM Tables”. &lt;br /&gt;
&lt;br /&gt;
mysqlaccess &lt;br /&gt;
&lt;br /&gt;
A script that checks the access privileges for a host name, user name, and database combination. See Section 4.6.6, “mysqlaccess — Client for Checking Access Privileges”. &lt;br /&gt;
&lt;br /&gt;
mysqlbinlog &lt;br /&gt;
&lt;br /&gt;
A utility for reading statements from a binary log. The log of executed statements contained in the binary log files can be used to help recover from a crash. See Section 4.6.7, “mysqlbinlog — Utility for Processing Binary Log Files”. &lt;br /&gt;
&lt;br /&gt;
mysqldumpslow &lt;br /&gt;
&lt;br /&gt;
A utility to read and summarize the contents of a slow query log. See Section 4.6.8, “mysqldumpslow — Summarize Slow Query Log Files”. &lt;br /&gt;
&lt;br /&gt;
mysqlhotcopy &lt;br /&gt;
&lt;br /&gt;
A utility that quickly makes backups of MyISAM tables while the server is running. See Section 4.6.9, “mysqlhotcopy — A Database Backup Program”. &lt;br /&gt;
&lt;br /&gt;
mysql_convert_table_format &lt;br /&gt;
&lt;br /&gt;
A utility that converts tables in a database to use a given storage engine. See Section 4.6.10, “mysql_convert_table_format — Convert Tables to Use a Given Storage Engine”. &lt;br /&gt;
&lt;br /&gt;
mysql_find_rows &lt;br /&gt;
&lt;br /&gt;
A utility that reads files containing SQL statements (such as update logs) and extracts statements that match a given regular expression. See Section 4.6.11, “mysql_find_rows — Extract SQL Statements from Files”. &lt;br /&gt;
&lt;br /&gt;
mysql_fix_extensions &lt;br /&gt;
&lt;br /&gt;
A utility that converts the extensions for MyISAM table files to lowercase. This can be useful after transferring the files from a system with case-insensitive file names to a system with case-sensitive file names. See Section 4.6.12, “mysql_fix_extensions — Normalize Table File Name Extensions”. &lt;br /&gt;
&lt;br /&gt;
mysql_setpermission &lt;br /&gt;
&lt;br /&gt;
A utility for interactively setting permissions in the MySQL grant tables. See Section 4.6.13, “mysql_setpermission — Interactively Set Permissions in Grant Tables”. &lt;br /&gt;
&lt;br /&gt;
mysql_waitpid &lt;br /&gt;
&lt;br /&gt;
A utility that kills the process with a given process ID. See Section 4.6.14, “mysql_waitpid — Kill Process and Wait for Its Termination”. &lt;br /&gt;
&lt;br /&gt;
mysql_zap &lt;br /&gt;
&lt;br /&gt;
A utility that kills processes that match a pattern. See Section 4.6.15, “mysql_zap — Kill Processes That Match a Pattern”. &lt;br /&gt;
&lt;br /&gt;
MySQL program-development utilities: &lt;br /&gt;
&lt;br /&gt;
msql2mysql &lt;br /&gt;
&lt;br /&gt;
A shell script that converts mSQL programs to MySQL. It doesn't handle every case, but it gives a good start when converting. See Section 4.7.1, “msql2mysql — Convert mSQL Programs for Use with MySQL”. &lt;br /&gt;
&lt;br /&gt;
mysql_config &lt;br /&gt;
&lt;br /&gt;
A shell script that produces the option values needed when compiling MySQL programs. See Section 4.7.2, “mysql_config — Display Options for Compiling Clients”. &lt;br /&gt;
&lt;br /&gt;
my_print_defaults &lt;br /&gt;
&lt;br /&gt;
A utility that shows which options are present in option groups of option files. See Section 4.7.3, “my_print_defaults — Display Options from Option Files”. &lt;br /&gt;
&lt;br /&gt;
resolve_stack_dump &lt;br /&gt;
&lt;br /&gt;
A utility program that resolves a numeric stack trace dump to symbols. See Section 4.7.4, “resolve_stack_dump — Resolve Numeric Stack Trace Dump to Symbols”. &lt;br /&gt;
&lt;br /&gt;
Miscellaneous utilities: &lt;br /&gt;
&lt;br /&gt;
perror &lt;br /&gt;
&lt;br /&gt;
A utility that displays the meaning of system or MySQL error codes. See Section 4.8.1, “perror — Explain Error Codes”. &lt;br /&gt;
&lt;br /&gt;
replace &lt;br /&gt;
&lt;br /&gt;
A utility program that performs string replacement in the input text. See Section 4.8.2, “replace — A String-Replacement Utility”. &lt;br /&gt;
&lt;br /&gt;
resolveip &lt;br /&gt;
&lt;br /&gt;
A utility program that resolves a host name to an IP address or vice versa. See Section 4.8.3, “resolveip — Resolve Host name to IP Address or Vice Versa”. &lt;br /&gt;
&lt;br /&gt;
Oracle Corporation also provides the MySQL Workbench GUI tool, which is used to administer MySQL servers and databases, to create, execute, and evaluate queries, and to migrate schemas and data from other relational database management systems for use with MySQL. Additional GUI tools include MySQL Notifier for Microsoft Windows MySQL for Excel. &lt;br /&gt;
&lt;br /&gt;
MySQL client programs that communicate with the server using the MySQL client/server library use the following environment variables. &lt;br /&gt;
Environment Variable	Meaning&lt;br /&gt;
MYSQL_UNIX_PORT	The default Unix socket file; used for connections to localhost&lt;br /&gt;
MYSQL_TCP_PORT	The default port number; used for TCP/IP connections&lt;br /&gt;
MYSQL_PWD	The default password&lt;br /&gt;
MYSQL_DEBUG	Debug trace options when debugging&lt;br /&gt;
TMPDIR	The directory where temporary tables and files are created&lt;br /&gt;
&lt;br /&gt;
For a full list of environment variables used by MySQL programs, see Section 2.12, “Environment Variables”.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Mysql configuration file in /etc/my.cnf&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[mysqld]&lt;br /&gt;
datadir=/var/lib/mysql&lt;br /&gt;
socket=/var/lib/mysql/mysql.sock&lt;br /&gt;
&lt;br /&gt;
# Disabling symbolic-links is recommended to prevent assorted security risks&lt;br /&gt;
symbolic-links=0&lt;br /&gt;
&lt;br /&gt;
# Settings user and group are ignored when systemd is used (fedora &amp;gt;= 15).&lt;br /&gt;
# If you need to run mysqld under a different user or group,&lt;br /&gt;
# customize your systemd unit file for mysqld according to the&lt;br /&gt;
# instructions in http://fedoraproject.org/wiki/Systemd&lt;br /&gt;
user=mysql&lt;br /&gt;
&lt;br /&gt;
# Semisynchronous Replication&lt;br /&gt;
# http://dev.mysql.com/doc/refman/5.5/en/replication-semisync.html&lt;br /&gt;
# uncomment next line on MASTER&lt;br /&gt;
;plugin-load=rpl_semi_sync_master=semisync_master.so&lt;br /&gt;
# uncomment next line on SLAVE&lt;br /&gt;
;plugin-load=rpl_semi_sync_slave=semisync_slave.so&lt;br /&gt;
&lt;br /&gt;
# Others options for Semisynchronous Replication&lt;br /&gt;
;rpl_semi_sync_master_enabled=1&lt;br /&gt;
;rpl_semi_sync_master_timeout=10&lt;br /&gt;
;rpl_semi_sync_slave_enabled=1&lt;br /&gt;
&lt;br /&gt;
# http://dev.mysql.com/doc/refman/5.5/en/performance-schema.html&lt;br /&gt;
;performance_schema&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[mysqld_safe]&lt;br /&gt;
log-error=/var/log/mysqld.log&lt;br /&gt;
pid-file=/var/run/mysqld/mysqld.pid&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;mysql --help&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql  Ver 14.14 Distrib 5.5.36, for Linux (x86_64) using readline 5.1&lt;br /&gt;
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.&lt;br /&gt;
&lt;br /&gt;
Oracle is a registered trademark of Oracle Corporation and/or its&lt;br /&gt;
affiliates. Other names may be trademarks of their respective&lt;br /&gt;
owners.&lt;br /&gt;
&lt;br /&gt;
Usage: mysql [OPTIONS] [database]&lt;br /&gt;
  -?, --help          Display this help and exit.&lt;br /&gt;
  -I, --help          Synonym for -?&lt;br /&gt;
  --auto-rehash       Enable automatic rehashing. One doesn't need to use&lt;br /&gt;
                      'rehash' to get table and field completion, but startup&lt;br /&gt;
                      and reconnecting may take a longer time. Disable with&lt;br /&gt;
                      --disable-auto-rehash.&lt;br /&gt;
                      (Defaults to on; use --skip-auto-rehash to disable.)&lt;br /&gt;
  -A, --no-auto-rehash &lt;br /&gt;
                      No automatic rehashing. One has to use 'rehash' to get&lt;br /&gt;
                      table and field completion. This gives a quicker start of&lt;br /&gt;
                      mysql and disables rehashing on reconnect.&lt;br /&gt;
  --auto-vertical-output &lt;br /&gt;
                      Automatically switch to vertical output mode if the&lt;br /&gt;
                      result is wider than the terminal width.&lt;br /&gt;
  -B, --batch         Don't use history file. Disable interactive behavior.&lt;br /&gt;
                      (Enables --silent.)&lt;br /&gt;
  --character-sets-dir=name &lt;br /&gt;
                      Directory for character set files.&lt;br /&gt;
  --column-type-info  Display column type information.&lt;br /&gt;
  -c, --comments      Preserve comments. Send comments to the server. The&lt;br /&gt;
                      default is --skip-comments (discard comments), enable&lt;br /&gt;
                      with --comments.&lt;br /&gt;
  -C, --compress      Use compression in server/client protocol.&lt;br /&gt;
  -#, --debug[=#]     This is a non-debug version. Catch this and exit.&lt;br /&gt;
  --debug-check       Check memory and open file usage at exit.&lt;br /&gt;
  -T, --debug-info    Print some debug info at exit.&lt;br /&gt;
  -D, --database=name Database to use.&lt;br /&gt;
  --default-character-set=name &lt;br /&gt;
                      Set the default character set.&lt;br /&gt;
  --delimiter=name    Delimiter to be used.&lt;br /&gt;
  --enable-cleartext-plugin &lt;br /&gt;
                      Enable/disable the clear text authentication plugin.&lt;br /&gt;
  -e, --execute=name  Execute command and quit. (Disables --force and history&lt;br /&gt;
                      file.)&lt;br /&gt;
  -E, --vertical      Print the output of a query (rows) vertically.&lt;br /&gt;
  -f, --force         Continue even if we get an SQL error.&lt;br /&gt;
  -G, --named-commands &lt;br /&gt;
                      Enable named commands. Named commands mean this program's&lt;br /&gt;
                      internal commands; see mysql&amp;gt; help . When enabled, the&lt;br /&gt;
                      named commands can be used from any line of the query,&lt;br /&gt;
                      otherwise only from the first line, before an enter.&lt;br /&gt;
                      Disable with --disable-named-commands. This option is&lt;br /&gt;
                      disabled by default.&lt;br /&gt;
  -i, --ignore-spaces Ignore space after function names.&lt;br /&gt;
  --init-command=name SQL Command to execute when connecting to MySQL server.&lt;br /&gt;
                      Will automatically be re-executed when reconnecting.&lt;br /&gt;
  --local-infile      Enable/disable LOAD DATA LOCAL INFILE.&lt;br /&gt;
  -b, --no-beep       Turn off beep on error.&lt;br /&gt;
  -h, --host=name     Connect to host.&lt;br /&gt;
  -H, --html          Produce HTML output.&lt;br /&gt;
  -X, --xml           Produce XML output.&lt;br /&gt;
  --line-numbers      Write line numbers for errors.&lt;br /&gt;
                      (Defaults to on; use --skip-line-numbers to disable.)&lt;br /&gt;
  -L, --skip-line-numbers &lt;br /&gt;
                      Don't write line number for errors.&lt;br /&gt;
  -n, --unbuffered    Flush buffer after each query.&lt;br /&gt;
  --column-names      Write column names in results.&lt;br /&gt;
                      (Defaults to on; use --skip-column-names to disable.)&lt;br /&gt;
  -N, --skip-column-names &lt;br /&gt;
                      Don't write column names in results.&lt;br /&gt;
  --sigint-ignore     Ignore SIGINT (CTRL-C).&lt;br /&gt;
  -o, --one-database  Ignore statements except those that occur while the&lt;br /&gt;
                      default database is the one named at the command line.&lt;br /&gt;
  --pager[=name]      Pager to use to display results. If you don't supply an&lt;br /&gt;
                      option, the default pager is taken from your ENV variable&lt;br /&gt;
                      PAGER. Valid pagers are less, more, cat [&amp;gt; filename],&lt;br /&gt;
                      etc. See interactive help (\h) also. This option does not&lt;br /&gt;
                      work in batch mode. Disable with --disable-pager. This&lt;br /&gt;
                      option is disabled by default.&lt;br /&gt;
  -p, --password[=name] &lt;br /&gt;
                      Password to use when connecting to server. If password is&lt;br /&gt;
                      not given it's asked from the tty.&lt;br /&gt;
  -P, --port=#        Port number to use for connection or 0 for default to, in&lt;br /&gt;
                      order of preference, my.cnf, $MYSQL_TCP_PORT,&lt;br /&gt;
                      /etc/services, built-in default (3306).&lt;br /&gt;
  --prompt=name       Set the mysql prompt to this value.&lt;br /&gt;
  --protocol=name     The protocol to use for connection (tcp, socket, pipe,&lt;br /&gt;
                      memory).&lt;br /&gt;
  -q, --quick         Don't cache result, print it row by row. This may slow&lt;br /&gt;
                      down the server if the output is suspended. Doesn't use&lt;br /&gt;
                      history file.&lt;br /&gt;
  -r, --raw           Write fields without conversion. Used with --batch.&lt;br /&gt;
  --reconnect         Reconnect if the connection is lost. Disable with&lt;br /&gt;
                      --disable-reconnect. This option is enabled by default.&lt;br /&gt;
                      (Defaults to on; use --skip-reconnect to disable.)&lt;br /&gt;
  -s, --silent        Be more silent. Print results with a tab as separator,&lt;br /&gt;
                      each row on new line.&lt;br /&gt;
  -S, --socket=name   The socket file to use for connection.&lt;br /&gt;
  --ssl               Enable SSL for connection (automatically enabled with&lt;br /&gt;
                      other flags).&lt;br /&gt;
  --ssl-ca=name       CA file in PEM format (check OpenSSL docs, implies&lt;br /&gt;
                      --ssl).&lt;br /&gt;
  --ssl-capath=name   CA directory (check OpenSSL docs, implies --ssl).&lt;br /&gt;
  --ssl-cert=name     X509 cert in PEM format (implies --ssl).&lt;br /&gt;
  --ssl-cipher=name   SSL cipher to use (implies --ssl).&lt;br /&gt;
  --ssl-key=name      X509 key in PEM format (implies --ssl).&lt;br /&gt;
  --ssl-verify-server-cert &lt;br /&gt;
                      Verify server's &amp;quot;Common Name&amp;quot; in its cert against&lt;br /&gt;
                      hostname used when connecting. This option is disabled by&lt;br /&gt;
                      default.&lt;br /&gt;
  -t, --table         Output in table format.&lt;br /&gt;
  --tee=name          Append everything into outfile. See interactive help (\h)&lt;br /&gt;
                      also. Does not work in batch mode. Disable with&lt;br /&gt;
                      --disable-tee. This option is disabled by default.&lt;br /&gt;
  -u, --user=name     User for login if not current user.&lt;br /&gt;
  -U, --safe-updates  Only allow UPDATE and DELETE that uses keys.&lt;br /&gt;
  -U, --i-am-a-dummy  Synonym for option --safe-updates, -U.&lt;br /&gt;
  -v, --verbose       Write more. (-v -v -v gives the table output format).&lt;br /&gt;
  -V, --version       Output version information and exit.&lt;br /&gt;
  -w, --wait          Wait and retry if connection is down.&lt;br /&gt;
  --connect-timeout=# Number of seconds before connection timeout.&lt;br /&gt;
  --max-allowed-packet=# &lt;br /&gt;
                      The maximum packet length to send to or receive from&lt;br /&gt;
                      server.&lt;br /&gt;
  --net-buffer-length=# &lt;br /&gt;
                      The buffer size for TCP/IP and socket communication.&lt;br /&gt;
  --select-limit=#    Automatic limit for SELECT when using --safe-updates.&lt;br /&gt;
  --max-join-size=#   Automatic limit for rows in a join when using&lt;br /&gt;
                      --safe-updates.&lt;br /&gt;
  --secure-auth       Refuse client connecting to server if it uses old&lt;br /&gt;
                      (pre-4.1.1) protocol.&lt;br /&gt;
  --server-arg=name   Send embedded server this as a parameter.&lt;br /&gt;
  --show-warnings     Show warnings after every statement.&lt;br /&gt;
  --plugin-dir=name   Directory for client-side plugins.&lt;br /&gt;
  --default-auth=name Default authentication client-side plugin to use.&lt;br /&gt;
&lt;br /&gt;
Default options are read from the following files in the given order:&lt;br /&gt;
/etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf &lt;br /&gt;
The following groups are read: mysql client&lt;br /&gt;
The following options may be given as the first argument:&lt;br /&gt;
--print-defaults        Print the program argument list and exit.&lt;br /&gt;
--no-defaults           Don't read default options from any option file.&lt;br /&gt;
--defaults-file=#       Only read default options from the given file #.&lt;br /&gt;
--defaults-extra-file=# Read this file after the global files are read.&lt;br /&gt;
&lt;br /&gt;
Variables (--variable-name=value)&lt;br /&gt;
and boolean options {FALSE|TRUE}  Value (after reading options)&lt;br /&gt;
--------------------------------- ----------------------------------------&lt;br /&gt;
auto-rehash                       TRUE&lt;br /&gt;
auto-vertical-output              FALSE&lt;br /&gt;
character-sets-dir                (No default value)&lt;br /&gt;
column-type-info                  FALSE&lt;br /&gt;
comments                          FALSE&lt;br /&gt;
compress                          FALSE&lt;br /&gt;
debug-check                       FALSE&lt;br /&gt;
debug-info                        FALSE&lt;br /&gt;
database                          (No default value)&lt;br /&gt;
default-character-set             auto&lt;br /&gt;
delimiter                         ;&lt;br /&gt;
enable-cleartext-plugin           FALSE&lt;br /&gt;
vertical                          FALSE&lt;br /&gt;
force                             FALSE&lt;br /&gt;
named-commands                    FALSE&lt;br /&gt;
ignore-spaces                     FALSE&lt;br /&gt;
init-command                      (No default value)&lt;br /&gt;
local-infile                      FALSE&lt;br /&gt;
no-beep                           FALSE&lt;br /&gt;
host                              (No default value)&lt;br /&gt;
html                              FALSE&lt;br /&gt;
xml                               FALSE&lt;br /&gt;
line-numbers                      TRUE&lt;br /&gt;
unbuffered                        FALSE&lt;br /&gt;
column-names                      TRUE&lt;br /&gt;
sigint-ignore                     FALSE&lt;br /&gt;
port                              0&lt;br /&gt;
prompt                            mysql&amp;gt; &lt;br /&gt;
quick                             FALSE&lt;br /&gt;
raw                               FALSE&lt;br /&gt;
reconnect                         TRUE&lt;br /&gt;
socket                            (No default value)&lt;br /&gt;
ssl                               FALSE&lt;br /&gt;
ssl-ca                            (No default value)&lt;br /&gt;
ssl-capath                        (No default value)&lt;br /&gt;
ssl-cert                          (No default value)&lt;br /&gt;
ssl-cipher                        (No default value)&lt;br /&gt;
ssl-key                           (No default value)&lt;br /&gt;
ssl-verify-server-cert            FALSE&lt;br /&gt;
table                             FALSE&lt;br /&gt;
user                              (No default value)&lt;br /&gt;
safe-updates                      FALSE&lt;br /&gt;
i-am-a-dummy                      FALSE&lt;br /&gt;
connect-timeout                   0&lt;br /&gt;
max-allowed-packet                16777216&lt;br /&gt;
net-buffer-length                 16384&lt;br /&gt;
select-limit                      1000&lt;br /&gt;
max-join-size                     1000000&lt;br /&gt;
secure-auth                       FALSE&lt;br /&gt;
show-warnings                     FALSE&lt;br /&gt;
plugin-dir                        (No default value)&lt;br /&gt;
default-auth                      (No default value)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=MySql&amp;diff=5415</id>
		<title>MySql</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=MySql&amp;diff=5415"/>
		<updated>2014-03-03T04:26:29Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[CssWork]] - parent&lt;br /&gt;
* [[SqlSchema]] - tables used in the database &lt;br /&gt;
* [[SqlDefaults]] - defaults for those tables&lt;br /&gt;
&lt;br /&gt;
* http://dev.mysql.com/doc/refman/5.5/en/index.html&lt;br /&gt;
* http://dev.mysql.com/doc/refman/5.5/en/tutorial.html&lt;br /&gt;
&lt;br /&gt;
as root: mysqldump altslashdot css &amp;gt; zz.txt&lt;br /&gt;
&lt;br /&gt;
Information about mysql as used for slash&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Database Name: altslashdot&lt;br /&gt;
Database user: mysql&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Version&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql-5.5.36&lt;br /&gt;
db4-devel-4.7.25                     mysql-libs-5.5.36&lt;br /&gt;
db4-utils-4.7.25                     mysql-server-5.5.36&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;mysqldump&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
mysqldump http://dev.mysql.com/doc/refman/5.5/en/mysqldump.html&lt;br /&gt;
&lt;br /&gt;
A client that dumps a MySQL database into a file as SQL, text, or XML.&lt;br /&gt;
&lt;br /&gt;
The mysqldump client is a utility that performs logical backups, producing a set of SQL statements that can be run to reproduce the original schema objects, table data, or both. It dumps one or more MySQL database for backup or transfer to another SQL server. The mysqldump command can also generate output in CSV, other delimited text, or XML format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Syntax &lt;br /&gt;
&lt;br /&gt;
There are in general three ways to use mysqldump—in order to dump a set of one or more tables, a set of one or more complete databases, or an entire MySQL server—as shown here: &lt;br /&gt;
shell&amp;gt; mysqldump [options] db_name [tbl_name ...]&lt;br /&gt;
shell&amp;gt; mysqldump [options] --databases db_name ...&lt;br /&gt;
shell&amp;gt; mysqldump [options] --all-databases&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To dump entire databases, do not name any tables following db_name, or use the --databases or --all-databases option. &lt;br /&gt;
&lt;br /&gt;
mysqldump does not dump the INFORMATION_SCHEMA database by default. mysqldump dumps INFORMATION_SCHEMA only if you name it explicitly on the command line, although currently you must also use the --skip-lock-tables option. Before MySQL 5.5 mysqldump silently ignores INFORMATION_SCHEMA even if you name it explicitly on the command line. &lt;br /&gt;
&lt;br /&gt;
mysqldump does not dump the performance_schema database. &lt;br /&gt;
&lt;br /&gt;
Before MySQL 5.5.25, mysqldump does not dump the general_log or slow_query_log tables for dumps of the mysql database. As of 5.5.25, the dump includes statements to recreate those tables so that they are not missing after reloading the dump file. Log table contents are not dumped. &lt;br /&gt;
&lt;br /&gt;
mysqldump also does not dump the MySQL Cluster ndbinfo information database. &lt;br /&gt;
&lt;br /&gt;
To see a list of the options your version of mysqldump supports, execute mysqldump --help.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Mysql programs&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All these try PROGNAME --help for details&lt;br /&gt;
&lt;br /&gt;
also  http://dev.mysql.com/doc/refman/5.5/en/programs-overview.html&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
The MySQL server, mysqld, is the main program that does most of the work in a MySQL installation. The server is accompanied by several related scripts that assist you in starting and stopping the server: &lt;br /&gt;
&lt;br /&gt;
mysqld &lt;br /&gt;
&lt;br /&gt;
The SQL daemon (that is, the MySQL server). To use client programs, mysqld must be running, because clients gain access to databases by connecting to the server. See Section 4.3.1, “mysqld — The MySQL Server”. &lt;br /&gt;
&lt;br /&gt;
mysqld_safe &lt;br /&gt;
&lt;br /&gt;
A server startup script. mysqld_safe attempts to start mysqld. See Section 4.3.2, “mysqld_safe — MySQL Server Startup Script”. &lt;br /&gt;
&lt;br /&gt;
mysql.server &lt;br /&gt;
&lt;br /&gt;
A server startup script. This script is used on systems that use System V-style run directories containing scripts that start system services for particular run levels. It invokes mysqld_safe to start the MySQL server. See Section 4.3.3, “mysql.server — MySQL Server Startup Script”. &lt;br /&gt;
&lt;br /&gt;
mysqld_multi &lt;br /&gt;
&lt;br /&gt;
A server startup script that can start or stop multiple servers installed on the system. See Section 4.3.4, “mysqld_multi — Manage Multiple MySQL Servers”. &lt;br /&gt;
&lt;br /&gt;
Several programs perform setup operations during MySQL installation or upgrading: &lt;br /&gt;
&lt;br /&gt;
comp_err &lt;br /&gt;
&lt;br /&gt;
This program is used during the MySQL build/installation process. It compiles error message files from the error source files. See Section 4.4.1, “comp_err — Compile MySQL Error Message File”. &lt;br /&gt;
&lt;br /&gt;
mysql_install_db &lt;br /&gt;
&lt;br /&gt;
This script creates the MySQL database and initializes the grant tables with default privileges. It is usually executed only once, when first installing MySQL on a system. See Section 4.4.3, “mysql_install_db — Initialize MySQL Data Directory”, Section 2.10.1, “Postinstallation Procedures for Unix-like Systems”, and Section 4.4.3, “mysql_install_db — Initialize MySQL Data Directory”. &lt;br /&gt;
&lt;br /&gt;
mysql_plugin &lt;br /&gt;
&lt;br /&gt;
This program configures MySQL server plugins. See Section 4.4.4, “mysql_plugin — Configure MySQL Server Plugins”. &lt;br /&gt;
&lt;br /&gt;
mysql_secure_installation &lt;br /&gt;
&lt;br /&gt;
This program enables you to improve the security of your MySQL installation. SQL. See Section 4.4.5, “mysql_secure_installation — Improve MySQL Installation Security”. &lt;br /&gt;
&lt;br /&gt;
mysql_tzinfo_to_sql &lt;br /&gt;
&lt;br /&gt;
This program loads the time zone tables in the mysql database using the contents of the host system zoneinfo database (the set of files describing time zones). SQL. See Section 4.4.6, “mysql_tzinfo_to_sql — Load the Time Zone Tables”. &lt;br /&gt;
&lt;br /&gt;
mysql_upgrade &lt;br /&gt;
&lt;br /&gt;
This program is used after a MySQL upgrade operation. It checks tables for incompatibilities and repairs them if necessary, and updates the grant tables with any changes that have been made in newer versions of MySQL. See Section 4.4.7, “mysql_upgrade — Check and Upgrade MySQL Tables”. &lt;br /&gt;
&lt;br /&gt;
MySQL client programs that connect to the MySQL server: &lt;br /&gt;
&lt;br /&gt;
mysql &lt;br /&gt;
&lt;br /&gt;
The command-line tool for interactively entering SQL statements or executing them from a file in batch mode. See Section 4.5.1, “mysql — The MySQL Command-Line Tool”. &lt;br /&gt;
&lt;br /&gt;
mysqladmin &lt;br /&gt;
&lt;br /&gt;
A client that performs administrative operations, such as creating or dropping databases, reloading the grant tables, flushing tables to disk, and reopening log files. mysqladmin can also be used to retrieve version, process, and status information from the server. See Section 4.5.2, “mysqladmin — Client for Administering a MySQL Server”. &lt;br /&gt;
&lt;br /&gt;
mysqlcheck &lt;br /&gt;
&lt;br /&gt;
A table-maintenance client that checks, repairs, analyzes, and optimizes tables. See Section 4.5.3, “mysqlcheck — A Table Maintenance Program”. &lt;br /&gt;
&lt;br /&gt;
mysqldump &lt;br /&gt;
&lt;br /&gt;
A client that dumps a MySQL database into a file as SQL, text, or XML. See Section 4.5.4, “mysqldump — A Database Backup Program”. &lt;br /&gt;
&lt;br /&gt;
mysqlimport &lt;br /&gt;
&lt;br /&gt;
A client that imports text files into their respective tables using LOAD DATA INFILE. See Section 4.5.5, “mysqlimport — A Data Import Program”. &lt;br /&gt;
&lt;br /&gt;
mysqlshow &lt;br /&gt;
&lt;br /&gt;
A client that displays information about databases, tables, columns, and indexes. See Section 4.5.6, “mysqlshow — Display Database, Table, and Column Information”. &lt;br /&gt;
&lt;br /&gt;
mysqlslap &lt;br /&gt;
&lt;br /&gt;
A client that is designed to emulate client load for a MySQL server and report the timing of each stage. It works as if multiple clients are accessing the server. See Section 4.5.7, “mysqlslap — Load Emulation Client”. &lt;br /&gt;
&lt;br /&gt;
MySQL administrative and utility programs: &lt;br /&gt;
&lt;br /&gt;
innochecksum &lt;br /&gt;
&lt;br /&gt;
An offline InnoDB offline file checksum utility. See Section 4.6.1, “innochecksum — Offline InnoDB File Checksum Utility”. &lt;br /&gt;
&lt;br /&gt;
myisam_ftdump &lt;br /&gt;
&lt;br /&gt;
A utility that displays information about full-text indexes in MyISAM tables. See Section 4.6.2, “myisam_ftdump — Display Full-Text Index information”. &lt;br /&gt;
&lt;br /&gt;
myisamchk &lt;br /&gt;
&lt;br /&gt;
A utility to describe, check, optimize, and repair MyISAM tables. See Section 4.6.3, “myisamchk — MyISAM Table-Maintenance Utility”. &lt;br /&gt;
&lt;br /&gt;
myisamlog &lt;br /&gt;
&lt;br /&gt;
A utility that processes the contents of a MyISAM log file. See Section 4.6.4, “myisamlog — Display MyISAM Log File Contents”. &lt;br /&gt;
&lt;br /&gt;
myisampack &lt;br /&gt;
&lt;br /&gt;
A utility that compresses MyISAM tables to produce smaller read-only tables. See Section 4.6.5, “myisampack — Generate Compressed, Read-Only MyISAM Tables”. &lt;br /&gt;
&lt;br /&gt;
mysqlaccess &lt;br /&gt;
&lt;br /&gt;
A script that checks the access privileges for a host name, user name, and database combination. See Section 4.6.6, “mysqlaccess — Client for Checking Access Privileges”. &lt;br /&gt;
&lt;br /&gt;
mysqlbinlog &lt;br /&gt;
&lt;br /&gt;
A utility for reading statements from a binary log. The log of executed statements contained in the binary log files can be used to help recover from a crash. See Section 4.6.7, “mysqlbinlog — Utility for Processing Binary Log Files”. &lt;br /&gt;
&lt;br /&gt;
mysqldumpslow &lt;br /&gt;
&lt;br /&gt;
A utility to read and summarize the contents of a slow query log. See Section 4.6.8, “mysqldumpslow — Summarize Slow Query Log Files”. &lt;br /&gt;
&lt;br /&gt;
mysqlhotcopy &lt;br /&gt;
&lt;br /&gt;
A utility that quickly makes backups of MyISAM tables while the server is running. See Section 4.6.9, “mysqlhotcopy — A Database Backup Program”. &lt;br /&gt;
&lt;br /&gt;
mysql_convert_table_format &lt;br /&gt;
&lt;br /&gt;
A utility that converts tables in a database to use a given storage engine. See Section 4.6.10, “mysql_convert_table_format — Convert Tables to Use a Given Storage Engine”. &lt;br /&gt;
&lt;br /&gt;
mysql_find_rows &lt;br /&gt;
&lt;br /&gt;
A utility that reads files containing SQL statements (such as update logs) and extracts statements that match a given regular expression. See Section 4.6.11, “mysql_find_rows — Extract SQL Statements from Files”. &lt;br /&gt;
&lt;br /&gt;
mysql_fix_extensions &lt;br /&gt;
&lt;br /&gt;
A utility that converts the extensions for MyISAM table files to lowercase. This can be useful after transferring the files from a system with case-insensitive file names to a system with case-sensitive file names. See Section 4.6.12, “mysql_fix_extensions — Normalize Table File Name Extensions”. &lt;br /&gt;
&lt;br /&gt;
mysql_setpermission &lt;br /&gt;
&lt;br /&gt;
A utility for interactively setting permissions in the MySQL grant tables. See Section 4.6.13, “mysql_setpermission — Interactively Set Permissions in Grant Tables”. &lt;br /&gt;
&lt;br /&gt;
mysql_waitpid &lt;br /&gt;
&lt;br /&gt;
A utility that kills the process with a given process ID. See Section 4.6.14, “mysql_waitpid — Kill Process and Wait for Its Termination”. &lt;br /&gt;
&lt;br /&gt;
mysql_zap &lt;br /&gt;
&lt;br /&gt;
A utility that kills processes that match a pattern. See Section 4.6.15, “mysql_zap — Kill Processes That Match a Pattern”. &lt;br /&gt;
&lt;br /&gt;
MySQL program-development utilities: &lt;br /&gt;
&lt;br /&gt;
msql2mysql &lt;br /&gt;
&lt;br /&gt;
A shell script that converts mSQL programs to MySQL. It doesn't handle every case, but it gives a good start when converting. See Section 4.7.1, “msql2mysql — Convert mSQL Programs for Use with MySQL”. &lt;br /&gt;
&lt;br /&gt;
mysql_config &lt;br /&gt;
&lt;br /&gt;
A shell script that produces the option values needed when compiling MySQL programs. See Section 4.7.2, “mysql_config — Display Options for Compiling Clients”. &lt;br /&gt;
&lt;br /&gt;
my_print_defaults &lt;br /&gt;
&lt;br /&gt;
A utility that shows which options are present in option groups of option files. See Section 4.7.3, “my_print_defaults — Display Options from Option Files”. &lt;br /&gt;
&lt;br /&gt;
resolve_stack_dump &lt;br /&gt;
&lt;br /&gt;
A utility program that resolves a numeric stack trace dump to symbols. See Section 4.7.4, “resolve_stack_dump — Resolve Numeric Stack Trace Dump to Symbols”. &lt;br /&gt;
&lt;br /&gt;
Miscellaneous utilities: &lt;br /&gt;
&lt;br /&gt;
perror &lt;br /&gt;
&lt;br /&gt;
A utility that displays the meaning of system or MySQL error codes. See Section 4.8.1, “perror — Explain Error Codes”. &lt;br /&gt;
&lt;br /&gt;
replace &lt;br /&gt;
&lt;br /&gt;
A utility program that performs string replacement in the input text. See Section 4.8.2, “replace — A String-Replacement Utility”. &lt;br /&gt;
&lt;br /&gt;
resolveip &lt;br /&gt;
&lt;br /&gt;
A utility program that resolves a host name to an IP address or vice versa. See Section 4.8.3, “resolveip — Resolve Host name to IP Address or Vice Versa”. &lt;br /&gt;
&lt;br /&gt;
Oracle Corporation also provides the MySQL Workbench GUI tool, which is used to administer MySQL servers and databases, to create, execute, and evaluate queries, and to migrate schemas and data from other relational database management systems for use with MySQL. Additional GUI tools include MySQL Notifier for Microsoft Windows MySQL for Excel. &lt;br /&gt;
&lt;br /&gt;
MySQL client programs that communicate with the server using the MySQL client/server library use the following environment variables. &lt;br /&gt;
Environment Variable	Meaning&lt;br /&gt;
MYSQL_UNIX_PORT	The default Unix socket file; used for connections to localhost&lt;br /&gt;
MYSQL_TCP_PORT	The default port number; used for TCP/IP connections&lt;br /&gt;
MYSQL_PWD	The default password&lt;br /&gt;
MYSQL_DEBUG	Debug trace options when debugging&lt;br /&gt;
TMPDIR	The directory where temporary tables and files are created&lt;br /&gt;
&lt;br /&gt;
For a full list of environment variables used by MySQL programs, see Section 2.12, “Environment Variables”.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Mysql configuration file in /etc/my.cnf&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[mysqld]&lt;br /&gt;
datadir=/var/lib/mysql&lt;br /&gt;
socket=/var/lib/mysql/mysql.sock&lt;br /&gt;
&lt;br /&gt;
# Disabling symbolic-links is recommended to prevent assorted security risks&lt;br /&gt;
symbolic-links=0&lt;br /&gt;
&lt;br /&gt;
# Settings user and group are ignored when systemd is used (fedora &amp;gt;= 15).&lt;br /&gt;
# If you need to run mysqld under a different user or group,&lt;br /&gt;
# customize your systemd unit file for mysqld according to the&lt;br /&gt;
# instructions in http://fedoraproject.org/wiki/Systemd&lt;br /&gt;
user=mysql&lt;br /&gt;
&lt;br /&gt;
# Semisynchronous Replication&lt;br /&gt;
# http://dev.mysql.com/doc/refman/5.5/en/replication-semisync.html&lt;br /&gt;
# uncomment next line on MASTER&lt;br /&gt;
;plugin-load=rpl_semi_sync_master=semisync_master.so&lt;br /&gt;
# uncomment next line on SLAVE&lt;br /&gt;
;plugin-load=rpl_semi_sync_slave=semisync_slave.so&lt;br /&gt;
&lt;br /&gt;
# Others options for Semisynchronous Replication&lt;br /&gt;
;rpl_semi_sync_master_enabled=1&lt;br /&gt;
;rpl_semi_sync_master_timeout=10&lt;br /&gt;
;rpl_semi_sync_slave_enabled=1&lt;br /&gt;
&lt;br /&gt;
# http://dev.mysql.com/doc/refman/5.5/en/performance-schema.html&lt;br /&gt;
;performance_schema&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[mysqld_safe]&lt;br /&gt;
log-error=/var/log/mysqld.log&lt;br /&gt;
pid-file=/var/run/mysqld/mysqld.pid&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;mysql --help&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql  Ver 14.14 Distrib 5.5.36, for Linux (x86_64) using readline 5.1&lt;br /&gt;
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.&lt;br /&gt;
&lt;br /&gt;
Oracle is a registered trademark of Oracle Corporation and/or its&lt;br /&gt;
affiliates. Other names may be trademarks of their respective&lt;br /&gt;
owners.&lt;br /&gt;
&lt;br /&gt;
Usage: mysql [OPTIONS] [database]&lt;br /&gt;
  -?, --help          Display this help and exit.&lt;br /&gt;
  -I, --help          Synonym for -?&lt;br /&gt;
  --auto-rehash       Enable automatic rehashing. One doesn't need to use&lt;br /&gt;
                      'rehash' to get table and field completion, but startup&lt;br /&gt;
                      and reconnecting may take a longer time. Disable with&lt;br /&gt;
                      --disable-auto-rehash.&lt;br /&gt;
                      (Defaults to on; use --skip-auto-rehash to disable.)&lt;br /&gt;
  -A, --no-auto-rehash &lt;br /&gt;
                      No automatic rehashing. One has to use 'rehash' to get&lt;br /&gt;
                      table and field completion. This gives a quicker start of&lt;br /&gt;
                      mysql and disables rehashing on reconnect.&lt;br /&gt;
  --auto-vertical-output &lt;br /&gt;
                      Automatically switch to vertical output mode if the&lt;br /&gt;
                      result is wider than the terminal width.&lt;br /&gt;
  -B, --batch         Don't use history file. Disable interactive behavior.&lt;br /&gt;
                      (Enables --silent.)&lt;br /&gt;
  --character-sets-dir=name &lt;br /&gt;
                      Directory for character set files.&lt;br /&gt;
  --column-type-info  Display column type information.&lt;br /&gt;
  -c, --comments      Preserve comments. Send comments to the server. The&lt;br /&gt;
                      default is --skip-comments (discard comments), enable&lt;br /&gt;
                      with --comments.&lt;br /&gt;
  -C, --compress      Use compression in server/client protocol.&lt;br /&gt;
  -#, --debug[=#]     This is a non-debug version. Catch this and exit.&lt;br /&gt;
  --debug-check       Check memory and open file usage at exit.&lt;br /&gt;
  -T, --debug-info    Print some debug info at exit.&lt;br /&gt;
  -D, --database=name Database to use.&lt;br /&gt;
  --default-character-set=name &lt;br /&gt;
                      Set the default character set.&lt;br /&gt;
  --delimiter=name    Delimiter to be used.&lt;br /&gt;
  --enable-cleartext-plugin &lt;br /&gt;
                      Enable/disable the clear text authentication plugin.&lt;br /&gt;
  -e, --execute=name  Execute command and quit. (Disables --force and history&lt;br /&gt;
                      file.)&lt;br /&gt;
  -E, --vertical      Print the output of a query (rows) vertically.&lt;br /&gt;
  -f, --force         Continue even if we get an SQL error.&lt;br /&gt;
  -G, --named-commands &lt;br /&gt;
                      Enable named commands. Named commands mean this program's&lt;br /&gt;
                      internal commands; see mysql&amp;gt; help . When enabled, the&lt;br /&gt;
                      named commands can be used from any line of the query,&lt;br /&gt;
                      otherwise only from the first line, before an enter.&lt;br /&gt;
                      Disable with --disable-named-commands. This option is&lt;br /&gt;
                      disabled by default.&lt;br /&gt;
  -i, --ignore-spaces Ignore space after function names.&lt;br /&gt;
  --init-command=name SQL Command to execute when connecting to MySQL server.&lt;br /&gt;
                      Will automatically be re-executed when reconnecting.&lt;br /&gt;
  --local-infile      Enable/disable LOAD DATA LOCAL INFILE.&lt;br /&gt;
  -b, --no-beep       Turn off beep on error.&lt;br /&gt;
  -h, --host=name     Connect to host.&lt;br /&gt;
  -H, --html          Produce HTML output.&lt;br /&gt;
  -X, --xml           Produce XML output.&lt;br /&gt;
  --line-numbers      Write line numbers for errors.&lt;br /&gt;
                      (Defaults to on; use --skip-line-numbers to disable.)&lt;br /&gt;
  -L, --skip-line-numbers &lt;br /&gt;
                      Don't write line number for errors.&lt;br /&gt;
  -n, --unbuffered    Flush buffer after each query.&lt;br /&gt;
  --column-names      Write column names in results.&lt;br /&gt;
                      (Defaults to on; use --skip-column-names to disable.)&lt;br /&gt;
  -N, --skip-column-names &lt;br /&gt;
                      Don't write column names in results.&lt;br /&gt;
  --sigint-ignore     Ignore SIGINT (CTRL-C).&lt;br /&gt;
  -o, --one-database  Ignore statements except those that occur while the&lt;br /&gt;
                      default database is the one named at the command line.&lt;br /&gt;
  --pager[=name]      Pager to use to display results. If you don't supply an&lt;br /&gt;
                      option, the default pager is taken from your ENV variable&lt;br /&gt;
                      PAGER. Valid pagers are less, more, cat [&amp;gt; filename],&lt;br /&gt;
                      etc. See interactive help (\h) also. This option does not&lt;br /&gt;
                      work in batch mode. Disable with --disable-pager. This&lt;br /&gt;
                      option is disabled by default.&lt;br /&gt;
  -p, --password[=name] &lt;br /&gt;
                      Password to use when connecting to server. If password is&lt;br /&gt;
                      not given it's asked from the tty.&lt;br /&gt;
  -P, --port=#        Port number to use for connection or 0 for default to, in&lt;br /&gt;
                      order of preference, my.cnf, $MYSQL_TCP_PORT,&lt;br /&gt;
                      /etc/services, built-in default (3306).&lt;br /&gt;
  --prompt=name       Set the mysql prompt to this value.&lt;br /&gt;
  --protocol=name     The protocol to use for connection (tcp, socket, pipe,&lt;br /&gt;
                      memory).&lt;br /&gt;
  -q, --quick         Don't cache result, print it row by row. This may slow&lt;br /&gt;
                      down the server if the output is suspended. Doesn't use&lt;br /&gt;
                      history file.&lt;br /&gt;
  -r, --raw           Write fields without conversion. Used with --batch.&lt;br /&gt;
  --reconnect         Reconnect if the connection is lost. Disable with&lt;br /&gt;
                      --disable-reconnect. This option is enabled by default.&lt;br /&gt;
                      (Defaults to on; use --skip-reconnect to disable.)&lt;br /&gt;
  -s, --silent        Be more silent. Print results with a tab as separator,&lt;br /&gt;
                      each row on new line.&lt;br /&gt;
  -S, --socket=name   The socket file to use for connection.&lt;br /&gt;
  --ssl               Enable SSL for connection (automatically enabled with&lt;br /&gt;
                      other flags).&lt;br /&gt;
  --ssl-ca=name       CA file in PEM format (check OpenSSL docs, implies&lt;br /&gt;
                      --ssl).&lt;br /&gt;
  --ssl-capath=name   CA directory (check OpenSSL docs, implies --ssl).&lt;br /&gt;
  --ssl-cert=name     X509 cert in PEM format (implies --ssl).&lt;br /&gt;
  --ssl-cipher=name   SSL cipher to use (implies --ssl).&lt;br /&gt;
  --ssl-key=name      X509 key in PEM format (implies --ssl).&lt;br /&gt;
  --ssl-verify-server-cert &lt;br /&gt;
                      Verify server's &amp;quot;Common Name&amp;quot; in its cert against&lt;br /&gt;
                      hostname used when connecting. This option is disabled by&lt;br /&gt;
                      default.&lt;br /&gt;
  -t, --table         Output in table format.&lt;br /&gt;
  --tee=name          Append everything into outfile. See interactive help (\h)&lt;br /&gt;
                      also. Does not work in batch mode. Disable with&lt;br /&gt;
                      --disable-tee. This option is disabled by default.&lt;br /&gt;
  -u, --user=name     User for login if not current user.&lt;br /&gt;
  -U, --safe-updates  Only allow UPDATE and DELETE that uses keys.&lt;br /&gt;
  -U, --i-am-a-dummy  Synonym for option --safe-updates, -U.&lt;br /&gt;
  -v, --verbose       Write more. (-v -v -v gives the table output format).&lt;br /&gt;
  -V, --version       Output version information and exit.&lt;br /&gt;
  -w, --wait          Wait and retry if connection is down.&lt;br /&gt;
  --connect-timeout=# Number of seconds before connection timeout.&lt;br /&gt;
  --max-allowed-packet=# &lt;br /&gt;
                      The maximum packet length to send to or receive from&lt;br /&gt;
                      server.&lt;br /&gt;
  --net-buffer-length=# &lt;br /&gt;
                      The buffer size for TCP/IP and socket communication.&lt;br /&gt;
  --select-limit=#    Automatic limit for SELECT when using --safe-updates.&lt;br /&gt;
  --max-join-size=#   Automatic limit for rows in a join when using&lt;br /&gt;
                      --safe-updates.&lt;br /&gt;
  --secure-auth       Refuse client connecting to server if it uses old&lt;br /&gt;
                      (pre-4.1.1) protocol.&lt;br /&gt;
  --server-arg=name   Send embedded server this as a parameter.&lt;br /&gt;
  --show-warnings     Show warnings after every statement.&lt;br /&gt;
  --plugin-dir=name   Directory for client-side plugins.&lt;br /&gt;
  --default-auth=name Default authentication client-side plugin to use.&lt;br /&gt;
&lt;br /&gt;
Default options are read from the following files in the given order:&lt;br /&gt;
/etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf &lt;br /&gt;
The following groups are read: mysql client&lt;br /&gt;
The following options may be given as the first argument:&lt;br /&gt;
--print-defaults        Print the program argument list and exit.&lt;br /&gt;
--no-defaults           Don't read default options from any option file.&lt;br /&gt;
--defaults-file=#       Only read default options from the given file #.&lt;br /&gt;
--defaults-extra-file=# Read this file after the global files are read.&lt;br /&gt;
&lt;br /&gt;
Variables (--variable-name=value)&lt;br /&gt;
and boolean options {FALSE|TRUE}  Value (after reading options)&lt;br /&gt;
--------------------------------- ----------------------------------------&lt;br /&gt;
auto-rehash                       TRUE&lt;br /&gt;
auto-vertical-output              FALSE&lt;br /&gt;
character-sets-dir                (No default value)&lt;br /&gt;
column-type-info                  FALSE&lt;br /&gt;
comments                          FALSE&lt;br /&gt;
compress                          FALSE&lt;br /&gt;
debug-check                       FALSE&lt;br /&gt;
debug-info                        FALSE&lt;br /&gt;
database                          (No default value)&lt;br /&gt;
default-character-set             auto&lt;br /&gt;
delimiter                         ;&lt;br /&gt;
enable-cleartext-plugin           FALSE&lt;br /&gt;
vertical                          FALSE&lt;br /&gt;
force                             FALSE&lt;br /&gt;
named-commands                    FALSE&lt;br /&gt;
ignore-spaces                     FALSE&lt;br /&gt;
init-command                      (No default value)&lt;br /&gt;
local-infile                      FALSE&lt;br /&gt;
no-beep                           FALSE&lt;br /&gt;
host                              (No default value)&lt;br /&gt;
html                              FALSE&lt;br /&gt;
xml                               FALSE&lt;br /&gt;
line-numbers                      TRUE&lt;br /&gt;
unbuffered                        FALSE&lt;br /&gt;
column-names                      TRUE&lt;br /&gt;
sigint-ignore                     FALSE&lt;br /&gt;
port                              0&lt;br /&gt;
prompt                            mysql&amp;gt; &lt;br /&gt;
quick                             FALSE&lt;br /&gt;
raw                               FALSE&lt;br /&gt;
reconnect                         TRUE&lt;br /&gt;
socket                            (No default value)&lt;br /&gt;
ssl                               FALSE&lt;br /&gt;
ssl-ca                            (No default value)&lt;br /&gt;
ssl-capath                        (No default value)&lt;br /&gt;
ssl-cert                          (No default value)&lt;br /&gt;
ssl-cipher                        (No default value)&lt;br /&gt;
ssl-key                           (No default value)&lt;br /&gt;
ssl-verify-server-cert            FALSE&lt;br /&gt;
table                             FALSE&lt;br /&gt;
user                              (No default value)&lt;br /&gt;
safe-updates                      FALSE&lt;br /&gt;
i-am-a-dummy                      FALSE&lt;br /&gt;
connect-timeout                   0&lt;br /&gt;
max-allowed-packet                16777216&lt;br /&gt;
net-buffer-length                 16384&lt;br /&gt;
select-limit                      1000&lt;br /&gt;
max-join-size                     1000000&lt;br /&gt;
secure-auth                       FALSE&lt;br /&gt;
show-warnings                     FALSE&lt;br /&gt;
plugin-dir                        (No default value)&lt;br /&gt;
default-auth                      (No default value)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=MySql&amp;diff=5414</id>
		<title>MySql</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=MySql&amp;diff=5414"/>
		<updated>2014-03-03T03:46:20Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[CssWork]] - parent&lt;br /&gt;
* [[SqlSchema]] - tables used in the database &lt;br /&gt;
* [[SqlDefaults]] - defaults for those tables&lt;br /&gt;
&lt;br /&gt;
* http://dev.mysql.com/doc/refman/5.5/en/index.html&lt;br /&gt;
* http://dev.mysql.com/doc/refman/5.5/en/tutorial.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Information about mysql as used for slash&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Database Name: ibdata1 ??&lt;br /&gt;
Database user: mysql&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Version&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql-5.5.36&lt;br /&gt;
db4-devel-4.7.25                     mysql-libs-5.5.36&lt;br /&gt;
db4-utils-4.7.25                     mysql-server-5.5.36&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;mysqldump&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
mysqldump http://dev.mysql.com/doc/refman/5.5/en/mysqldump.html&lt;br /&gt;
&lt;br /&gt;
A client that dumps a MySQL database into a file as SQL, text, or XML.&lt;br /&gt;
&lt;br /&gt;
The mysqldump client is a utility that performs logical backups, producing a set of SQL statements that can be run to reproduce the original schema objects, table data, or both. It dumps one or more MySQL database for backup or transfer to another SQL server. The mysqldump command can also generate output in CSV, other delimited text, or XML format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Syntax &lt;br /&gt;
&lt;br /&gt;
There are in general three ways to use mysqldump—in order to dump a set of one or more tables, a set of one or more complete databases, or an entire MySQL server—as shown here: &lt;br /&gt;
shell&amp;gt; mysqldump [options] db_name [tbl_name ...]&lt;br /&gt;
shell&amp;gt; mysqldump [options] --databases db_name ...&lt;br /&gt;
shell&amp;gt; mysqldump [options] --all-databases&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To dump entire databases, do not name any tables following db_name, or use the --databases or --all-databases option. &lt;br /&gt;
&lt;br /&gt;
mysqldump does not dump the INFORMATION_SCHEMA database by default. mysqldump dumps INFORMATION_SCHEMA only if you name it explicitly on the command line, although currently you must also use the --skip-lock-tables option. Before MySQL 5.5 mysqldump silently ignores INFORMATION_SCHEMA even if you name it explicitly on the command line. &lt;br /&gt;
&lt;br /&gt;
mysqldump does not dump the performance_schema database. &lt;br /&gt;
&lt;br /&gt;
Before MySQL 5.5.25, mysqldump does not dump the general_log or slow_query_log tables for dumps of the mysql database. As of 5.5.25, the dump includes statements to recreate those tables so that they are not missing after reloading the dump file. Log table contents are not dumped. &lt;br /&gt;
&lt;br /&gt;
mysqldump also does not dump the MySQL Cluster ndbinfo information database. &lt;br /&gt;
&lt;br /&gt;
To see a list of the options your version of mysqldump supports, execute mysqldump --help.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Mysql programs&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All these try PROGNAME --help for details&lt;br /&gt;
&lt;br /&gt;
also  http://dev.mysql.com/doc/refman/5.5/en/programs-overview.html&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
The MySQL server, mysqld, is the main program that does most of the work in a MySQL installation. The server is accompanied by several related scripts that assist you in starting and stopping the server: &lt;br /&gt;
&lt;br /&gt;
mysqld &lt;br /&gt;
&lt;br /&gt;
The SQL daemon (that is, the MySQL server). To use client programs, mysqld must be running, because clients gain access to databases by connecting to the server. See Section 4.3.1, “mysqld — The MySQL Server”. &lt;br /&gt;
&lt;br /&gt;
mysqld_safe &lt;br /&gt;
&lt;br /&gt;
A server startup script. mysqld_safe attempts to start mysqld. See Section 4.3.2, “mysqld_safe — MySQL Server Startup Script”. &lt;br /&gt;
&lt;br /&gt;
mysql.server &lt;br /&gt;
&lt;br /&gt;
A server startup script. This script is used on systems that use System V-style run directories containing scripts that start system services for particular run levels. It invokes mysqld_safe to start the MySQL server. See Section 4.3.3, “mysql.server — MySQL Server Startup Script”. &lt;br /&gt;
&lt;br /&gt;
mysqld_multi &lt;br /&gt;
&lt;br /&gt;
A server startup script that can start or stop multiple servers installed on the system. See Section 4.3.4, “mysqld_multi — Manage Multiple MySQL Servers”. &lt;br /&gt;
&lt;br /&gt;
Several programs perform setup operations during MySQL installation or upgrading: &lt;br /&gt;
&lt;br /&gt;
comp_err &lt;br /&gt;
&lt;br /&gt;
This program is used during the MySQL build/installation process. It compiles error message files from the error source files. See Section 4.4.1, “comp_err — Compile MySQL Error Message File”. &lt;br /&gt;
&lt;br /&gt;
mysql_install_db &lt;br /&gt;
&lt;br /&gt;
This script creates the MySQL database and initializes the grant tables with default privileges. It is usually executed only once, when first installing MySQL on a system. See Section 4.4.3, “mysql_install_db — Initialize MySQL Data Directory”, Section 2.10.1, “Postinstallation Procedures for Unix-like Systems”, and Section 4.4.3, “mysql_install_db — Initialize MySQL Data Directory”. &lt;br /&gt;
&lt;br /&gt;
mysql_plugin &lt;br /&gt;
&lt;br /&gt;
This program configures MySQL server plugins. See Section 4.4.4, “mysql_plugin — Configure MySQL Server Plugins”. &lt;br /&gt;
&lt;br /&gt;
mysql_secure_installation &lt;br /&gt;
&lt;br /&gt;
This program enables you to improve the security of your MySQL installation. SQL. See Section 4.4.5, “mysql_secure_installation — Improve MySQL Installation Security”. &lt;br /&gt;
&lt;br /&gt;
mysql_tzinfo_to_sql &lt;br /&gt;
&lt;br /&gt;
This program loads the time zone tables in the mysql database using the contents of the host system zoneinfo database (the set of files describing time zones). SQL. See Section 4.4.6, “mysql_tzinfo_to_sql — Load the Time Zone Tables”. &lt;br /&gt;
&lt;br /&gt;
mysql_upgrade &lt;br /&gt;
&lt;br /&gt;
This program is used after a MySQL upgrade operation. It checks tables for incompatibilities and repairs them if necessary, and updates the grant tables with any changes that have been made in newer versions of MySQL. See Section 4.4.7, “mysql_upgrade — Check and Upgrade MySQL Tables”. &lt;br /&gt;
&lt;br /&gt;
MySQL client programs that connect to the MySQL server: &lt;br /&gt;
&lt;br /&gt;
mysql &lt;br /&gt;
&lt;br /&gt;
The command-line tool for interactively entering SQL statements or executing them from a file in batch mode. See Section 4.5.1, “mysql — The MySQL Command-Line Tool”. &lt;br /&gt;
&lt;br /&gt;
mysqladmin &lt;br /&gt;
&lt;br /&gt;
A client that performs administrative operations, such as creating or dropping databases, reloading the grant tables, flushing tables to disk, and reopening log files. mysqladmin can also be used to retrieve version, process, and status information from the server. See Section 4.5.2, “mysqladmin — Client for Administering a MySQL Server”. &lt;br /&gt;
&lt;br /&gt;
mysqlcheck &lt;br /&gt;
&lt;br /&gt;
A table-maintenance client that checks, repairs, analyzes, and optimizes tables. See Section 4.5.3, “mysqlcheck — A Table Maintenance Program”. &lt;br /&gt;
&lt;br /&gt;
mysqldump &lt;br /&gt;
&lt;br /&gt;
A client that dumps a MySQL database into a file as SQL, text, or XML. See Section 4.5.4, “mysqldump — A Database Backup Program”. &lt;br /&gt;
&lt;br /&gt;
mysqlimport &lt;br /&gt;
&lt;br /&gt;
A client that imports text files into their respective tables using LOAD DATA INFILE. See Section 4.5.5, “mysqlimport — A Data Import Program”. &lt;br /&gt;
&lt;br /&gt;
mysqlshow &lt;br /&gt;
&lt;br /&gt;
A client that displays information about databases, tables, columns, and indexes. See Section 4.5.6, “mysqlshow — Display Database, Table, and Column Information”. &lt;br /&gt;
&lt;br /&gt;
mysqlslap &lt;br /&gt;
&lt;br /&gt;
A client that is designed to emulate client load for a MySQL server and report the timing of each stage. It works as if multiple clients are accessing the server. See Section 4.5.7, “mysqlslap — Load Emulation Client”. &lt;br /&gt;
&lt;br /&gt;
MySQL administrative and utility programs: &lt;br /&gt;
&lt;br /&gt;
innochecksum &lt;br /&gt;
&lt;br /&gt;
An offline InnoDB offline file checksum utility. See Section 4.6.1, “innochecksum — Offline InnoDB File Checksum Utility”. &lt;br /&gt;
&lt;br /&gt;
myisam_ftdump &lt;br /&gt;
&lt;br /&gt;
A utility that displays information about full-text indexes in MyISAM tables. See Section 4.6.2, “myisam_ftdump — Display Full-Text Index information”. &lt;br /&gt;
&lt;br /&gt;
myisamchk &lt;br /&gt;
&lt;br /&gt;
A utility to describe, check, optimize, and repair MyISAM tables. See Section 4.6.3, “myisamchk — MyISAM Table-Maintenance Utility”. &lt;br /&gt;
&lt;br /&gt;
myisamlog &lt;br /&gt;
&lt;br /&gt;
A utility that processes the contents of a MyISAM log file. See Section 4.6.4, “myisamlog — Display MyISAM Log File Contents”. &lt;br /&gt;
&lt;br /&gt;
myisampack &lt;br /&gt;
&lt;br /&gt;
A utility that compresses MyISAM tables to produce smaller read-only tables. See Section 4.6.5, “myisampack — Generate Compressed, Read-Only MyISAM Tables”. &lt;br /&gt;
&lt;br /&gt;
mysqlaccess &lt;br /&gt;
&lt;br /&gt;
A script that checks the access privileges for a host name, user name, and database combination. See Section 4.6.6, “mysqlaccess — Client for Checking Access Privileges”. &lt;br /&gt;
&lt;br /&gt;
mysqlbinlog &lt;br /&gt;
&lt;br /&gt;
A utility for reading statements from a binary log. The log of executed statements contained in the binary log files can be used to help recover from a crash. See Section 4.6.7, “mysqlbinlog — Utility for Processing Binary Log Files”. &lt;br /&gt;
&lt;br /&gt;
mysqldumpslow &lt;br /&gt;
&lt;br /&gt;
A utility to read and summarize the contents of a slow query log. See Section 4.6.8, “mysqldumpslow — Summarize Slow Query Log Files”. &lt;br /&gt;
&lt;br /&gt;
mysqlhotcopy &lt;br /&gt;
&lt;br /&gt;
A utility that quickly makes backups of MyISAM tables while the server is running. See Section 4.6.9, “mysqlhotcopy — A Database Backup Program”. &lt;br /&gt;
&lt;br /&gt;
mysql_convert_table_format &lt;br /&gt;
&lt;br /&gt;
A utility that converts tables in a database to use a given storage engine. See Section 4.6.10, “mysql_convert_table_format — Convert Tables to Use a Given Storage Engine”. &lt;br /&gt;
&lt;br /&gt;
mysql_find_rows &lt;br /&gt;
&lt;br /&gt;
A utility that reads files containing SQL statements (such as update logs) and extracts statements that match a given regular expression. See Section 4.6.11, “mysql_find_rows — Extract SQL Statements from Files”. &lt;br /&gt;
&lt;br /&gt;
mysql_fix_extensions &lt;br /&gt;
&lt;br /&gt;
A utility that converts the extensions for MyISAM table files to lowercase. This can be useful after transferring the files from a system with case-insensitive file names to a system with case-sensitive file names. See Section 4.6.12, “mysql_fix_extensions — Normalize Table File Name Extensions”. &lt;br /&gt;
&lt;br /&gt;
mysql_setpermission &lt;br /&gt;
&lt;br /&gt;
A utility for interactively setting permissions in the MySQL grant tables. See Section 4.6.13, “mysql_setpermission — Interactively Set Permissions in Grant Tables”. &lt;br /&gt;
&lt;br /&gt;
mysql_waitpid &lt;br /&gt;
&lt;br /&gt;
A utility that kills the process with a given process ID. See Section 4.6.14, “mysql_waitpid — Kill Process and Wait for Its Termination”. &lt;br /&gt;
&lt;br /&gt;
mysql_zap &lt;br /&gt;
&lt;br /&gt;
A utility that kills processes that match a pattern. See Section 4.6.15, “mysql_zap — Kill Processes That Match a Pattern”. &lt;br /&gt;
&lt;br /&gt;
MySQL program-development utilities: &lt;br /&gt;
&lt;br /&gt;
msql2mysql &lt;br /&gt;
&lt;br /&gt;
A shell script that converts mSQL programs to MySQL. It doesn't handle every case, but it gives a good start when converting. See Section 4.7.1, “msql2mysql — Convert mSQL Programs for Use with MySQL”. &lt;br /&gt;
&lt;br /&gt;
mysql_config &lt;br /&gt;
&lt;br /&gt;
A shell script that produces the option values needed when compiling MySQL programs. See Section 4.7.2, “mysql_config — Display Options for Compiling Clients”. &lt;br /&gt;
&lt;br /&gt;
my_print_defaults &lt;br /&gt;
&lt;br /&gt;
A utility that shows which options are present in option groups of option files. See Section 4.7.3, “my_print_defaults — Display Options from Option Files”. &lt;br /&gt;
&lt;br /&gt;
resolve_stack_dump &lt;br /&gt;
&lt;br /&gt;
A utility program that resolves a numeric stack trace dump to symbols. See Section 4.7.4, “resolve_stack_dump — Resolve Numeric Stack Trace Dump to Symbols”. &lt;br /&gt;
&lt;br /&gt;
Miscellaneous utilities: &lt;br /&gt;
&lt;br /&gt;
perror &lt;br /&gt;
&lt;br /&gt;
A utility that displays the meaning of system or MySQL error codes. See Section 4.8.1, “perror — Explain Error Codes”. &lt;br /&gt;
&lt;br /&gt;
replace &lt;br /&gt;
&lt;br /&gt;
A utility program that performs string replacement in the input text. See Section 4.8.2, “replace — A String-Replacement Utility”. &lt;br /&gt;
&lt;br /&gt;
resolveip &lt;br /&gt;
&lt;br /&gt;
A utility program that resolves a host name to an IP address or vice versa. See Section 4.8.3, “resolveip — Resolve Host name to IP Address or Vice Versa”. &lt;br /&gt;
&lt;br /&gt;
Oracle Corporation also provides the MySQL Workbench GUI tool, which is used to administer MySQL servers and databases, to create, execute, and evaluate queries, and to migrate schemas and data from other relational database management systems for use with MySQL. Additional GUI tools include MySQL Notifier for Microsoft Windows MySQL for Excel. &lt;br /&gt;
&lt;br /&gt;
MySQL client programs that communicate with the server using the MySQL client/server library use the following environment variables. &lt;br /&gt;
Environment Variable	Meaning&lt;br /&gt;
MYSQL_UNIX_PORT	The default Unix socket file; used for connections to localhost&lt;br /&gt;
MYSQL_TCP_PORT	The default port number; used for TCP/IP connections&lt;br /&gt;
MYSQL_PWD	The default password&lt;br /&gt;
MYSQL_DEBUG	Debug trace options when debugging&lt;br /&gt;
TMPDIR	The directory where temporary tables and files are created&lt;br /&gt;
&lt;br /&gt;
For a full list of environment variables used by MySQL programs, see Section 2.12, “Environment Variables”.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Mysql configuration file in /etc/my.cnf&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[mysqld]&lt;br /&gt;
datadir=/var/lib/mysql&lt;br /&gt;
socket=/var/lib/mysql/mysql.sock&lt;br /&gt;
&lt;br /&gt;
# Disabling symbolic-links is recommended to prevent assorted security risks&lt;br /&gt;
symbolic-links=0&lt;br /&gt;
&lt;br /&gt;
# Settings user and group are ignored when systemd is used (fedora &amp;gt;= 15).&lt;br /&gt;
# If you need to run mysqld under a different user or group,&lt;br /&gt;
# customize your systemd unit file for mysqld according to the&lt;br /&gt;
# instructions in http://fedoraproject.org/wiki/Systemd&lt;br /&gt;
user=mysql&lt;br /&gt;
&lt;br /&gt;
# Semisynchronous Replication&lt;br /&gt;
# http://dev.mysql.com/doc/refman/5.5/en/replication-semisync.html&lt;br /&gt;
# uncomment next line on MASTER&lt;br /&gt;
;plugin-load=rpl_semi_sync_master=semisync_master.so&lt;br /&gt;
# uncomment next line on SLAVE&lt;br /&gt;
;plugin-load=rpl_semi_sync_slave=semisync_slave.so&lt;br /&gt;
&lt;br /&gt;
# Others options for Semisynchronous Replication&lt;br /&gt;
;rpl_semi_sync_master_enabled=1&lt;br /&gt;
;rpl_semi_sync_master_timeout=10&lt;br /&gt;
;rpl_semi_sync_slave_enabled=1&lt;br /&gt;
&lt;br /&gt;
# http://dev.mysql.com/doc/refman/5.5/en/performance-schema.html&lt;br /&gt;
;performance_schema&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[mysqld_safe]&lt;br /&gt;
log-error=/var/log/mysqld.log&lt;br /&gt;
pid-file=/var/run/mysqld/mysqld.pid&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;mysql --help&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql  Ver 14.14 Distrib 5.5.36, for Linux (x86_64) using readline 5.1&lt;br /&gt;
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.&lt;br /&gt;
&lt;br /&gt;
Oracle is a registered trademark of Oracle Corporation and/or its&lt;br /&gt;
affiliates. Other names may be trademarks of their respective&lt;br /&gt;
owners.&lt;br /&gt;
&lt;br /&gt;
Usage: mysql [OPTIONS] [database]&lt;br /&gt;
  -?, --help          Display this help and exit.&lt;br /&gt;
  -I, --help          Synonym for -?&lt;br /&gt;
  --auto-rehash       Enable automatic rehashing. One doesn't need to use&lt;br /&gt;
                      'rehash' to get table and field completion, but startup&lt;br /&gt;
                      and reconnecting may take a longer time. Disable with&lt;br /&gt;
                      --disable-auto-rehash.&lt;br /&gt;
                      (Defaults to on; use --skip-auto-rehash to disable.)&lt;br /&gt;
  -A, --no-auto-rehash &lt;br /&gt;
                      No automatic rehashing. One has to use 'rehash' to get&lt;br /&gt;
                      table and field completion. This gives a quicker start of&lt;br /&gt;
                      mysql and disables rehashing on reconnect.&lt;br /&gt;
  --auto-vertical-output &lt;br /&gt;
                      Automatically switch to vertical output mode if the&lt;br /&gt;
                      result is wider than the terminal width.&lt;br /&gt;
  -B, --batch         Don't use history file. Disable interactive behavior.&lt;br /&gt;
                      (Enables --silent.)&lt;br /&gt;
  --character-sets-dir=name &lt;br /&gt;
                      Directory for character set files.&lt;br /&gt;
  --column-type-info  Display column type information.&lt;br /&gt;
  -c, --comments      Preserve comments. Send comments to the server. The&lt;br /&gt;
                      default is --skip-comments (discard comments), enable&lt;br /&gt;
                      with --comments.&lt;br /&gt;
  -C, --compress      Use compression in server/client protocol.&lt;br /&gt;
  -#, --debug[=#]     This is a non-debug version. Catch this and exit.&lt;br /&gt;
  --debug-check       Check memory and open file usage at exit.&lt;br /&gt;
  -T, --debug-info    Print some debug info at exit.&lt;br /&gt;
  -D, --database=name Database to use.&lt;br /&gt;
  --default-character-set=name &lt;br /&gt;
                      Set the default character set.&lt;br /&gt;
  --delimiter=name    Delimiter to be used.&lt;br /&gt;
  --enable-cleartext-plugin &lt;br /&gt;
                      Enable/disable the clear text authentication plugin.&lt;br /&gt;
  -e, --execute=name  Execute command and quit. (Disables --force and history&lt;br /&gt;
                      file.)&lt;br /&gt;
  -E, --vertical      Print the output of a query (rows) vertically.&lt;br /&gt;
  -f, --force         Continue even if we get an SQL error.&lt;br /&gt;
  -G, --named-commands &lt;br /&gt;
                      Enable named commands. Named commands mean this program's&lt;br /&gt;
                      internal commands; see mysql&amp;gt; help . When enabled, the&lt;br /&gt;
                      named commands can be used from any line of the query,&lt;br /&gt;
                      otherwise only from the first line, before an enter.&lt;br /&gt;
                      Disable with --disable-named-commands. This option is&lt;br /&gt;
                      disabled by default.&lt;br /&gt;
  -i, --ignore-spaces Ignore space after function names.&lt;br /&gt;
  --init-command=name SQL Command to execute when connecting to MySQL server.&lt;br /&gt;
                      Will automatically be re-executed when reconnecting.&lt;br /&gt;
  --local-infile      Enable/disable LOAD DATA LOCAL INFILE.&lt;br /&gt;
  -b, --no-beep       Turn off beep on error.&lt;br /&gt;
  -h, --host=name     Connect to host.&lt;br /&gt;
  -H, --html          Produce HTML output.&lt;br /&gt;
  -X, --xml           Produce XML output.&lt;br /&gt;
  --line-numbers      Write line numbers for errors.&lt;br /&gt;
                      (Defaults to on; use --skip-line-numbers to disable.)&lt;br /&gt;
  -L, --skip-line-numbers &lt;br /&gt;
                      Don't write line number for errors.&lt;br /&gt;
  -n, --unbuffered    Flush buffer after each query.&lt;br /&gt;
  --column-names      Write column names in results.&lt;br /&gt;
                      (Defaults to on; use --skip-column-names to disable.)&lt;br /&gt;
  -N, --skip-column-names &lt;br /&gt;
                      Don't write column names in results.&lt;br /&gt;
  --sigint-ignore     Ignore SIGINT (CTRL-C).&lt;br /&gt;
  -o, --one-database  Ignore statements except those that occur while the&lt;br /&gt;
                      default database is the one named at the command line.&lt;br /&gt;
  --pager[=name]      Pager to use to display results. If you don't supply an&lt;br /&gt;
                      option, the default pager is taken from your ENV variable&lt;br /&gt;
                      PAGER. Valid pagers are less, more, cat [&amp;gt; filename],&lt;br /&gt;
                      etc. See interactive help (\h) also. This option does not&lt;br /&gt;
                      work in batch mode. Disable with --disable-pager. This&lt;br /&gt;
                      option is disabled by default.&lt;br /&gt;
  -p, --password[=name] &lt;br /&gt;
                      Password to use when connecting to server. If password is&lt;br /&gt;
                      not given it's asked from the tty.&lt;br /&gt;
  -P, --port=#        Port number to use for connection or 0 for default to, in&lt;br /&gt;
                      order of preference, my.cnf, $MYSQL_TCP_PORT,&lt;br /&gt;
                      /etc/services, built-in default (3306).&lt;br /&gt;
  --prompt=name       Set the mysql prompt to this value.&lt;br /&gt;
  --protocol=name     The protocol to use for connection (tcp, socket, pipe,&lt;br /&gt;
                      memory).&lt;br /&gt;
  -q, --quick         Don't cache result, print it row by row. This may slow&lt;br /&gt;
                      down the server if the output is suspended. Doesn't use&lt;br /&gt;
                      history file.&lt;br /&gt;
  -r, --raw           Write fields without conversion. Used with --batch.&lt;br /&gt;
  --reconnect         Reconnect if the connection is lost. Disable with&lt;br /&gt;
                      --disable-reconnect. This option is enabled by default.&lt;br /&gt;
                      (Defaults to on; use --skip-reconnect to disable.)&lt;br /&gt;
  -s, --silent        Be more silent. Print results with a tab as separator,&lt;br /&gt;
                      each row on new line.&lt;br /&gt;
  -S, --socket=name   The socket file to use for connection.&lt;br /&gt;
  --ssl               Enable SSL for connection (automatically enabled with&lt;br /&gt;
                      other flags).&lt;br /&gt;
  --ssl-ca=name       CA file in PEM format (check OpenSSL docs, implies&lt;br /&gt;
                      --ssl).&lt;br /&gt;
  --ssl-capath=name   CA directory (check OpenSSL docs, implies --ssl).&lt;br /&gt;
  --ssl-cert=name     X509 cert in PEM format (implies --ssl).&lt;br /&gt;
  --ssl-cipher=name   SSL cipher to use (implies --ssl).&lt;br /&gt;
  --ssl-key=name      X509 key in PEM format (implies --ssl).&lt;br /&gt;
  --ssl-verify-server-cert &lt;br /&gt;
                      Verify server's &amp;quot;Common Name&amp;quot; in its cert against&lt;br /&gt;
                      hostname used when connecting. This option is disabled by&lt;br /&gt;
                      default.&lt;br /&gt;
  -t, --table         Output in table format.&lt;br /&gt;
  --tee=name          Append everything into outfile. See interactive help (\h)&lt;br /&gt;
                      also. Does not work in batch mode. Disable with&lt;br /&gt;
                      --disable-tee. This option is disabled by default.&lt;br /&gt;
  -u, --user=name     User for login if not current user.&lt;br /&gt;
  -U, --safe-updates  Only allow UPDATE and DELETE that uses keys.&lt;br /&gt;
  -U, --i-am-a-dummy  Synonym for option --safe-updates, -U.&lt;br /&gt;
  -v, --verbose       Write more. (-v -v -v gives the table output format).&lt;br /&gt;
  -V, --version       Output version information and exit.&lt;br /&gt;
  -w, --wait          Wait and retry if connection is down.&lt;br /&gt;
  --connect-timeout=# Number of seconds before connection timeout.&lt;br /&gt;
  --max-allowed-packet=# &lt;br /&gt;
                      The maximum packet length to send to or receive from&lt;br /&gt;
                      server.&lt;br /&gt;
  --net-buffer-length=# &lt;br /&gt;
                      The buffer size for TCP/IP and socket communication.&lt;br /&gt;
  --select-limit=#    Automatic limit for SELECT when using --safe-updates.&lt;br /&gt;
  --max-join-size=#   Automatic limit for rows in a join when using&lt;br /&gt;
                      --safe-updates.&lt;br /&gt;
  --secure-auth       Refuse client connecting to server if it uses old&lt;br /&gt;
                      (pre-4.1.1) protocol.&lt;br /&gt;
  --server-arg=name   Send embedded server this as a parameter.&lt;br /&gt;
  --show-warnings     Show warnings after every statement.&lt;br /&gt;
  --plugin-dir=name   Directory for client-side plugins.&lt;br /&gt;
  --default-auth=name Default authentication client-side plugin to use.&lt;br /&gt;
&lt;br /&gt;
Default options are read from the following files in the given order:&lt;br /&gt;
/etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf &lt;br /&gt;
The following groups are read: mysql client&lt;br /&gt;
The following options may be given as the first argument:&lt;br /&gt;
--print-defaults        Print the program argument list and exit.&lt;br /&gt;
--no-defaults           Don't read default options from any option file.&lt;br /&gt;
--defaults-file=#       Only read default options from the given file #.&lt;br /&gt;
--defaults-extra-file=# Read this file after the global files are read.&lt;br /&gt;
&lt;br /&gt;
Variables (--variable-name=value)&lt;br /&gt;
and boolean options {FALSE|TRUE}  Value (after reading options)&lt;br /&gt;
--------------------------------- ----------------------------------------&lt;br /&gt;
auto-rehash                       TRUE&lt;br /&gt;
auto-vertical-output              FALSE&lt;br /&gt;
character-sets-dir                (No default value)&lt;br /&gt;
column-type-info                  FALSE&lt;br /&gt;
comments                          FALSE&lt;br /&gt;
compress                          FALSE&lt;br /&gt;
debug-check                       FALSE&lt;br /&gt;
debug-info                        FALSE&lt;br /&gt;
database                          (No default value)&lt;br /&gt;
default-character-set             auto&lt;br /&gt;
delimiter                         ;&lt;br /&gt;
enable-cleartext-plugin           FALSE&lt;br /&gt;
vertical                          FALSE&lt;br /&gt;
force                             FALSE&lt;br /&gt;
named-commands                    FALSE&lt;br /&gt;
ignore-spaces                     FALSE&lt;br /&gt;
init-command                      (No default value)&lt;br /&gt;
local-infile                      FALSE&lt;br /&gt;
no-beep                           FALSE&lt;br /&gt;
host                              (No default value)&lt;br /&gt;
html                              FALSE&lt;br /&gt;
xml                               FALSE&lt;br /&gt;
line-numbers                      TRUE&lt;br /&gt;
unbuffered                        FALSE&lt;br /&gt;
column-names                      TRUE&lt;br /&gt;
sigint-ignore                     FALSE&lt;br /&gt;
port                              0&lt;br /&gt;
prompt                            mysql&amp;gt; &lt;br /&gt;
quick                             FALSE&lt;br /&gt;
raw                               FALSE&lt;br /&gt;
reconnect                         TRUE&lt;br /&gt;
socket                            (No default value)&lt;br /&gt;
ssl                               FALSE&lt;br /&gt;
ssl-ca                            (No default value)&lt;br /&gt;
ssl-capath                        (No default value)&lt;br /&gt;
ssl-cert                          (No default value)&lt;br /&gt;
ssl-cipher                        (No default value)&lt;br /&gt;
ssl-key                           (No default value)&lt;br /&gt;
ssl-verify-server-cert            FALSE&lt;br /&gt;
table                             FALSE&lt;br /&gt;
user                              (No default value)&lt;br /&gt;
safe-updates                      FALSE&lt;br /&gt;
i-am-a-dummy                      FALSE&lt;br /&gt;
connect-timeout                   0&lt;br /&gt;
max-allowed-packet                16777216&lt;br /&gt;
net-buffer-length                 16384&lt;br /&gt;
select-limit                      1000&lt;br /&gt;
max-join-size                     1000000&lt;br /&gt;
secure-auth                       FALSE&lt;br /&gt;
show-warnings                     FALSE&lt;br /&gt;
plugin-dir                        (No default value)&lt;br /&gt;
default-auth                      (No default value)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=MySql&amp;diff=5413</id>
		<title>MySql</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=MySql&amp;diff=5413"/>
		<updated>2014-03-03T03:41:05Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[CssWork]] - parent&lt;br /&gt;
* [[SqlSchema]] - tables used in the database &lt;br /&gt;
* [[SqlDefaults]] - defaults for those tables&lt;br /&gt;
&lt;br /&gt;
* http://dev.mysql.com/doc/refman/5.5/en/index.html&lt;br /&gt;
* http://dev.mysql.com/doc/refman/5.5/en/tutorial.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Information about mysql as used for slash&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Version&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql-5.5.36&lt;br /&gt;
db4-devel-4.7.25                     mysql-libs-5.5.36&lt;br /&gt;
db4-utils-4.7.25                     mysql-server-5.5.36&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;mysqldump&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
mysqldump http://dev.mysql.com/doc/refman/5.5/en/mysqldump.html&lt;br /&gt;
&lt;br /&gt;
A client that dumps a MySQL database into a file as SQL, text, or XML.&lt;br /&gt;
&lt;br /&gt;
The mysqldump client is a utility that performs logical backups, producing a set of SQL statements that can be run to reproduce the original schema objects, table data, or both. It dumps one or more MySQL database for backup or transfer to another SQL server. The mysqldump command can also generate output in CSV, other delimited text, or XML format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Syntax &lt;br /&gt;
&lt;br /&gt;
There are in general three ways to use mysqldump—in order to dump a set of one or more tables, a set of one or more complete databases, or an entire MySQL server—as shown here: &lt;br /&gt;
shell&amp;gt; mysqldump [options] db_name [tbl_name ...]&lt;br /&gt;
shell&amp;gt; mysqldump [options] --databases db_name ...&lt;br /&gt;
shell&amp;gt; mysqldump [options] --all-databases&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To dump entire databases, do not name any tables following db_name, or use the --databases or --all-databases option. &lt;br /&gt;
&lt;br /&gt;
mysqldump does not dump the INFORMATION_SCHEMA database by default. mysqldump dumps INFORMATION_SCHEMA only if you name it explicitly on the command line, although currently you must also use the --skip-lock-tables option. Before MySQL 5.5 mysqldump silently ignores INFORMATION_SCHEMA even if you name it explicitly on the command line. &lt;br /&gt;
&lt;br /&gt;
mysqldump does not dump the performance_schema database. &lt;br /&gt;
&lt;br /&gt;
Before MySQL 5.5.25, mysqldump does not dump the general_log or slow_query_log tables for dumps of the mysql database. As of 5.5.25, the dump includes statements to recreate those tables so that they are not missing after reloading the dump file. Log table contents are not dumped. &lt;br /&gt;
&lt;br /&gt;
mysqldump also does not dump the MySQL Cluster ndbinfo information database. &lt;br /&gt;
&lt;br /&gt;
To see a list of the options your version of mysqldump supports, execute mysqldump --help.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Mysql programs&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All these try PROGNAME --help for details&lt;br /&gt;
&lt;br /&gt;
also  http://dev.mysql.com/doc/refman/5.5/en/programs-overview.html&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
The MySQL server, mysqld, is the main program that does most of the work in a MySQL installation. The server is accompanied by several related scripts that assist you in starting and stopping the server: &lt;br /&gt;
&lt;br /&gt;
mysqld &lt;br /&gt;
&lt;br /&gt;
The SQL daemon (that is, the MySQL server). To use client programs, mysqld must be running, because clients gain access to databases by connecting to the server. See Section 4.3.1, “mysqld — The MySQL Server”. &lt;br /&gt;
&lt;br /&gt;
mysqld_safe &lt;br /&gt;
&lt;br /&gt;
A server startup script. mysqld_safe attempts to start mysqld. See Section 4.3.2, “mysqld_safe — MySQL Server Startup Script”. &lt;br /&gt;
&lt;br /&gt;
mysql.server &lt;br /&gt;
&lt;br /&gt;
A server startup script. This script is used on systems that use System V-style run directories containing scripts that start system services for particular run levels. It invokes mysqld_safe to start the MySQL server. See Section 4.3.3, “mysql.server — MySQL Server Startup Script”. &lt;br /&gt;
&lt;br /&gt;
mysqld_multi &lt;br /&gt;
&lt;br /&gt;
A server startup script that can start or stop multiple servers installed on the system. See Section 4.3.4, “mysqld_multi — Manage Multiple MySQL Servers”. &lt;br /&gt;
&lt;br /&gt;
Several programs perform setup operations during MySQL installation or upgrading: &lt;br /&gt;
&lt;br /&gt;
comp_err &lt;br /&gt;
&lt;br /&gt;
This program is used during the MySQL build/installation process. It compiles error message files from the error source files. See Section 4.4.1, “comp_err — Compile MySQL Error Message File”. &lt;br /&gt;
&lt;br /&gt;
mysql_install_db &lt;br /&gt;
&lt;br /&gt;
This script creates the MySQL database and initializes the grant tables with default privileges. It is usually executed only once, when first installing MySQL on a system. See Section 4.4.3, “mysql_install_db — Initialize MySQL Data Directory”, Section 2.10.1, “Postinstallation Procedures for Unix-like Systems”, and Section 4.4.3, “mysql_install_db — Initialize MySQL Data Directory”. &lt;br /&gt;
&lt;br /&gt;
mysql_plugin &lt;br /&gt;
&lt;br /&gt;
This program configures MySQL server plugins. See Section 4.4.4, “mysql_plugin — Configure MySQL Server Plugins”. &lt;br /&gt;
&lt;br /&gt;
mysql_secure_installation &lt;br /&gt;
&lt;br /&gt;
This program enables you to improve the security of your MySQL installation. SQL. See Section 4.4.5, “mysql_secure_installation — Improve MySQL Installation Security”. &lt;br /&gt;
&lt;br /&gt;
mysql_tzinfo_to_sql &lt;br /&gt;
&lt;br /&gt;
This program loads the time zone tables in the mysql database using the contents of the host system zoneinfo database (the set of files describing time zones). SQL. See Section 4.4.6, “mysql_tzinfo_to_sql — Load the Time Zone Tables”. &lt;br /&gt;
&lt;br /&gt;
mysql_upgrade &lt;br /&gt;
&lt;br /&gt;
This program is used after a MySQL upgrade operation. It checks tables for incompatibilities and repairs them if necessary, and updates the grant tables with any changes that have been made in newer versions of MySQL. See Section 4.4.7, “mysql_upgrade — Check and Upgrade MySQL Tables”. &lt;br /&gt;
&lt;br /&gt;
MySQL client programs that connect to the MySQL server: &lt;br /&gt;
&lt;br /&gt;
mysql &lt;br /&gt;
&lt;br /&gt;
The command-line tool for interactively entering SQL statements or executing them from a file in batch mode. See Section 4.5.1, “mysql — The MySQL Command-Line Tool”. &lt;br /&gt;
&lt;br /&gt;
mysqladmin &lt;br /&gt;
&lt;br /&gt;
A client that performs administrative operations, such as creating or dropping databases, reloading the grant tables, flushing tables to disk, and reopening log files. mysqladmin can also be used to retrieve version, process, and status information from the server. See Section 4.5.2, “mysqladmin — Client for Administering a MySQL Server”. &lt;br /&gt;
&lt;br /&gt;
mysqlcheck &lt;br /&gt;
&lt;br /&gt;
A table-maintenance client that checks, repairs, analyzes, and optimizes tables. See Section 4.5.3, “mysqlcheck — A Table Maintenance Program”. &lt;br /&gt;
&lt;br /&gt;
mysqldump &lt;br /&gt;
&lt;br /&gt;
A client that dumps a MySQL database into a file as SQL, text, or XML. See Section 4.5.4, “mysqldump — A Database Backup Program”. &lt;br /&gt;
&lt;br /&gt;
mysqlimport &lt;br /&gt;
&lt;br /&gt;
A client that imports text files into their respective tables using LOAD DATA INFILE. See Section 4.5.5, “mysqlimport — A Data Import Program”. &lt;br /&gt;
&lt;br /&gt;
mysqlshow &lt;br /&gt;
&lt;br /&gt;
A client that displays information about databases, tables, columns, and indexes. See Section 4.5.6, “mysqlshow — Display Database, Table, and Column Information”. &lt;br /&gt;
&lt;br /&gt;
mysqlslap &lt;br /&gt;
&lt;br /&gt;
A client that is designed to emulate client load for a MySQL server and report the timing of each stage. It works as if multiple clients are accessing the server. See Section 4.5.7, “mysqlslap — Load Emulation Client”. &lt;br /&gt;
&lt;br /&gt;
MySQL administrative and utility programs: &lt;br /&gt;
&lt;br /&gt;
innochecksum &lt;br /&gt;
&lt;br /&gt;
An offline InnoDB offline file checksum utility. See Section 4.6.1, “innochecksum — Offline InnoDB File Checksum Utility”. &lt;br /&gt;
&lt;br /&gt;
myisam_ftdump &lt;br /&gt;
&lt;br /&gt;
A utility that displays information about full-text indexes in MyISAM tables. See Section 4.6.2, “myisam_ftdump — Display Full-Text Index information”. &lt;br /&gt;
&lt;br /&gt;
myisamchk &lt;br /&gt;
&lt;br /&gt;
A utility to describe, check, optimize, and repair MyISAM tables. See Section 4.6.3, “myisamchk — MyISAM Table-Maintenance Utility”. &lt;br /&gt;
&lt;br /&gt;
myisamlog &lt;br /&gt;
&lt;br /&gt;
A utility that processes the contents of a MyISAM log file. See Section 4.6.4, “myisamlog — Display MyISAM Log File Contents”. &lt;br /&gt;
&lt;br /&gt;
myisampack &lt;br /&gt;
&lt;br /&gt;
A utility that compresses MyISAM tables to produce smaller read-only tables. See Section 4.6.5, “myisampack — Generate Compressed, Read-Only MyISAM Tables”. &lt;br /&gt;
&lt;br /&gt;
mysqlaccess &lt;br /&gt;
&lt;br /&gt;
A script that checks the access privileges for a host name, user name, and database combination. See Section 4.6.6, “mysqlaccess — Client for Checking Access Privileges”. &lt;br /&gt;
&lt;br /&gt;
mysqlbinlog &lt;br /&gt;
&lt;br /&gt;
A utility for reading statements from a binary log. The log of executed statements contained in the binary log files can be used to help recover from a crash. See Section 4.6.7, “mysqlbinlog — Utility for Processing Binary Log Files”. &lt;br /&gt;
&lt;br /&gt;
mysqldumpslow &lt;br /&gt;
&lt;br /&gt;
A utility to read and summarize the contents of a slow query log. See Section 4.6.8, “mysqldumpslow — Summarize Slow Query Log Files”. &lt;br /&gt;
&lt;br /&gt;
mysqlhotcopy &lt;br /&gt;
&lt;br /&gt;
A utility that quickly makes backups of MyISAM tables while the server is running. See Section 4.6.9, “mysqlhotcopy — A Database Backup Program”. &lt;br /&gt;
&lt;br /&gt;
mysql_convert_table_format &lt;br /&gt;
&lt;br /&gt;
A utility that converts tables in a database to use a given storage engine. See Section 4.6.10, “mysql_convert_table_format — Convert Tables to Use a Given Storage Engine”. &lt;br /&gt;
&lt;br /&gt;
mysql_find_rows &lt;br /&gt;
&lt;br /&gt;
A utility that reads files containing SQL statements (such as update logs) and extracts statements that match a given regular expression. See Section 4.6.11, “mysql_find_rows — Extract SQL Statements from Files”. &lt;br /&gt;
&lt;br /&gt;
mysql_fix_extensions &lt;br /&gt;
&lt;br /&gt;
A utility that converts the extensions for MyISAM table files to lowercase. This can be useful after transferring the files from a system with case-insensitive file names to a system with case-sensitive file names. See Section 4.6.12, “mysql_fix_extensions — Normalize Table File Name Extensions”. &lt;br /&gt;
&lt;br /&gt;
mysql_setpermission &lt;br /&gt;
&lt;br /&gt;
A utility for interactively setting permissions in the MySQL grant tables. See Section 4.6.13, “mysql_setpermission — Interactively Set Permissions in Grant Tables”. &lt;br /&gt;
&lt;br /&gt;
mysql_waitpid &lt;br /&gt;
&lt;br /&gt;
A utility that kills the process with a given process ID. See Section 4.6.14, “mysql_waitpid — Kill Process and Wait for Its Termination”. &lt;br /&gt;
&lt;br /&gt;
mysql_zap &lt;br /&gt;
&lt;br /&gt;
A utility that kills processes that match a pattern. See Section 4.6.15, “mysql_zap — Kill Processes That Match a Pattern”. &lt;br /&gt;
&lt;br /&gt;
MySQL program-development utilities: &lt;br /&gt;
&lt;br /&gt;
msql2mysql &lt;br /&gt;
&lt;br /&gt;
A shell script that converts mSQL programs to MySQL. It doesn't handle every case, but it gives a good start when converting. See Section 4.7.1, “msql2mysql — Convert mSQL Programs for Use with MySQL”. &lt;br /&gt;
&lt;br /&gt;
mysql_config &lt;br /&gt;
&lt;br /&gt;
A shell script that produces the option values needed when compiling MySQL programs. See Section 4.7.2, “mysql_config — Display Options for Compiling Clients”. &lt;br /&gt;
&lt;br /&gt;
my_print_defaults &lt;br /&gt;
&lt;br /&gt;
A utility that shows which options are present in option groups of option files. See Section 4.7.3, “my_print_defaults — Display Options from Option Files”. &lt;br /&gt;
&lt;br /&gt;
resolve_stack_dump &lt;br /&gt;
&lt;br /&gt;
A utility program that resolves a numeric stack trace dump to symbols. See Section 4.7.4, “resolve_stack_dump — Resolve Numeric Stack Trace Dump to Symbols”. &lt;br /&gt;
&lt;br /&gt;
Miscellaneous utilities: &lt;br /&gt;
&lt;br /&gt;
perror &lt;br /&gt;
&lt;br /&gt;
A utility that displays the meaning of system or MySQL error codes. See Section 4.8.1, “perror — Explain Error Codes”. &lt;br /&gt;
&lt;br /&gt;
replace &lt;br /&gt;
&lt;br /&gt;
A utility program that performs string replacement in the input text. See Section 4.8.2, “replace — A String-Replacement Utility”. &lt;br /&gt;
&lt;br /&gt;
resolveip &lt;br /&gt;
&lt;br /&gt;
A utility program that resolves a host name to an IP address or vice versa. See Section 4.8.3, “resolveip — Resolve Host name to IP Address or Vice Versa”. &lt;br /&gt;
&lt;br /&gt;
Oracle Corporation also provides the MySQL Workbench GUI tool, which is used to administer MySQL servers and databases, to create, execute, and evaluate queries, and to migrate schemas and data from other relational database management systems for use with MySQL. Additional GUI tools include MySQL Notifier for Microsoft Windows MySQL for Excel. &lt;br /&gt;
&lt;br /&gt;
MySQL client programs that communicate with the server using the MySQL client/server library use the following environment variables. &lt;br /&gt;
Environment Variable	Meaning&lt;br /&gt;
MYSQL_UNIX_PORT	The default Unix socket file; used for connections to localhost&lt;br /&gt;
MYSQL_TCP_PORT	The default port number; used for TCP/IP connections&lt;br /&gt;
MYSQL_PWD	The default password&lt;br /&gt;
MYSQL_DEBUG	Debug trace options when debugging&lt;br /&gt;
TMPDIR	The directory where temporary tables and files are created&lt;br /&gt;
&lt;br /&gt;
For a full list of environment variables used by MySQL programs, see Section 2.12, “Environment Variables”.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Mysql configuration file in /etc/my.cnf&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[mysqld]&lt;br /&gt;
datadir=/var/lib/mysql&lt;br /&gt;
socket=/var/lib/mysql/mysql.sock&lt;br /&gt;
&lt;br /&gt;
# Disabling symbolic-links is recommended to prevent assorted security risks&lt;br /&gt;
symbolic-links=0&lt;br /&gt;
&lt;br /&gt;
# Settings user and group are ignored when systemd is used (fedora &amp;gt;= 15).&lt;br /&gt;
# If you need to run mysqld under a different user or group,&lt;br /&gt;
# customize your systemd unit file for mysqld according to the&lt;br /&gt;
# instructions in http://fedoraproject.org/wiki/Systemd&lt;br /&gt;
user=mysql&lt;br /&gt;
&lt;br /&gt;
# Semisynchronous Replication&lt;br /&gt;
# http://dev.mysql.com/doc/refman/5.5/en/replication-semisync.html&lt;br /&gt;
# uncomment next line on MASTER&lt;br /&gt;
;plugin-load=rpl_semi_sync_master=semisync_master.so&lt;br /&gt;
# uncomment next line on SLAVE&lt;br /&gt;
;plugin-load=rpl_semi_sync_slave=semisync_slave.so&lt;br /&gt;
&lt;br /&gt;
# Others options for Semisynchronous Replication&lt;br /&gt;
;rpl_semi_sync_master_enabled=1&lt;br /&gt;
;rpl_semi_sync_master_timeout=10&lt;br /&gt;
;rpl_semi_sync_slave_enabled=1&lt;br /&gt;
&lt;br /&gt;
# http://dev.mysql.com/doc/refman/5.5/en/performance-schema.html&lt;br /&gt;
;performance_schema&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[mysqld_safe]&lt;br /&gt;
log-error=/var/log/mysqld.log&lt;br /&gt;
pid-file=/var/run/mysqld/mysqld.pid&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;mysql --help&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql  Ver 14.14 Distrib 5.5.36, for Linux (x86_64) using readline 5.1&lt;br /&gt;
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.&lt;br /&gt;
&lt;br /&gt;
Oracle is a registered trademark of Oracle Corporation and/or its&lt;br /&gt;
affiliates. Other names may be trademarks of their respective&lt;br /&gt;
owners.&lt;br /&gt;
&lt;br /&gt;
Usage: mysql [OPTIONS] [database]&lt;br /&gt;
  -?, --help          Display this help and exit.&lt;br /&gt;
  -I, --help          Synonym for -?&lt;br /&gt;
  --auto-rehash       Enable automatic rehashing. One doesn't need to use&lt;br /&gt;
                      'rehash' to get table and field completion, but startup&lt;br /&gt;
                      and reconnecting may take a longer time. Disable with&lt;br /&gt;
                      --disable-auto-rehash.&lt;br /&gt;
                      (Defaults to on; use --skip-auto-rehash to disable.)&lt;br /&gt;
  -A, --no-auto-rehash &lt;br /&gt;
                      No automatic rehashing. One has to use 'rehash' to get&lt;br /&gt;
                      table and field completion. This gives a quicker start of&lt;br /&gt;
                      mysql and disables rehashing on reconnect.&lt;br /&gt;
  --auto-vertical-output &lt;br /&gt;
                      Automatically switch to vertical output mode if the&lt;br /&gt;
                      result is wider than the terminal width.&lt;br /&gt;
  -B, --batch         Don't use history file. Disable interactive behavior.&lt;br /&gt;
                      (Enables --silent.)&lt;br /&gt;
  --character-sets-dir=name &lt;br /&gt;
                      Directory for character set files.&lt;br /&gt;
  --column-type-info  Display column type information.&lt;br /&gt;
  -c, --comments      Preserve comments. Send comments to the server. The&lt;br /&gt;
                      default is --skip-comments (discard comments), enable&lt;br /&gt;
                      with --comments.&lt;br /&gt;
  -C, --compress      Use compression in server/client protocol.&lt;br /&gt;
  -#, --debug[=#]     This is a non-debug version. Catch this and exit.&lt;br /&gt;
  --debug-check       Check memory and open file usage at exit.&lt;br /&gt;
  -T, --debug-info    Print some debug info at exit.&lt;br /&gt;
  -D, --database=name Database to use.&lt;br /&gt;
  --default-character-set=name &lt;br /&gt;
                      Set the default character set.&lt;br /&gt;
  --delimiter=name    Delimiter to be used.&lt;br /&gt;
  --enable-cleartext-plugin &lt;br /&gt;
                      Enable/disable the clear text authentication plugin.&lt;br /&gt;
  -e, --execute=name  Execute command and quit. (Disables --force and history&lt;br /&gt;
                      file.)&lt;br /&gt;
  -E, --vertical      Print the output of a query (rows) vertically.&lt;br /&gt;
  -f, --force         Continue even if we get an SQL error.&lt;br /&gt;
  -G, --named-commands &lt;br /&gt;
                      Enable named commands. Named commands mean this program's&lt;br /&gt;
                      internal commands; see mysql&amp;gt; help . When enabled, the&lt;br /&gt;
                      named commands can be used from any line of the query,&lt;br /&gt;
                      otherwise only from the first line, before an enter.&lt;br /&gt;
                      Disable with --disable-named-commands. This option is&lt;br /&gt;
                      disabled by default.&lt;br /&gt;
  -i, --ignore-spaces Ignore space after function names.&lt;br /&gt;
  --init-command=name SQL Command to execute when connecting to MySQL server.&lt;br /&gt;
                      Will automatically be re-executed when reconnecting.&lt;br /&gt;
  --local-infile      Enable/disable LOAD DATA LOCAL INFILE.&lt;br /&gt;
  -b, --no-beep       Turn off beep on error.&lt;br /&gt;
  -h, --host=name     Connect to host.&lt;br /&gt;
  -H, --html          Produce HTML output.&lt;br /&gt;
  -X, --xml           Produce XML output.&lt;br /&gt;
  --line-numbers      Write line numbers for errors.&lt;br /&gt;
                      (Defaults to on; use --skip-line-numbers to disable.)&lt;br /&gt;
  -L, --skip-line-numbers &lt;br /&gt;
                      Don't write line number for errors.&lt;br /&gt;
  -n, --unbuffered    Flush buffer after each query.&lt;br /&gt;
  --column-names      Write column names in results.&lt;br /&gt;
                      (Defaults to on; use --skip-column-names to disable.)&lt;br /&gt;
  -N, --skip-column-names &lt;br /&gt;
                      Don't write column names in results.&lt;br /&gt;
  --sigint-ignore     Ignore SIGINT (CTRL-C).&lt;br /&gt;
  -o, --one-database  Ignore statements except those that occur while the&lt;br /&gt;
                      default database is the one named at the command line.&lt;br /&gt;
  --pager[=name]      Pager to use to display results. If you don't supply an&lt;br /&gt;
                      option, the default pager is taken from your ENV variable&lt;br /&gt;
                      PAGER. Valid pagers are less, more, cat [&amp;gt; filename],&lt;br /&gt;
                      etc. See interactive help (\h) also. This option does not&lt;br /&gt;
                      work in batch mode. Disable with --disable-pager. This&lt;br /&gt;
                      option is disabled by default.&lt;br /&gt;
  -p, --password[=name] &lt;br /&gt;
                      Password to use when connecting to server. If password is&lt;br /&gt;
                      not given it's asked from the tty.&lt;br /&gt;
  -P, --port=#        Port number to use for connection or 0 for default to, in&lt;br /&gt;
                      order of preference, my.cnf, $MYSQL_TCP_PORT,&lt;br /&gt;
                      /etc/services, built-in default (3306).&lt;br /&gt;
  --prompt=name       Set the mysql prompt to this value.&lt;br /&gt;
  --protocol=name     The protocol to use for connection (tcp, socket, pipe,&lt;br /&gt;
                      memory).&lt;br /&gt;
  -q, --quick         Don't cache result, print it row by row. This may slow&lt;br /&gt;
                      down the server if the output is suspended. Doesn't use&lt;br /&gt;
                      history file.&lt;br /&gt;
  -r, --raw           Write fields without conversion. Used with --batch.&lt;br /&gt;
  --reconnect         Reconnect if the connection is lost. Disable with&lt;br /&gt;
                      --disable-reconnect. This option is enabled by default.&lt;br /&gt;
                      (Defaults to on; use --skip-reconnect to disable.)&lt;br /&gt;
  -s, --silent        Be more silent. Print results with a tab as separator,&lt;br /&gt;
                      each row on new line.&lt;br /&gt;
  -S, --socket=name   The socket file to use for connection.&lt;br /&gt;
  --ssl               Enable SSL for connection (automatically enabled with&lt;br /&gt;
                      other flags).&lt;br /&gt;
  --ssl-ca=name       CA file in PEM format (check OpenSSL docs, implies&lt;br /&gt;
                      --ssl).&lt;br /&gt;
  --ssl-capath=name   CA directory (check OpenSSL docs, implies --ssl).&lt;br /&gt;
  --ssl-cert=name     X509 cert in PEM format (implies --ssl).&lt;br /&gt;
  --ssl-cipher=name   SSL cipher to use (implies --ssl).&lt;br /&gt;
  --ssl-key=name      X509 key in PEM format (implies --ssl).&lt;br /&gt;
  --ssl-verify-server-cert &lt;br /&gt;
                      Verify server's &amp;quot;Common Name&amp;quot; in its cert against&lt;br /&gt;
                      hostname used when connecting. This option is disabled by&lt;br /&gt;
                      default.&lt;br /&gt;
  -t, --table         Output in table format.&lt;br /&gt;
  --tee=name          Append everything into outfile. See interactive help (\h)&lt;br /&gt;
                      also. Does not work in batch mode. Disable with&lt;br /&gt;
                      --disable-tee. This option is disabled by default.&lt;br /&gt;
  -u, --user=name     User for login if not current user.&lt;br /&gt;
  -U, --safe-updates  Only allow UPDATE and DELETE that uses keys.&lt;br /&gt;
  -U, --i-am-a-dummy  Synonym for option --safe-updates, -U.&lt;br /&gt;
  -v, --verbose       Write more. (-v -v -v gives the table output format).&lt;br /&gt;
  -V, --version       Output version information and exit.&lt;br /&gt;
  -w, --wait          Wait and retry if connection is down.&lt;br /&gt;
  --connect-timeout=# Number of seconds before connection timeout.&lt;br /&gt;
  --max-allowed-packet=# &lt;br /&gt;
                      The maximum packet length to send to or receive from&lt;br /&gt;
                      server.&lt;br /&gt;
  --net-buffer-length=# &lt;br /&gt;
                      The buffer size for TCP/IP and socket communication.&lt;br /&gt;
  --select-limit=#    Automatic limit for SELECT when using --safe-updates.&lt;br /&gt;
  --max-join-size=#   Automatic limit for rows in a join when using&lt;br /&gt;
                      --safe-updates.&lt;br /&gt;
  --secure-auth       Refuse client connecting to server if it uses old&lt;br /&gt;
                      (pre-4.1.1) protocol.&lt;br /&gt;
  --server-arg=name   Send embedded server this as a parameter.&lt;br /&gt;
  --show-warnings     Show warnings after every statement.&lt;br /&gt;
  --plugin-dir=name   Directory for client-side plugins.&lt;br /&gt;
  --default-auth=name Default authentication client-side plugin to use.&lt;br /&gt;
&lt;br /&gt;
Default options are read from the following files in the given order:&lt;br /&gt;
/etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf &lt;br /&gt;
The following groups are read: mysql client&lt;br /&gt;
The following options may be given as the first argument:&lt;br /&gt;
--print-defaults        Print the program argument list and exit.&lt;br /&gt;
--no-defaults           Don't read default options from any option file.&lt;br /&gt;
--defaults-file=#       Only read default options from the given file #.&lt;br /&gt;
--defaults-extra-file=# Read this file after the global files are read.&lt;br /&gt;
&lt;br /&gt;
Variables (--variable-name=value)&lt;br /&gt;
and boolean options {FALSE|TRUE}  Value (after reading options)&lt;br /&gt;
--------------------------------- ----------------------------------------&lt;br /&gt;
auto-rehash                       TRUE&lt;br /&gt;
auto-vertical-output              FALSE&lt;br /&gt;
character-sets-dir                (No default value)&lt;br /&gt;
column-type-info                  FALSE&lt;br /&gt;
comments                          FALSE&lt;br /&gt;
compress                          FALSE&lt;br /&gt;
debug-check                       FALSE&lt;br /&gt;
debug-info                        FALSE&lt;br /&gt;
database                          (No default value)&lt;br /&gt;
default-character-set             auto&lt;br /&gt;
delimiter                         ;&lt;br /&gt;
enable-cleartext-plugin           FALSE&lt;br /&gt;
vertical                          FALSE&lt;br /&gt;
force                             FALSE&lt;br /&gt;
named-commands                    FALSE&lt;br /&gt;
ignore-spaces                     FALSE&lt;br /&gt;
init-command                      (No default value)&lt;br /&gt;
local-infile                      FALSE&lt;br /&gt;
no-beep                           FALSE&lt;br /&gt;
host                              (No default value)&lt;br /&gt;
html                              FALSE&lt;br /&gt;
xml                               FALSE&lt;br /&gt;
line-numbers                      TRUE&lt;br /&gt;
unbuffered                        FALSE&lt;br /&gt;
column-names                      TRUE&lt;br /&gt;
sigint-ignore                     FALSE&lt;br /&gt;
port                              0&lt;br /&gt;
prompt                            mysql&amp;gt; &lt;br /&gt;
quick                             FALSE&lt;br /&gt;
raw                               FALSE&lt;br /&gt;
reconnect                         TRUE&lt;br /&gt;
socket                            (No default value)&lt;br /&gt;
ssl                               FALSE&lt;br /&gt;
ssl-ca                            (No default value)&lt;br /&gt;
ssl-capath                        (No default value)&lt;br /&gt;
ssl-cert                          (No default value)&lt;br /&gt;
ssl-cipher                        (No default value)&lt;br /&gt;
ssl-key                           (No default value)&lt;br /&gt;
ssl-verify-server-cert            FALSE&lt;br /&gt;
table                             FALSE&lt;br /&gt;
user                              (No default value)&lt;br /&gt;
safe-updates                      FALSE&lt;br /&gt;
i-am-a-dummy                      FALSE&lt;br /&gt;
connect-timeout                   0&lt;br /&gt;
max-allowed-packet                16777216&lt;br /&gt;
net-buffer-length                 16384&lt;br /&gt;
select-limit                      1000&lt;br /&gt;
max-join-size                     1000000&lt;br /&gt;
secure-auth                       FALSE&lt;br /&gt;
show-warnings                     FALSE&lt;br /&gt;
plugin-dir                        (No default value)&lt;br /&gt;
default-auth                      (No default value)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=MySql&amp;diff=5412</id>
		<title>MySql</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=MySql&amp;diff=5412"/>
		<updated>2014-03-03T03:38:18Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[CssWork]] - parent&lt;br /&gt;
* [[SqlSchema]] - tables used in the database &lt;br /&gt;
* [[SqlDefaults]] - defaults for those tables&lt;br /&gt;
&lt;br /&gt;
* http://dev.mysql.com/doc/refman/5.5/en/index.html&lt;br /&gt;
* http://dev.mysql.com/doc/refman/5.5/en/tutorial.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Information about mysql as used for slash&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Version&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql-5.5.36&lt;br /&gt;
db4-devel-4.7.25                     mysql-libs-5.5.36&lt;br /&gt;
db4-utils-4.7.25                     mysql-server-5.5.36&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;mysqldump&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
mysqldump http://dev.mysql.com/doc/refman/5.5/en/mysqldump.html&lt;br /&gt;
&lt;br /&gt;
A client that dumps a MySQL database into a file as SQL, text, or XML.&lt;br /&gt;
&lt;br /&gt;
The mysqldump client is a utility that performs logical backups, producing a set of SQL statements that can be run to reproduce the original schema objects, table data, or both. It dumps one or more MySQL database for backup or transfer to another SQL server. The mysqldump command can also generate output in CSV, other delimited text, or XML format.&lt;br /&gt;
&lt;br /&gt;
Syntax &lt;br /&gt;
&lt;br /&gt;
There are in general three ways to use mysqldump—in order to dump a set of one or more tables, a set of one or more complete databases, or an entire MySQL server—as shown here: &lt;br /&gt;
shell&amp;gt; mysqldump [options] db_name [tbl_name ...]&lt;br /&gt;
shell&amp;gt; mysqldump [options] --databases db_name ...&lt;br /&gt;
shell&amp;gt; mysqldump [options] --all-databases&lt;br /&gt;
&lt;br /&gt;
To dump entire databases, do not name any tables following db_name, or use the --databases or --all-databases option. &lt;br /&gt;
&lt;br /&gt;
mysqldump does not dump the INFORMATION_SCHEMA database by default. mysqldump dumps INFORMATION_SCHEMA only if you name it explicitly on the command line, although currently you must also use the --skip-lock-tables option. Before MySQL 5.5 mysqldump silently ignores INFORMATION_SCHEMA even if you name it explicitly on the command line. &lt;br /&gt;
&lt;br /&gt;
mysqldump does not dump the performance_schema database. &lt;br /&gt;
&lt;br /&gt;
Before MySQL 5.5.25, mysqldump does not dump the general_log or slow_query_log tables for dumps of the mysql database. As of 5.5.25, the dump includes statements to recreate those tables so that they are not missing after reloading the dump file. Log table contents are not dumped. &lt;br /&gt;
&lt;br /&gt;
mysqldump also does not dump the MySQL Cluster ndbinfo information database. &lt;br /&gt;
&lt;br /&gt;
To see a list of the options your version of mysqldump supports, execute mysqldump --help.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Mysql programs&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All these try PROGNAME --help for details&lt;br /&gt;
&lt;br /&gt;
also  http://dev.mysql.com/doc/refman/5.5/en/programs-overview.html&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
The MySQL server, mysqld, is the main program that does most of the work in a MySQL installation. The server is accompanied by several related scripts that assist you in starting and stopping the server: &lt;br /&gt;
&lt;br /&gt;
mysqld &lt;br /&gt;
&lt;br /&gt;
The SQL daemon (that is, the MySQL server). To use client programs, mysqld must be running, because clients gain access to databases by connecting to the server. See Section 4.3.1, “mysqld — The MySQL Server”. &lt;br /&gt;
&lt;br /&gt;
mysqld_safe &lt;br /&gt;
&lt;br /&gt;
A server startup script. mysqld_safe attempts to start mysqld. See Section 4.3.2, “mysqld_safe — MySQL Server Startup Script”. &lt;br /&gt;
&lt;br /&gt;
mysql.server &lt;br /&gt;
&lt;br /&gt;
A server startup script. This script is used on systems that use System V-style run directories containing scripts that start system services for particular run levels. It invokes mysqld_safe to start the MySQL server. See Section 4.3.3, “mysql.server — MySQL Server Startup Script”. &lt;br /&gt;
&lt;br /&gt;
mysqld_multi &lt;br /&gt;
&lt;br /&gt;
A server startup script that can start or stop multiple servers installed on the system. See Section 4.3.4, “mysqld_multi — Manage Multiple MySQL Servers”. &lt;br /&gt;
&lt;br /&gt;
Several programs perform setup operations during MySQL installation or upgrading: &lt;br /&gt;
&lt;br /&gt;
comp_err &lt;br /&gt;
&lt;br /&gt;
This program is used during the MySQL build/installation process. It compiles error message files from the error source files. See Section 4.4.1, “comp_err — Compile MySQL Error Message File”. &lt;br /&gt;
&lt;br /&gt;
mysql_install_db &lt;br /&gt;
&lt;br /&gt;
This script creates the MySQL database and initializes the grant tables with default privileges. It is usually executed only once, when first installing MySQL on a system. See Section 4.4.3, “mysql_install_db — Initialize MySQL Data Directory”, Section 2.10.1, “Postinstallation Procedures for Unix-like Systems”, and Section 4.4.3, “mysql_install_db — Initialize MySQL Data Directory”. &lt;br /&gt;
&lt;br /&gt;
mysql_plugin &lt;br /&gt;
&lt;br /&gt;
This program configures MySQL server plugins. See Section 4.4.4, “mysql_plugin — Configure MySQL Server Plugins”. &lt;br /&gt;
&lt;br /&gt;
mysql_secure_installation &lt;br /&gt;
&lt;br /&gt;
This program enables you to improve the security of your MySQL installation. SQL. See Section 4.4.5, “mysql_secure_installation — Improve MySQL Installation Security”. &lt;br /&gt;
&lt;br /&gt;
mysql_tzinfo_to_sql &lt;br /&gt;
&lt;br /&gt;
This program loads the time zone tables in the mysql database using the contents of the host system zoneinfo database (the set of files describing time zones). SQL. See Section 4.4.6, “mysql_tzinfo_to_sql — Load the Time Zone Tables”. &lt;br /&gt;
&lt;br /&gt;
mysql_upgrade &lt;br /&gt;
&lt;br /&gt;
This program is used after a MySQL upgrade operation. It checks tables for incompatibilities and repairs them if necessary, and updates the grant tables with any changes that have been made in newer versions of MySQL. See Section 4.4.7, “mysql_upgrade — Check and Upgrade MySQL Tables”. &lt;br /&gt;
&lt;br /&gt;
MySQL client programs that connect to the MySQL server: &lt;br /&gt;
&lt;br /&gt;
mysql &lt;br /&gt;
&lt;br /&gt;
The command-line tool for interactively entering SQL statements or executing them from a file in batch mode. See Section 4.5.1, “mysql — The MySQL Command-Line Tool”. &lt;br /&gt;
&lt;br /&gt;
mysqladmin &lt;br /&gt;
&lt;br /&gt;
A client that performs administrative operations, such as creating or dropping databases, reloading the grant tables, flushing tables to disk, and reopening log files. mysqladmin can also be used to retrieve version, process, and status information from the server. See Section 4.5.2, “mysqladmin — Client for Administering a MySQL Server”. &lt;br /&gt;
&lt;br /&gt;
mysqlcheck &lt;br /&gt;
&lt;br /&gt;
A table-maintenance client that checks, repairs, analyzes, and optimizes tables. See Section 4.5.3, “mysqlcheck — A Table Maintenance Program”. &lt;br /&gt;
&lt;br /&gt;
mysqldump &lt;br /&gt;
&lt;br /&gt;
A client that dumps a MySQL database into a file as SQL, text, or XML. See Section 4.5.4, “mysqldump — A Database Backup Program”. &lt;br /&gt;
&lt;br /&gt;
mysqlimport &lt;br /&gt;
&lt;br /&gt;
A client that imports text files into their respective tables using LOAD DATA INFILE. See Section 4.5.5, “mysqlimport — A Data Import Program”. &lt;br /&gt;
&lt;br /&gt;
mysqlshow &lt;br /&gt;
&lt;br /&gt;
A client that displays information about databases, tables, columns, and indexes. See Section 4.5.6, “mysqlshow — Display Database, Table, and Column Information”. &lt;br /&gt;
&lt;br /&gt;
mysqlslap &lt;br /&gt;
&lt;br /&gt;
A client that is designed to emulate client load for a MySQL server and report the timing of each stage. It works as if multiple clients are accessing the server. See Section 4.5.7, “mysqlslap — Load Emulation Client”. &lt;br /&gt;
&lt;br /&gt;
MySQL administrative and utility programs: &lt;br /&gt;
&lt;br /&gt;
innochecksum &lt;br /&gt;
&lt;br /&gt;
An offline InnoDB offline file checksum utility. See Section 4.6.1, “innochecksum — Offline InnoDB File Checksum Utility”. &lt;br /&gt;
&lt;br /&gt;
myisam_ftdump &lt;br /&gt;
&lt;br /&gt;
A utility that displays information about full-text indexes in MyISAM tables. See Section 4.6.2, “myisam_ftdump — Display Full-Text Index information”. &lt;br /&gt;
&lt;br /&gt;
myisamchk &lt;br /&gt;
&lt;br /&gt;
A utility to describe, check, optimize, and repair MyISAM tables. See Section 4.6.3, “myisamchk — MyISAM Table-Maintenance Utility”. &lt;br /&gt;
&lt;br /&gt;
myisamlog &lt;br /&gt;
&lt;br /&gt;
A utility that processes the contents of a MyISAM log file. See Section 4.6.4, “myisamlog — Display MyISAM Log File Contents”. &lt;br /&gt;
&lt;br /&gt;
myisampack &lt;br /&gt;
&lt;br /&gt;
A utility that compresses MyISAM tables to produce smaller read-only tables. See Section 4.6.5, “myisampack — Generate Compressed, Read-Only MyISAM Tables”. &lt;br /&gt;
&lt;br /&gt;
mysqlaccess &lt;br /&gt;
&lt;br /&gt;
A script that checks the access privileges for a host name, user name, and database combination. See Section 4.6.6, “mysqlaccess — Client for Checking Access Privileges”. &lt;br /&gt;
&lt;br /&gt;
mysqlbinlog &lt;br /&gt;
&lt;br /&gt;
A utility for reading statements from a binary log. The log of executed statements contained in the binary log files can be used to help recover from a crash. See Section 4.6.7, “mysqlbinlog — Utility for Processing Binary Log Files”. &lt;br /&gt;
&lt;br /&gt;
mysqldumpslow &lt;br /&gt;
&lt;br /&gt;
A utility to read and summarize the contents of a slow query log. See Section 4.6.8, “mysqldumpslow — Summarize Slow Query Log Files”. &lt;br /&gt;
&lt;br /&gt;
mysqlhotcopy &lt;br /&gt;
&lt;br /&gt;
A utility that quickly makes backups of MyISAM tables while the server is running. See Section 4.6.9, “mysqlhotcopy — A Database Backup Program”. &lt;br /&gt;
&lt;br /&gt;
mysql_convert_table_format &lt;br /&gt;
&lt;br /&gt;
A utility that converts tables in a database to use a given storage engine. See Section 4.6.10, “mysql_convert_table_format — Convert Tables to Use a Given Storage Engine”. &lt;br /&gt;
&lt;br /&gt;
mysql_find_rows &lt;br /&gt;
&lt;br /&gt;
A utility that reads files containing SQL statements (such as update logs) and extracts statements that match a given regular expression. See Section 4.6.11, “mysql_find_rows — Extract SQL Statements from Files”. &lt;br /&gt;
&lt;br /&gt;
mysql_fix_extensions &lt;br /&gt;
&lt;br /&gt;
A utility that converts the extensions for MyISAM table files to lowercase. This can be useful after transferring the files from a system with case-insensitive file names to a system with case-sensitive file names. See Section 4.6.12, “mysql_fix_extensions — Normalize Table File Name Extensions”. &lt;br /&gt;
&lt;br /&gt;
mysql_setpermission &lt;br /&gt;
&lt;br /&gt;
A utility for interactively setting permissions in the MySQL grant tables. See Section 4.6.13, “mysql_setpermission — Interactively Set Permissions in Grant Tables”. &lt;br /&gt;
&lt;br /&gt;
mysql_waitpid &lt;br /&gt;
&lt;br /&gt;
A utility that kills the process with a given process ID. See Section 4.6.14, “mysql_waitpid — Kill Process and Wait for Its Termination”. &lt;br /&gt;
&lt;br /&gt;
mysql_zap &lt;br /&gt;
&lt;br /&gt;
A utility that kills processes that match a pattern. See Section 4.6.15, “mysql_zap — Kill Processes That Match a Pattern”. &lt;br /&gt;
&lt;br /&gt;
MySQL program-development utilities: &lt;br /&gt;
&lt;br /&gt;
msql2mysql &lt;br /&gt;
&lt;br /&gt;
A shell script that converts mSQL programs to MySQL. It doesn't handle every case, but it gives a good start when converting. See Section 4.7.1, “msql2mysql — Convert mSQL Programs for Use with MySQL”. &lt;br /&gt;
&lt;br /&gt;
mysql_config &lt;br /&gt;
&lt;br /&gt;
A shell script that produces the option values needed when compiling MySQL programs. See Section 4.7.2, “mysql_config — Display Options for Compiling Clients”. &lt;br /&gt;
&lt;br /&gt;
my_print_defaults &lt;br /&gt;
&lt;br /&gt;
A utility that shows which options are present in option groups of option files. See Section 4.7.3, “my_print_defaults — Display Options from Option Files”. &lt;br /&gt;
&lt;br /&gt;
resolve_stack_dump &lt;br /&gt;
&lt;br /&gt;
A utility program that resolves a numeric stack trace dump to symbols. See Section 4.7.4, “resolve_stack_dump — Resolve Numeric Stack Trace Dump to Symbols”. &lt;br /&gt;
&lt;br /&gt;
Miscellaneous utilities: &lt;br /&gt;
&lt;br /&gt;
perror &lt;br /&gt;
&lt;br /&gt;
A utility that displays the meaning of system or MySQL error codes. See Section 4.8.1, “perror — Explain Error Codes”. &lt;br /&gt;
&lt;br /&gt;
replace &lt;br /&gt;
&lt;br /&gt;
A utility program that performs string replacement in the input text. See Section 4.8.2, “replace — A String-Replacement Utility”. &lt;br /&gt;
&lt;br /&gt;
resolveip &lt;br /&gt;
&lt;br /&gt;
A utility program that resolves a host name to an IP address or vice versa. See Section 4.8.3, “resolveip — Resolve Host name to IP Address or Vice Versa”. &lt;br /&gt;
&lt;br /&gt;
Oracle Corporation also provides the MySQL Workbench GUI tool, which is used to administer MySQL servers and databases, to create, execute, and evaluate queries, and to migrate schemas and data from other relational database management systems for use with MySQL. Additional GUI tools include MySQL Notifier for Microsoft Windows MySQL for Excel. &lt;br /&gt;
&lt;br /&gt;
MySQL client programs that communicate with the server using the MySQL client/server library use the following environment variables. &lt;br /&gt;
Environment Variable	Meaning&lt;br /&gt;
MYSQL_UNIX_PORT	The default Unix socket file; used for connections to localhost&lt;br /&gt;
MYSQL_TCP_PORT	The default port number; used for TCP/IP connections&lt;br /&gt;
MYSQL_PWD	The default password&lt;br /&gt;
MYSQL_DEBUG	Debug trace options when debugging&lt;br /&gt;
TMPDIR	The directory where temporary tables and files are created&lt;br /&gt;
&lt;br /&gt;
For a full list of environment variables used by MySQL programs, see Section 2.12, “Environment Variables”.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Mysql configuration file in /etc/my.cnf&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[mysqld]&lt;br /&gt;
datadir=/var/lib/mysql&lt;br /&gt;
socket=/var/lib/mysql/mysql.sock&lt;br /&gt;
&lt;br /&gt;
# Disabling symbolic-links is recommended to prevent assorted security risks&lt;br /&gt;
symbolic-links=0&lt;br /&gt;
&lt;br /&gt;
# Settings user and group are ignored when systemd is used (fedora &amp;gt;= 15).&lt;br /&gt;
# If you need to run mysqld under a different user or group,&lt;br /&gt;
# customize your systemd unit file for mysqld according to the&lt;br /&gt;
# instructions in http://fedoraproject.org/wiki/Systemd&lt;br /&gt;
user=mysql&lt;br /&gt;
&lt;br /&gt;
# Semisynchronous Replication&lt;br /&gt;
# http://dev.mysql.com/doc/refman/5.5/en/replication-semisync.html&lt;br /&gt;
# uncomment next line on MASTER&lt;br /&gt;
;plugin-load=rpl_semi_sync_master=semisync_master.so&lt;br /&gt;
# uncomment next line on SLAVE&lt;br /&gt;
;plugin-load=rpl_semi_sync_slave=semisync_slave.so&lt;br /&gt;
&lt;br /&gt;
# Others options for Semisynchronous Replication&lt;br /&gt;
;rpl_semi_sync_master_enabled=1&lt;br /&gt;
;rpl_semi_sync_master_timeout=10&lt;br /&gt;
;rpl_semi_sync_slave_enabled=1&lt;br /&gt;
&lt;br /&gt;
# http://dev.mysql.com/doc/refman/5.5/en/performance-schema.html&lt;br /&gt;
;performance_schema&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[mysqld_safe]&lt;br /&gt;
log-error=/var/log/mysqld.log&lt;br /&gt;
pid-file=/var/run/mysqld/mysqld.pid&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;mysql --help&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql  Ver 14.14 Distrib 5.5.36, for Linux (x86_64) using readline 5.1&lt;br /&gt;
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.&lt;br /&gt;
&lt;br /&gt;
Oracle is a registered trademark of Oracle Corporation and/or its&lt;br /&gt;
affiliates. Other names may be trademarks of their respective&lt;br /&gt;
owners.&lt;br /&gt;
&lt;br /&gt;
Usage: mysql [OPTIONS] [database]&lt;br /&gt;
  -?, --help          Display this help and exit.&lt;br /&gt;
  -I, --help          Synonym for -?&lt;br /&gt;
  --auto-rehash       Enable automatic rehashing. One doesn't need to use&lt;br /&gt;
                      'rehash' to get table and field completion, but startup&lt;br /&gt;
                      and reconnecting may take a longer time. Disable with&lt;br /&gt;
                      --disable-auto-rehash.&lt;br /&gt;
                      (Defaults to on; use --skip-auto-rehash to disable.)&lt;br /&gt;
  -A, --no-auto-rehash &lt;br /&gt;
                      No automatic rehashing. One has to use 'rehash' to get&lt;br /&gt;
                      table and field completion. This gives a quicker start of&lt;br /&gt;
                      mysql and disables rehashing on reconnect.&lt;br /&gt;
  --auto-vertical-output &lt;br /&gt;
                      Automatically switch to vertical output mode if the&lt;br /&gt;
                      result is wider than the terminal width.&lt;br /&gt;
  -B, --batch         Don't use history file. Disable interactive behavior.&lt;br /&gt;
                      (Enables --silent.)&lt;br /&gt;
  --character-sets-dir=name &lt;br /&gt;
                      Directory for character set files.&lt;br /&gt;
  --column-type-info  Display column type information.&lt;br /&gt;
  -c, --comments      Preserve comments. Send comments to the server. The&lt;br /&gt;
                      default is --skip-comments (discard comments), enable&lt;br /&gt;
                      with --comments.&lt;br /&gt;
  -C, --compress      Use compression in server/client protocol.&lt;br /&gt;
  -#, --debug[=#]     This is a non-debug version. Catch this and exit.&lt;br /&gt;
  --debug-check       Check memory and open file usage at exit.&lt;br /&gt;
  -T, --debug-info    Print some debug info at exit.&lt;br /&gt;
  -D, --database=name Database to use.&lt;br /&gt;
  --default-character-set=name &lt;br /&gt;
                      Set the default character set.&lt;br /&gt;
  --delimiter=name    Delimiter to be used.&lt;br /&gt;
  --enable-cleartext-plugin &lt;br /&gt;
                      Enable/disable the clear text authentication plugin.&lt;br /&gt;
  -e, --execute=name  Execute command and quit. (Disables --force and history&lt;br /&gt;
                      file.)&lt;br /&gt;
  -E, --vertical      Print the output of a query (rows) vertically.&lt;br /&gt;
  -f, --force         Continue even if we get an SQL error.&lt;br /&gt;
  -G, --named-commands &lt;br /&gt;
                      Enable named commands. Named commands mean this program's&lt;br /&gt;
                      internal commands; see mysql&amp;gt; help . When enabled, the&lt;br /&gt;
                      named commands can be used from any line of the query,&lt;br /&gt;
                      otherwise only from the first line, before an enter.&lt;br /&gt;
                      Disable with --disable-named-commands. This option is&lt;br /&gt;
                      disabled by default.&lt;br /&gt;
  -i, --ignore-spaces Ignore space after function names.&lt;br /&gt;
  --init-command=name SQL Command to execute when connecting to MySQL server.&lt;br /&gt;
                      Will automatically be re-executed when reconnecting.&lt;br /&gt;
  --local-infile      Enable/disable LOAD DATA LOCAL INFILE.&lt;br /&gt;
  -b, --no-beep       Turn off beep on error.&lt;br /&gt;
  -h, --host=name     Connect to host.&lt;br /&gt;
  -H, --html          Produce HTML output.&lt;br /&gt;
  -X, --xml           Produce XML output.&lt;br /&gt;
  --line-numbers      Write line numbers for errors.&lt;br /&gt;
                      (Defaults to on; use --skip-line-numbers to disable.)&lt;br /&gt;
  -L, --skip-line-numbers &lt;br /&gt;
                      Don't write line number for errors.&lt;br /&gt;
  -n, --unbuffered    Flush buffer after each query.&lt;br /&gt;
  --column-names      Write column names in results.&lt;br /&gt;
                      (Defaults to on; use --skip-column-names to disable.)&lt;br /&gt;
  -N, --skip-column-names &lt;br /&gt;
                      Don't write column names in results.&lt;br /&gt;
  --sigint-ignore     Ignore SIGINT (CTRL-C).&lt;br /&gt;
  -o, --one-database  Ignore statements except those that occur while the&lt;br /&gt;
                      default database is the one named at the command line.&lt;br /&gt;
  --pager[=name]      Pager to use to display results. If you don't supply an&lt;br /&gt;
                      option, the default pager is taken from your ENV variable&lt;br /&gt;
                      PAGER. Valid pagers are less, more, cat [&amp;gt; filename],&lt;br /&gt;
                      etc. See interactive help (\h) also. This option does not&lt;br /&gt;
                      work in batch mode. Disable with --disable-pager. This&lt;br /&gt;
                      option is disabled by default.&lt;br /&gt;
  -p, --password[=name] &lt;br /&gt;
                      Password to use when connecting to server. If password is&lt;br /&gt;
                      not given it's asked from the tty.&lt;br /&gt;
  -P, --port=#        Port number to use for connection or 0 for default to, in&lt;br /&gt;
                      order of preference, my.cnf, $MYSQL_TCP_PORT,&lt;br /&gt;
                      /etc/services, built-in default (3306).&lt;br /&gt;
  --prompt=name       Set the mysql prompt to this value.&lt;br /&gt;
  --protocol=name     The protocol to use for connection (tcp, socket, pipe,&lt;br /&gt;
                      memory).&lt;br /&gt;
  -q, --quick         Don't cache result, print it row by row. This may slow&lt;br /&gt;
                      down the server if the output is suspended. Doesn't use&lt;br /&gt;
                      history file.&lt;br /&gt;
  -r, --raw           Write fields without conversion. Used with --batch.&lt;br /&gt;
  --reconnect         Reconnect if the connection is lost. Disable with&lt;br /&gt;
                      --disable-reconnect. This option is enabled by default.&lt;br /&gt;
                      (Defaults to on; use --skip-reconnect to disable.)&lt;br /&gt;
  -s, --silent        Be more silent. Print results with a tab as separator,&lt;br /&gt;
                      each row on new line.&lt;br /&gt;
  -S, --socket=name   The socket file to use for connection.&lt;br /&gt;
  --ssl               Enable SSL for connection (automatically enabled with&lt;br /&gt;
                      other flags).&lt;br /&gt;
  --ssl-ca=name       CA file in PEM format (check OpenSSL docs, implies&lt;br /&gt;
                      --ssl).&lt;br /&gt;
  --ssl-capath=name   CA directory (check OpenSSL docs, implies --ssl).&lt;br /&gt;
  --ssl-cert=name     X509 cert in PEM format (implies --ssl).&lt;br /&gt;
  --ssl-cipher=name   SSL cipher to use (implies --ssl).&lt;br /&gt;
  --ssl-key=name      X509 key in PEM format (implies --ssl).&lt;br /&gt;
  --ssl-verify-server-cert &lt;br /&gt;
                      Verify server's &amp;quot;Common Name&amp;quot; in its cert against&lt;br /&gt;
                      hostname used when connecting. This option is disabled by&lt;br /&gt;
                      default.&lt;br /&gt;
  -t, --table         Output in table format.&lt;br /&gt;
  --tee=name          Append everything into outfile. See interactive help (\h)&lt;br /&gt;
                      also. Does not work in batch mode. Disable with&lt;br /&gt;
                      --disable-tee. This option is disabled by default.&lt;br /&gt;
  -u, --user=name     User for login if not current user.&lt;br /&gt;
  -U, --safe-updates  Only allow UPDATE and DELETE that uses keys.&lt;br /&gt;
  -U, --i-am-a-dummy  Synonym for option --safe-updates, -U.&lt;br /&gt;
  -v, --verbose       Write more. (-v -v -v gives the table output format).&lt;br /&gt;
  -V, --version       Output version information and exit.&lt;br /&gt;
  -w, --wait          Wait and retry if connection is down.&lt;br /&gt;
  --connect-timeout=# Number of seconds before connection timeout.&lt;br /&gt;
  --max-allowed-packet=# &lt;br /&gt;
                      The maximum packet length to send to or receive from&lt;br /&gt;
                      server.&lt;br /&gt;
  --net-buffer-length=# &lt;br /&gt;
                      The buffer size for TCP/IP and socket communication.&lt;br /&gt;
  --select-limit=#    Automatic limit for SELECT when using --safe-updates.&lt;br /&gt;
  --max-join-size=#   Automatic limit for rows in a join when using&lt;br /&gt;
                      --safe-updates.&lt;br /&gt;
  --secure-auth       Refuse client connecting to server if it uses old&lt;br /&gt;
                      (pre-4.1.1) protocol.&lt;br /&gt;
  --server-arg=name   Send embedded server this as a parameter.&lt;br /&gt;
  --show-warnings     Show warnings after every statement.&lt;br /&gt;
  --plugin-dir=name   Directory for client-side plugins.&lt;br /&gt;
  --default-auth=name Default authentication client-side plugin to use.&lt;br /&gt;
&lt;br /&gt;
Default options are read from the following files in the given order:&lt;br /&gt;
/etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf &lt;br /&gt;
The following groups are read: mysql client&lt;br /&gt;
The following options may be given as the first argument:&lt;br /&gt;
--print-defaults        Print the program argument list and exit.&lt;br /&gt;
--no-defaults           Don't read default options from any option file.&lt;br /&gt;
--defaults-file=#       Only read default options from the given file #.&lt;br /&gt;
--defaults-extra-file=# Read this file after the global files are read.&lt;br /&gt;
&lt;br /&gt;
Variables (--variable-name=value)&lt;br /&gt;
and boolean options {FALSE|TRUE}  Value (after reading options)&lt;br /&gt;
--------------------------------- ----------------------------------------&lt;br /&gt;
auto-rehash                       TRUE&lt;br /&gt;
auto-vertical-output              FALSE&lt;br /&gt;
character-sets-dir                (No default value)&lt;br /&gt;
column-type-info                  FALSE&lt;br /&gt;
comments                          FALSE&lt;br /&gt;
compress                          FALSE&lt;br /&gt;
debug-check                       FALSE&lt;br /&gt;
debug-info                        FALSE&lt;br /&gt;
database                          (No default value)&lt;br /&gt;
default-character-set             auto&lt;br /&gt;
delimiter                         ;&lt;br /&gt;
enable-cleartext-plugin           FALSE&lt;br /&gt;
vertical                          FALSE&lt;br /&gt;
force                             FALSE&lt;br /&gt;
named-commands                    FALSE&lt;br /&gt;
ignore-spaces                     FALSE&lt;br /&gt;
init-command                      (No default value)&lt;br /&gt;
local-infile                      FALSE&lt;br /&gt;
no-beep                           FALSE&lt;br /&gt;
host                              (No default value)&lt;br /&gt;
html                              FALSE&lt;br /&gt;
xml                               FALSE&lt;br /&gt;
line-numbers                      TRUE&lt;br /&gt;
unbuffered                        FALSE&lt;br /&gt;
column-names                      TRUE&lt;br /&gt;
sigint-ignore                     FALSE&lt;br /&gt;
port                              0&lt;br /&gt;
prompt                            mysql&amp;gt; &lt;br /&gt;
quick                             FALSE&lt;br /&gt;
raw                               FALSE&lt;br /&gt;
reconnect                         TRUE&lt;br /&gt;
socket                            (No default value)&lt;br /&gt;
ssl                               FALSE&lt;br /&gt;
ssl-ca                            (No default value)&lt;br /&gt;
ssl-capath                        (No default value)&lt;br /&gt;
ssl-cert                          (No default value)&lt;br /&gt;
ssl-cipher                        (No default value)&lt;br /&gt;
ssl-key                           (No default value)&lt;br /&gt;
ssl-verify-server-cert            FALSE&lt;br /&gt;
table                             FALSE&lt;br /&gt;
user                              (No default value)&lt;br /&gt;
safe-updates                      FALSE&lt;br /&gt;
i-am-a-dummy                      FALSE&lt;br /&gt;
connect-timeout                   0&lt;br /&gt;
max-allowed-packet                16777216&lt;br /&gt;
net-buffer-length                 16384&lt;br /&gt;
select-limit                      1000&lt;br /&gt;
max-join-size                     1000000&lt;br /&gt;
secure-auth                       FALSE&lt;br /&gt;
show-warnings                     FALSE&lt;br /&gt;
plugin-dir                        (No default value)&lt;br /&gt;
default-auth                      (No default value)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=MySql&amp;diff=5411</id>
		<title>MySql</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=MySql&amp;diff=5411"/>
		<updated>2014-03-03T03:14:57Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[CssWork]] - parent&lt;br /&gt;
* [[SqlSchema]] - tables used in the database &lt;br /&gt;
* [[SqlDefaults]] - defaults for those tables&lt;br /&gt;
&lt;br /&gt;
* http://dev.mysql.com/doc/refman/5.5/en/index.html&lt;br /&gt;
* http://dev.mysql.com/doc/refman/5.5/en/tutorial.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Information about mysql as used for slash&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Version&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql-5.5.36&lt;br /&gt;
db4-devel-4.7.25                     mysql-libs-5.5.36&lt;br /&gt;
db4-utils-4.7.25                     mysql-server-5.5.36&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Mysql configuration file in /etc/my.cnf&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[mysqld]&lt;br /&gt;
datadir=/var/lib/mysql&lt;br /&gt;
socket=/var/lib/mysql/mysql.sock&lt;br /&gt;
&lt;br /&gt;
# Disabling symbolic-links is recommended to prevent assorted security risks&lt;br /&gt;
symbolic-links=0&lt;br /&gt;
&lt;br /&gt;
# Settings user and group are ignored when systemd is used (fedora &amp;gt;= 15).&lt;br /&gt;
# If you need to run mysqld under a different user or group,&lt;br /&gt;
# customize your systemd unit file for mysqld according to the&lt;br /&gt;
# instructions in http://fedoraproject.org/wiki/Systemd&lt;br /&gt;
user=mysql&lt;br /&gt;
&lt;br /&gt;
# Semisynchronous Replication&lt;br /&gt;
# http://dev.mysql.com/doc/refman/5.5/en/replication-semisync.html&lt;br /&gt;
# uncomment next line on MASTER&lt;br /&gt;
;plugin-load=rpl_semi_sync_master=semisync_master.so&lt;br /&gt;
# uncomment next line on SLAVE&lt;br /&gt;
;plugin-load=rpl_semi_sync_slave=semisync_slave.so&lt;br /&gt;
&lt;br /&gt;
# Others options for Semisynchronous Replication&lt;br /&gt;
;rpl_semi_sync_master_enabled=1&lt;br /&gt;
;rpl_semi_sync_master_timeout=10&lt;br /&gt;
;rpl_semi_sync_slave_enabled=1&lt;br /&gt;
&lt;br /&gt;
# http://dev.mysql.com/doc/refman/5.5/en/performance-schema.html&lt;br /&gt;
;performance_schema&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[mysqld_safe]&lt;br /&gt;
log-error=/var/log/mysqld.log&lt;br /&gt;
pid-file=/var/run/mysqld/mysqld.pid&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;mysql --help&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql  Ver 14.14 Distrib 5.5.36, for Linux (x86_64) using readline 5.1&lt;br /&gt;
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.&lt;br /&gt;
&lt;br /&gt;
Oracle is a registered trademark of Oracle Corporation and/or its&lt;br /&gt;
affiliates. Other names may be trademarks of their respective&lt;br /&gt;
owners.&lt;br /&gt;
&lt;br /&gt;
Usage: mysql [OPTIONS] [database]&lt;br /&gt;
  -?, --help          Display this help and exit.&lt;br /&gt;
  -I, --help          Synonym for -?&lt;br /&gt;
  --auto-rehash       Enable automatic rehashing. One doesn't need to use&lt;br /&gt;
                      'rehash' to get table and field completion, but startup&lt;br /&gt;
                      and reconnecting may take a longer time. Disable with&lt;br /&gt;
                      --disable-auto-rehash.&lt;br /&gt;
                      (Defaults to on; use --skip-auto-rehash to disable.)&lt;br /&gt;
  -A, --no-auto-rehash &lt;br /&gt;
                      No automatic rehashing. One has to use 'rehash' to get&lt;br /&gt;
                      table and field completion. This gives a quicker start of&lt;br /&gt;
                      mysql and disables rehashing on reconnect.&lt;br /&gt;
  --auto-vertical-output &lt;br /&gt;
                      Automatically switch to vertical output mode if the&lt;br /&gt;
                      result is wider than the terminal width.&lt;br /&gt;
  -B, --batch         Don't use history file. Disable interactive behavior.&lt;br /&gt;
                      (Enables --silent.)&lt;br /&gt;
  --character-sets-dir=name &lt;br /&gt;
                      Directory for character set files.&lt;br /&gt;
  --column-type-info  Display column type information.&lt;br /&gt;
  -c, --comments      Preserve comments. Send comments to the server. The&lt;br /&gt;
                      default is --skip-comments (discard comments), enable&lt;br /&gt;
                      with --comments.&lt;br /&gt;
  -C, --compress      Use compression in server/client protocol.&lt;br /&gt;
  -#, --debug[=#]     This is a non-debug version. Catch this and exit.&lt;br /&gt;
  --debug-check       Check memory and open file usage at exit.&lt;br /&gt;
  -T, --debug-info    Print some debug info at exit.&lt;br /&gt;
  -D, --database=name Database to use.&lt;br /&gt;
  --default-character-set=name &lt;br /&gt;
                      Set the default character set.&lt;br /&gt;
  --delimiter=name    Delimiter to be used.&lt;br /&gt;
  --enable-cleartext-plugin &lt;br /&gt;
                      Enable/disable the clear text authentication plugin.&lt;br /&gt;
  -e, --execute=name  Execute command and quit. (Disables --force and history&lt;br /&gt;
                      file.)&lt;br /&gt;
  -E, --vertical      Print the output of a query (rows) vertically.&lt;br /&gt;
  -f, --force         Continue even if we get an SQL error.&lt;br /&gt;
  -G, --named-commands &lt;br /&gt;
                      Enable named commands. Named commands mean this program's&lt;br /&gt;
                      internal commands; see mysql&amp;gt; help . When enabled, the&lt;br /&gt;
                      named commands can be used from any line of the query,&lt;br /&gt;
                      otherwise only from the first line, before an enter.&lt;br /&gt;
                      Disable with --disable-named-commands. This option is&lt;br /&gt;
                      disabled by default.&lt;br /&gt;
  -i, --ignore-spaces Ignore space after function names.&lt;br /&gt;
  --init-command=name SQL Command to execute when connecting to MySQL server.&lt;br /&gt;
                      Will automatically be re-executed when reconnecting.&lt;br /&gt;
  --local-infile      Enable/disable LOAD DATA LOCAL INFILE.&lt;br /&gt;
  -b, --no-beep       Turn off beep on error.&lt;br /&gt;
  -h, --host=name     Connect to host.&lt;br /&gt;
  -H, --html          Produce HTML output.&lt;br /&gt;
  -X, --xml           Produce XML output.&lt;br /&gt;
  --line-numbers      Write line numbers for errors.&lt;br /&gt;
                      (Defaults to on; use --skip-line-numbers to disable.)&lt;br /&gt;
  -L, --skip-line-numbers &lt;br /&gt;
                      Don't write line number for errors.&lt;br /&gt;
  -n, --unbuffered    Flush buffer after each query.&lt;br /&gt;
  --column-names      Write column names in results.&lt;br /&gt;
                      (Defaults to on; use --skip-column-names to disable.)&lt;br /&gt;
  -N, --skip-column-names &lt;br /&gt;
                      Don't write column names in results.&lt;br /&gt;
  --sigint-ignore     Ignore SIGINT (CTRL-C).&lt;br /&gt;
  -o, --one-database  Ignore statements except those that occur while the&lt;br /&gt;
                      default database is the one named at the command line.&lt;br /&gt;
  --pager[=name]      Pager to use to display results. If you don't supply an&lt;br /&gt;
                      option, the default pager is taken from your ENV variable&lt;br /&gt;
                      PAGER. Valid pagers are less, more, cat [&amp;gt; filename],&lt;br /&gt;
                      etc. See interactive help (\h) also. This option does not&lt;br /&gt;
                      work in batch mode. Disable with --disable-pager. This&lt;br /&gt;
                      option is disabled by default.&lt;br /&gt;
  -p, --password[=name] &lt;br /&gt;
                      Password to use when connecting to server. If password is&lt;br /&gt;
                      not given it's asked from the tty.&lt;br /&gt;
  -P, --port=#        Port number to use for connection or 0 for default to, in&lt;br /&gt;
                      order of preference, my.cnf, $MYSQL_TCP_PORT,&lt;br /&gt;
                      /etc/services, built-in default (3306).&lt;br /&gt;
  --prompt=name       Set the mysql prompt to this value.&lt;br /&gt;
  --protocol=name     The protocol to use for connection (tcp, socket, pipe,&lt;br /&gt;
                      memory).&lt;br /&gt;
  -q, --quick         Don't cache result, print it row by row. This may slow&lt;br /&gt;
                      down the server if the output is suspended. Doesn't use&lt;br /&gt;
                      history file.&lt;br /&gt;
  -r, --raw           Write fields without conversion. Used with --batch.&lt;br /&gt;
  --reconnect         Reconnect if the connection is lost. Disable with&lt;br /&gt;
                      --disable-reconnect. This option is enabled by default.&lt;br /&gt;
                      (Defaults to on; use --skip-reconnect to disable.)&lt;br /&gt;
  -s, --silent        Be more silent. Print results with a tab as separator,&lt;br /&gt;
                      each row on new line.&lt;br /&gt;
  -S, --socket=name   The socket file to use for connection.&lt;br /&gt;
  --ssl               Enable SSL for connection (automatically enabled with&lt;br /&gt;
                      other flags).&lt;br /&gt;
  --ssl-ca=name       CA file in PEM format (check OpenSSL docs, implies&lt;br /&gt;
                      --ssl).&lt;br /&gt;
  --ssl-capath=name   CA directory (check OpenSSL docs, implies --ssl).&lt;br /&gt;
  --ssl-cert=name     X509 cert in PEM format (implies --ssl).&lt;br /&gt;
  --ssl-cipher=name   SSL cipher to use (implies --ssl).&lt;br /&gt;
  --ssl-key=name      X509 key in PEM format (implies --ssl).&lt;br /&gt;
  --ssl-verify-server-cert &lt;br /&gt;
                      Verify server's &amp;quot;Common Name&amp;quot; in its cert against&lt;br /&gt;
                      hostname used when connecting. This option is disabled by&lt;br /&gt;
                      default.&lt;br /&gt;
  -t, --table         Output in table format.&lt;br /&gt;
  --tee=name          Append everything into outfile. See interactive help (\h)&lt;br /&gt;
                      also. Does not work in batch mode. Disable with&lt;br /&gt;
                      --disable-tee. This option is disabled by default.&lt;br /&gt;
  -u, --user=name     User for login if not current user.&lt;br /&gt;
  -U, --safe-updates  Only allow UPDATE and DELETE that uses keys.&lt;br /&gt;
  -U, --i-am-a-dummy  Synonym for option --safe-updates, -U.&lt;br /&gt;
  -v, --verbose       Write more. (-v -v -v gives the table output format).&lt;br /&gt;
  -V, --version       Output version information and exit.&lt;br /&gt;
  -w, --wait          Wait and retry if connection is down.&lt;br /&gt;
  --connect-timeout=# Number of seconds before connection timeout.&lt;br /&gt;
  --max-allowed-packet=# &lt;br /&gt;
                      The maximum packet length to send to or receive from&lt;br /&gt;
                      server.&lt;br /&gt;
  --net-buffer-length=# &lt;br /&gt;
                      The buffer size for TCP/IP and socket communication.&lt;br /&gt;
  --select-limit=#    Automatic limit for SELECT when using --safe-updates.&lt;br /&gt;
  --max-join-size=#   Automatic limit for rows in a join when using&lt;br /&gt;
                      --safe-updates.&lt;br /&gt;
  --secure-auth       Refuse client connecting to server if it uses old&lt;br /&gt;
                      (pre-4.1.1) protocol.&lt;br /&gt;
  --server-arg=name   Send embedded server this as a parameter.&lt;br /&gt;
  --show-warnings     Show warnings after every statement.&lt;br /&gt;
  --plugin-dir=name   Directory for client-side plugins.&lt;br /&gt;
  --default-auth=name Default authentication client-side plugin to use.&lt;br /&gt;
&lt;br /&gt;
Default options are read from the following files in the given order:&lt;br /&gt;
/etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf &lt;br /&gt;
The following groups are read: mysql client&lt;br /&gt;
The following options may be given as the first argument:&lt;br /&gt;
--print-defaults        Print the program argument list and exit.&lt;br /&gt;
--no-defaults           Don't read default options from any option file.&lt;br /&gt;
--defaults-file=#       Only read default options from the given file #.&lt;br /&gt;
--defaults-extra-file=# Read this file after the global files are read.&lt;br /&gt;
&lt;br /&gt;
Variables (--variable-name=value)&lt;br /&gt;
and boolean options {FALSE|TRUE}  Value (after reading options)&lt;br /&gt;
--------------------------------- ----------------------------------------&lt;br /&gt;
auto-rehash                       TRUE&lt;br /&gt;
auto-vertical-output              FALSE&lt;br /&gt;
character-sets-dir                (No default value)&lt;br /&gt;
column-type-info                  FALSE&lt;br /&gt;
comments                          FALSE&lt;br /&gt;
compress                          FALSE&lt;br /&gt;
debug-check                       FALSE&lt;br /&gt;
debug-info                        FALSE&lt;br /&gt;
database                          (No default value)&lt;br /&gt;
default-character-set             auto&lt;br /&gt;
delimiter                         ;&lt;br /&gt;
enable-cleartext-plugin           FALSE&lt;br /&gt;
vertical                          FALSE&lt;br /&gt;
force                             FALSE&lt;br /&gt;
named-commands                    FALSE&lt;br /&gt;
ignore-spaces                     FALSE&lt;br /&gt;
init-command                      (No default value)&lt;br /&gt;
local-infile                      FALSE&lt;br /&gt;
no-beep                           FALSE&lt;br /&gt;
host                              (No default value)&lt;br /&gt;
html                              FALSE&lt;br /&gt;
xml                               FALSE&lt;br /&gt;
line-numbers                      TRUE&lt;br /&gt;
unbuffered                        FALSE&lt;br /&gt;
column-names                      TRUE&lt;br /&gt;
sigint-ignore                     FALSE&lt;br /&gt;
port                              0&lt;br /&gt;
prompt                            mysql&amp;gt; &lt;br /&gt;
quick                             FALSE&lt;br /&gt;
raw                               FALSE&lt;br /&gt;
reconnect                         TRUE&lt;br /&gt;
socket                            (No default value)&lt;br /&gt;
ssl                               FALSE&lt;br /&gt;
ssl-ca                            (No default value)&lt;br /&gt;
ssl-capath                        (No default value)&lt;br /&gt;
ssl-cert                          (No default value)&lt;br /&gt;
ssl-cipher                        (No default value)&lt;br /&gt;
ssl-key                           (No default value)&lt;br /&gt;
ssl-verify-server-cert            FALSE&lt;br /&gt;
table                             FALSE&lt;br /&gt;
user                              (No default value)&lt;br /&gt;
safe-updates                      FALSE&lt;br /&gt;
i-am-a-dummy                      FALSE&lt;br /&gt;
connect-timeout                   0&lt;br /&gt;
max-allowed-packet                16777216&lt;br /&gt;
net-buffer-length                 16384&lt;br /&gt;
select-limit                      1000&lt;br /&gt;
max-join-size                     1000000&lt;br /&gt;
secure-auth                       FALSE&lt;br /&gt;
show-warnings                     FALSE&lt;br /&gt;
plugin-dir                        (No default value)&lt;br /&gt;
default-auth                      (No default value)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=MySql&amp;diff=5410</id>
		<title>MySql</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=MySql&amp;diff=5410"/>
		<updated>2014-03-03T03:08:26Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[CssWork]] - parent&lt;br /&gt;
&amp;lt;br&amp;gt;[[SqlSchema]] - tables used in the database &lt;br /&gt;
&amp;lt;br&amp;gt;[[SqlDefaults]] - defaults for those tables&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Information about mysql as used for slash&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Version&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql-5.5.36&lt;br /&gt;
db4-devel-4.7.25                     mysql-libs-5.5.36&lt;br /&gt;
db4-utils-4.7.25                     mysql-server-5.5.36&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Mysql configuration file in /etc/my.cnf&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[mysqld]&lt;br /&gt;
datadir=/var/lib/mysql&lt;br /&gt;
socket=/var/lib/mysql/mysql.sock&lt;br /&gt;
&lt;br /&gt;
# Disabling symbolic-links is recommended to prevent assorted security risks&lt;br /&gt;
symbolic-links=0&lt;br /&gt;
&lt;br /&gt;
# Settings user and group are ignored when systemd is used (fedora &amp;gt;= 15).&lt;br /&gt;
# If you need to run mysqld under a different user or group,&lt;br /&gt;
# customize your systemd unit file for mysqld according to the&lt;br /&gt;
# instructions in http://fedoraproject.org/wiki/Systemd&lt;br /&gt;
user=mysql&lt;br /&gt;
&lt;br /&gt;
# Semisynchronous Replication&lt;br /&gt;
# http://dev.mysql.com/doc/refman/5.5/en/replication-semisync.html&lt;br /&gt;
# uncomment next line on MASTER&lt;br /&gt;
;plugin-load=rpl_semi_sync_master=semisync_master.so&lt;br /&gt;
# uncomment next line on SLAVE&lt;br /&gt;
;plugin-load=rpl_semi_sync_slave=semisync_slave.so&lt;br /&gt;
&lt;br /&gt;
# Others options for Semisynchronous Replication&lt;br /&gt;
;rpl_semi_sync_master_enabled=1&lt;br /&gt;
;rpl_semi_sync_master_timeout=10&lt;br /&gt;
;rpl_semi_sync_slave_enabled=1&lt;br /&gt;
&lt;br /&gt;
# http://dev.mysql.com/doc/refman/5.5/en/performance-schema.html&lt;br /&gt;
;performance_schema&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[mysqld_safe]&lt;br /&gt;
log-error=/var/log/mysqld.log&lt;br /&gt;
pid-file=/var/run/mysqld/mysqld.pid&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;mysql --help&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql  Ver 14.14 Distrib 5.5.36, for Linux (x86_64) using readline 5.1&lt;br /&gt;
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.&lt;br /&gt;
&lt;br /&gt;
Oracle is a registered trademark of Oracle Corporation and/or its&lt;br /&gt;
affiliates. Other names may be trademarks of their respective&lt;br /&gt;
owners.&lt;br /&gt;
&lt;br /&gt;
Usage: mysql [OPTIONS] [database]&lt;br /&gt;
  -?, --help          Display this help and exit.&lt;br /&gt;
  -I, --help          Synonym for -?&lt;br /&gt;
  --auto-rehash       Enable automatic rehashing. One doesn't need to use&lt;br /&gt;
                      'rehash' to get table and field completion, but startup&lt;br /&gt;
                      and reconnecting may take a longer time. Disable with&lt;br /&gt;
                      --disable-auto-rehash.&lt;br /&gt;
                      (Defaults to on; use --skip-auto-rehash to disable.)&lt;br /&gt;
  -A, --no-auto-rehash &lt;br /&gt;
                      No automatic rehashing. One has to use 'rehash' to get&lt;br /&gt;
                      table and field completion. This gives a quicker start of&lt;br /&gt;
                      mysql and disables rehashing on reconnect.&lt;br /&gt;
  --auto-vertical-output &lt;br /&gt;
                      Automatically switch to vertical output mode if the&lt;br /&gt;
                      result is wider than the terminal width.&lt;br /&gt;
  -B, --batch         Don't use history file. Disable interactive behavior.&lt;br /&gt;
                      (Enables --silent.)&lt;br /&gt;
  --character-sets-dir=name &lt;br /&gt;
                      Directory for character set files.&lt;br /&gt;
  --column-type-info  Display column type information.&lt;br /&gt;
  -c, --comments      Preserve comments. Send comments to the server. The&lt;br /&gt;
                      default is --skip-comments (discard comments), enable&lt;br /&gt;
                      with --comments.&lt;br /&gt;
  -C, --compress      Use compression in server/client protocol.&lt;br /&gt;
  -#, --debug[=#]     This is a non-debug version. Catch this and exit.&lt;br /&gt;
  --debug-check       Check memory and open file usage at exit.&lt;br /&gt;
  -T, --debug-info    Print some debug info at exit.&lt;br /&gt;
  -D, --database=name Database to use.&lt;br /&gt;
  --default-character-set=name &lt;br /&gt;
                      Set the default character set.&lt;br /&gt;
  --delimiter=name    Delimiter to be used.&lt;br /&gt;
  --enable-cleartext-plugin &lt;br /&gt;
                      Enable/disable the clear text authentication plugin.&lt;br /&gt;
  -e, --execute=name  Execute command and quit. (Disables --force and history&lt;br /&gt;
                      file.)&lt;br /&gt;
  -E, --vertical      Print the output of a query (rows) vertically.&lt;br /&gt;
  -f, --force         Continue even if we get an SQL error.&lt;br /&gt;
  -G, --named-commands &lt;br /&gt;
                      Enable named commands. Named commands mean this program's&lt;br /&gt;
                      internal commands; see mysql&amp;gt; help . When enabled, the&lt;br /&gt;
                      named commands can be used from any line of the query,&lt;br /&gt;
                      otherwise only from the first line, before an enter.&lt;br /&gt;
                      Disable with --disable-named-commands. This option is&lt;br /&gt;
                      disabled by default.&lt;br /&gt;
  -i, --ignore-spaces Ignore space after function names.&lt;br /&gt;
  --init-command=name SQL Command to execute when connecting to MySQL server.&lt;br /&gt;
                      Will automatically be re-executed when reconnecting.&lt;br /&gt;
  --local-infile      Enable/disable LOAD DATA LOCAL INFILE.&lt;br /&gt;
  -b, --no-beep       Turn off beep on error.&lt;br /&gt;
  -h, --host=name     Connect to host.&lt;br /&gt;
  -H, --html          Produce HTML output.&lt;br /&gt;
  -X, --xml           Produce XML output.&lt;br /&gt;
  --line-numbers      Write line numbers for errors.&lt;br /&gt;
                      (Defaults to on; use --skip-line-numbers to disable.)&lt;br /&gt;
  -L, --skip-line-numbers &lt;br /&gt;
                      Don't write line number for errors.&lt;br /&gt;
  -n, --unbuffered    Flush buffer after each query.&lt;br /&gt;
  --column-names      Write column names in results.&lt;br /&gt;
                      (Defaults to on; use --skip-column-names to disable.)&lt;br /&gt;
  -N, --skip-column-names &lt;br /&gt;
                      Don't write column names in results.&lt;br /&gt;
  --sigint-ignore     Ignore SIGINT (CTRL-C).&lt;br /&gt;
  -o, --one-database  Ignore statements except those that occur while the&lt;br /&gt;
                      default database is the one named at the command line.&lt;br /&gt;
  --pager[=name]      Pager to use to display results. If you don't supply an&lt;br /&gt;
                      option, the default pager is taken from your ENV variable&lt;br /&gt;
                      PAGER. Valid pagers are less, more, cat [&amp;gt; filename],&lt;br /&gt;
                      etc. See interactive help (\h) also. This option does not&lt;br /&gt;
                      work in batch mode. Disable with --disable-pager. This&lt;br /&gt;
                      option is disabled by default.&lt;br /&gt;
  -p, --password[=name] &lt;br /&gt;
                      Password to use when connecting to server. If password is&lt;br /&gt;
                      not given it's asked from the tty.&lt;br /&gt;
  -P, --port=#        Port number to use for connection or 0 for default to, in&lt;br /&gt;
                      order of preference, my.cnf, $MYSQL_TCP_PORT,&lt;br /&gt;
                      /etc/services, built-in default (3306).&lt;br /&gt;
  --prompt=name       Set the mysql prompt to this value.&lt;br /&gt;
  --protocol=name     The protocol to use for connection (tcp, socket, pipe,&lt;br /&gt;
                      memory).&lt;br /&gt;
  -q, --quick         Don't cache result, print it row by row. This may slow&lt;br /&gt;
                      down the server if the output is suspended. Doesn't use&lt;br /&gt;
                      history file.&lt;br /&gt;
  -r, --raw           Write fields without conversion. Used with --batch.&lt;br /&gt;
  --reconnect         Reconnect if the connection is lost. Disable with&lt;br /&gt;
                      --disable-reconnect. This option is enabled by default.&lt;br /&gt;
                      (Defaults to on; use --skip-reconnect to disable.)&lt;br /&gt;
  -s, --silent        Be more silent. Print results with a tab as separator,&lt;br /&gt;
                      each row on new line.&lt;br /&gt;
  -S, --socket=name   The socket file to use for connection.&lt;br /&gt;
  --ssl               Enable SSL for connection (automatically enabled with&lt;br /&gt;
                      other flags).&lt;br /&gt;
  --ssl-ca=name       CA file in PEM format (check OpenSSL docs, implies&lt;br /&gt;
                      --ssl).&lt;br /&gt;
  --ssl-capath=name   CA directory (check OpenSSL docs, implies --ssl).&lt;br /&gt;
  --ssl-cert=name     X509 cert in PEM format (implies --ssl).&lt;br /&gt;
  --ssl-cipher=name   SSL cipher to use (implies --ssl).&lt;br /&gt;
  --ssl-key=name      X509 key in PEM format (implies --ssl).&lt;br /&gt;
  --ssl-verify-server-cert &lt;br /&gt;
                      Verify server's &amp;quot;Common Name&amp;quot; in its cert against&lt;br /&gt;
                      hostname used when connecting. This option is disabled by&lt;br /&gt;
                      default.&lt;br /&gt;
  -t, --table         Output in table format.&lt;br /&gt;
  --tee=name          Append everything into outfile. See interactive help (\h)&lt;br /&gt;
                      also. Does not work in batch mode. Disable with&lt;br /&gt;
                      --disable-tee. This option is disabled by default.&lt;br /&gt;
  -u, --user=name     User for login if not current user.&lt;br /&gt;
  -U, --safe-updates  Only allow UPDATE and DELETE that uses keys.&lt;br /&gt;
  -U, --i-am-a-dummy  Synonym for option --safe-updates, -U.&lt;br /&gt;
  -v, --verbose       Write more. (-v -v -v gives the table output format).&lt;br /&gt;
  -V, --version       Output version information and exit.&lt;br /&gt;
  -w, --wait          Wait and retry if connection is down.&lt;br /&gt;
  --connect-timeout=# Number of seconds before connection timeout.&lt;br /&gt;
  --max-allowed-packet=# &lt;br /&gt;
                      The maximum packet length to send to or receive from&lt;br /&gt;
                      server.&lt;br /&gt;
  --net-buffer-length=# &lt;br /&gt;
                      The buffer size for TCP/IP and socket communication.&lt;br /&gt;
  --select-limit=#    Automatic limit for SELECT when using --safe-updates.&lt;br /&gt;
  --max-join-size=#   Automatic limit for rows in a join when using&lt;br /&gt;
                      --safe-updates.&lt;br /&gt;
  --secure-auth       Refuse client connecting to server if it uses old&lt;br /&gt;
                      (pre-4.1.1) protocol.&lt;br /&gt;
  --server-arg=name   Send embedded server this as a parameter.&lt;br /&gt;
  --show-warnings     Show warnings after every statement.&lt;br /&gt;
  --plugin-dir=name   Directory for client-side plugins.&lt;br /&gt;
  --default-auth=name Default authentication client-side plugin to use.&lt;br /&gt;
&lt;br /&gt;
Default options are read from the following files in the given order:&lt;br /&gt;
/etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf &lt;br /&gt;
The following groups are read: mysql client&lt;br /&gt;
The following options may be given as the first argument:&lt;br /&gt;
--print-defaults        Print the program argument list and exit.&lt;br /&gt;
--no-defaults           Don't read default options from any option file.&lt;br /&gt;
--defaults-file=#       Only read default options from the given file #.&lt;br /&gt;
--defaults-extra-file=# Read this file after the global files are read.&lt;br /&gt;
&lt;br /&gt;
Variables (--variable-name=value)&lt;br /&gt;
and boolean options {FALSE|TRUE}  Value (after reading options)&lt;br /&gt;
--------------------------------- ----------------------------------------&lt;br /&gt;
auto-rehash                       TRUE&lt;br /&gt;
auto-vertical-output              FALSE&lt;br /&gt;
character-sets-dir                (No default value)&lt;br /&gt;
column-type-info                  FALSE&lt;br /&gt;
comments                          FALSE&lt;br /&gt;
compress                          FALSE&lt;br /&gt;
debug-check                       FALSE&lt;br /&gt;
debug-info                        FALSE&lt;br /&gt;
database                          (No default value)&lt;br /&gt;
default-character-set             auto&lt;br /&gt;
delimiter                         ;&lt;br /&gt;
enable-cleartext-plugin           FALSE&lt;br /&gt;
vertical                          FALSE&lt;br /&gt;
force                             FALSE&lt;br /&gt;
named-commands                    FALSE&lt;br /&gt;
ignore-spaces                     FALSE&lt;br /&gt;
init-command                      (No default value)&lt;br /&gt;
local-infile                      FALSE&lt;br /&gt;
no-beep                           FALSE&lt;br /&gt;
host                              (No default value)&lt;br /&gt;
html                              FALSE&lt;br /&gt;
xml                               FALSE&lt;br /&gt;
line-numbers                      TRUE&lt;br /&gt;
unbuffered                        FALSE&lt;br /&gt;
column-names                      TRUE&lt;br /&gt;
sigint-ignore                     FALSE&lt;br /&gt;
port                              0&lt;br /&gt;
prompt                            mysql&amp;gt; &lt;br /&gt;
quick                             FALSE&lt;br /&gt;
raw                               FALSE&lt;br /&gt;
reconnect                         TRUE&lt;br /&gt;
socket                            (No default value)&lt;br /&gt;
ssl                               FALSE&lt;br /&gt;
ssl-ca                            (No default value)&lt;br /&gt;
ssl-capath                        (No default value)&lt;br /&gt;
ssl-cert                          (No default value)&lt;br /&gt;
ssl-cipher                        (No default value)&lt;br /&gt;
ssl-key                           (No default value)&lt;br /&gt;
ssl-verify-server-cert            FALSE&lt;br /&gt;
table                             FALSE&lt;br /&gt;
user                              (No default value)&lt;br /&gt;
safe-updates                      FALSE&lt;br /&gt;
i-am-a-dummy                      FALSE&lt;br /&gt;
connect-timeout                   0&lt;br /&gt;
max-allowed-packet                16777216&lt;br /&gt;
net-buffer-length                 16384&lt;br /&gt;
select-limit                      1000&lt;br /&gt;
max-join-size                     1000000&lt;br /&gt;
secure-auth                       FALSE&lt;br /&gt;
show-warnings                     FALSE&lt;br /&gt;
plugin-dir                        (No default value)&lt;br /&gt;
default-auth                      (No default value)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=MySql&amp;diff=5409</id>
		<title>MySql</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=MySql&amp;diff=5409"/>
		<updated>2014-03-03T00:06:02Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[CssWork]] - parent&lt;br /&gt;
&amp;lt;br&amp;gt;[[SqlSchema]] - tables used in the database &lt;br /&gt;
&amp;lt;br&amp;gt;[[SqlDefaults]] - defaults for those tables&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Information about mysql as used for slash&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Mysql configuration file in /etc/my.cnf&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[mysqld]&lt;br /&gt;
datadir=/var/lib/mysql&lt;br /&gt;
socket=/var/lib/mysql/mysql.sock&lt;br /&gt;
&lt;br /&gt;
# Disabling symbolic-links is recommended to prevent assorted security risks&lt;br /&gt;
symbolic-links=0&lt;br /&gt;
&lt;br /&gt;
# Settings user and group are ignored when systemd is used (fedora &amp;gt;= 15).&lt;br /&gt;
# If you need to run mysqld under a different user or group,&lt;br /&gt;
# customize your systemd unit file for mysqld according to the&lt;br /&gt;
# instructions in http://fedoraproject.org/wiki/Systemd&lt;br /&gt;
user=mysql&lt;br /&gt;
&lt;br /&gt;
# Semisynchronous Replication&lt;br /&gt;
# http://dev.mysql.com/doc/refman/5.5/en/replication-semisync.html&lt;br /&gt;
# uncomment next line on MASTER&lt;br /&gt;
;plugin-load=rpl_semi_sync_master=semisync_master.so&lt;br /&gt;
# uncomment next line on SLAVE&lt;br /&gt;
;plugin-load=rpl_semi_sync_slave=semisync_slave.so&lt;br /&gt;
&lt;br /&gt;
# Others options for Semisynchronous Replication&lt;br /&gt;
;rpl_semi_sync_master_enabled=1&lt;br /&gt;
;rpl_semi_sync_master_timeout=10&lt;br /&gt;
;rpl_semi_sync_slave_enabled=1&lt;br /&gt;
&lt;br /&gt;
# http://dev.mysql.com/doc/refman/5.5/en/performance-schema.html&lt;br /&gt;
;performance_schema&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[mysqld_safe]&lt;br /&gt;
log-error=/var/log/mysqld.log&lt;br /&gt;
pid-file=/var/run/mysqld/mysqld.pid&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;mysql --help&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql  Ver 14.14 Distrib 5.5.36, for Linux (x86_64) using readline 5.1&lt;br /&gt;
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.&lt;br /&gt;
&lt;br /&gt;
Oracle is a registered trademark of Oracle Corporation and/or its&lt;br /&gt;
affiliates. Other names may be trademarks of their respective&lt;br /&gt;
owners.&lt;br /&gt;
&lt;br /&gt;
Usage: mysql [OPTIONS] [database]&lt;br /&gt;
  -?, --help          Display this help and exit.&lt;br /&gt;
  -I, --help          Synonym for -?&lt;br /&gt;
  --auto-rehash       Enable automatic rehashing. One doesn't need to use&lt;br /&gt;
                      'rehash' to get table and field completion, but startup&lt;br /&gt;
                      and reconnecting may take a longer time. Disable with&lt;br /&gt;
                      --disable-auto-rehash.&lt;br /&gt;
                      (Defaults to on; use --skip-auto-rehash to disable.)&lt;br /&gt;
  -A, --no-auto-rehash &lt;br /&gt;
                      No automatic rehashing. One has to use 'rehash' to get&lt;br /&gt;
                      table and field completion. This gives a quicker start of&lt;br /&gt;
                      mysql and disables rehashing on reconnect.&lt;br /&gt;
  --auto-vertical-output &lt;br /&gt;
                      Automatically switch to vertical output mode if the&lt;br /&gt;
                      result is wider than the terminal width.&lt;br /&gt;
  -B, --batch         Don't use history file. Disable interactive behavior.&lt;br /&gt;
                      (Enables --silent.)&lt;br /&gt;
  --character-sets-dir=name &lt;br /&gt;
                      Directory for character set files.&lt;br /&gt;
  --column-type-info  Display column type information.&lt;br /&gt;
  -c, --comments      Preserve comments. Send comments to the server. The&lt;br /&gt;
                      default is --skip-comments (discard comments), enable&lt;br /&gt;
                      with --comments.&lt;br /&gt;
  -C, --compress      Use compression in server/client protocol.&lt;br /&gt;
  -#, --debug[=#]     This is a non-debug version. Catch this and exit.&lt;br /&gt;
  --debug-check       Check memory and open file usage at exit.&lt;br /&gt;
  -T, --debug-info    Print some debug info at exit.&lt;br /&gt;
  -D, --database=name Database to use.&lt;br /&gt;
  --default-character-set=name &lt;br /&gt;
                      Set the default character set.&lt;br /&gt;
  --delimiter=name    Delimiter to be used.&lt;br /&gt;
  --enable-cleartext-plugin &lt;br /&gt;
                      Enable/disable the clear text authentication plugin.&lt;br /&gt;
  -e, --execute=name  Execute command and quit. (Disables --force and history&lt;br /&gt;
                      file.)&lt;br /&gt;
  -E, --vertical      Print the output of a query (rows) vertically.&lt;br /&gt;
  -f, --force         Continue even if we get an SQL error.&lt;br /&gt;
  -G, --named-commands &lt;br /&gt;
                      Enable named commands. Named commands mean this program's&lt;br /&gt;
                      internal commands; see mysql&amp;gt; help . When enabled, the&lt;br /&gt;
                      named commands can be used from any line of the query,&lt;br /&gt;
                      otherwise only from the first line, before an enter.&lt;br /&gt;
                      Disable with --disable-named-commands. This option is&lt;br /&gt;
                      disabled by default.&lt;br /&gt;
  -i, --ignore-spaces Ignore space after function names.&lt;br /&gt;
  --init-command=name SQL Command to execute when connecting to MySQL server.&lt;br /&gt;
                      Will automatically be re-executed when reconnecting.&lt;br /&gt;
  --local-infile      Enable/disable LOAD DATA LOCAL INFILE.&lt;br /&gt;
  -b, --no-beep       Turn off beep on error.&lt;br /&gt;
  -h, --host=name     Connect to host.&lt;br /&gt;
  -H, --html          Produce HTML output.&lt;br /&gt;
  -X, --xml           Produce XML output.&lt;br /&gt;
  --line-numbers      Write line numbers for errors.&lt;br /&gt;
                      (Defaults to on; use --skip-line-numbers to disable.)&lt;br /&gt;
  -L, --skip-line-numbers &lt;br /&gt;
                      Don't write line number for errors.&lt;br /&gt;
  -n, --unbuffered    Flush buffer after each query.&lt;br /&gt;
  --column-names      Write column names in results.&lt;br /&gt;
                      (Defaults to on; use --skip-column-names to disable.)&lt;br /&gt;
  -N, --skip-column-names &lt;br /&gt;
                      Don't write column names in results.&lt;br /&gt;
  --sigint-ignore     Ignore SIGINT (CTRL-C).&lt;br /&gt;
  -o, --one-database  Ignore statements except those that occur while the&lt;br /&gt;
                      default database is the one named at the command line.&lt;br /&gt;
  --pager[=name]      Pager to use to display results. If you don't supply an&lt;br /&gt;
                      option, the default pager is taken from your ENV variable&lt;br /&gt;
                      PAGER. Valid pagers are less, more, cat [&amp;gt; filename],&lt;br /&gt;
                      etc. See interactive help (\h) also. This option does not&lt;br /&gt;
                      work in batch mode. Disable with --disable-pager. This&lt;br /&gt;
                      option is disabled by default.&lt;br /&gt;
  -p, --password[=name] &lt;br /&gt;
                      Password to use when connecting to server. If password is&lt;br /&gt;
                      not given it's asked from the tty.&lt;br /&gt;
  -P, --port=#        Port number to use for connection or 0 for default to, in&lt;br /&gt;
                      order of preference, my.cnf, $MYSQL_TCP_PORT,&lt;br /&gt;
                      /etc/services, built-in default (3306).&lt;br /&gt;
  --prompt=name       Set the mysql prompt to this value.&lt;br /&gt;
  --protocol=name     The protocol to use for connection (tcp, socket, pipe,&lt;br /&gt;
                      memory).&lt;br /&gt;
  -q, --quick         Don't cache result, print it row by row. This may slow&lt;br /&gt;
                      down the server if the output is suspended. Doesn't use&lt;br /&gt;
                      history file.&lt;br /&gt;
  -r, --raw           Write fields without conversion. Used with --batch.&lt;br /&gt;
  --reconnect         Reconnect if the connection is lost. Disable with&lt;br /&gt;
                      --disable-reconnect. This option is enabled by default.&lt;br /&gt;
                      (Defaults to on; use --skip-reconnect to disable.)&lt;br /&gt;
  -s, --silent        Be more silent. Print results with a tab as separator,&lt;br /&gt;
                      each row on new line.&lt;br /&gt;
  -S, --socket=name   The socket file to use for connection.&lt;br /&gt;
  --ssl               Enable SSL for connection (automatically enabled with&lt;br /&gt;
                      other flags).&lt;br /&gt;
  --ssl-ca=name       CA file in PEM format (check OpenSSL docs, implies&lt;br /&gt;
                      --ssl).&lt;br /&gt;
  --ssl-capath=name   CA directory (check OpenSSL docs, implies --ssl).&lt;br /&gt;
  --ssl-cert=name     X509 cert in PEM format (implies --ssl).&lt;br /&gt;
  --ssl-cipher=name   SSL cipher to use (implies --ssl).&lt;br /&gt;
  --ssl-key=name      X509 key in PEM format (implies --ssl).&lt;br /&gt;
  --ssl-verify-server-cert &lt;br /&gt;
                      Verify server's &amp;quot;Common Name&amp;quot; in its cert against&lt;br /&gt;
                      hostname used when connecting. This option is disabled by&lt;br /&gt;
                      default.&lt;br /&gt;
  -t, --table         Output in table format.&lt;br /&gt;
  --tee=name          Append everything into outfile. See interactive help (\h)&lt;br /&gt;
                      also. Does not work in batch mode. Disable with&lt;br /&gt;
                      --disable-tee. This option is disabled by default.&lt;br /&gt;
  -u, --user=name     User for login if not current user.&lt;br /&gt;
  -U, --safe-updates  Only allow UPDATE and DELETE that uses keys.&lt;br /&gt;
  -U, --i-am-a-dummy  Synonym for option --safe-updates, -U.&lt;br /&gt;
  -v, --verbose       Write more. (-v -v -v gives the table output format).&lt;br /&gt;
  -V, --version       Output version information and exit.&lt;br /&gt;
  -w, --wait          Wait and retry if connection is down.&lt;br /&gt;
  --connect-timeout=# Number of seconds before connection timeout.&lt;br /&gt;
  --max-allowed-packet=# &lt;br /&gt;
                      The maximum packet length to send to or receive from&lt;br /&gt;
                      server.&lt;br /&gt;
  --net-buffer-length=# &lt;br /&gt;
                      The buffer size for TCP/IP and socket communication.&lt;br /&gt;
  --select-limit=#    Automatic limit for SELECT when using --safe-updates.&lt;br /&gt;
  --max-join-size=#   Automatic limit for rows in a join when using&lt;br /&gt;
                      --safe-updates.&lt;br /&gt;
  --secure-auth       Refuse client connecting to server if it uses old&lt;br /&gt;
                      (pre-4.1.1) protocol.&lt;br /&gt;
  --server-arg=name   Send embedded server this as a parameter.&lt;br /&gt;
  --show-warnings     Show warnings after every statement.&lt;br /&gt;
  --plugin-dir=name   Directory for client-side plugins.&lt;br /&gt;
  --default-auth=name Default authentication client-side plugin to use.&lt;br /&gt;
&lt;br /&gt;
Default options are read from the following files in the given order:&lt;br /&gt;
/etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf &lt;br /&gt;
The following groups are read: mysql client&lt;br /&gt;
The following options may be given as the first argument:&lt;br /&gt;
--print-defaults        Print the program argument list and exit.&lt;br /&gt;
--no-defaults           Don't read default options from any option file.&lt;br /&gt;
--defaults-file=#       Only read default options from the given file #.&lt;br /&gt;
--defaults-extra-file=# Read this file after the global files are read.&lt;br /&gt;
&lt;br /&gt;
Variables (--variable-name=value)&lt;br /&gt;
and boolean options {FALSE|TRUE}  Value (after reading options)&lt;br /&gt;
--------------------------------- ----------------------------------------&lt;br /&gt;
auto-rehash                       TRUE&lt;br /&gt;
auto-vertical-output              FALSE&lt;br /&gt;
character-sets-dir                (No default value)&lt;br /&gt;
column-type-info                  FALSE&lt;br /&gt;
comments                          FALSE&lt;br /&gt;
compress                          FALSE&lt;br /&gt;
debug-check                       FALSE&lt;br /&gt;
debug-info                        FALSE&lt;br /&gt;
database                          (No default value)&lt;br /&gt;
default-character-set             auto&lt;br /&gt;
delimiter                         ;&lt;br /&gt;
enable-cleartext-plugin           FALSE&lt;br /&gt;
vertical                          FALSE&lt;br /&gt;
force                             FALSE&lt;br /&gt;
named-commands                    FALSE&lt;br /&gt;
ignore-spaces                     FALSE&lt;br /&gt;
init-command                      (No default value)&lt;br /&gt;
local-infile                      FALSE&lt;br /&gt;
no-beep                           FALSE&lt;br /&gt;
host                              (No default value)&lt;br /&gt;
html                              FALSE&lt;br /&gt;
xml                               FALSE&lt;br /&gt;
line-numbers                      TRUE&lt;br /&gt;
unbuffered                        FALSE&lt;br /&gt;
column-names                      TRUE&lt;br /&gt;
sigint-ignore                     FALSE&lt;br /&gt;
port                              0&lt;br /&gt;
prompt                            mysql&amp;gt; &lt;br /&gt;
quick                             FALSE&lt;br /&gt;
raw                               FALSE&lt;br /&gt;
reconnect                         TRUE&lt;br /&gt;
socket                            (No default value)&lt;br /&gt;
ssl                               FALSE&lt;br /&gt;
ssl-ca                            (No default value)&lt;br /&gt;
ssl-capath                        (No default value)&lt;br /&gt;
ssl-cert                          (No default value)&lt;br /&gt;
ssl-cipher                        (No default value)&lt;br /&gt;
ssl-key                           (No default value)&lt;br /&gt;
ssl-verify-server-cert            FALSE&lt;br /&gt;
table                             FALSE&lt;br /&gt;
user                              (No default value)&lt;br /&gt;
safe-updates                      FALSE&lt;br /&gt;
i-am-a-dummy                      FALSE&lt;br /&gt;
connect-timeout                   0&lt;br /&gt;
max-allowed-packet                16777216&lt;br /&gt;
net-buffer-length                 16384&lt;br /&gt;
select-limit                      1000&lt;br /&gt;
max-join-size                     1000000&lt;br /&gt;
secure-auth                       FALSE&lt;br /&gt;
show-warnings                     FALSE&lt;br /&gt;
plugin-dir                        (No default value)&lt;br /&gt;
default-auth                      (No default value)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=MySql&amp;diff=5408</id>
		<title>MySql</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=MySql&amp;diff=5408"/>
		<updated>2014-03-03T00:05:27Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[CssWork]] - parent&lt;br /&gt;
[[SqlSchema]] - tables used in the database &lt;br /&gt;
[[SqlDefaults]] - defaults for those tables&lt;br /&gt;
&lt;br /&gt;
Information about mysql as used for slash&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Mysql configuration file in /etc/my.cnf&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[mysqld]&lt;br /&gt;
datadir=/var/lib/mysql&lt;br /&gt;
socket=/var/lib/mysql/mysql.sock&lt;br /&gt;
&lt;br /&gt;
# Disabling symbolic-links is recommended to prevent assorted security risks&lt;br /&gt;
symbolic-links=0&lt;br /&gt;
&lt;br /&gt;
# Settings user and group are ignored when systemd is used (fedora &amp;gt;= 15).&lt;br /&gt;
# If you need to run mysqld under a different user or group,&lt;br /&gt;
# customize your systemd unit file for mysqld according to the&lt;br /&gt;
# instructions in http://fedoraproject.org/wiki/Systemd&lt;br /&gt;
user=mysql&lt;br /&gt;
&lt;br /&gt;
# Semisynchronous Replication&lt;br /&gt;
# http://dev.mysql.com/doc/refman/5.5/en/replication-semisync.html&lt;br /&gt;
# uncomment next line on MASTER&lt;br /&gt;
;plugin-load=rpl_semi_sync_master=semisync_master.so&lt;br /&gt;
# uncomment next line on SLAVE&lt;br /&gt;
;plugin-load=rpl_semi_sync_slave=semisync_slave.so&lt;br /&gt;
&lt;br /&gt;
# Others options for Semisynchronous Replication&lt;br /&gt;
;rpl_semi_sync_master_enabled=1&lt;br /&gt;
;rpl_semi_sync_master_timeout=10&lt;br /&gt;
;rpl_semi_sync_slave_enabled=1&lt;br /&gt;
&lt;br /&gt;
# http://dev.mysql.com/doc/refman/5.5/en/performance-schema.html&lt;br /&gt;
;performance_schema&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[mysqld_safe]&lt;br /&gt;
log-error=/var/log/mysqld.log&lt;br /&gt;
pid-file=/var/run/mysqld/mysqld.pid&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;mysql --help&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql  Ver 14.14 Distrib 5.5.36, for Linux (x86_64) using readline 5.1&lt;br /&gt;
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.&lt;br /&gt;
&lt;br /&gt;
Oracle is a registered trademark of Oracle Corporation and/or its&lt;br /&gt;
affiliates. Other names may be trademarks of their respective&lt;br /&gt;
owners.&lt;br /&gt;
&lt;br /&gt;
Usage: mysql [OPTIONS] [database]&lt;br /&gt;
  -?, --help          Display this help and exit.&lt;br /&gt;
  -I, --help          Synonym for -?&lt;br /&gt;
  --auto-rehash       Enable automatic rehashing. One doesn't need to use&lt;br /&gt;
                      'rehash' to get table and field completion, but startup&lt;br /&gt;
                      and reconnecting may take a longer time. Disable with&lt;br /&gt;
                      --disable-auto-rehash.&lt;br /&gt;
                      (Defaults to on; use --skip-auto-rehash to disable.)&lt;br /&gt;
  -A, --no-auto-rehash &lt;br /&gt;
                      No automatic rehashing. One has to use 'rehash' to get&lt;br /&gt;
                      table and field completion. This gives a quicker start of&lt;br /&gt;
                      mysql and disables rehashing on reconnect.&lt;br /&gt;
  --auto-vertical-output &lt;br /&gt;
                      Automatically switch to vertical output mode if the&lt;br /&gt;
                      result is wider than the terminal width.&lt;br /&gt;
  -B, --batch         Don't use history file. Disable interactive behavior.&lt;br /&gt;
                      (Enables --silent.)&lt;br /&gt;
  --character-sets-dir=name &lt;br /&gt;
                      Directory for character set files.&lt;br /&gt;
  --column-type-info  Display column type information.&lt;br /&gt;
  -c, --comments      Preserve comments. Send comments to the server. The&lt;br /&gt;
                      default is --skip-comments (discard comments), enable&lt;br /&gt;
                      with --comments.&lt;br /&gt;
  -C, --compress      Use compression in server/client protocol.&lt;br /&gt;
  -#, --debug[=#]     This is a non-debug version. Catch this and exit.&lt;br /&gt;
  --debug-check       Check memory and open file usage at exit.&lt;br /&gt;
  -T, --debug-info    Print some debug info at exit.&lt;br /&gt;
  -D, --database=name Database to use.&lt;br /&gt;
  --default-character-set=name &lt;br /&gt;
                      Set the default character set.&lt;br /&gt;
  --delimiter=name    Delimiter to be used.&lt;br /&gt;
  --enable-cleartext-plugin &lt;br /&gt;
                      Enable/disable the clear text authentication plugin.&lt;br /&gt;
  -e, --execute=name  Execute command and quit. (Disables --force and history&lt;br /&gt;
                      file.)&lt;br /&gt;
  -E, --vertical      Print the output of a query (rows) vertically.&lt;br /&gt;
  -f, --force         Continue even if we get an SQL error.&lt;br /&gt;
  -G, --named-commands &lt;br /&gt;
                      Enable named commands. Named commands mean this program's&lt;br /&gt;
                      internal commands; see mysql&amp;gt; help . When enabled, the&lt;br /&gt;
                      named commands can be used from any line of the query,&lt;br /&gt;
                      otherwise only from the first line, before an enter.&lt;br /&gt;
                      Disable with --disable-named-commands. This option is&lt;br /&gt;
                      disabled by default.&lt;br /&gt;
  -i, --ignore-spaces Ignore space after function names.&lt;br /&gt;
  --init-command=name SQL Command to execute when connecting to MySQL server.&lt;br /&gt;
                      Will automatically be re-executed when reconnecting.&lt;br /&gt;
  --local-infile      Enable/disable LOAD DATA LOCAL INFILE.&lt;br /&gt;
  -b, --no-beep       Turn off beep on error.&lt;br /&gt;
  -h, --host=name     Connect to host.&lt;br /&gt;
  -H, --html          Produce HTML output.&lt;br /&gt;
  -X, --xml           Produce XML output.&lt;br /&gt;
  --line-numbers      Write line numbers for errors.&lt;br /&gt;
                      (Defaults to on; use --skip-line-numbers to disable.)&lt;br /&gt;
  -L, --skip-line-numbers &lt;br /&gt;
                      Don't write line number for errors.&lt;br /&gt;
  -n, --unbuffered    Flush buffer after each query.&lt;br /&gt;
  --column-names      Write column names in results.&lt;br /&gt;
                      (Defaults to on; use --skip-column-names to disable.)&lt;br /&gt;
  -N, --skip-column-names &lt;br /&gt;
                      Don't write column names in results.&lt;br /&gt;
  --sigint-ignore     Ignore SIGINT (CTRL-C).&lt;br /&gt;
  -o, --one-database  Ignore statements except those that occur while the&lt;br /&gt;
                      default database is the one named at the command line.&lt;br /&gt;
  --pager[=name]      Pager to use to display results. If you don't supply an&lt;br /&gt;
                      option, the default pager is taken from your ENV variable&lt;br /&gt;
                      PAGER. Valid pagers are less, more, cat [&amp;gt; filename],&lt;br /&gt;
                      etc. See interactive help (\h) also. This option does not&lt;br /&gt;
                      work in batch mode. Disable with --disable-pager. This&lt;br /&gt;
                      option is disabled by default.&lt;br /&gt;
  -p, --password[=name] &lt;br /&gt;
                      Password to use when connecting to server. If password is&lt;br /&gt;
                      not given it's asked from the tty.&lt;br /&gt;
  -P, --port=#        Port number to use for connection or 0 for default to, in&lt;br /&gt;
                      order of preference, my.cnf, $MYSQL_TCP_PORT,&lt;br /&gt;
                      /etc/services, built-in default (3306).&lt;br /&gt;
  --prompt=name       Set the mysql prompt to this value.&lt;br /&gt;
  --protocol=name     The protocol to use for connection (tcp, socket, pipe,&lt;br /&gt;
                      memory).&lt;br /&gt;
  -q, --quick         Don't cache result, print it row by row. This may slow&lt;br /&gt;
                      down the server if the output is suspended. Doesn't use&lt;br /&gt;
                      history file.&lt;br /&gt;
  -r, --raw           Write fields without conversion. Used with --batch.&lt;br /&gt;
  --reconnect         Reconnect if the connection is lost. Disable with&lt;br /&gt;
                      --disable-reconnect. This option is enabled by default.&lt;br /&gt;
                      (Defaults to on; use --skip-reconnect to disable.)&lt;br /&gt;
  -s, --silent        Be more silent. Print results with a tab as separator,&lt;br /&gt;
                      each row on new line.&lt;br /&gt;
  -S, --socket=name   The socket file to use for connection.&lt;br /&gt;
  --ssl               Enable SSL for connection (automatically enabled with&lt;br /&gt;
                      other flags).&lt;br /&gt;
  --ssl-ca=name       CA file in PEM format (check OpenSSL docs, implies&lt;br /&gt;
                      --ssl).&lt;br /&gt;
  --ssl-capath=name   CA directory (check OpenSSL docs, implies --ssl).&lt;br /&gt;
  --ssl-cert=name     X509 cert in PEM format (implies --ssl).&lt;br /&gt;
  --ssl-cipher=name   SSL cipher to use (implies --ssl).&lt;br /&gt;
  --ssl-key=name      X509 key in PEM format (implies --ssl).&lt;br /&gt;
  --ssl-verify-server-cert &lt;br /&gt;
                      Verify server's &amp;quot;Common Name&amp;quot; in its cert against&lt;br /&gt;
                      hostname used when connecting. This option is disabled by&lt;br /&gt;
                      default.&lt;br /&gt;
  -t, --table         Output in table format.&lt;br /&gt;
  --tee=name          Append everything into outfile. See interactive help (\h)&lt;br /&gt;
                      also. Does not work in batch mode. Disable with&lt;br /&gt;
                      --disable-tee. This option is disabled by default.&lt;br /&gt;
  -u, --user=name     User for login if not current user.&lt;br /&gt;
  -U, --safe-updates  Only allow UPDATE and DELETE that uses keys.&lt;br /&gt;
  -U, --i-am-a-dummy  Synonym for option --safe-updates, -U.&lt;br /&gt;
  -v, --verbose       Write more. (-v -v -v gives the table output format).&lt;br /&gt;
  -V, --version       Output version information and exit.&lt;br /&gt;
  -w, --wait          Wait and retry if connection is down.&lt;br /&gt;
  --connect-timeout=# Number of seconds before connection timeout.&lt;br /&gt;
  --max-allowed-packet=# &lt;br /&gt;
                      The maximum packet length to send to or receive from&lt;br /&gt;
                      server.&lt;br /&gt;
  --net-buffer-length=# &lt;br /&gt;
                      The buffer size for TCP/IP and socket communication.&lt;br /&gt;
  --select-limit=#    Automatic limit for SELECT when using --safe-updates.&lt;br /&gt;
  --max-join-size=#   Automatic limit for rows in a join when using&lt;br /&gt;
                      --safe-updates.&lt;br /&gt;
  --secure-auth       Refuse client connecting to server if it uses old&lt;br /&gt;
                      (pre-4.1.1) protocol.&lt;br /&gt;
  --server-arg=name   Send embedded server this as a parameter.&lt;br /&gt;
  --show-warnings     Show warnings after every statement.&lt;br /&gt;
  --plugin-dir=name   Directory for client-side plugins.&lt;br /&gt;
  --default-auth=name Default authentication client-side plugin to use.&lt;br /&gt;
&lt;br /&gt;
Default options are read from the following files in the given order:&lt;br /&gt;
/etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf &lt;br /&gt;
The following groups are read: mysql client&lt;br /&gt;
The following options may be given as the first argument:&lt;br /&gt;
--print-defaults        Print the program argument list and exit.&lt;br /&gt;
--no-defaults           Don't read default options from any option file.&lt;br /&gt;
--defaults-file=#       Only read default options from the given file #.&lt;br /&gt;
--defaults-extra-file=# Read this file after the global files are read.&lt;br /&gt;
&lt;br /&gt;
Variables (--variable-name=value)&lt;br /&gt;
and boolean options {FALSE|TRUE}  Value (after reading options)&lt;br /&gt;
--------------------------------- ----------------------------------------&lt;br /&gt;
auto-rehash                       TRUE&lt;br /&gt;
auto-vertical-output              FALSE&lt;br /&gt;
character-sets-dir                (No default value)&lt;br /&gt;
column-type-info                  FALSE&lt;br /&gt;
comments                          FALSE&lt;br /&gt;
compress                          FALSE&lt;br /&gt;
debug-check                       FALSE&lt;br /&gt;
debug-info                        FALSE&lt;br /&gt;
database                          (No default value)&lt;br /&gt;
default-character-set             auto&lt;br /&gt;
delimiter                         ;&lt;br /&gt;
enable-cleartext-plugin           FALSE&lt;br /&gt;
vertical                          FALSE&lt;br /&gt;
force                             FALSE&lt;br /&gt;
named-commands                    FALSE&lt;br /&gt;
ignore-spaces                     FALSE&lt;br /&gt;
init-command                      (No default value)&lt;br /&gt;
local-infile                      FALSE&lt;br /&gt;
no-beep                           FALSE&lt;br /&gt;
host                              (No default value)&lt;br /&gt;
html                              FALSE&lt;br /&gt;
xml                               FALSE&lt;br /&gt;
line-numbers                      TRUE&lt;br /&gt;
unbuffered                        FALSE&lt;br /&gt;
column-names                      TRUE&lt;br /&gt;
sigint-ignore                     FALSE&lt;br /&gt;
port                              0&lt;br /&gt;
prompt                            mysql&amp;gt; &lt;br /&gt;
quick                             FALSE&lt;br /&gt;
raw                               FALSE&lt;br /&gt;
reconnect                         TRUE&lt;br /&gt;
socket                            (No default value)&lt;br /&gt;
ssl                               FALSE&lt;br /&gt;
ssl-ca                            (No default value)&lt;br /&gt;
ssl-capath                        (No default value)&lt;br /&gt;
ssl-cert                          (No default value)&lt;br /&gt;
ssl-cipher                        (No default value)&lt;br /&gt;
ssl-key                           (No default value)&lt;br /&gt;
ssl-verify-server-cert            FALSE&lt;br /&gt;
table                             FALSE&lt;br /&gt;
user                              (No default value)&lt;br /&gt;
safe-updates                      FALSE&lt;br /&gt;
i-am-a-dummy                      FALSE&lt;br /&gt;
connect-timeout                   0&lt;br /&gt;
max-allowed-packet                16777216&lt;br /&gt;
net-buffer-length                 16384&lt;br /&gt;
select-limit                      1000&lt;br /&gt;
max-join-size                     1000000&lt;br /&gt;
secure-auth                       FALSE&lt;br /&gt;
show-warnings                     FALSE&lt;br /&gt;
plugin-dir                        (No default value)&lt;br /&gt;
default-auth                      (No default value)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=MySql&amp;diff=5407</id>
		<title>MySql</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=MySql&amp;diff=5407"/>
		<updated>2014-03-03T00:03:21Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[CssWork]] - parent&lt;br /&gt;
&lt;br /&gt;
Information about mysql as used for slash&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Mysql configuration file in /etc/my.cnf&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[mysqld]&lt;br /&gt;
datadir=/var/lib/mysql&lt;br /&gt;
socket=/var/lib/mysql/mysql.sock&lt;br /&gt;
&lt;br /&gt;
# Disabling symbolic-links is recommended to prevent assorted security risks&lt;br /&gt;
symbolic-links=0&lt;br /&gt;
&lt;br /&gt;
# Settings user and group are ignored when systemd is used (fedora &amp;gt;= 15).&lt;br /&gt;
# If you need to run mysqld under a different user or group,&lt;br /&gt;
# customize your systemd unit file for mysqld according to the&lt;br /&gt;
# instructions in http://fedoraproject.org/wiki/Systemd&lt;br /&gt;
user=mysql&lt;br /&gt;
&lt;br /&gt;
# Semisynchronous Replication&lt;br /&gt;
# http://dev.mysql.com/doc/refman/5.5/en/replication-semisync.html&lt;br /&gt;
# uncomment next line on MASTER&lt;br /&gt;
;plugin-load=rpl_semi_sync_master=semisync_master.so&lt;br /&gt;
# uncomment next line on SLAVE&lt;br /&gt;
;plugin-load=rpl_semi_sync_slave=semisync_slave.so&lt;br /&gt;
&lt;br /&gt;
# Others options for Semisynchronous Replication&lt;br /&gt;
;rpl_semi_sync_master_enabled=1&lt;br /&gt;
;rpl_semi_sync_master_timeout=10&lt;br /&gt;
;rpl_semi_sync_slave_enabled=1&lt;br /&gt;
&lt;br /&gt;
# http://dev.mysql.com/doc/refman/5.5/en/performance-schema.html&lt;br /&gt;
;performance_schema&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[mysqld_safe]&lt;br /&gt;
log-error=/var/log/mysqld.log&lt;br /&gt;
pid-file=/var/run/mysqld/mysqld.pid&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;mysql --help&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql  Ver 14.14 Distrib 5.5.36, for Linux (x86_64) using readline 5.1&lt;br /&gt;
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.&lt;br /&gt;
&lt;br /&gt;
Oracle is a registered trademark of Oracle Corporation and/or its&lt;br /&gt;
affiliates. Other names may be trademarks of their respective&lt;br /&gt;
owners.&lt;br /&gt;
&lt;br /&gt;
Usage: mysql [OPTIONS] [database]&lt;br /&gt;
  -?, --help          Display this help and exit.&lt;br /&gt;
  -I, --help          Synonym for -?&lt;br /&gt;
  --auto-rehash       Enable automatic rehashing. One doesn't need to use&lt;br /&gt;
                      'rehash' to get table and field completion, but startup&lt;br /&gt;
                      and reconnecting may take a longer time. Disable with&lt;br /&gt;
                      --disable-auto-rehash.&lt;br /&gt;
                      (Defaults to on; use --skip-auto-rehash to disable.)&lt;br /&gt;
  -A, --no-auto-rehash &lt;br /&gt;
                      No automatic rehashing. One has to use 'rehash' to get&lt;br /&gt;
                      table and field completion. This gives a quicker start of&lt;br /&gt;
                      mysql and disables rehashing on reconnect.&lt;br /&gt;
  --auto-vertical-output &lt;br /&gt;
                      Automatically switch to vertical output mode if the&lt;br /&gt;
                      result is wider than the terminal width.&lt;br /&gt;
  -B, --batch         Don't use history file. Disable interactive behavior.&lt;br /&gt;
                      (Enables --silent.)&lt;br /&gt;
  --character-sets-dir=name &lt;br /&gt;
                      Directory for character set files.&lt;br /&gt;
  --column-type-info  Display column type information.&lt;br /&gt;
  -c, --comments      Preserve comments. Send comments to the server. The&lt;br /&gt;
                      default is --skip-comments (discard comments), enable&lt;br /&gt;
                      with --comments.&lt;br /&gt;
  -C, --compress      Use compression in server/client protocol.&lt;br /&gt;
  -#, --debug[=#]     This is a non-debug version. Catch this and exit.&lt;br /&gt;
  --debug-check       Check memory and open file usage at exit.&lt;br /&gt;
  -T, --debug-info    Print some debug info at exit.&lt;br /&gt;
  -D, --database=name Database to use.&lt;br /&gt;
  --default-character-set=name &lt;br /&gt;
                      Set the default character set.&lt;br /&gt;
  --delimiter=name    Delimiter to be used.&lt;br /&gt;
  --enable-cleartext-plugin &lt;br /&gt;
                      Enable/disable the clear text authentication plugin.&lt;br /&gt;
  -e, --execute=name  Execute command and quit. (Disables --force and history&lt;br /&gt;
                      file.)&lt;br /&gt;
  -E, --vertical      Print the output of a query (rows) vertically.&lt;br /&gt;
  -f, --force         Continue even if we get an SQL error.&lt;br /&gt;
  -G, --named-commands &lt;br /&gt;
                      Enable named commands. Named commands mean this program's&lt;br /&gt;
                      internal commands; see mysql&amp;gt; help . When enabled, the&lt;br /&gt;
                      named commands can be used from any line of the query,&lt;br /&gt;
                      otherwise only from the first line, before an enter.&lt;br /&gt;
                      Disable with --disable-named-commands. This option is&lt;br /&gt;
                      disabled by default.&lt;br /&gt;
  -i, --ignore-spaces Ignore space after function names.&lt;br /&gt;
  --init-command=name SQL Command to execute when connecting to MySQL server.&lt;br /&gt;
                      Will automatically be re-executed when reconnecting.&lt;br /&gt;
  --local-infile      Enable/disable LOAD DATA LOCAL INFILE.&lt;br /&gt;
  -b, --no-beep       Turn off beep on error.&lt;br /&gt;
  -h, --host=name     Connect to host.&lt;br /&gt;
  -H, --html          Produce HTML output.&lt;br /&gt;
  -X, --xml           Produce XML output.&lt;br /&gt;
  --line-numbers      Write line numbers for errors.&lt;br /&gt;
                      (Defaults to on; use --skip-line-numbers to disable.)&lt;br /&gt;
  -L, --skip-line-numbers &lt;br /&gt;
                      Don't write line number for errors.&lt;br /&gt;
  -n, --unbuffered    Flush buffer after each query.&lt;br /&gt;
  --column-names      Write column names in results.&lt;br /&gt;
                      (Defaults to on; use --skip-column-names to disable.)&lt;br /&gt;
  -N, --skip-column-names &lt;br /&gt;
                      Don't write column names in results.&lt;br /&gt;
  --sigint-ignore     Ignore SIGINT (CTRL-C).&lt;br /&gt;
  -o, --one-database  Ignore statements except those that occur while the&lt;br /&gt;
                      default database is the one named at the command line.&lt;br /&gt;
  --pager[=name]      Pager to use to display results. If you don't supply an&lt;br /&gt;
                      option, the default pager is taken from your ENV variable&lt;br /&gt;
                      PAGER. Valid pagers are less, more, cat [&amp;gt; filename],&lt;br /&gt;
                      etc. See interactive help (\h) also. This option does not&lt;br /&gt;
                      work in batch mode. Disable with --disable-pager. This&lt;br /&gt;
                      option is disabled by default.&lt;br /&gt;
  -p, --password[=name] &lt;br /&gt;
                      Password to use when connecting to server. If password is&lt;br /&gt;
                      not given it's asked from the tty.&lt;br /&gt;
  -P, --port=#        Port number to use for connection or 0 for default to, in&lt;br /&gt;
                      order of preference, my.cnf, $MYSQL_TCP_PORT,&lt;br /&gt;
                      /etc/services, built-in default (3306).&lt;br /&gt;
  --prompt=name       Set the mysql prompt to this value.&lt;br /&gt;
  --protocol=name     The protocol to use for connection (tcp, socket, pipe,&lt;br /&gt;
                      memory).&lt;br /&gt;
  -q, --quick         Don't cache result, print it row by row. This may slow&lt;br /&gt;
                      down the server if the output is suspended. Doesn't use&lt;br /&gt;
                      history file.&lt;br /&gt;
  -r, --raw           Write fields without conversion. Used with --batch.&lt;br /&gt;
  --reconnect         Reconnect if the connection is lost. Disable with&lt;br /&gt;
                      --disable-reconnect. This option is enabled by default.&lt;br /&gt;
                      (Defaults to on; use --skip-reconnect to disable.)&lt;br /&gt;
  -s, --silent        Be more silent. Print results with a tab as separator,&lt;br /&gt;
                      each row on new line.&lt;br /&gt;
  -S, --socket=name   The socket file to use for connection.&lt;br /&gt;
  --ssl               Enable SSL for connection (automatically enabled with&lt;br /&gt;
                      other flags).&lt;br /&gt;
  --ssl-ca=name       CA file in PEM format (check OpenSSL docs, implies&lt;br /&gt;
                      --ssl).&lt;br /&gt;
  --ssl-capath=name   CA directory (check OpenSSL docs, implies --ssl).&lt;br /&gt;
  --ssl-cert=name     X509 cert in PEM format (implies --ssl).&lt;br /&gt;
  --ssl-cipher=name   SSL cipher to use (implies --ssl).&lt;br /&gt;
  --ssl-key=name      X509 key in PEM format (implies --ssl).&lt;br /&gt;
  --ssl-verify-server-cert &lt;br /&gt;
                      Verify server's &amp;quot;Common Name&amp;quot; in its cert against&lt;br /&gt;
                      hostname used when connecting. This option is disabled by&lt;br /&gt;
                      default.&lt;br /&gt;
  -t, --table         Output in table format.&lt;br /&gt;
  --tee=name          Append everything into outfile. See interactive help (\h)&lt;br /&gt;
                      also. Does not work in batch mode. Disable with&lt;br /&gt;
                      --disable-tee. This option is disabled by default.&lt;br /&gt;
  -u, --user=name     User for login if not current user.&lt;br /&gt;
  -U, --safe-updates  Only allow UPDATE and DELETE that uses keys.&lt;br /&gt;
  -U, --i-am-a-dummy  Synonym for option --safe-updates, -U.&lt;br /&gt;
  -v, --verbose       Write more. (-v -v -v gives the table output format).&lt;br /&gt;
  -V, --version       Output version information and exit.&lt;br /&gt;
  -w, --wait          Wait and retry if connection is down.&lt;br /&gt;
  --connect-timeout=# Number of seconds before connection timeout.&lt;br /&gt;
  --max-allowed-packet=# &lt;br /&gt;
                      The maximum packet length to send to or receive from&lt;br /&gt;
                      server.&lt;br /&gt;
  --net-buffer-length=# &lt;br /&gt;
                      The buffer size for TCP/IP and socket communication.&lt;br /&gt;
  --select-limit=#    Automatic limit for SELECT when using --safe-updates.&lt;br /&gt;
  --max-join-size=#   Automatic limit for rows in a join when using&lt;br /&gt;
                      --safe-updates.&lt;br /&gt;
  --secure-auth       Refuse client connecting to server if it uses old&lt;br /&gt;
                      (pre-4.1.1) protocol.&lt;br /&gt;
  --server-arg=name   Send embedded server this as a parameter.&lt;br /&gt;
  --show-warnings     Show warnings after every statement.&lt;br /&gt;
  --plugin-dir=name   Directory for client-side plugins.&lt;br /&gt;
  --default-auth=name Default authentication client-side plugin to use.&lt;br /&gt;
&lt;br /&gt;
Default options are read from the following files in the given order:&lt;br /&gt;
/etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf &lt;br /&gt;
The following groups are read: mysql client&lt;br /&gt;
The following options may be given as the first argument:&lt;br /&gt;
--print-defaults        Print the program argument list and exit.&lt;br /&gt;
--no-defaults           Don't read default options from any option file.&lt;br /&gt;
--defaults-file=#       Only read default options from the given file #.&lt;br /&gt;
--defaults-extra-file=# Read this file after the global files are read.&lt;br /&gt;
&lt;br /&gt;
Variables (--variable-name=value)&lt;br /&gt;
and boolean options {FALSE|TRUE}  Value (after reading options)&lt;br /&gt;
--------------------------------- ----------------------------------------&lt;br /&gt;
auto-rehash                       TRUE&lt;br /&gt;
auto-vertical-output              FALSE&lt;br /&gt;
character-sets-dir                (No default value)&lt;br /&gt;
column-type-info                  FALSE&lt;br /&gt;
comments                          FALSE&lt;br /&gt;
compress                          FALSE&lt;br /&gt;
debug-check                       FALSE&lt;br /&gt;
debug-info                        FALSE&lt;br /&gt;
database                          (No default value)&lt;br /&gt;
default-character-set             auto&lt;br /&gt;
delimiter                         ;&lt;br /&gt;
enable-cleartext-plugin           FALSE&lt;br /&gt;
vertical                          FALSE&lt;br /&gt;
force                             FALSE&lt;br /&gt;
named-commands                    FALSE&lt;br /&gt;
ignore-spaces                     FALSE&lt;br /&gt;
init-command                      (No default value)&lt;br /&gt;
local-infile                      FALSE&lt;br /&gt;
no-beep                           FALSE&lt;br /&gt;
host                              (No default value)&lt;br /&gt;
html                              FALSE&lt;br /&gt;
xml                               FALSE&lt;br /&gt;
line-numbers                      TRUE&lt;br /&gt;
unbuffered                        FALSE&lt;br /&gt;
column-names                      TRUE&lt;br /&gt;
sigint-ignore                     FALSE&lt;br /&gt;
port                              0&lt;br /&gt;
prompt                            mysql&amp;gt; &lt;br /&gt;
quick                             FALSE&lt;br /&gt;
raw                               FALSE&lt;br /&gt;
reconnect                         TRUE&lt;br /&gt;
socket                            (No default value)&lt;br /&gt;
ssl                               FALSE&lt;br /&gt;
ssl-ca                            (No default value)&lt;br /&gt;
ssl-capath                        (No default value)&lt;br /&gt;
ssl-cert                          (No default value)&lt;br /&gt;
ssl-cipher                        (No default value)&lt;br /&gt;
ssl-key                           (No default value)&lt;br /&gt;
ssl-verify-server-cert            FALSE&lt;br /&gt;
table                             FALSE&lt;br /&gt;
user                              (No default value)&lt;br /&gt;
safe-updates                      FALSE&lt;br /&gt;
i-am-a-dummy                      FALSE&lt;br /&gt;
connect-timeout                   0&lt;br /&gt;
max-allowed-packet                16777216&lt;br /&gt;
net-buffer-length                 16384&lt;br /&gt;
select-limit                      1000&lt;br /&gt;
max-join-size                     1000000&lt;br /&gt;
secure-auth                       FALSE&lt;br /&gt;
show-warnings                     FALSE&lt;br /&gt;
plugin-dir                        (No default value)&lt;br /&gt;
default-auth                      (No default value)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=MySql&amp;diff=5406</id>
		<title>MySql</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=MySql&amp;diff=5406"/>
		<updated>2014-03-03T00:00:24Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[CssWork]] - parent&lt;br /&gt;
&lt;br /&gt;
Information about mysql as used for slash&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;mysql --help&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql  Ver 14.14 Distrib 5.5.36, for Linux (x86_64) using readline 5.1&lt;br /&gt;
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.&lt;br /&gt;
&lt;br /&gt;
Oracle is a registered trademark of Oracle Corporation and/or its&lt;br /&gt;
affiliates. Other names may be trademarks of their respective&lt;br /&gt;
owners.&lt;br /&gt;
&lt;br /&gt;
Usage: mysql [OPTIONS] [database]&lt;br /&gt;
  -?, --help          Display this help and exit.&lt;br /&gt;
  -I, --help          Synonym for -?&lt;br /&gt;
  --auto-rehash       Enable automatic rehashing. One doesn't need to use&lt;br /&gt;
                      'rehash' to get table and field completion, but startup&lt;br /&gt;
                      and reconnecting may take a longer time. Disable with&lt;br /&gt;
                      --disable-auto-rehash.&lt;br /&gt;
                      (Defaults to on; use --skip-auto-rehash to disable.)&lt;br /&gt;
  -A, --no-auto-rehash &lt;br /&gt;
                      No automatic rehashing. One has to use 'rehash' to get&lt;br /&gt;
                      table and field completion. This gives a quicker start of&lt;br /&gt;
                      mysql and disables rehashing on reconnect.&lt;br /&gt;
  --auto-vertical-output &lt;br /&gt;
                      Automatically switch to vertical output mode if the&lt;br /&gt;
                      result is wider than the terminal width.&lt;br /&gt;
  -B, --batch         Don't use history file. Disable interactive behavior.&lt;br /&gt;
                      (Enables --silent.)&lt;br /&gt;
  --character-sets-dir=name &lt;br /&gt;
                      Directory for character set files.&lt;br /&gt;
  --column-type-info  Display column type information.&lt;br /&gt;
  -c, --comments      Preserve comments. Send comments to the server. The&lt;br /&gt;
                      default is --skip-comments (discard comments), enable&lt;br /&gt;
                      with --comments.&lt;br /&gt;
  -C, --compress      Use compression in server/client protocol.&lt;br /&gt;
  -#, --debug[=#]     This is a non-debug version. Catch this and exit.&lt;br /&gt;
  --debug-check       Check memory and open file usage at exit.&lt;br /&gt;
  -T, --debug-info    Print some debug info at exit.&lt;br /&gt;
  -D, --database=name Database to use.&lt;br /&gt;
  --default-character-set=name &lt;br /&gt;
                      Set the default character set.&lt;br /&gt;
  --delimiter=name    Delimiter to be used.&lt;br /&gt;
  --enable-cleartext-plugin &lt;br /&gt;
                      Enable/disable the clear text authentication plugin.&lt;br /&gt;
  -e, --execute=name  Execute command and quit. (Disables --force and history&lt;br /&gt;
                      file.)&lt;br /&gt;
  -E, --vertical      Print the output of a query (rows) vertically.&lt;br /&gt;
  -f, --force         Continue even if we get an SQL error.&lt;br /&gt;
  -G, --named-commands &lt;br /&gt;
                      Enable named commands. Named commands mean this program's&lt;br /&gt;
                      internal commands; see mysql&amp;gt; help . When enabled, the&lt;br /&gt;
                      named commands can be used from any line of the query,&lt;br /&gt;
                      otherwise only from the first line, before an enter.&lt;br /&gt;
                      Disable with --disable-named-commands. This option is&lt;br /&gt;
                      disabled by default.&lt;br /&gt;
  -i, --ignore-spaces Ignore space after function names.&lt;br /&gt;
  --init-command=name SQL Command to execute when connecting to MySQL server.&lt;br /&gt;
                      Will automatically be re-executed when reconnecting.&lt;br /&gt;
  --local-infile      Enable/disable LOAD DATA LOCAL INFILE.&lt;br /&gt;
  -b, --no-beep       Turn off beep on error.&lt;br /&gt;
  -h, --host=name     Connect to host.&lt;br /&gt;
  -H, --html          Produce HTML output.&lt;br /&gt;
  -X, --xml           Produce XML output.&lt;br /&gt;
  --line-numbers      Write line numbers for errors.&lt;br /&gt;
                      (Defaults to on; use --skip-line-numbers to disable.)&lt;br /&gt;
  -L, --skip-line-numbers &lt;br /&gt;
                      Don't write line number for errors.&lt;br /&gt;
  -n, --unbuffered    Flush buffer after each query.&lt;br /&gt;
  --column-names      Write column names in results.&lt;br /&gt;
                      (Defaults to on; use --skip-column-names to disable.)&lt;br /&gt;
  -N, --skip-column-names &lt;br /&gt;
                      Don't write column names in results.&lt;br /&gt;
  --sigint-ignore     Ignore SIGINT (CTRL-C).&lt;br /&gt;
  -o, --one-database  Ignore statements except those that occur while the&lt;br /&gt;
                      default database is the one named at the command line.&lt;br /&gt;
  --pager[=name]      Pager to use to display results. If you don't supply an&lt;br /&gt;
                      option, the default pager is taken from your ENV variable&lt;br /&gt;
                      PAGER. Valid pagers are less, more, cat [&amp;gt; filename],&lt;br /&gt;
                      etc. See interactive help (\h) also. This option does not&lt;br /&gt;
                      work in batch mode. Disable with --disable-pager. This&lt;br /&gt;
                      option is disabled by default.&lt;br /&gt;
  -p, --password[=name] &lt;br /&gt;
                      Password to use when connecting to server. If password is&lt;br /&gt;
                      not given it's asked from the tty.&lt;br /&gt;
  -P, --port=#        Port number to use for connection or 0 for default to, in&lt;br /&gt;
                      order of preference, my.cnf, $MYSQL_TCP_PORT,&lt;br /&gt;
                      /etc/services, built-in default (3306).&lt;br /&gt;
  --prompt=name       Set the mysql prompt to this value.&lt;br /&gt;
  --protocol=name     The protocol to use for connection (tcp, socket, pipe,&lt;br /&gt;
                      memory).&lt;br /&gt;
  -q, --quick         Don't cache result, print it row by row. This may slow&lt;br /&gt;
                      down the server if the output is suspended. Doesn't use&lt;br /&gt;
                      history file.&lt;br /&gt;
  -r, --raw           Write fields without conversion. Used with --batch.&lt;br /&gt;
  --reconnect         Reconnect if the connection is lost. Disable with&lt;br /&gt;
                      --disable-reconnect. This option is enabled by default.&lt;br /&gt;
                      (Defaults to on; use --skip-reconnect to disable.)&lt;br /&gt;
  -s, --silent        Be more silent. Print results with a tab as separator,&lt;br /&gt;
                      each row on new line.&lt;br /&gt;
  -S, --socket=name   The socket file to use for connection.&lt;br /&gt;
  --ssl               Enable SSL for connection (automatically enabled with&lt;br /&gt;
                      other flags).&lt;br /&gt;
  --ssl-ca=name       CA file in PEM format (check OpenSSL docs, implies&lt;br /&gt;
                      --ssl).&lt;br /&gt;
  --ssl-capath=name   CA directory (check OpenSSL docs, implies --ssl).&lt;br /&gt;
  --ssl-cert=name     X509 cert in PEM format (implies --ssl).&lt;br /&gt;
  --ssl-cipher=name   SSL cipher to use (implies --ssl).&lt;br /&gt;
  --ssl-key=name      X509 key in PEM format (implies --ssl).&lt;br /&gt;
  --ssl-verify-server-cert &lt;br /&gt;
                      Verify server's &amp;quot;Common Name&amp;quot; in its cert against&lt;br /&gt;
                      hostname used when connecting. This option is disabled by&lt;br /&gt;
                      default.&lt;br /&gt;
  -t, --table         Output in table format.&lt;br /&gt;
  --tee=name          Append everything into outfile. See interactive help (\h)&lt;br /&gt;
                      also. Does not work in batch mode. Disable with&lt;br /&gt;
                      --disable-tee. This option is disabled by default.&lt;br /&gt;
  -u, --user=name     User for login if not current user.&lt;br /&gt;
  -U, --safe-updates  Only allow UPDATE and DELETE that uses keys.&lt;br /&gt;
  -U, --i-am-a-dummy  Synonym for option --safe-updates, -U.&lt;br /&gt;
  -v, --verbose       Write more. (-v -v -v gives the table output format).&lt;br /&gt;
  -V, --version       Output version information and exit.&lt;br /&gt;
  -w, --wait          Wait and retry if connection is down.&lt;br /&gt;
  --connect-timeout=# Number of seconds before connection timeout.&lt;br /&gt;
  --max-allowed-packet=# &lt;br /&gt;
                      The maximum packet length to send to or receive from&lt;br /&gt;
                      server.&lt;br /&gt;
  --net-buffer-length=# &lt;br /&gt;
                      The buffer size for TCP/IP and socket communication.&lt;br /&gt;
  --select-limit=#    Automatic limit for SELECT when using --safe-updates.&lt;br /&gt;
  --max-join-size=#   Automatic limit for rows in a join when using&lt;br /&gt;
                      --safe-updates.&lt;br /&gt;
  --secure-auth       Refuse client connecting to server if it uses old&lt;br /&gt;
                      (pre-4.1.1) protocol.&lt;br /&gt;
  --server-arg=name   Send embedded server this as a parameter.&lt;br /&gt;
  --show-warnings     Show warnings after every statement.&lt;br /&gt;
  --plugin-dir=name   Directory for client-side plugins.&lt;br /&gt;
  --default-auth=name Default authentication client-side plugin to use.&lt;br /&gt;
&lt;br /&gt;
Default options are read from the following files in the given order:&lt;br /&gt;
/etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf &lt;br /&gt;
The following groups are read: mysql client&lt;br /&gt;
The following options may be given as the first argument:&lt;br /&gt;
--print-defaults        Print the program argument list and exit.&lt;br /&gt;
--no-defaults           Don't read default options from any option file.&lt;br /&gt;
--defaults-file=#       Only read default options from the given file #.&lt;br /&gt;
--defaults-extra-file=# Read this file after the global files are read.&lt;br /&gt;
&lt;br /&gt;
Variables (--variable-name=value)&lt;br /&gt;
and boolean options {FALSE|TRUE}  Value (after reading options)&lt;br /&gt;
--------------------------------- ----------------------------------------&lt;br /&gt;
auto-rehash                       TRUE&lt;br /&gt;
auto-vertical-output              FALSE&lt;br /&gt;
character-sets-dir                (No default value)&lt;br /&gt;
column-type-info                  FALSE&lt;br /&gt;
comments                          FALSE&lt;br /&gt;
compress                          FALSE&lt;br /&gt;
debug-check                       FALSE&lt;br /&gt;
debug-info                        FALSE&lt;br /&gt;
database                          (No default value)&lt;br /&gt;
default-character-set             auto&lt;br /&gt;
delimiter                         ;&lt;br /&gt;
enable-cleartext-plugin           FALSE&lt;br /&gt;
vertical                          FALSE&lt;br /&gt;
force                             FALSE&lt;br /&gt;
named-commands                    FALSE&lt;br /&gt;
ignore-spaces                     FALSE&lt;br /&gt;
init-command                      (No default value)&lt;br /&gt;
local-infile                      FALSE&lt;br /&gt;
no-beep                           FALSE&lt;br /&gt;
host                              (No default value)&lt;br /&gt;
html                              FALSE&lt;br /&gt;
xml                               FALSE&lt;br /&gt;
line-numbers                      TRUE&lt;br /&gt;
unbuffered                        FALSE&lt;br /&gt;
column-names                      TRUE&lt;br /&gt;
sigint-ignore                     FALSE&lt;br /&gt;
port                              0&lt;br /&gt;
prompt                            mysql&amp;gt; &lt;br /&gt;
quick                             FALSE&lt;br /&gt;
raw                               FALSE&lt;br /&gt;
reconnect                         TRUE&lt;br /&gt;
socket                            (No default value)&lt;br /&gt;
ssl                               FALSE&lt;br /&gt;
ssl-ca                            (No default value)&lt;br /&gt;
ssl-capath                        (No default value)&lt;br /&gt;
ssl-cert                          (No default value)&lt;br /&gt;
ssl-cipher                        (No default value)&lt;br /&gt;
ssl-key                           (No default value)&lt;br /&gt;
ssl-verify-server-cert            FALSE&lt;br /&gt;
table                             FALSE&lt;br /&gt;
user                              (No default value)&lt;br /&gt;
safe-updates                      FALSE&lt;br /&gt;
i-am-a-dummy                      FALSE&lt;br /&gt;
connect-timeout                   0&lt;br /&gt;
max-allowed-packet                16777216&lt;br /&gt;
net-buffer-length                 16384&lt;br /&gt;
select-limit                      1000&lt;br /&gt;
max-join-size                     1000000&lt;br /&gt;
secure-auth                       FALSE&lt;br /&gt;
show-warnings                     FALSE&lt;br /&gt;
plugin-dir                        (No default value)&lt;br /&gt;
default-auth                      (No default value)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=MySql&amp;diff=5405</id>
		<title>MySql</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=MySql&amp;diff=5405"/>
		<updated>2014-03-02T23:58:59Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: Created page with &amp;quot;CssWork - parent  Information about mysql as used for slash  &amp;lt;h2&amp;gt;mysql --help&amp;lt;/h2&amp;gt; &amp;lt;pre&amp;gt;   &amp;lt;/pre&amp;gt;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[CssWork]] - parent&lt;br /&gt;
&lt;br /&gt;
Information about mysql as used for slash&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;mysql --help&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=Historic:CssWork&amp;diff=5404</id>
		<title>Historic:CssWork</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=Historic:CssWork&amp;diff=5404"/>
		<updated>2014-03-02T23:57:40Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h2&amp;gt;Related pages  &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Official docs&lt;br /&gt;
** [[InstallDoc]] - original INSTALL document&lt;br /&gt;
** [[SlashGuide]] - this is the guide (from htdocs) you are supposed to read immediately after installing slashcode&lt;br /&gt;
** [[SectionTopics]] - This is the 'new' sections and topics rewrite and is more important to read than it first appears, explains what a skin is. Sort of.&lt;br /&gt;
** [[SlashChart]] Png chart of slashcode organization&lt;br /&gt;
** [[SlashManPages]] Man pages available by typing man PAGENAME&lt;br /&gt;
** [[TemplateManPages]] Man pages for the template library used to deliver the html&lt;br /&gt;
&lt;br /&gt;
* [[SlashHelperProgramsInBin]] - provided admin helpers in slash/bin&lt;br /&gt;
* [[SlashGlossary]] Glossary of terms used in Slash code&lt;br /&gt;
* [[FileLocations]] Locations of important files on disk. Has Main Libraries called by all routines&lt;br /&gt;
* [[FileLocations2]] Locations of files on disk continued. This is the stuff in local/slash.&lt;br /&gt;
* [[FileLocations3]] Locations of files on disk continued. This is the stuff in /usr/local/share/perl5/Slash/&lt;br /&gt;
* [[FileLocationsMisc]] Has Apache, Man pages,... &lt;br /&gt;
* [[MySql]]&lt;br /&gt;
** [[SqlSchema]] - tables used in the database&lt;br /&gt;
** [[SqlDefaults]] - defaults for those tables&lt;br /&gt;
* [[PageScriptList]] - scripts (= 'pages') in /slash/site/slashcott.org/htdocs with routines listed&lt;br /&gt;
* [[PerlModuleDisplay]] - this is what actually sends a single template out to the broswer (through Apache)&lt;br /&gt;
* [[PerlModuleUsers]] - this is what handles the users home page and similar user functions.&lt;br /&gt;
&lt;br /&gt;
* [[AvailableThemes]] and how they are organized &lt;br /&gt;
* [[ThemesAnatomy]] Overview - &amp;quot;A theme is a website design.&amp;quot; (includes HOWTO-THemes doc)&lt;br /&gt;
** [[TemplateAnatomy]] - All html in these. &amp;quot;parsed by Perl Template Toolkit&amp;quot; (HOWTO-Templates)&lt;br /&gt;
***  [[TemplateTutorialWeb]] - man page&lt;br /&gt;
*** [[TemplateManualDirective]] - man page, has all the keywords used by template library&lt;br /&gt;
*** [[ThePartsOfTemplateLibraryActuallyUsedInSlashCode]] - knowing this can save time reading docs&lt;br /&gt;
*** [[TemplateLists]] - lists of the template in our Theme, some descriptions fm src&lt;br /&gt;
**[[TasksAnatomy]] -&lt;br /&gt;
&lt;br /&gt;
* [[TagboxesAnatomy]] - I don't realy know what these are yet. But there are a lot of them ;-)&lt;br /&gt;
* [[PluginsAnatomy]] - (HOWTO-plugins)&lt;br /&gt;
&lt;br /&gt;
* [[ChangelogForCss]] - Put final finished change here &lt;br /&gt;
* [[HowSlashCssWorks]] Overview&lt;br /&gt;
* [[CssFilesUsedEachPage]] Which css files are used on different pages&lt;br /&gt;
&lt;br /&gt;
* [[http://dev.soylentnews.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=soylentnews/soylentnews.git;a=tree;f=themes;hb=refs/heads/master]] git - themes&lt;br /&gt;
&lt;br /&gt;
http://www.mediawiki.org/wiki/Help:Images&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Unanswered Questions&amp;lt;/h2&amp;gt;&lt;br /&gt;
* The templates are individually output by routine slashDisplay(), but how is the order of delivery determined, and how does one insure a new template goes to the right place on the page?&lt;br /&gt;
* The users home page link goes to /my/homepage. I can find no apache redirect for this nor is there a 'my' folder anywhere. I am guessing this is done in the apache perl module, through some redirects that hook into Apache innards. It is hard to be sure what script is actually being called first. I am assuming it is users. Once an edit is made, you are in /users.pl without /my/&lt;br /&gt;
* Two users scripts, users,users2 Am guesssing users2 is for the d2 interface we are not using, since the forms on the page call users.pl&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Got tired of scrolling through pages of perl code just to see what subs were in a module&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So wrote this, now in /usr/local/sbin/listsubs.sh:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[root@slashcode Slash]# listsubs.sh Admin.pm&lt;br /&gt;
Admin.pm:&lt;br /&gt;
    addSpriteForSid, ajax_authorbox, ajax_learnword, ajax_neverdisplay, &lt;br /&gt;
    ajax_perfbox, ajax_signoff, ajax_signoffbox, ajax_slashdbox, &lt;br /&gt;
    ajax_storyadminbox, ajax_sub_memory, DESTROY, extractRelatedStoriesFromForm, &lt;br /&gt;
    findTheTime, getAccesslogAbusersByID, getAccesslogMaxID, get_ispell_comments, &lt;br /&gt;
    getRecentSubs, getRecentWebheads, getRelated, getSignoffData, &lt;br /&gt;
    getStorySignoffs, getStoryThumbLargeLink, grantStoryPostingAchievements, otherLinks, &lt;br /&gt;
    relatedLinks, showAdminTodo, showAuthorActivityBox, showPerformanceBox, &lt;br /&gt;
    showSignoffBox, showSlashdBox, showStoryAdminBox, write_to_temp_file, &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also will work from a list, as in&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ls *.pm &amp;gt; list.tst&lt;br /&gt;
listsubs.sh &amp;lt; list.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Maybe someone else will find it useful as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Order css files are loaded when simple switch on user prefs page is selected viewing main page main page&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* base.css?T_2_5_0_272 The numbers are the slash verion number (from one of the docs).&lt;br /&gt;
* slashcode.css?T_2_5__0_272&lt;br /&gt;
* slashcode_lite.css?T_2_5__0_272&lt;br /&gt;
* slashcode_lite.css?T_2_5__0_272 (appears to be loading this twice,why?)&lt;br /&gt;
* print.cssT_2_5__0_272&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow a page link from the main page to an individual article page &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Link: http://soylentnews.org/article.pl?sid=14/02/18/0336229&lt;br /&gt;
* article.pl is foind in slash/themes/slashcode/htdocs/article.pl So 'slashcode' is treated as a theme.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;article.pl&amp;lt;/h2&amp;gt;&lt;br /&gt;
The stuff of interest to us&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
use Slash;  -------- located in /local/lib64/perl5/slash.pm&lt;br /&gt;
use Slash::Display;     &lt;br /&gt;
use Slash::Utility;&lt;br /&gt;
&lt;br /&gt;
sub main {&lt;br /&gt;
        my $slashdb   = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user      = getCurrentUser();&lt;br /&gt;
        my $form      = getCurrentForm();&lt;br /&gt;
        my $gSkin     = getCurrentSkin();&lt;br /&gt;
         &lt;br /&gt;
        my $story;&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
                # Make sure the reader is viewing this story in the&lt;br /&gt;
                # proper skin.&lt;br /&gt;
                my $cur_skid = determineCurrentSkin();&lt;br /&gt;
                if ($story-&amp;gt;{primaryskid} != $cur_skid) {&lt;br /&gt;
                        my $cur_skin = $reader-&amp;gt;getSkin($cur_skid);&lt;br /&gt;
                        my $story_skin = $reader-&amp;gt;getSkin($story-&amp;gt;{primaryskid});&lt;br /&gt;
                        if ($story_skin &amp;amp;&amp;amp; $story_skin-&amp;gt;{rootdir}&lt;br /&gt;
                                &amp;amp;&amp;amp; $story_skin-&amp;gt;{rootdir} ne $cur_skin-&amp;gt;{rootdir})$&lt;br /&gt;
                                redirect(&amp;quot;$story_skin-&amp;gt;{rootdir}$ENV{REQUEST_URI}&amp;quot;$&lt;br /&gt;
                                return;&lt;br /&gt;
&lt;br /&gt;
               # XXXSECTIONTOPICS this needs to be updated&lt;br /&gt;
                my $SECT = $reader-&amp;gt;getSection($story-&amp;gt;{section});&lt;br /&gt;
                # This should be a getData call for title&lt;br /&gt;
                my $title = &amp;quot;$constants-&amp;gt;{sitename} | $story-&amp;gt;{title}&amp;quot;;&lt;br /&gt;
                if ($gSkin-&amp;gt;{name} &amp;amp;&amp;amp; $gSkin-&amp;gt;{name} eq &amp;quot;idle&amp;quot;) {&lt;br /&gt;
                        $title = &amp;quot;$gSkin-&amp;gt;{hostname} | $story-&amp;gt;{title}&amp;quot;;&lt;br /&gt;
                &lt;br /&gt;
if (my $pollbooth_db = getObject('Slash::PollBooth')) {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
slashDisplay('display', {&lt;br /&gt;
                        poll                    =&amp;gt; $pollbooth,&lt;br /&gt;
                        section                 =&amp;gt; $SECT,&lt;br /&gt;
                        section_block           =&amp;gt; $reader-&amp;gt;getBlock($SECT-&amp;gt;{secti$&lt;br /&gt;
                        show_poll               =&amp;gt; $pollbooth ? 1 : 0,&lt;br /&gt;
                        story                   =&amp;gt; $story,&lt;br /&gt;
                        stories                 =&amp;gt; \%stories,&lt;br /&gt;
                });&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
               my $called_pc = 0;&lt;br /&gt;
                if ($story-&amp;gt;{discussion}) {&lt;br /&gt;
                        # Still not happy with this logic -Brian&lt;br /&gt;
                        my $discussion = $reader-&amp;gt;getDiscussion($story-&amp;gt;{discussio$&lt;br /&gt;
&lt;br /&gt;
                        }&lt;br /&gt;
                        # If no comments ever have existed and commentstatus is di$&lt;br /&gt;
                        # just skip the display of the comment header bar -Brian&lt;br /&gt;
&lt;br /&gt;
                               &amp;amp;&amp;amp;  $discussion-&amp;gt;{commentstatus} eq 'disabled'&lt;br /&gt;
                        )) {&lt;br /&gt;
                                printComments($discussion);&lt;br /&gt;
                                $called_pc = 1;&lt;br /&gt;
                        }&lt;br /&gt;
                 if (!$called_pc &amp;amp;&amp;amp; $form-&amp;gt;{ssi} &amp;amp;&amp;amp; $form-&amp;gt;{ssi} eq 'yes' &amp;amp;&amp;amp; $form-$&lt;br /&gt;
                        # This is a real hack, we're kind of skipping down&lt;br /&gt;
                        # two levels of code.  But the cchp printing is an&lt;br /&gt;
                        # important optimization;  we avoid having to do&lt;br /&gt;
                        # multiple expensive comment selects.  One problem&lt;br /&gt;
                        # is that if there's no discussion with a story,&lt;br /&gt;
                        # printComments() doesn't get called, which means&lt;br /&gt;
                        # selectComments() doesn't get called, which means&lt;br /&gt;
                        # the cchp file won't be written.  If article.pl&lt;br /&gt;
                       # is being called by slashd, and we need to write&lt;br /&gt;
                        # that file, then here's where we print an empty&lt;br /&gt;
                        # file that will satisfy slashd. - Jamie&lt;br /&gt;
&lt;br /&gt;
                        Slash::Utility::Comments::_print_cchp({ stoid =&amp;gt; &amp;quot;dummy&amp;quot; }$&lt;br /&gt;
                }&lt;br /&gt;
        } else {&lt;br /&gt;
                header('Error', $form-&amp;gt;{section}) or return;&lt;br /&gt;
       &lt;br /&gt;
       my $plugins = $slashdb-&amp;gt;getDescriptions('plugins');&lt;br /&gt;
        if (!$user-&amp;gt;{is_anon} &amp;amp;&amp;amp; $plugins-&amp;gt;{Tags} &amp;amp;&amp;amp; $story) {&lt;br /&gt;
                my $tagsdb = getObject('Slash::Tags');&lt;br /&gt;
                $tagsdb-&amp;gt;markViewed($user-&amp;gt;{uid},&lt;br /&gt;
                        $reader-&amp;gt;getGlobjidCreate('stories', $story-&amp;gt;{stoid}));&lt;br /&gt;
        }&lt;br /&gt;
                        &lt;br /&gt;
        footer();&lt;br /&gt;
        if ($story) {&lt;br /&gt;
                writeLog($story-&amp;gt;{sid} || $sid);&lt;br /&gt;
        } else { &lt;br /&gt;
                writeLog($sid);&lt;br /&gt;
&lt;br /&gt;
               &lt;br /&gt;
createEnvironment();&lt;br /&gt;
main();  &lt;br /&gt;
1; &lt;br /&gt;
&lt;br /&gt;
(EOF)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Slash/DB/MySQL/MySQL.pm&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
479 sub getCSS {&lt;br /&gt;
480         my($self, $layout) = @_;&lt;br /&gt;
481         my $user = getCurrentUser();&lt;br /&gt;
482         my $page = $user-&amp;gt;{currentPage};&lt;br /&gt;
483         my $skin = getCurrentSkin('name');&lt;br /&gt;
484         my $admin = $user-&amp;gt;{is_admin};&lt;br /&gt;
485         my $theme = ($user-&amp;gt;{simpledesign} || $user-&amp;gt;{pda}) ? &amp;quot;light&amp;quot; : $user-&amp;gt;{css_theme};&lt;br /&gt;
486         my $secure = apacheConnectionSSL();&lt;br /&gt;
487         $layout ||= '';&lt;br /&gt;
488         my $constants = getCurrentStatic();&lt;br /&gt;
489&lt;br /&gt;
490         my $expire_time = $constants-&amp;gt;{css_expire} || 3600;&lt;br /&gt;
491         $expire_time += int(rand(60)) if $expire_time;&lt;br /&gt;
492         _genericCacheRefresh($self, 'css', $expire_time);&lt;br /&gt;
493         _genericCacheRefresh($self, 'css_pages', $expire_time);&lt;br /&gt;
494         _genericCacheRefresh($self, 'css_skins', $expire_time);&lt;br /&gt;
495         _genericCacheRefresh($self, 'css_themes', $expire_time);&lt;br /&gt;
496&lt;br /&gt;
497         my $css_ref             = $self-&amp;gt;{_css_cache} ||= {};&lt;br /&gt;
498         my $css_pages_ref       = $self-&amp;gt;{_css_pages_cache};&lt;br /&gt;
499         my $css_skins_ref       = $self-&amp;gt;{_css_skins_cache};&lt;br /&gt;
500         my $css_themes_ref      = $self-&amp;gt;{_css_themes_cache};&lt;br /&gt;
501         my $css_layouts_ref     = $self-&amp;gt;{_css_layouts_cache};&lt;br /&gt;
502&lt;br /&gt;
503         $css_pages_ref = $self-&amp;gt;getCSSValuesHashForCol('page') if !$css_pages_ref;&lt;br /&gt;
504         $css_skins_ref = $self-&amp;gt;getCSSValuesHashForCol('skin') if !$css_skins_ref;&lt;br /&gt;
505         $css_themes_ref = $self-&amp;gt;getCSSValuesHashForCol('theme') if !$css_themes_ref;&lt;br /&gt;
506         $css_layouts_ref = $self-&amp;gt;getCSSValuesHashForCol('layout') if !$css_layouts_ref;&lt;br /&gt;
507&lt;br /&gt;
508         my $lowbandwidth = ($user-&amp;gt;{lowbandwidth} || $user-&amp;gt;{pda}) ? &amp;quot;yes&amp;quot; : &amp;quot;no&amp;quot;;&lt;br /&gt;
509&lt;br /&gt;
510         $page   = '' if !$css_pages_ref-&amp;gt;{$page};&lt;br /&gt;
511         $skin   = '' if !$css_skins_ref-&amp;gt;{$skin};&lt;br /&gt;
512         $theme  = '' if !$css_themes_ref-&amp;gt;{$theme};&lt;br /&gt;
513         $layout = '' if !$css_layouts_ref-&amp;gt;{$layout};&lt;br /&gt;
514&lt;br /&gt;
515         return $css_ref-&amp;gt;{$skin}{$page}{$admin}{$theme}{$lowbandwidth}{$layout}{$secure}&lt;br /&gt;
516                 if exists $css_ref-&amp;gt;{$skin}{$page}{$admin}{$theme}{$lowbandwidth}{$layout}{$secure};&lt;br /&gt;
517&lt;br /&gt;
518         my @clauses;&lt;br /&gt;
519&lt;br /&gt;
520         my $page_q = $self-&amp;gt;sqlQuote($page);&lt;br /&gt;
521         my $page_in = $page ? &amp;quot;(page = '' or page = $page_q)&amp;quot; : &amp;quot;page = ''&amp;quot;;&lt;br /&gt;
522         push @clauses, $page_in;&lt;br /&gt;
523&lt;br /&gt;
524         my $skin_in = $skin ? &amp;quot;(skin = '' or skin = '$skin')&amp;quot; : &amp;quot;skin = ''&amp;quot;;&lt;br /&gt;
525         push @clauses, $skin_in;&lt;br /&gt;
526&lt;br /&gt;
527         push @clauses, &amp;quot;admin='no'&amp;quot; if !$admin;&lt;br /&gt;
528&lt;br /&gt;
529         my $theme_q  = $self-&amp;gt;sqlQuote($theme);&lt;br /&gt;
530         my $theme_in = $theme ? &amp;quot;(theme='' or theme=$theme_q)&amp;quot; : &amp;quot;theme=''&amp;quot;;&lt;br /&gt;
531         push @clauses, $theme_in;&lt;br /&gt;
532&lt;br /&gt;
533         push @clauses, &amp;quot;lowbandwidth='$lowbandwidth'&amp;quot; if $lowbandwidth eq &amp;quot;no&amp;quot;;&lt;br /&gt;
534&lt;br /&gt;
535         my $layout_q = $self-&amp;gt;sqlQuote($layout);&lt;br /&gt;
536         push @clauses, &amp;quot;layout=$layout_q&amp;quot;;&lt;br /&gt;
537&lt;br /&gt;
538         my $where = &amp;quot;css.ctid=css_type.ctid AND &amp;quot;;&lt;br /&gt;
539         $where .= join ' AND ', @clauses;&lt;br /&gt;
540&lt;br /&gt;
541         my $css = $self-&amp;gt;sqlSelectAllHashrefArray(&amp;quot;rel,type,media,file,title,ie_cond,skin&amp;quot;,&lt;br /&gt;
542                 &amp;quot;css, css_type&amp;quot;, $where, &amp;quot;ORDER BY css_type.ordernum, css.ordernum&amp;quot;);&lt;br /&gt;
543         if ($secure) {&lt;br /&gt;
544                 for my $hr (@$css) { $hr-&amp;gt;{file} =~ s/\.css/.ssl.css/ }&lt;br /&gt;
545         }&lt;br /&gt;
546         &lt;br /&gt;
547         $css_ref-&amp;gt;{$skin}{$page}{$admin}{$theme}{$lowbandwidth}{$layout}{$secure} = $css;&lt;br /&gt;
548         return $css;&lt;br /&gt;
549 }&lt;br /&gt;
550 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Slash/Apache/User/User.pm&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
548 {&lt;br /&gt;
549 my %ops_my = (&lt;br /&gt;
550         inbox           =&amp;gt; { args =&amp;gt; 'op=list', uri =&amp;gt; 'messages.pl' },&lt;br /&gt;
551         # XXX change messages to be same as /inbox, move this to /my/preferences/messages&lt;br /&gt;
552         messages        =&amp;gt; { args =&amp;gt; 'op=display_prefs', uri =&amp;gt; 'messages.pl' },&lt;br /&gt;
553         comments        =&amp;gt; { args =&amp;gt; 'op=editcomm' },&lt;br /&gt;
554         homepage        =&amp;gt; { args =&amp;gt; 'op=edithome' },&lt;br /&gt;
555         password        =&amp;gt; { args =&amp;gt; 'op=changeprefs', uri =&amp;gt; 'login.pl' },&lt;br /&gt;
556         logout          =&amp;gt; { args =&amp;gt; 'op=userclose', uri =&amp;gt; 'login.pl' },&lt;br /&gt;
557         misc            =&amp;gt; { args =&amp;gt; 'op=editmiscopts' },&lt;br /&gt;
558         amigos          =&amp;gt; { args =&amp;gt; 'op=friendview', uri =&amp;gt; 'journal.pl' },&lt;br /&gt;
559         bookmarks       =&amp;gt; { args =&amp;gt; 'op=showbookmarks' },&lt;br /&gt;
560         firehose        =&amp;gt; { args =&amp;gt; 'op=userfirehose' },&lt;br /&gt;
561         preferences     =&amp;gt; { args =&amp;gt; 'op=displayprefs', uri =&amp;gt; 'preferences.pl' },&lt;br /&gt;
562         tags            =&amp;gt; { args =&amp;gt; 'op=showtags' },&lt;br /&gt;
563         journal         =&amp;gt; { args =&amp;gt; 'op=list', uri =&amp;gt; 'journal.pl' },&lt;br /&gt;
564&lt;br /&gt;
565         friends         =&amp;gt; { args =&amp;gt; 'op=friends', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
566         fans            =&amp;gt; { args =&amp;gt; 'op=fans', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
567         freaks          =&amp;gt; { args =&amp;gt; 'op=freaks', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
568         foes            =&amp;gt; { args =&amp;gt; 'op=foes', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
569         zoo             =&amp;gt; { args =&amp;gt; 'op=all', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
570&lt;br /&gt;
571         default         =&amp;gt; { args =&amp;gt; 'op=edituser' }&lt;br /&gt;
572 );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;sql/mysql/defaults.sql&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 134 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','base.css','','','','no','',1,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
135 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','comments','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
136 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','article','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
137 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','print','print.css','','','','no','',5,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
138 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','admin.css','','','','yes','',1,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
139 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','pollBooth','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
140 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode_lite.css','','','','no','light',4,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
141 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','journal','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
142 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode_lite.css','','','','no','light',4,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
143 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','journal','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
144 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode.css','','','','no','',3,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
145 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','metamod','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
146 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode_low_bw.css','','','','no','',4,99, &amp;quot;&amp;quot;,&amp;quot;yes&amp;quot;);&lt;br /&gt;
147&lt;br /&gt;
148 #&lt;br /&gt;
149 # Dumping data for table 'css_type'&lt;br /&gt;
150 #&lt;br /&gt;
151 INSERT INTO css_type (ctid, name, ordernum) VALUES (1,'base',1);&lt;br /&gt;
152 INSERT INTO css_type (ctid, name, ordernum) VALUES (2,'page',2);&lt;br /&gt;
153 INSERT INTO css_type (ctid, name, ordernum) VALUES (3,'theme',3);&lt;br /&gt;
154 INSERT INTO css_type (ctid, name, ordernum) VALUES (4,'user_theme',5);&lt;br /&gt;
155 INSERT INTO css_type (ctid, name, ordernum) VALUES (5,'print',6);&lt;br /&gt;
156 INSERT INTO css_type (ctid, name, ordernum) VALUES (6,'skin',4);&lt;br /&gt;
157 INSERT INTO css_type (ctid, name, ordernum) VALUES (7,'handheld',7);&lt;br /&gt;
158 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;plugins/FireHose/mysql_dump.sql &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','firehose','no','',2,0, '');&lt;br /&gt;
==&amp;gt; INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','users','no','',2,0, '');&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','calendar.css','','','firehose','no','',2,0, '');&lt;br /&gt;
==&amp;gt; INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','users','no','',2,0, '');&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','firehose','no','',2,0, '');&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','index2','no','',2,0, ''); &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;I believe that we are not using FireHose but it was needed to make the site work.  As can be seen in the db dump above, it adds the firehose.css file to any of the user pages. Need to verify and then see if we can get the db purged of these values.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Good work. The question in my mind is why the heck css for one module has any effect *at all* on any other module. Talk about lack of localization...-AG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;I think there was some firehose slashboxes that showed up in the users pages.  They needed to be wider than the default, so they patched those pages with the firehose.css. Next step is to get a current dump of the two css tables. The important part is I know what files are for what parts of the code.  Slashcode.css is the theme css file slashcode-lite.css is the style file that is called by a user pref.  This means I need to fix comments.css to remove the theme elements I inserted and put them in the theme file.  I still need to make sure that the changes that benefited the Simplified theme stay intact. -EP&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;fonts&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
This is what I usually start with:&lt;br /&gt;
   font-family: Helvetica,Geneva,Arial,Verdana,sans-serif;&lt;br /&gt;
&lt;br /&gt;
Too many can lead to a LOT of testing being required. As can the wrong order. ;-)&lt;br /&gt;
&lt;br /&gt;
Others I have used in the past:&lt;br /&gt;
font-family: Geneva,Arial,Verdana,Helvetica,Chicago,sans-serif;&lt;br /&gt;
font-family: Helvetica,Arial,Geneva,Chicago,Verdana,sans-serif;&lt;br /&gt;
font-family: Helvetica,Geneva,Arial,Verdana,sans-serif;&lt;br /&gt;
-AG&lt;br /&gt;
&lt;br /&gt;
I have used:&lt;br /&gt;
font-family: Verdana, Geneva, &amp;quot;Bitstream Vera Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif;&lt;br /&gt;
&lt;br /&gt;
Note this has Linux fonts as well to help with these users.&lt;br /&gt;
-EP&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;User Menu&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','Logout','logout','/my/logout',1,0,10);&lt;br /&gt;
124 INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','Preferences','preferences','/users.pl?op=edituser',1,0,20);&lt;br /&gt;
125 INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','Password','password','[% constants.real_rootdir %]/my/password',1,0,40);&lt;br /&gt;
126 INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','~[% user.nickname | strip_literal %] ([% user.uid %])','me','/~[% user.nickname | fixparam %]',1,0,50);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; This code sets up the upper menu on http://slashcott.org/users.pl which is linked from your userid on the home page.  The Preferences is wrong, as it needs to be all three links: Info, Homepage, Comments.  This will allow users with low-bandwidth option set to easily get to the setting to unset low-bandwidth. -EP&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Refernces to css in the man pages in /usr/local/share/man/man3&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
grep -i css *&lt;br /&gt;
&lt;br /&gt;
HTML::CalendarMonth.3pm:.IP &amp;quot;enable_css&amp;quot; 4&lt;br /&gt;
HTML::CalendarMonth.3pm:.IX Item &amp;quot;enable_css&amp;quot;&lt;br /&gt;
HTML::CalendarMonth.3pm:Set some handy \s-1CSS\s0 class attributes on elements, enabled by default.&lt;br /&gt;
HTML::CalendarMonth.3pm:.IP &amp;quot;semantic_css&amp;quot; 4&lt;br /&gt;
HTML::CalendarMonth.3pm:.IX Item &amp;quot;semantic_css&amp;quot;&lt;br /&gt;
HTML::CalendarMonth.3pm:Sets some additional \s-1CSS\s0 class attributes on elements, disabled by&lt;br /&gt;
HTML::CalendarMonth.3pm:.IP &amp;quot;\fIdefault_css()\fR&amp;quot; 4&lt;br /&gt;
HTML::CalendarMonth.3pm:.IX Item &amp;quot;default_css()&amp;quot;&lt;br /&gt;
HTML::CalendarMonth.3pm:document in conjunction with the classes assigned to elements when css&lt;br /&gt;
HTML::ElementSuper.3pm:might be when you'd like to assign multiple \s-1CSS\s0 classes to a single&lt;br /&gt;
HTML::PopupTreeSelect.3pm:.IP &amp;quot;include_css (optional)&amp;quot; 4&lt;br /&gt;
HTML::PopupTreeSelect.3pm:.IX Item &amp;quot;include_css (optional)&amp;quot;&lt;br /&gt;
HTML::PopupTreeSelect.3pm:Set this to 0 and the default \s-1CSS\s0 will not be included in the widget&lt;br /&gt;
HTML::PopupTreeSelect.3pm:output.  This allows you to include your own \s-1CSS\s0 which will be used by&lt;br /&gt;
HTML::PopupTreeSelect.3pm:your widget.  Modifying the \s-1CSS\s0 will allow you to control the fonts,&lt;br /&gt;
HTML::PopupTreeSelect.3pm:If you run the widget with include_css set to 1 then you can use that&lt;br /&gt;
HTML::Tree::Scanning.3pm:tagging, such is as useful in \s-1CSS\s0 \*(-- note the&lt;br /&gt;
Module::Build::API.3pm:.IP &amp;quot;\fIhtml_css()\fR&amp;quot; 4&lt;br /&gt;
Module::Build::API.3pm:.IX Item &amp;quot;html_css()&amp;quot;&lt;br /&gt;
TAP::Parser::YAMLish::Reader.3pm:YAML::Tiny, \s-1YAML\s0, YAML::Syck, Config::Tiny, CSS::Tiny,&lt;br /&gt;
TAP::Parser::YAMLish::Writer.3pm:YAML::Tiny, \s-1YAML\s0, YAML::Syck, Config::Tiny, CSS::Tiny,&lt;br /&gt;
Template::Iterator.3pm:You can then style the \f(CW\*(C`tr.odd\*(C'\fR and \f(CW\*(C`tr.even\*(C'\fR elements using \s-1CSS:\s0&lt;br /&gt;
Template::Toolkit.3pm:kind of text documents: \s-1HTML\s0, \s-1XML\s0, \s-1CSS\s0, Javascript, Perl code, plain text,&lt;br /&gt;
Template::Tutorial::Web.3pm:kind of content they contain.  So you can use \s-1TT\s0 to generate \s-1HTML\s0, \s-1XML\s0, \s-1CSS\s0,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;CSS commit for Feb 23&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Changes to most of the css files to set all sizes to em (some were in px and broke flow). Changed the font-family to a more friendly chain for all platforms, and remove all other font-faimily calls from the code. Changed font sizes from % to ems and adjusted size for some of the main elements. Fix a issue with the middle column size caused by firehose.css. Many small fixes to spacing over many places.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moved all of the slashcode theme items into the slashcode.cssraw file. Some were in comments.cssraw due to some previous work I did.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On article body and comment body, made the font size a bit smaller. Also on comments body set the margins to be smaller.&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;-EP&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=PageScriptList&amp;diff=5380</id>
		<title>PageScriptList</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=PageScriptList&amp;diff=5380"/>
		<updated>2014-03-01T20:40:38Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h2&amp;gt;Scripts ('pages') in /slash/site/slashcott.org/htdocs &amp;lt;/h2&amp;gt;&lt;br /&gt;
[[CssWork]] parent&lt;br /&gt;
&lt;br /&gt;
404.pl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    main, &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
admin.pl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    aclEdit, aclSave, blockDelete, blockEdit, &lt;br /&gt;
    blockSave, colorEdit, colorSave, commentLog, &lt;br /&gt;
    deleteKeyword, displayMcdStats, displayPeerWeights, displayRecent, &lt;br /&gt;
    displayRecentMods, displayRecentRequests, displayRecentSubs, displayRecentWebheads, &lt;br /&gt;
    displaySignoffStats, displaySlashd, editFilter, editKeyword, &lt;br /&gt;
    editStory, extractChosenFromForm, getDescForTopicsRendered, getsiddir, &lt;br /&gt;
    getTitle, handleMediaFileForStory, importFile, importImage, &lt;br /&gt;
    importText, listFilters, listStories, main, &lt;br /&gt;
    moderate, pageEdit, rmStory, saveKeyword, &lt;br /&gt;
    saveStory, showStaticFiles, siteInfo, templateDelete, &lt;br /&gt;
    templateEdit, templateSave, topicDelete, topicEdit, &lt;br /&gt;
    topicExtrasEdit, topicSave, topicTree, updateStory, &lt;br /&gt;
    updateTopicNexusExtras, varEdit, varSave, &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ajax.pl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    default, editPreview, editReset, editSave, &lt;br /&gt;
    fetchComments, getModalPrefs, getModalPrefsAnon, getModalPrefsAnonHC, &lt;br /&gt;
    getOps, getSectionPrefsHTML, main, previewReply, &lt;br /&gt;
    readRest, replyForm, saveModalPrefs, saveModalPrefsAnon, &lt;br /&gt;
    saveModalPrefsAnonHC, setModalUpdates, setSectionNexusPrefs, submitReply, &lt;br /&gt;
    updateD2prefs, &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
article.pl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    main, &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
authors.pl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    main, &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
badge.pl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    display, forward, main, vote, &lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
blob.pl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    main, &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
comments.pl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    _buildargs, delete, deleteThread, displayComments, &lt;br /&gt;
    editComment, main, metamod_elig, metamod_if_necessary, &lt;br /&gt;
    moderate, previewForm, submitComment, &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
edit.pl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    cancel, edit, main, preview, &lt;br /&gt;
    save, start, &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
fileadmin.pl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    addFileForStory, editBySid, editFile, listAll, &lt;br /&gt;
    listFilesForStories, main, &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
help.pl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    display_help, main, &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
hof.pl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    main, &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
imgupload.pl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    main, receive_upload, &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
index.pl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    displayStories, dnBid, do_rss, getDispModeForStory, &lt;br /&gt;
    getDispModesForStories, getSidFromRemark, main, redirect_home_if_necessary, &lt;br /&gt;
    rmBid, saveUserBoxes, upBid, &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
journal.pl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    add_entry, articleMeta, _checkTheme, delete_entry, &lt;br /&gt;
    displayArticle, displayArticleFriends, displayFriends, displayRSS, &lt;br /&gt;
    displayTop, displayTopRSS, doEditArticle, doSaveArticle, &lt;br /&gt;
    editArticle, editPrefs, get_entries, get_entry, &lt;br /&gt;
    get_uid_from_nickname, listArticle, main, modify_entry, &lt;br /&gt;
    _printHead, removeArticle, saveArticle, _save_params, &lt;br /&gt;
    searchUsers, setPrefs, &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
login.pl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    allowOpenID, changePrefs, claimOpenID, deleteOpenID, &lt;br /&gt;
    getOtherUserParams, loginForm, mailPasswd, mailPasswdForm, &lt;br /&gt;
    main, newUser, newUserForm, printOpenID, &lt;br /&gt;
    savePrefs, _sendMailPasswd, _validFormkey, verifyOpenID, &lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
messages.pl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    delete_message, delete_messages, display_message, display_prefs, &lt;br /&gt;
    edit_message, list_messages, list_messages_rss, main, &lt;br /&gt;
    save_prefs, send_message, &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
metamod.pl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    displayTheComments, main, &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
pollBooth.pl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    default, deletepolls, detachpoll, editpoll, &lt;br /&gt;
    link_story_to_poll, listpolls, main, poll_booth, &lt;br /&gt;
    savepoll, vote, &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
preferences.pl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    display_prefs, main, &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
print.pl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    get_content, main, &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
pubkey.pl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    main, &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
search.pl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    _authors, _buildargs, commentSearch, commentSearchRSS, &lt;br /&gt;
    journalSearch, journalSearchRSS, main, pollSearch, &lt;br /&gt;
    pollSearchRSS, rssSearch, rssSearchRSS, _shorten, &lt;br /&gt;
    _skins, _sort, storySearch, storySearchRSS, &lt;br /&gt;
    submissionSearch, submissionSearchRSS, _topics, userSearch, &lt;br /&gt;
    userSearchRSS, &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
shtml.pl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    getFileText, getRequestedFileAndType, main, parse, &lt;br /&gt;
    replace_footer, replace_header, &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
stats.pl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    csv, _get_graph_data, _get_graph_id, _get_skins, &lt;br /&gt;
    graph, list, main, report, &lt;br /&gt;
    _set_legend, table, topics, &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
submit.pl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    blankForm, changeSubmission, deleteSubmissions, displayForm, &lt;br /&gt;
    displayRSS, genChosenHashrefForTopics, getSubmissionSelections, main, &lt;br /&gt;
    mergeSubmissions, previewForm, previewStory, saveSub, &lt;br /&gt;
    submissionEd, updateSubmissions, yourPendingSubmissions, &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
topics.pl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    hierarchy, listTopics, main, &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
users2.pl: see [[PerlModuleUsers]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    adminDispatch, checkList, displayForm, editKey, &lt;br /&gt;
    editMiscOpts, editUser, forceAccountVerify, getCommentListing, &lt;br /&gt;
    getError, _get_lastjournal, getMessage, getOtherUserParams, &lt;br /&gt;
    getTitle, getUserAdmin, listAbuses, listBanned, &lt;br /&gt;
    listReadOnly, mailPasswd, main, newUser, &lt;br /&gt;
    newUserForm, noUser, previewSlashbox, saveMiscOpts, &lt;br /&gt;
    saveUser, saveUserAdmin, setToDefaults, showFireHose, &lt;br /&gt;
    showInfo, tildeEd, topAbusers, validateUser, &lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
users.pl: see [[PerlModuleUsers]] - this is what handles the users home page and similar user functions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    adminDispatch, changePasswd, checkList, displayForm, &lt;br /&gt;
    editComm, editHome, editKey, editMiscOpts, &lt;br /&gt;
    editTags, editUser, forceAccountVerify, getCommentListing, &lt;br /&gt;
    getError, _get_lastjournal, getMessage, getOtherUserParams, &lt;br /&gt;
    getTitle, getUserAdmin, listAbuses, listBanned, &lt;br /&gt;
    listReadOnly, mailPasswd, main, newUser, &lt;br /&gt;
    newUserForm, noUser, previewSlashbox, saveComm, &lt;br /&gt;
    saveHome, saveMiscOpts, savePasswd, saveTags, &lt;br /&gt;
    saveUser, saveUserAdmin, setToDefaults, showBookmarks, &lt;br /&gt;
    showComments, showFireHose, showInfo, showSubmissions, &lt;br /&gt;
    showTags, tildeEd, topAbusers, validateUser, &lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
zoo.pl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    action, check, main, people, &lt;br /&gt;
    _printHead, _rss, testSocialized, &amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=PageScriptList&amp;diff=5379</id>
		<title>PageScriptList</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=PageScriptList&amp;diff=5379"/>
		<updated>2014-03-01T20:36:42Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h2&amp;gt;Scripts ('pages') in /slash/site/slashcott.org/htdocs &amp;lt;/h2&amp;gt;&lt;br /&gt;
[[CssWork]] parent&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
index.pl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    displayStories, dnBid, do_rss, getDispModeForStory, &lt;br /&gt;
    getDispModesForStories, getSidFromRemark, main, redirect_home_if_necessary, &lt;br /&gt;
    rmBid, saveUserBoxes, upBid, &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
journal.pl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    add_entry, articleMeta, _checkTheme, delete_entry, &lt;br /&gt;
    displayArticle, displayArticleFriends, displayFriends, displayRSS, &lt;br /&gt;
    displayTop, displayTopRSS, doEditArticle, doSaveArticle, &lt;br /&gt;
    editArticle, editPrefs, get_entries, get_entry, &lt;br /&gt;
    get_uid_from_nickname, listArticle, main, modify_entry, &lt;br /&gt;
    _printHead, removeArticle, saveArticle, _save_params, &lt;br /&gt;
    searchUsers, setPrefs, &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
login.pl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    allowOpenID, changePrefs, claimOpenID, deleteOpenID, &lt;br /&gt;
    getOtherUserParams, loginForm, mailPasswd, mailPasswdForm, &lt;br /&gt;
    main, newUser, newUserForm, printOpenID, &lt;br /&gt;
    savePrefs, _sendMailPasswd, _validFormkey, verifyOpenID, &lt;br /&gt;
    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
messages.pl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    delete_message, delete_messages, display_message, display_prefs, &lt;br /&gt;
    edit_message, list_messages, list_messages_rss, main, &lt;br /&gt;
    save_prefs, send_message, &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
404.pl:&lt;br /&gt;
    main, &lt;br /&gt;
&lt;br /&gt;
admin.pl:&lt;br /&gt;
    aclEdit, aclSave, blockDelete, blockEdit, &lt;br /&gt;
    blockSave, colorEdit, colorSave, commentLog, &lt;br /&gt;
    deleteKeyword, displayMcdStats, displayPeerWeights, displayRecent, &lt;br /&gt;
    displayRecentMods, displayRecentRequests, displayRecentSubs, displayRecentWebheads, &lt;br /&gt;
    displaySignoffStats, displaySlashd, editFilter, editKeyword, &lt;br /&gt;
    editStory, extractChosenFromForm, getDescForTopicsRendered, getsiddir, &lt;br /&gt;
    getTitle, handleMediaFileForStory, importFile, importImage, &lt;br /&gt;
    importText, listFilters, listStories, main, &lt;br /&gt;
    moderate, pageEdit, rmStory, saveKeyword, &lt;br /&gt;
    saveStory, showStaticFiles, siteInfo, templateDelete, &lt;br /&gt;
    templateEdit, templateSave, topicDelete, topicEdit, &lt;br /&gt;
    topicExtrasEdit, topicSave, topicTree, updateStory, &lt;br /&gt;
    updateTopicNexusExtras, varEdit, varSave, &lt;br /&gt;
&lt;br /&gt;
ajax.pl:&lt;br /&gt;
    default, editPreview, editReset, editSave, &lt;br /&gt;
    fetchComments, getModalPrefs, getModalPrefsAnon, getModalPrefsAnonHC, &lt;br /&gt;
    getOps, getSectionPrefsHTML, main, previewReply, &lt;br /&gt;
    readRest, replyForm, saveModalPrefs, saveModalPrefsAnon, &lt;br /&gt;
    saveModalPrefsAnonHC, setModalUpdates, setSectionNexusPrefs, submitReply, &lt;br /&gt;
    updateD2prefs, &lt;br /&gt;
&lt;br /&gt;
article.pl:&lt;br /&gt;
    main, &lt;br /&gt;
&lt;br /&gt;
authors.pl:&lt;br /&gt;
    main, &lt;br /&gt;
&lt;br /&gt;
badge.pl:&lt;br /&gt;
    display, forward, main, vote, &lt;br /&gt;
    &lt;br /&gt;
blob.pl:&lt;br /&gt;
    main, &lt;br /&gt;
&lt;br /&gt;
comments.pl:&lt;br /&gt;
    _buildargs, delete, deleteThread, displayComments, &lt;br /&gt;
    editComment, main, metamod_elig, metamod_if_necessary, &lt;br /&gt;
    moderate, previewForm, submitComment, &lt;br /&gt;
&lt;br /&gt;
edit.pl:&lt;br /&gt;
    cancel, edit, main, preview, &lt;br /&gt;
    save, start, &lt;br /&gt;
&lt;br /&gt;
fileadmin.pl:&lt;br /&gt;
    addFileForStory, editBySid, editFile, listAll, &lt;br /&gt;
    listFilesForStories, main, &lt;br /&gt;
&lt;br /&gt;
help.pl:&lt;br /&gt;
    display_help, main, &lt;br /&gt;
&lt;br /&gt;
hof.pl:&lt;br /&gt;
    main, &lt;br /&gt;
&lt;br /&gt;
imgupload.pl:&lt;br /&gt;
    main, receive_upload, &lt;br /&gt;
&lt;br /&gt;
index.pl:&lt;br /&gt;
    displayStories, dnBid, do_rss, getDispModeForStory, &lt;br /&gt;
    getDispModesForStories, getSidFromRemark, main, redirect_home_if_necessary, &lt;br /&gt;
    rmBid, saveUserBoxes, upBid, &lt;br /&gt;
&lt;br /&gt;
journal.pl:&lt;br /&gt;
    add_entry, articleMeta, _checkTheme, delete_entry, &lt;br /&gt;
    displayArticle, displayArticleFriends, displayFriends, displayRSS, &lt;br /&gt;
    displayTop, displayTopRSS, doEditArticle, doSaveArticle, &lt;br /&gt;
    editArticle, editPrefs, get_entries, get_entry, &lt;br /&gt;
    get_uid_from_nickname, listArticle, main, modify_entry, &lt;br /&gt;
    _printHead, removeArticle, saveArticle, _save_params, &lt;br /&gt;
    searchUsers, setPrefs, &lt;br /&gt;
&lt;br /&gt;
login.pl:&lt;br /&gt;
    allowOpenID, changePrefs, claimOpenID, deleteOpenID, &lt;br /&gt;
    getOtherUserParams, loginForm, mailPasswd, mailPasswdForm, &lt;br /&gt;
    main, newUser, newUserForm, printOpenID, &lt;br /&gt;
    savePrefs, _sendMailPasswd, _validFormkey, verifyOpenID, &lt;br /&gt;
    &lt;br /&gt;
messages.pl:&lt;br /&gt;
    delete_message, delete_messages, display_message, display_prefs, &lt;br /&gt;
    edit_message, list_messages, list_messages_rss, main, &lt;br /&gt;
    save_prefs, send_message, &lt;br /&gt;
&lt;br /&gt;
metamod.pl:&lt;br /&gt;
    displayTheComments, main, &lt;br /&gt;
&lt;br /&gt;
pollBooth.pl:&lt;br /&gt;
    default, deletepolls, detachpoll, editpoll, &lt;br /&gt;
    link_story_to_poll, listpolls, main, poll_booth, &lt;br /&gt;
    savepoll, vote, &lt;br /&gt;
&lt;br /&gt;
preferences.pl:&lt;br /&gt;
    display_prefs, main, &lt;br /&gt;
&lt;br /&gt;
print.pl:&lt;br /&gt;
    get_content, main, &lt;br /&gt;
&lt;br /&gt;
pubkey.pl:&lt;br /&gt;
    main, &lt;br /&gt;
&lt;br /&gt;
search.pl:&lt;br /&gt;
    _authors, _buildargs, commentSearch, commentSearchRSS, &lt;br /&gt;
    journalSearch, journalSearchRSS, main, pollSearch, &lt;br /&gt;
    pollSearchRSS, rssSearch, rssSearchRSS, _shorten, &lt;br /&gt;
    _skins, _sort, storySearch, storySearchRSS, &lt;br /&gt;
    submissionSearch, submissionSearchRSS, _topics, userSearch, &lt;br /&gt;
    userSearchRSS, &lt;br /&gt;
&lt;br /&gt;
shtml.pl:&lt;br /&gt;
    getFileText, getRequestedFileAndType, main, parse, &lt;br /&gt;
    replace_footer, replace_header, &lt;br /&gt;
&lt;br /&gt;
stats.pl:&lt;br /&gt;
    csv, _get_graph_data, _get_graph_id, _get_skins, &lt;br /&gt;
    graph, list, main, report, &lt;br /&gt;
    _set_legend, table, topics, &lt;br /&gt;
&lt;br /&gt;
submit.pl:&lt;br /&gt;
    blankForm, changeSubmission, deleteSubmissions, displayForm, &lt;br /&gt;
    displayRSS, genChosenHashrefForTopics, getSubmissionSelections, main, &lt;br /&gt;
    mergeSubmissions, previewForm, previewStory, saveSub, &lt;br /&gt;
    submissionEd, updateSubmissions, yourPendingSubmissions, &lt;br /&gt;
&lt;br /&gt;
topics.pl:&lt;br /&gt;
    hierarchy, listTopics, main, &lt;br /&gt;
&amp;lt;/pre&amp;gt;see [[PerlModuleUsers]]&amp;lt;pre&amp;gt;&lt;br /&gt;
users2.pl: &lt;br /&gt;
    adminDispatch, checkList, displayForm, editKey, &lt;br /&gt;
    editMiscOpts, editUser, forceAccountVerify, getCommentListing, &lt;br /&gt;
    getError, _get_lastjournal, getMessage, getOtherUserParams, &lt;br /&gt;
    getTitle, getUserAdmin, listAbuses, listBanned, &lt;br /&gt;
    listReadOnly, mailPasswd, main, newUser, &lt;br /&gt;
    newUserForm, noUser, previewSlashbox, saveMiscOpts, &lt;br /&gt;
    saveUser, saveUserAdmin, setToDefaults, showFireHose, &lt;br /&gt;
    showInfo, tildeEd, topAbusers, validateUser, &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;see [[PerlModuleUsers]]&amp;lt;pre&amp;gt;&lt;br /&gt;
users.pl:  - this is what handles the users home page and similar user functions.&lt;br /&gt;
&lt;br /&gt;
    adminDispatch, changePasswd, checkList, displayForm, &lt;br /&gt;
    editComm, editHome, editKey, editMiscOpts, &lt;br /&gt;
    editTags, editUser, forceAccountVerify, getCommentListing, &lt;br /&gt;
    getError, _get_lastjournal, getMessage, getOtherUserParams, &lt;br /&gt;
    getTitle, getUserAdmin, listAbuses, listBanned, &lt;br /&gt;
    listReadOnly, mailPasswd, main, newUser, &lt;br /&gt;
    newUserForm, noUser, previewSlashbox, saveComm, &lt;br /&gt;
    saveHome, saveMiscOpts, savePasswd, saveTags, &lt;br /&gt;
    saveUser, saveUserAdmin, setToDefaults, showBookmarks, &lt;br /&gt;
    showComments, showFireHose, showInfo, showSubmissions, &lt;br /&gt;
    showTags, tildeEd, topAbusers, validateUser, &lt;br /&gt;
    &lt;br /&gt;
zoo.pl:&lt;br /&gt;
    action, check, main, people, &lt;br /&gt;
    _printHead, _rss, testSocialized, &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=PageScriptList&amp;diff=5378</id>
		<title>PageScriptList</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=PageScriptList&amp;diff=5378"/>
		<updated>2014-03-01T20:31:40Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h2&amp;gt;Scripts ('pages') in /slash/site/slashcott.org/htdocs &amp;lt;/h2&amp;gt;&lt;br /&gt;
[[CssWork]] parent&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
404.pl:&lt;br /&gt;
    main, &lt;br /&gt;
&lt;br /&gt;
admin.pl:&lt;br /&gt;
    aclEdit, aclSave, blockDelete, blockEdit, &lt;br /&gt;
    blockSave, colorEdit, colorSave, commentLog, &lt;br /&gt;
    deleteKeyword, displayMcdStats, displayPeerWeights, displayRecent, &lt;br /&gt;
    displayRecentMods, displayRecentRequests, displayRecentSubs, displayRecentWebheads, &lt;br /&gt;
    displaySignoffStats, displaySlashd, editFilter, editKeyword, &lt;br /&gt;
    editStory, extractChosenFromForm, getDescForTopicsRendered, getsiddir, &lt;br /&gt;
    getTitle, handleMediaFileForStory, importFile, importImage, &lt;br /&gt;
    importText, listFilters, listStories, main, &lt;br /&gt;
    moderate, pageEdit, rmStory, saveKeyword, &lt;br /&gt;
    saveStory, showStaticFiles, siteInfo, templateDelete, &lt;br /&gt;
    templateEdit, templateSave, topicDelete, topicEdit, &lt;br /&gt;
    topicExtrasEdit, topicSave, topicTree, updateStory, &lt;br /&gt;
    updateTopicNexusExtras, varEdit, varSave, &lt;br /&gt;
&lt;br /&gt;
ajax.pl:&lt;br /&gt;
    default, editPreview, editReset, editSave, &lt;br /&gt;
    fetchComments, getModalPrefs, getModalPrefsAnon, getModalPrefsAnonHC, &lt;br /&gt;
    getOps, getSectionPrefsHTML, main, previewReply, &lt;br /&gt;
    readRest, replyForm, saveModalPrefs, saveModalPrefsAnon, &lt;br /&gt;
    saveModalPrefsAnonHC, setModalUpdates, setSectionNexusPrefs, submitReply, &lt;br /&gt;
    updateD2prefs, &lt;br /&gt;
&lt;br /&gt;
article.pl:&lt;br /&gt;
    main, &lt;br /&gt;
&lt;br /&gt;
authors.pl:&lt;br /&gt;
    main, &lt;br /&gt;
&lt;br /&gt;
badge.pl:&lt;br /&gt;
    display, forward, main, vote, &lt;br /&gt;
    &lt;br /&gt;
blob.pl:&lt;br /&gt;
    main, &lt;br /&gt;
&lt;br /&gt;
comments.pl:&lt;br /&gt;
    _buildargs, delete, deleteThread, displayComments, &lt;br /&gt;
    editComment, main, metamod_elig, metamod_if_necessary, &lt;br /&gt;
    moderate, previewForm, submitComment, &lt;br /&gt;
&lt;br /&gt;
edit.pl:&lt;br /&gt;
    cancel, edit, main, preview, &lt;br /&gt;
    save, start, &lt;br /&gt;
&lt;br /&gt;
fileadmin.pl:&lt;br /&gt;
    addFileForStory, editBySid, editFile, listAll, &lt;br /&gt;
    listFilesForStories, main, &lt;br /&gt;
&lt;br /&gt;
help.pl:&lt;br /&gt;
    display_help, main, &lt;br /&gt;
&lt;br /&gt;
hof.pl:&lt;br /&gt;
    main, &lt;br /&gt;
&lt;br /&gt;
imgupload.pl:&lt;br /&gt;
    main, receive_upload, &lt;br /&gt;
&lt;br /&gt;
index.pl:&lt;br /&gt;
    displayStories, dnBid, do_rss, getDispModeForStory, &lt;br /&gt;
    getDispModesForStories, getSidFromRemark, main, redirect_home_if_necessary, &lt;br /&gt;
    rmBid, saveUserBoxes, upBid, &lt;br /&gt;
&lt;br /&gt;
journal.pl:&lt;br /&gt;
    add_entry, articleMeta, _checkTheme, delete_entry, &lt;br /&gt;
    displayArticle, displayArticleFriends, displayFriends, displayRSS, &lt;br /&gt;
    displayTop, displayTopRSS, doEditArticle, doSaveArticle, &lt;br /&gt;
    editArticle, editPrefs, get_entries, get_entry, &lt;br /&gt;
    get_uid_from_nickname, listArticle, main, modify_entry, &lt;br /&gt;
    _printHead, removeArticle, saveArticle, _save_params, &lt;br /&gt;
    searchUsers, setPrefs, &lt;br /&gt;
&lt;br /&gt;
login.pl:&lt;br /&gt;
    allowOpenID, changePrefs, claimOpenID, deleteOpenID, &lt;br /&gt;
    getOtherUserParams, loginForm, mailPasswd, mailPasswdForm, &lt;br /&gt;
    main, newUser, newUserForm, printOpenID, &lt;br /&gt;
    savePrefs, _sendMailPasswd, _validFormkey, verifyOpenID, &lt;br /&gt;
    &lt;br /&gt;
messages.pl:&lt;br /&gt;
    delete_message, delete_messages, display_message, display_prefs, &lt;br /&gt;
    edit_message, list_messages, list_messages_rss, main, &lt;br /&gt;
    save_prefs, send_message, &lt;br /&gt;
&lt;br /&gt;
metamod.pl:&lt;br /&gt;
    displayTheComments, main, &lt;br /&gt;
&lt;br /&gt;
pollBooth.pl:&lt;br /&gt;
    default, deletepolls, detachpoll, editpoll, &lt;br /&gt;
    link_story_to_poll, listpolls, main, poll_booth, &lt;br /&gt;
    savepoll, vote, &lt;br /&gt;
&lt;br /&gt;
preferences.pl:&lt;br /&gt;
    display_prefs, main, &lt;br /&gt;
&lt;br /&gt;
print.pl:&lt;br /&gt;
    get_content, main, &lt;br /&gt;
&lt;br /&gt;
pubkey.pl:&lt;br /&gt;
    main, &lt;br /&gt;
&lt;br /&gt;
search.pl:&lt;br /&gt;
    _authors, _buildargs, commentSearch, commentSearchRSS, &lt;br /&gt;
    journalSearch, journalSearchRSS, main, pollSearch, &lt;br /&gt;
    pollSearchRSS, rssSearch, rssSearchRSS, _shorten, &lt;br /&gt;
    _skins, _sort, storySearch, storySearchRSS, &lt;br /&gt;
    submissionSearch, submissionSearchRSS, _topics, userSearch, &lt;br /&gt;
    userSearchRSS, &lt;br /&gt;
&lt;br /&gt;
shtml.pl:&lt;br /&gt;
    getFileText, getRequestedFileAndType, main, parse, &lt;br /&gt;
    replace_footer, replace_header, &lt;br /&gt;
&lt;br /&gt;
stats.pl:&lt;br /&gt;
    csv, _get_graph_data, _get_graph_id, _get_skins, &lt;br /&gt;
    graph, list, main, report, &lt;br /&gt;
    _set_legend, table, topics, &lt;br /&gt;
&lt;br /&gt;
submit.pl:&lt;br /&gt;
    blankForm, changeSubmission, deleteSubmissions, displayForm, &lt;br /&gt;
    displayRSS, genChosenHashrefForTopics, getSubmissionSelections, main, &lt;br /&gt;
    mergeSubmissions, previewForm, previewStory, saveSub, &lt;br /&gt;
    submissionEd, updateSubmissions, yourPendingSubmissions, &lt;br /&gt;
&lt;br /&gt;
topics.pl:&lt;br /&gt;
    hierarchy, listTopics, main, &lt;br /&gt;
&amp;lt;/pre&amp;gt;see [[PerlModuleUsers]]&amp;lt;pre&amp;gt;&lt;br /&gt;
users2.pl: &lt;br /&gt;
    adminDispatch, checkList, displayForm, editKey, &lt;br /&gt;
    editMiscOpts, editUser, forceAccountVerify, getCommentListing, &lt;br /&gt;
    getError, _get_lastjournal, getMessage, getOtherUserParams, &lt;br /&gt;
    getTitle, getUserAdmin, listAbuses, listBanned, &lt;br /&gt;
    listReadOnly, mailPasswd, main, newUser, &lt;br /&gt;
    newUserForm, noUser, previewSlashbox, saveMiscOpts, &lt;br /&gt;
    saveUser, saveUserAdmin, setToDefaults, showFireHose, &lt;br /&gt;
    showInfo, tildeEd, topAbusers, validateUser, &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;see [[PerlModuleUsers]]&amp;lt;pre&amp;gt;&lt;br /&gt;
users.pl:  - this is what handles the users home page and similar user functions.&lt;br /&gt;
&lt;br /&gt;
    adminDispatch, changePasswd, checkList, displayForm, &lt;br /&gt;
    editComm, editHome, editKey, editMiscOpts, &lt;br /&gt;
    editTags, editUser, forceAccountVerify, getCommentListing, &lt;br /&gt;
    getError, _get_lastjournal, getMessage, getOtherUserParams, &lt;br /&gt;
    getTitle, getUserAdmin, listAbuses, listBanned, &lt;br /&gt;
    listReadOnly, mailPasswd, main, newUser, &lt;br /&gt;
    newUserForm, noUser, previewSlashbox, saveComm, &lt;br /&gt;
    saveHome, saveMiscOpts, savePasswd, saveTags, &lt;br /&gt;
    saveUser, saveUserAdmin, setToDefaults, showBookmarks, &lt;br /&gt;
    showComments, showFireHose, showInfo, showSubmissions, &lt;br /&gt;
    showTags, tildeEd, topAbusers, validateUser, &lt;br /&gt;
    &lt;br /&gt;
zoo.pl:&lt;br /&gt;
    action, check, main, people, &lt;br /&gt;
    _printHead, _rss, testSocialized, &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=PageScriptList&amp;diff=5377</id>
		<title>PageScriptList</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=PageScriptList&amp;diff=5377"/>
		<updated>2014-03-01T20:27:08Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h2&amp;gt;Scripts ('pages') in /slash/site/slashcott.org/htdocs &amp;lt;/h2&amp;gt;&lt;br /&gt;
[[CssWork]] parent&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
404.pl:&lt;br /&gt;
    main, &lt;br /&gt;
&lt;br /&gt;
admin.pl:&lt;br /&gt;
    aclEdit, aclSave, blockDelete, blockEdit, &lt;br /&gt;
    blockSave, colorEdit, colorSave, commentLog, &lt;br /&gt;
    deleteKeyword, displayMcdStats, displayPeerWeights, displayRecent, &lt;br /&gt;
    displayRecentMods, displayRecentRequests, displayRecentSubs, displayRecentWebheads, &lt;br /&gt;
    displaySignoffStats, displaySlashd, editFilter, editKeyword, &lt;br /&gt;
    editStory, extractChosenFromForm, getDescForTopicsRendered, getsiddir, &lt;br /&gt;
    getTitle, handleMediaFileForStory, importFile, importImage, &lt;br /&gt;
    importText, listFilters, listStories, main, &lt;br /&gt;
    moderate, pageEdit, rmStory, saveKeyword, &lt;br /&gt;
    saveStory, showStaticFiles, siteInfo, templateDelete, &lt;br /&gt;
    templateEdit, templateSave, topicDelete, topicEdit, &lt;br /&gt;
    topicExtrasEdit, topicSave, topicTree, updateStory, &lt;br /&gt;
    updateTopicNexusExtras, varEdit, varSave, &lt;br /&gt;
&lt;br /&gt;
ajax.pl:&lt;br /&gt;
    default, editPreview, editReset, editSave, &lt;br /&gt;
    fetchComments, getModalPrefs, getModalPrefsAnon, getModalPrefsAnonHC, &lt;br /&gt;
    getOps, getSectionPrefsHTML, main, previewReply, &lt;br /&gt;
    readRest, replyForm, saveModalPrefs, saveModalPrefsAnon, &lt;br /&gt;
    saveModalPrefsAnonHC, setModalUpdates, setSectionNexusPrefs, submitReply, &lt;br /&gt;
    updateD2prefs, &lt;br /&gt;
&lt;br /&gt;
article.pl:&lt;br /&gt;
    main, &lt;br /&gt;
&lt;br /&gt;
authors.pl:&lt;br /&gt;
    main, &lt;br /&gt;
&lt;br /&gt;
badge.pl:&lt;br /&gt;
    display, forward, main, vote, &lt;br /&gt;
    &lt;br /&gt;
blob.pl:&lt;br /&gt;
    main, &lt;br /&gt;
&lt;br /&gt;
comments.pl:&lt;br /&gt;
    _buildargs, delete, deleteThread, displayComments, &lt;br /&gt;
    editComment, main, metamod_elig, metamod_if_necessary, &lt;br /&gt;
    moderate, previewForm, submitComment, &lt;br /&gt;
&lt;br /&gt;
edit.pl:&lt;br /&gt;
    cancel, edit, main, preview, &lt;br /&gt;
    save, start, &lt;br /&gt;
&lt;br /&gt;
fileadmin.pl:&lt;br /&gt;
    addFileForStory, editBySid, editFile, listAll, &lt;br /&gt;
    listFilesForStories, main, &lt;br /&gt;
&lt;br /&gt;
help.pl:&lt;br /&gt;
    display_help, main, &lt;br /&gt;
&lt;br /&gt;
hof.pl:&lt;br /&gt;
    main, &lt;br /&gt;
&lt;br /&gt;
imgupload.pl:&lt;br /&gt;
    main, receive_upload, &lt;br /&gt;
&lt;br /&gt;
index.pl:&lt;br /&gt;
    displayStories, dnBid, do_rss, getDispModeForStory, &lt;br /&gt;
    getDispModesForStories, getSidFromRemark, main, redirect_home_if_necessary, &lt;br /&gt;
    rmBid, saveUserBoxes, upBid, &lt;br /&gt;
&lt;br /&gt;
journal.pl:&lt;br /&gt;
    add_entry, articleMeta, _checkTheme, delete_entry, &lt;br /&gt;
    displayArticle, displayArticleFriends, displayFriends, displayRSS, &lt;br /&gt;
    displayTop, displayTopRSS, doEditArticle, doSaveArticle, &lt;br /&gt;
    editArticle, editPrefs, get_entries, get_entry, &lt;br /&gt;
    get_uid_from_nickname, listArticle, main, modify_entry, &lt;br /&gt;
    _printHead, removeArticle, saveArticle, _save_params, &lt;br /&gt;
    searchUsers, setPrefs, &lt;br /&gt;
&lt;br /&gt;
login.pl:&lt;br /&gt;
    allowOpenID, changePrefs, claimOpenID, deleteOpenID, &lt;br /&gt;
    getOtherUserParams, loginForm, mailPasswd, mailPasswdForm, &lt;br /&gt;
    main, newUser, newUserForm, printOpenID, &lt;br /&gt;
    savePrefs, _sendMailPasswd, _validFormkey, verifyOpenID, &lt;br /&gt;
    &lt;br /&gt;
messages.pl:&lt;br /&gt;
    delete_message, delete_messages, display_message, display_prefs, &lt;br /&gt;
    edit_message, list_messages, list_messages_rss, main, &lt;br /&gt;
    save_prefs, send_message, &lt;br /&gt;
&lt;br /&gt;
metamod.pl:&lt;br /&gt;
    displayTheComments, main, &lt;br /&gt;
&lt;br /&gt;
pollBooth.pl:&lt;br /&gt;
    default, deletepolls, detachpoll, editpoll, &lt;br /&gt;
    link_story_to_poll, listpolls, main, poll_booth, &lt;br /&gt;
    savepoll, vote, &lt;br /&gt;
&lt;br /&gt;
preferences.pl:&lt;br /&gt;
    display_prefs, main, &lt;br /&gt;
&lt;br /&gt;
print.pl:&lt;br /&gt;
    get_content, main, &lt;br /&gt;
&lt;br /&gt;
pubkey.pl:&lt;br /&gt;
    main, &lt;br /&gt;
&lt;br /&gt;
search.pl:&lt;br /&gt;
    _authors, _buildargs, commentSearch, commentSearchRSS, &lt;br /&gt;
    journalSearch, journalSearchRSS, main, pollSearch, &lt;br /&gt;
    pollSearchRSS, rssSearch, rssSearchRSS, _shorten, &lt;br /&gt;
    _skins, _sort, storySearch, storySearchRSS, &lt;br /&gt;
    submissionSearch, submissionSearchRSS, _topics, userSearch, &lt;br /&gt;
    userSearchRSS, &lt;br /&gt;
&lt;br /&gt;
shtml.pl:&lt;br /&gt;
    getFileText, getRequestedFileAndType, main, parse, &lt;br /&gt;
    replace_footer, replace_header, &lt;br /&gt;
&lt;br /&gt;
stats.pl:&lt;br /&gt;
    csv, _get_graph_data, _get_graph_id, _get_skins, &lt;br /&gt;
    graph, list, main, report, &lt;br /&gt;
    _set_legend, table, topics, &lt;br /&gt;
&lt;br /&gt;
submit.pl:&lt;br /&gt;
    blankForm, changeSubmission, deleteSubmissions, displayForm, &lt;br /&gt;
    displayRSS, genChosenHashrefForTopics, getSubmissionSelections, main, &lt;br /&gt;
    mergeSubmissions, previewForm, previewStory, saveSub, &lt;br /&gt;
    submissionEd, updateSubmissions, yourPendingSubmissions, &lt;br /&gt;
&lt;br /&gt;
topics.pl:&lt;br /&gt;
    hierarchy, listTopics, main, &lt;br /&gt;
&lt;br /&gt;
users2.pl:&lt;br /&gt;
    adminDispatch, checkList, displayForm, editKey, &lt;br /&gt;
    editMiscOpts, editUser, forceAccountVerify, getCommentListing, &lt;br /&gt;
    getError, _get_lastjournal, getMessage, getOtherUserParams, &lt;br /&gt;
    getTitle, getUserAdmin, listAbuses, listBanned, &lt;br /&gt;
    listReadOnly, mailPasswd, main, newUser, &lt;br /&gt;
    newUserForm, noUser, previewSlashbox, saveMiscOpts, &lt;br /&gt;
    saveUser, saveUserAdmin, setToDefaults, showFireHose, &lt;br /&gt;
    showInfo, tildeEd, topAbusers, validateUser, &lt;br /&gt;
    &lt;br /&gt;
users.pl:&lt;br /&gt;
    adminDispatch, changePasswd, checkList, displayForm, &lt;br /&gt;
    editComm, editHome, editKey, editMiscOpts, &lt;br /&gt;
    editTags, editUser, forceAccountVerify, getCommentListing, &lt;br /&gt;
    getError, _get_lastjournal, getMessage, getOtherUserParams, &lt;br /&gt;
    getTitle, getUserAdmin, listAbuses, listBanned, &lt;br /&gt;
    listReadOnly, mailPasswd, main, newUser, &lt;br /&gt;
    newUserForm, noUser, previewSlashbox, saveComm, &lt;br /&gt;
    saveHome, saveMiscOpts, savePasswd, saveTags, &lt;br /&gt;
    saveUser, saveUserAdmin, setToDefaults, showBookmarks, &lt;br /&gt;
    showComments, showFireHose, showInfo, showSubmissions, &lt;br /&gt;
    showTags, tildeEd, topAbusers, validateUser, &lt;br /&gt;
    &lt;br /&gt;
zoo.pl:&lt;br /&gt;
    action, check, main, people, &lt;br /&gt;
    _printHead, _rss, testSocialized, &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=PageScriptList&amp;diff=5376</id>
		<title>PageScriptList</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=PageScriptList&amp;diff=5376"/>
		<updated>2014-03-01T20:19:43Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: Created page with &amp;quot;&amp;lt;h2&amp;gt;Scripts ('pages') in /slash/site/slashcott.org/htdocs &amp;lt;/h2&amp;gt;  &amp;lt;pre&amp;gt; 404.pl:     main,   admin.pl:     aclEdit, aclSave, blockDelete, blockEdit,      blockSave, colorEdit, c...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h2&amp;gt;Scripts ('pages') in /slash/site/slashcott.org/htdocs &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
404.pl:&lt;br /&gt;
    main, &lt;br /&gt;
&lt;br /&gt;
admin.pl:&lt;br /&gt;
    aclEdit, aclSave, blockDelete, blockEdit, &lt;br /&gt;
    blockSave, colorEdit, colorSave, commentLog, &lt;br /&gt;
    deleteKeyword, displayMcdStats, displayPeerWeights, displayRecent, &lt;br /&gt;
    displayRecentMods, displayRecentRequests, displayRecentSubs, displayRecentWebheads, &lt;br /&gt;
    displaySignoffStats, displaySlashd, editFilter, editKeyword, &lt;br /&gt;
    editStory, extractChosenFromForm, getDescForTopicsRendered, getsiddir, &lt;br /&gt;
    getTitle, handleMediaFileForStory, importFile, importImage, &lt;br /&gt;
    importText, listFilters, listStories, main, &lt;br /&gt;
    moderate, pageEdit, rmStory, saveKeyword, &lt;br /&gt;
    saveStory, showStaticFiles, siteInfo, templateDelete, &lt;br /&gt;
    templateEdit, templateSave, topicDelete, topicEdit, &lt;br /&gt;
    topicExtrasEdit, topicSave, topicTree, updateStory, &lt;br /&gt;
    updateTopicNexusExtras, varEdit, varSave, &lt;br /&gt;
&lt;br /&gt;
ajax.pl:&lt;br /&gt;
    default, editPreview, editReset, editSave, &lt;br /&gt;
    fetchComments, getModalPrefs, getModalPrefsAnon, getModalPrefsAnonHC, &lt;br /&gt;
    getOps, getSectionPrefsHTML, main, previewReply, &lt;br /&gt;
    readRest, replyForm, saveModalPrefs, saveModalPrefsAnon, &lt;br /&gt;
    saveModalPrefsAnonHC, setModalUpdates, setSectionNexusPrefs, submitReply, &lt;br /&gt;
    updateD2prefs, &lt;br /&gt;
&lt;br /&gt;
article.pl:&lt;br /&gt;
    main, &lt;br /&gt;
&lt;br /&gt;
authors.pl:&lt;br /&gt;
    main, &lt;br /&gt;
&lt;br /&gt;
badge.pl:&lt;br /&gt;
    display, forward, main, vote, &lt;br /&gt;
    &lt;br /&gt;
blob.pl:&lt;br /&gt;
    main, &lt;br /&gt;
&lt;br /&gt;
comments.pl:&lt;br /&gt;
    _buildargs, delete, deleteThread, displayComments, &lt;br /&gt;
    editComment, main, metamod_elig, metamod_if_necessary, &lt;br /&gt;
    moderate, previewForm, submitComment, &lt;br /&gt;
&lt;br /&gt;
edit.pl:&lt;br /&gt;
    cancel, edit, main, preview, &lt;br /&gt;
    save, start, &lt;br /&gt;
&lt;br /&gt;
fileadmin.pl:&lt;br /&gt;
    addFileForStory, editBySid, editFile, listAll, &lt;br /&gt;
    listFilesForStories, main, &lt;br /&gt;
&lt;br /&gt;
help.pl:&lt;br /&gt;
    display_help, main, &lt;br /&gt;
&lt;br /&gt;
hof.pl:&lt;br /&gt;
    main, &lt;br /&gt;
&lt;br /&gt;
imgupload.pl:&lt;br /&gt;
    main, receive_upload, &lt;br /&gt;
&lt;br /&gt;
index.pl:&lt;br /&gt;
    displayStories, dnBid, do_rss, getDispModeForStory, &lt;br /&gt;
    getDispModesForStories, getSidFromRemark, main, redirect_home_if_necessary, &lt;br /&gt;
    rmBid, saveUserBoxes, upBid, &lt;br /&gt;
&lt;br /&gt;
journal.pl:&lt;br /&gt;
    add_entry, articleMeta, _checkTheme, delete_entry, &lt;br /&gt;
    displayArticle, displayArticleFriends, displayFriends, displayRSS, &lt;br /&gt;
    displayTop, displayTopRSS, doEditArticle, doSaveArticle, &lt;br /&gt;
    editArticle, editPrefs, get_entries, get_entry, &lt;br /&gt;
    get_uid_from_nickname, listArticle, main, modify_entry, &lt;br /&gt;
    _printHead, removeArticle, saveArticle, _save_params, &lt;br /&gt;
    searchUsers, setPrefs, &lt;br /&gt;
&lt;br /&gt;
login.pl:&lt;br /&gt;
    allowOpenID, changePrefs, claimOpenID, deleteOpenID, &lt;br /&gt;
    getOtherUserParams, loginForm, mailPasswd, mailPasswdForm, &lt;br /&gt;
    main, newUser, newUserForm, printOpenID, &lt;br /&gt;
    savePrefs, _sendMailPasswd, _validFormkey, verifyOpenID, &lt;br /&gt;
    &lt;br /&gt;
messages.pl:&lt;br /&gt;
    delete_message, delete_messages, display_message, display_prefs, &lt;br /&gt;
    edit_message, list_messages, list_messages_rss, main, &lt;br /&gt;
    save_prefs, send_message, &lt;br /&gt;
&lt;br /&gt;
metamod.pl:&lt;br /&gt;
    displayTheComments, main, &lt;br /&gt;
&lt;br /&gt;
pollBooth.pl:&lt;br /&gt;
    default, deletepolls, detachpoll, editpoll, &lt;br /&gt;
    link_story_to_poll, listpolls, main, poll_booth, &lt;br /&gt;
    savepoll, vote, &lt;br /&gt;
&lt;br /&gt;
preferences.pl:&lt;br /&gt;
    display_prefs, main, &lt;br /&gt;
&lt;br /&gt;
print.pl:&lt;br /&gt;
    get_content, main, &lt;br /&gt;
&lt;br /&gt;
pubkey.pl:&lt;br /&gt;
    main, &lt;br /&gt;
&lt;br /&gt;
search.pl:&lt;br /&gt;
    _authors, _buildargs, commentSearch, commentSearchRSS, &lt;br /&gt;
    journalSearch, journalSearchRSS, main, pollSearch, &lt;br /&gt;
    pollSearchRSS, rssSearch, rssSearchRSS, _shorten, &lt;br /&gt;
    _skins, _sort, storySearch, storySearchRSS, &lt;br /&gt;
    submissionSearch, submissionSearchRSS, _topics, userSearch, &lt;br /&gt;
    userSearchRSS, &lt;br /&gt;
&lt;br /&gt;
shtml.pl:&lt;br /&gt;
    getFileText, getRequestedFileAndType, main, parse, &lt;br /&gt;
    replace_footer, replace_header, &lt;br /&gt;
&lt;br /&gt;
stats.pl:&lt;br /&gt;
    csv, _get_graph_data, _get_graph_id, _get_skins, &lt;br /&gt;
    graph, list, main, report, &lt;br /&gt;
    _set_legend, table, topics, &lt;br /&gt;
&lt;br /&gt;
submit.pl:&lt;br /&gt;
    blankForm, changeSubmission, deleteSubmissions, displayForm, &lt;br /&gt;
    displayRSS, genChosenHashrefForTopics, getSubmissionSelections, main, &lt;br /&gt;
    mergeSubmissions, previewForm, previewStory, saveSub, &lt;br /&gt;
    submissionEd, updateSubmissions, yourPendingSubmissions, &lt;br /&gt;
&lt;br /&gt;
topics.pl:&lt;br /&gt;
    hierarchy, listTopics, main, &lt;br /&gt;
&lt;br /&gt;
users2.pl:&lt;br /&gt;
    adminDispatch, checkList, displayForm, editKey, &lt;br /&gt;
    editMiscOpts, editUser, forceAccountVerify, getCommentListing, &lt;br /&gt;
    getError, _get_lastjournal, getMessage, getOtherUserParams, &lt;br /&gt;
    getTitle, getUserAdmin, listAbuses, listBanned, &lt;br /&gt;
    listReadOnly, mailPasswd, main, newUser, &lt;br /&gt;
    newUserForm, noUser, previewSlashbox, saveMiscOpts, &lt;br /&gt;
    saveUser, saveUserAdmin, setToDefaults, showFireHose, &lt;br /&gt;
    showInfo, tildeEd, topAbusers, validateUser, &lt;br /&gt;
    &lt;br /&gt;
users.pl:&lt;br /&gt;
    adminDispatch, changePasswd, checkList, displayForm, &lt;br /&gt;
    editComm, editHome, editKey, editMiscOpts, &lt;br /&gt;
    editTags, editUser, forceAccountVerify, getCommentListing, &lt;br /&gt;
    getError, _get_lastjournal, getMessage, getOtherUserParams, &lt;br /&gt;
    getTitle, getUserAdmin, listAbuses, listBanned, &lt;br /&gt;
    listReadOnly, mailPasswd, main, newUser, &lt;br /&gt;
    newUserForm, noUser, previewSlashbox, saveComm, &lt;br /&gt;
    saveHome, saveMiscOpts, savePasswd, saveTags, &lt;br /&gt;
    saveUser, saveUserAdmin, setToDefaults, showBookmarks, &lt;br /&gt;
    showComments, showFireHose, showInfo, showSubmissions, &lt;br /&gt;
    showTags, tildeEd, topAbusers, validateUser, &lt;br /&gt;
    &lt;br /&gt;
zoo.pl:&lt;br /&gt;
    action, check, main, people, &lt;br /&gt;
    _printHead, _rss, testSocialized, &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=Historic:CssWork&amp;diff=5375</id>
		<title>Historic:CssWork</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=Historic:CssWork&amp;diff=5375"/>
		<updated>2014-03-01T20:13:20Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h2&amp;gt;Related pages  &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Official docs&lt;br /&gt;
** [[InstallDoc]] - original INSTALL document&lt;br /&gt;
** [[SlashGuide]] - this is the guide (from htdocs) you are supposed to read immediately after installing slashcode&lt;br /&gt;
** [[SectionTopics]] - This is the 'new' sections and topics rewrite and is more important to read than it first appears, explains what a skin is. Sort of.&lt;br /&gt;
** [[SlashChart]] Png chart of slashcode organization&lt;br /&gt;
** [[SlashManPages]] Man pages available by typing man PAGENAME&lt;br /&gt;
** [[TemplateManPages]] Man pages for the template library used to deliver the html&lt;br /&gt;
&lt;br /&gt;
* [[SlashHelperProgramsInBin]] - provided admin helpers in slash/bin&lt;br /&gt;
* [[SlashGlossary]] Glossary of terms used in Slash code&lt;br /&gt;
* [[FileLocations]] Locations of important files on disk. Has Main Libraries called by all routines&lt;br /&gt;
* [[FileLocations2]] Locations of files on disk continued. This is the stuff in local/slash.&lt;br /&gt;
* [[FileLocations3]] Locations of files on disk continued. This is the stuff in /usr/local/share/perl5/Slash/&lt;br /&gt;
* [[FileLocationsMisc]] Has Apache, Man pages,... &lt;br /&gt;
* [[SqlSchema]] - tables used in the database&lt;br /&gt;
* [[SqlDefaults]] - defaults for those tables&lt;br /&gt;
* [[PageScriptList]] - scripts (= 'pages') in /slash/site/slashcott.org/htdocs with routines listed&lt;br /&gt;
* [[PerlModuleDisplay]] - this is what actually sends a single template out to the broswer (through Apache)&lt;br /&gt;
* [[PerlModuleUsers]] - this is what handles the users home page and similar user functions.&lt;br /&gt;
&lt;br /&gt;
* [[AvailableThemes]] and how they are organized &lt;br /&gt;
* [[ThemesAnatomy]] Overview - &amp;quot;A theme is a website design.&amp;quot; (includes HOWTO-THemes doc)&lt;br /&gt;
** [[TemplateAnatomy]] - All html in these. &amp;quot;parsed by Perl Template Toolkit&amp;quot; (HOWTO-Templates)&lt;br /&gt;
***  [[TemplateTutorialWeb]] - man page&lt;br /&gt;
*** [[TemplateManualDirective]] - man page, has all the keywords used by template library&lt;br /&gt;
*** [[ThePartsOfTemplateLibraryActuallyUsedInSlashCode]] - knowing this can save time reading docs&lt;br /&gt;
*** [[TemplateLists]] - lists of the template in our Theme, some descriptions fm src&lt;br /&gt;
**[[TasksAnatomy]] -&lt;br /&gt;
&lt;br /&gt;
* [[TagboxesAnatomy]] - I don't realy know what these are yet. But there are a lot of them ;-)&lt;br /&gt;
* [[PluginsAnatomy]] - (HOWTO-plugins)&lt;br /&gt;
&lt;br /&gt;
* [[ChangelogForCss]] - Put final finished change here &lt;br /&gt;
* [[HowSlashCssWorks]] Overview&lt;br /&gt;
* [[CssFilesUsedEachPage]] Which css files are used on different pages&lt;br /&gt;
&lt;br /&gt;
* [[http://dev.soylentnews.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=soylentnews/soylentnews.git;a=tree;f=themes;hb=refs/heads/master]] git - themes&lt;br /&gt;
&lt;br /&gt;
http://www.mediawiki.org/wiki/Help:Images&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Unanswered Questions&amp;lt;/h2&amp;gt;&lt;br /&gt;
* The templates are individually output by routine slashDisplay(), but how is the order of delivery determined, and how does one insure a new template goes to the right place on the page?&lt;br /&gt;
* The users home page link goes to /my/homepage. I can find no apache redirect for this nor is there a 'my' folder anywhere. I am guessing this is done in the apache perl module, through some redirects that hook into Apache innards. It is hard to be sure what script is actually being called first. I am assuming it is users. Once an edit is made, you are in /users.pl without /my/&lt;br /&gt;
* Two users scripts, users,users2 Am guesssing users2 is for the d2 interface we are not using, since the forms on the page call users.pl&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Got tired of scrolling through pages of perl code just to see what subs were in a module&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So wrote this, now in /usr/local/sbin/listsubs.sh:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[root@slashcode Slash]# listsubs.sh Admin.pm&lt;br /&gt;
Admin.pm:&lt;br /&gt;
    addSpriteForSid, ajax_authorbox, ajax_learnword, ajax_neverdisplay, &lt;br /&gt;
    ajax_perfbox, ajax_signoff, ajax_signoffbox, ajax_slashdbox, &lt;br /&gt;
    ajax_storyadminbox, ajax_sub_memory, DESTROY, extractRelatedStoriesFromForm, &lt;br /&gt;
    findTheTime, getAccesslogAbusersByID, getAccesslogMaxID, get_ispell_comments, &lt;br /&gt;
    getRecentSubs, getRecentWebheads, getRelated, getSignoffData, &lt;br /&gt;
    getStorySignoffs, getStoryThumbLargeLink, grantStoryPostingAchievements, otherLinks, &lt;br /&gt;
    relatedLinks, showAdminTodo, showAuthorActivityBox, showPerformanceBox, &lt;br /&gt;
    showSignoffBox, showSlashdBox, showStoryAdminBox, write_to_temp_file, &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also will work from a list, as in&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ls *.pm &amp;gt; list.tst&lt;br /&gt;
listsubs.sh &amp;lt; list.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Maybe someone else will find it useful as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Order css files are loaded when simple switch on user prefs page is selected viewing main page main page&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* base.css?T_2_5_0_272 The numbers are the slash verion number (from one of the docs).&lt;br /&gt;
* slashcode.css?T_2_5__0_272&lt;br /&gt;
* slashcode_lite.css?T_2_5__0_272&lt;br /&gt;
* slashcode_lite.css?T_2_5__0_272 (appears to be loading this twice,why?)&lt;br /&gt;
* print.cssT_2_5__0_272&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow a page link from the main page to an individual article page &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Link: http://soylentnews.org/article.pl?sid=14/02/18/0336229&lt;br /&gt;
* article.pl is foind in slash/themes/slashcode/htdocs/article.pl So 'slashcode' is treated as a theme.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;article.pl&amp;lt;/h2&amp;gt;&lt;br /&gt;
The stuff of interest to us&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
use Slash;  -------- located in /local/lib64/perl5/slash.pm&lt;br /&gt;
use Slash::Display;     &lt;br /&gt;
use Slash::Utility;&lt;br /&gt;
&lt;br /&gt;
sub main {&lt;br /&gt;
        my $slashdb   = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user      = getCurrentUser();&lt;br /&gt;
        my $form      = getCurrentForm();&lt;br /&gt;
        my $gSkin     = getCurrentSkin();&lt;br /&gt;
         &lt;br /&gt;
        my $story;&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
                # Make sure the reader is viewing this story in the&lt;br /&gt;
                # proper skin.&lt;br /&gt;
                my $cur_skid = determineCurrentSkin();&lt;br /&gt;
                if ($story-&amp;gt;{primaryskid} != $cur_skid) {&lt;br /&gt;
                        my $cur_skin = $reader-&amp;gt;getSkin($cur_skid);&lt;br /&gt;
                        my $story_skin = $reader-&amp;gt;getSkin($story-&amp;gt;{primaryskid});&lt;br /&gt;
                        if ($story_skin &amp;amp;&amp;amp; $story_skin-&amp;gt;{rootdir}&lt;br /&gt;
                                &amp;amp;&amp;amp; $story_skin-&amp;gt;{rootdir} ne $cur_skin-&amp;gt;{rootdir})$&lt;br /&gt;
                                redirect(&amp;quot;$story_skin-&amp;gt;{rootdir}$ENV{REQUEST_URI}&amp;quot;$&lt;br /&gt;
                                return;&lt;br /&gt;
&lt;br /&gt;
               # XXXSECTIONTOPICS this needs to be updated&lt;br /&gt;
                my $SECT = $reader-&amp;gt;getSection($story-&amp;gt;{section});&lt;br /&gt;
                # This should be a getData call for title&lt;br /&gt;
                my $title = &amp;quot;$constants-&amp;gt;{sitename} | $story-&amp;gt;{title}&amp;quot;;&lt;br /&gt;
                if ($gSkin-&amp;gt;{name} &amp;amp;&amp;amp; $gSkin-&amp;gt;{name} eq &amp;quot;idle&amp;quot;) {&lt;br /&gt;
                        $title = &amp;quot;$gSkin-&amp;gt;{hostname} | $story-&amp;gt;{title}&amp;quot;;&lt;br /&gt;
                &lt;br /&gt;
if (my $pollbooth_db = getObject('Slash::PollBooth')) {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
slashDisplay('display', {&lt;br /&gt;
                        poll                    =&amp;gt; $pollbooth,&lt;br /&gt;
                        section                 =&amp;gt; $SECT,&lt;br /&gt;
                        section_block           =&amp;gt; $reader-&amp;gt;getBlock($SECT-&amp;gt;{secti$&lt;br /&gt;
                        show_poll               =&amp;gt; $pollbooth ? 1 : 0,&lt;br /&gt;
                        story                   =&amp;gt; $story,&lt;br /&gt;
                        stories                 =&amp;gt; \%stories,&lt;br /&gt;
                });&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
               my $called_pc = 0;&lt;br /&gt;
                if ($story-&amp;gt;{discussion}) {&lt;br /&gt;
                        # Still not happy with this logic -Brian&lt;br /&gt;
                        my $discussion = $reader-&amp;gt;getDiscussion($story-&amp;gt;{discussio$&lt;br /&gt;
&lt;br /&gt;
                        }&lt;br /&gt;
                        # If no comments ever have existed and commentstatus is di$&lt;br /&gt;
                        # just skip the display of the comment header bar -Brian&lt;br /&gt;
&lt;br /&gt;
                               &amp;amp;&amp;amp;  $discussion-&amp;gt;{commentstatus} eq 'disabled'&lt;br /&gt;
                        )) {&lt;br /&gt;
                                printComments($discussion);&lt;br /&gt;
                                $called_pc = 1;&lt;br /&gt;
                        }&lt;br /&gt;
                 if (!$called_pc &amp;amp;&amp;amp; $form-&amp;gt;{ssi} &amp;amp;&amp;amp; $form-&amp;gt;{ssi} eq 'yes' &amp;amp;&amp;amp; $form-$&lt;br /&gt;
                        # This is a real hack, we're kind of skipping down&lt;br /&gt;
                        # two levels of code.  But the cchp printing is an&lt;br /&gt;
                        # important optimization;  we avoid having to do&lt;br /&gt;
                        # multiple expensive comment selects.  One problem&lt;br /&gt;
                        # is that if there's no discussion with a story,&lt;br /&gt;
                        # printComments() doesn't get called, which means&lt;br /&gt;
                        # selectComments() doesn't get called, which means&lt;br /&gt;
                        # the cchp file won't be written.  If article.pl&lt;br /&gt;
                       # is being called by slashd, and we need to write&lt;br /&gt;
                        # that file, then here's where we print an empty&lt;br /&gt;
                        # file that will satisfy slashd. - Jamie&lt;br /&gt;
&lt;br /&gt;
                        Slash::Utility::Comments::_print_cchp({ stoid =&amp;gt; &amp;quot;dummy&amp;quot; }$&lt;br /&gt;
                }&lt;br /&gt;
        } else {&lt;br /&gt;
                header('Error', $form-&amp;gt;{section}) or return;&lt;br /&gt;
       &lt;br /&gt;
       my $plugins = $slashdb-&amp;gt;getDescriptions('plugins');&lt;br /&gt;
        if (!$user-&amp;gt;{is_anon} &amp;amp;&amp;amp; $plugins-&amp;gt;{Tags} &amp;amp;&amp;amp; $story) {&lt;br /&gt;
                my $tagsdb = getObject('Slash::Tags');&lt;br /&gt;
                $tagsdb-&amp;gt;markViewed($user-&amp;gt;{uid},&lt;br /&gt;
                        $reader-&amp;gt;getGlobjidCreate('stories', $story-&amp;gt;{stoid}));&lt;br /&gt;
        }&lt;br /&gt;
                        &lt;br /&gt;
        footer();&lt;br /&gt;
        if ($story) {&lt;br /&gt;
                writeLog($story-&amp;gt;{sid} || $sid);&lt;br /&gt;
        } else { &lt;br /&gt;
                writeLog($sid);&lt;br /&gt;
&lt;br /&gt;
               &lt;br /&gt;
createEnvironment();&lt;br /&gt;
main();  &lt;br /&gt;
1; &lt;br /&gt;
&lt;br /&gt;
(EOF)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Slash/DB/MySQL/MySQL.pm&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
479 sub getCSS {&lt;br /&gt;
480         my($self, $layout) = @_;&lt;br /&gt;
481         my $user = getCurrentUser();&lt;br /&gt;
482         my $page = $user-&amp;gt;{currentPage};&lt;br /&gt;
483         my $skin = getCurrentSkin('name');&lt;br /&gt;
484         my $admin = $user-&amp;gt;{is_admin};&lt;br /&gt;
485         my $theme = ($user-&amp;gt;{simpledesign} || $user-&amp;gt;{pda}) ? &amp;quot;light&amp;quot; : $user-&amp;gt;{css_theme};&lt;br /&gt;
486         my $secure = apacheConnectionSSL();&lt;br /&gt;
487         $layout ||= '';&lt;br /&gt;
488         my $constants = getCurrentStatic();&lt;br /&gt;
489&lt;br /&gt;
490         my $expire_time = $constants-&amp;gt;{css_expire} || 3600;&lt;br /&gt;
491         $expire_time += int(rand(60)) if $expire_time;&lt;br /&gt;
492         _genericCacheRefresh($self, 'css', $expire_time);&lt;br /&gt;
493         _genericCacheRefresh($self, 'css_pages', $expire_time);&lt;br /&gt;
494         _genericCacheRefresh($self, 'css_skins', $expire_time);&lt;br /&gt;
495         _genericCacheRefresh($self, 'css_themes', $expire_time);&lt;br /&gt;
496&lt;br /&gt;
497         my $css_ref             = $self-&amp;gt;{_css_cache} ||= {};&lt;br /&gt;
498         my $css_pages_ref       = $self-&amp;gt;{_css_pages_cache};&lt;br /&gt;
499         my $css_skins_ref       = $self-&amp;gt;{_css_skins_cache};&lt;br /&gt;
500         my $css_themes_ref      = $self-&amp;gt;{_css_themes_cache};&lt;br /&gt;
501         my $css_layouts_ref     = $self-&amp;gt;{_css_layouts_cache};&lt;br /&gt;
502&lt;br /&gt;
503         $css_pages_ref = $self-&amp;gt;getCSSValuesHashForCol('page') if !$css_pages_ref;&lt;br /&gt;
504         $css_skins_ref = $self-&amp;gt;getCSSValuesHashForCol('skin') if !$css_skins_ref;&lt;br /&gt;
505         $css_themes_ref = $self-&amp;gt;getCSSValuesHashForCol('theme') if !$css_themes_ref;&lt;br /&gt;
506         $css_layouts_ref = $self-&amp;gt;getCSSValuesHashForCol('layout') if !$css_layouts_ref;&lt;br /&gt;
507&lt;br /&gt;
508         my $lowbandwidth = ($user-&amp;gt;{lowbandwidth} || $user-&amp;gt;{pda}) ? &amp;quot;yes&amp;quot; : &amp;quot;no&amp;quot;;&lt;br /&gt;
509&lt;br /&gt;
510         $page   = '' if !$css_pages_ref-&amp;gt;{$page};&lt;br /&gt;
511         $skin   = '' if !$css_skins_ref-&amp;gt;{$skin};&lt;br /&gt;
512         $theme  = '' if !$css_themes_ref-&amp;gt;{$theme};&lt;br /&gt;
513         $layout = '' if !$css_layouts_ref-&amp;gt;{$layout};&lt;br /&gt;
514&lt;br /&gt;
515         return $css_ref-&amp;gt;{$skin}{$page}{$admin}{$theme}{$lowbandwidth}{$layout}{$secure}&lt;br /&gt;
516                 if exists $css_ref-&amp;gt;{$skin}{$page}{$admin}{$theme}{$lowbandwidth}{$layout}{$secure};&lt;br /&gt;
517&lt;br /&gt;
518         my @clauses;&lt;br /&gt;
519&lt;br /&gt;
520         my $page_q = $self-&amp;gt;sqlQuote($page);&lt;br /&gt;
521         my $page_in = $page ? &amp;quot;(page = '' or page = $page_q)&amp;quot; : &amp;quot;page = ''&amp;quot;;&lt;br /&gt;
522         push @clauses, $page_in;&lt;br /&gt;
523&lt;br /&gt;
524         my $skin_in = $skin ? &amp;quot;(skin = '' or skin = '$skin')&amp;quot; : &amp;quot;skin = ''&amp;quot;;&lt;br /&gt;
525         push @clauses, $skin_in;&lt;br /&gt;
526&lt;br /&gt;
527         push @clauses, &amp;quot;admin='no'&amp;quot; if !$admin;&lt;br /&gt;
528&lt;br /&gt;
529         my $theme_q  = $self-&amp;gt;sqlQuote($theme);&lt;br /&gt;
530         my $theme_in = $theme ? &amp;quot;(theme='' or theme=$theme_q)&amp;quot; : &amp;quot;theme=''&amp;quot;;&lt;br /&gt;
531         push @clauses, $theme_in;&lt;br /&gt;
532&lt;br /&gt;
533         push @clauses, &amp;quot;lowbandwidth='$lowbandwidth'&amp;quot; if $lowbandwidth eq &amp;quot;no&amp;quot;;&lt;br /&gt;
534&lt;br /&gt;
535         my $layout_q = $self-&amp;gt;sqlQuote($layout);&lt;br /&gt;
536         push @clauses, &amp;quot;layout=$layout_q&amp;quot;;&lt;br /&gt;
537&lt;br /&gt;
538         my $where = &amp;quot;css.ctid=css_type.ctid AND &amp;quot;;&lt;br /&gt;
539         $where .= join ' AND ', @clauses;&lt;br /&gt;
540&lt;br /&gt;
541         my $css = $self-&amp;gt;sqlSelectAllHashrefArray(&amp;quot;rel,type,media,file,title,ie_cond,skin&amp;quot;,&lt;br /&gt;
542                 &amp;quot;css, css_type&amp;quot;, $where, &amp;quot;ORDER BY css_type.ordernum, css.ordernum&amp;quot;);&lt;br /&gt;
543         if ($secure) {&lt;br /&gt;
544                 for my $hr (@$css) { $hr-&amp;gt;{file} =~ s/\.css/.ssl.css/ }&lt;br /&gt;
545         }&lt;br /&gt;
546         &lt;br /&gt;
547         $css_ref-&amp;gt;{$skin}{$page}{$admin}{$theme}{$lowbandwidth}{$layout}{$secure} = $css;&lt;br /&gt;
548         return $css;&lt;br /&gt;
549 }&lt;br /&gt;
550 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Slash/Apache/User/User.pm&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
548 {&lt;br /&gt;
549 my %ops_my = (&lt;br /&gt;
550         inbox           =&amp;gt; { args =&amp;gt; 'op=list', uri =&amp;gt; 'messages.pl' },&lt;br /&gt;
551         # XXX change messages to be same as /inbox, move this to /my/preferences/messages&lt;br /&gt;
552         messages        =&amp;gt; { args =&amp;gt; 'op=display_prefs', uri =&amp;gt; 'messages.pl' },&lt;br /&gt;
553         comments        =&amp;gt; { args =&amp;gt; 'op=editcomm' },&lt;br /&gt;
554         homepage        =&amp;gt; { args =&amp;gt; 'op=edithome' },&lt;br /&gt;
555         password        =&amp;gt; { args =&amp;gt; 'op=changeprefs', uri =&amp;gt; 'login.pl' },&lt;br /&gt;
556         logout          =&amp;gt; { args =&amp;gt; 'op=userclose', uri =&amp;gt; 'login.pl' },&lt;br /&gt;
557         misc            =&amp;gt; { args =&amp;gt; 'op=editmiscopts' },&lt;br /&gt;
558         amigos          =&amp;gt; { args =&amp;gt; 'op=friendview', uri =&amp;gt; 'journal.pl' },&lt;br /&gt;
559         bookmarks       =&amp;gt; { args =&amp;gt; 'op=showbookmarks' },&lt;br /&gt;
560         firehose        =&amp;gt; { args =&amp;gt; 'op=userfirehose' },&lt;br /&gt;
561         preferences     =&amp;gt; { args =&amp;gt; 'op=displayprefs', uri =&amp;gt; 'preferences.pl' },&lt;br /&gt;
562         tags            =&amp;gt; { args =&amp;gt; 'op=showtags' },&lt;br /&gt;
563         journal         =&amp;gt; { args =&amp;gt; 'op=list', uri =&amp;gt; 'journal.pl' },&lt;br /&gt;
564&lt;br /&gt;
565         friends         =&amp;gt; { args =&amp;gt; 'op=friends', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
566         fans            =&amp;gt; { args =&amp;gt; 'op=fans', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
567         freaks          =&amp;gt; { args =&amp;gt; 'op=freaks', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
568         foes            =&amp;gt; { args =&amp;gt; 'op=foes', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
569         zoo             =&amp;gt; { args =&amp;gt; 'op=all', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
570&lt;br /&gt;
571         default         =&amp;gt; { args =&amp;gt; 'op=edituser' }&lt;br /&gt;
572 );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;sql/mysql/defaults.sql&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 134 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','base.css','','','','no','',1,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
135 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','comments','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
136 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','article','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
137 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','print','print.css','','','','no','',5,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
138 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','admin.css','','','','yes','',1,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
139 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','pollBooth','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
140 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode_lite.css','','','','no','light',4,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
141 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','journal','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
142 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode_lite.css','','','','no','light',4,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
143 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','journal','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
144 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode.css','','','','no','',3,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
145 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','metamod','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
146 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode_low_bw.css','','','','no','',4,99, &amp;quot;&amp;quot;,&amp;quot;yes&amp;quot;);&lt;br /&gt;
147&lt;br /&gt;
148 #&lt;br /&gt;
149 # Dumping data for table 'css_type'&lt;br /&gt;
150 #&lt;br /&gt;
151 INSERT INTO css_type (ctid, name, ordernum) VALUES (1,'base',1);&lt;br /&gt;
152 INSERT INTO css_type (ctid, name, ordernum) VALUES (2,'page',2);&lt;br /&gt;
153 INSERT INTO css_type (ctid, name, ordernum) VALUES (3,'theme',3);&lt;br /&gt;
154 INSERT INTO css_type (ctid, name, ordernum) VALUES (4,'user_theme',5);&lt;br /&gt;
155 INSERT INTO css_type (ctid, name, ordernum) VALUES (5,'print',6);&lt;br /&gt;
156 INSERT INTO css_type (ctid, name, ordernum) VALUES (6,'skin',4);&lt;br /&gt;
157 INSERT INTO css_type (ctid, name, ordernum) VALUES (7,'handheld',7);&lt;br /&gt;
158 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;plugins/FireHose/mysql_dump.sql &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','firehose','no','',2,0, '');&lt;br /&gt;
==&amp;gt; INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','users','no','',2,0, '');&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','calendar.css','','','firehose','no','',2,0, '');&lt;br /&gt;
==&amp;gt; INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','users','no','',2,0, '');&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','firehose','no','',2,0, '');&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','index2','no','',2,0, ''); &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;I believe that we are not using FireHose but it was needed to make the site work.  As can be seen in the db dump above, it adds the firehose.css file to any of the user pages. Need to verify and then see if we can get the db purged of these values.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Good work. The question in my mind is why the heck css for one module has any effect *at all* on any other module. Talk about lack of localization...-AG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;I think there was some firehose slashboxes that showed up in the users pages.  They needed to be wider than the default, so they patched those pages with the firehose.css. Next step is to get a current dump of the two css tables. The important part is I know what files are for what parts of the code.  Slashcode.css is the theme css file slashcode-lite.css is the style file that is called by a user pref.  This means I need to fix comments.css to remove the theme elements I inserted and put them in the theme file.  I still need to make sure that the changes that benefited the Simplified theme stay intact. -EP&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;fonts&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
This is what I usually start with:&lt;br /&gt;
   font-family: Helvetica,Geneva,Arial,Verdana,sans-serif;&lt;br /&gt;
&lt;br /&gt;
Too many can lead to a LOT of testing being required. As can the wrong order. ;-)&lt;br /&gt;
&lt;br /&gt;
Others I have used in the past:&lt;br /&gt;
font-family: Geneva,Arial,Verdana,Helvetica,Chicago,sans-serif;&lt;br /&gt;
font-family: Helvetica,Arial,Geneva,Chicago,Verdana,sans-serif;&lt;br /&gt;
font-family: Helvetica,Geneva,Arial,Verdana,sans-serif;&lt;br /&gt;
-AG&lt;br /&gt;
&lt;br /&gt;
I have used:&lt;br /&gt;
font-family: Verdana, Geneva, &amp;quot;Bitstream Vera Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif;&lt;br /&gt;
&lt;br /&gt;
Note this has Linux fonts as well to help with these users.&lt;br /&gt;
-EP&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;User Menu&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','Logout','logout','/my/logout',1,0,10);&lt;br /&gt;
124 INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','Preferences','preferences','/users.pl?op=edituser',1,0,20);&lt;br /&gt;
125 INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','Password','password','[% constants.real_rootdir %]/my/password',1,0,40);&lt;br /&gt;
126 INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','~[% user.nickname | strip_literal %] ([% user.uid %])','me','/~[% user.nickname | fixparam %]',1,0,50);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; This code sets up the upper menu on http://slashcott.org/users.pl which is linked from your userid on the home page.  The Preferences is wrong, as it needs to be all three links: Info, Homepage, Comments.  This will allow users with low-bandwidth option set to easily get to the setting to unset low-bandwidth. -EP&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Refernces to css in the man pages in /usr/local/share/man/man3&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
grep -i css *&lt;br /&gt;
&lt;br /&gt;
HTML::CalendarMonth.3pm:.IP &amp;quot;enable_css&amp;quot; 4&lt;br /&gt;
HTML::CalendarMonth.3pm:.IX Item &amp;quot;enable_css&amp;quot;&lt;br /&gt;
HTML::CalendarMonth.3pm:Set some handy \s-1CSS\s0 class attributes on elements, enabled by default.&lt;br /&gt;
HTML::CalendarMonth.3pm:.IP &amp;quot;semantic_css&amp;quot; 4&lt;br /&gt;
HTML::CalendarMonth.3pm:.IX Item &amp;quot;semantic_css&amp;quot;&lt;br /&gt;
HTML::CalendarMonth.3pm:Sets some additional \s-1CSS\s0 class attributes on elements, disabled by&lt;br /&gt;
HTML::CalendarMonth.3pm:.IP &amp;quot;\fIdefault_css()\fR&amp;quot; 4&lt;br /&gt;
HTML::CalendarMonth.3pm:.IX Item &amp;quot;default_css()&amp;quot;&lt;br /&gt;
HTML::CalendarMonth.3pm:document in conjunction with the classes assigned to elements when css&lt;br /&gt;
HTML::ElementSuper.3pm:might be when you'd like to assign multiple \s-1CSS\s0 classes to a single&lt;br /&gt;
HTML::PopupTreeSelect.3pm:.IP &amp;quot;include_css (optional)&amp;quot; 4&lt;br /&gt;
HTML::PopupTreeSelect.3pm:.IX Item &amp;quot;include_css (optional)&amp;quot;&lt;br /&gt;
HTML::PopupTreeSelect.3pm:Set this to 0 and the default \s-1CSS\s0 will not be included in the widget&lt;br /&gt;
HTML::PopupTreeSelect.3pm:output.  This allows you to include your own \s-1CSS\s0 which will be used by&lt;br /&gt;
HTML::PopupTreeSelect.3pm:your widget.  Modifying the \s-1CSS\s0 will allow you to control the fonts,&lt;br /&gt;
HTML::PopupTreeSelect.3pm:If you run the widget with include_css set to 1 then you can use that&lt;br /&gt;
HTML::Tree::Scanning.3pm:tagging, such is as useful in \s-1CSS\s0 \*(-- note the&lt;br /&gt;
Module::Build::API.3pm:.IP &amp;quot;\fIhtml_css()\fR&amp;quot; 4&lt;br /&gt;
Module::Build::API.3pm:.IX Item &amp;quot;html_css()&amp;quot;&lt;br /&gt;
TAP::Parser::YAMLish::Reader.3pm:YAML::Tiny, \s-1YAML\s0, YAML::Syck, Config::Tiny, CSS::Tiny,&lt;br /&gt;
TAP::Parser::YAMLish::Writer.3pm:YAML::Tiny, \s-1YAML\s0, YAML::Syck, Config::Tiny, CSS::Tiny,&lt;br /&gt;
Template::Iterator.3pm:You can then style the \f(CW\*(C`tr.odd\*(C'\fR and \f(CW\*(C`tr.even\*(C'\fR elements using \s-1CSS:\s0&lt;br /&gt;
Template::Toolkit.3pm:kind of text documents: \s-1HTML\s0, \s-1XML\s0, \s-1CSS\s0, Javascript, Perl code, plain text,&lt;br /&gt;
Template::Tutorial::Web.3pm:kind of content they contain.  So you can use \s-1TT\s0 to generate \s-1HTML\s0, \s-1XML\s0, \s-1CSS\s0,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;CSS commit for Feb 23&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Changes to most of the css files to set all sizes to em (some were in px and broke flow). Changed the font-family to a more friendly chain for all platforms, and remove all other font-faimily calls from the code. Changed font sizes from % to ems and adjusted size for some of the main elements. Fix a issue with the middle column size caused by firehose.css. Many small fixes to spacing over many places.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moved all of the slashcode theme items into the slashcode.cssraw file. Some were in comments.cssraw due to some previous work I did.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On article body and comment body, made the font size a bit smaller. Also on comments body set the margins to be smaller.&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;-EP&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=PerlModuleUsers&amp;diff=5374</id>
		<title>PerlModuleUsers</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=PerlModuleUsers&amp;diff=5374"/>
		<updated>2014-03-01T19:43:57Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[CssWork]] parent&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Functions in users&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
users.pl:&lt;br /&gt;
    adminDispatch, changePasswd, checkList, displayForm, &lt;br /&gt;
    editComm, editHome, editKey, editMiscOpts, &lt;br /&gt;
    editTags, editUser, forceAccountVerify, getCommentListing, &lt;br /&gt;
    getError, _get_lastjournal, getMessage, getOtherUserParams, &lt;br /&gt;
    getTitle, getUserAdmin, listAbuses, listBanned, &lt;br /&gt;
    listReadOnly, mailPasswd, main, newUser, &lt;br /&gt;
    newUserForm, noUser, previewSlashbox, saveComm, &lt;br /&gt;
    saveHome, saveMiscOpts, savePasswd, saveTags, &lt;br /&gt;
    saveUser, saveUserAdmin, setToDefaults, showBookmarks, &lt;br /&gt;
    showComments, showFireHose, showInfo, showSubmissions, &lt;br /&gt;
    showTags, tildeEd, topAbusers, validateUser, &lt;br /&gt;
  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
users2.pl:&lt;br /&gt;
    adminDispatch, checkList, displayForm, editKey, &lt;br /&gt;
    editMiscOpts, editUser, forceAccountVerify, getCommentListing, &lt;br /&gt;
    getError, _get_lastjournal, getMessage, getOtherUserParams, &lt;br /&gt;
    getTitle, getUserAdmin, listAbuses, listBanned, &lt;br /&gt;
    listReadOnly, mailPasswd, main, newUser, &lt;br /&gt;
    newUserForm, noUser, previewSlashbox, saveMiscOpts, &lt;br /&gt;
    saveUser, saveUserAdmin, setToDefaults, showFireHose, &lt;br /&gt;
    showInfo, tildeEd, topAbusers, validateUser, &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Comparison, users vs users2&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
users                      users2&lt;br /&gt;
-----------------------------&lt;br /&gt;
adminDispatch          adminDispatch&lt;br /&gt;
changePasswd&lt;br /&gt;
checkList              checkList&lt;br /&gt;
displayForm            displayForm&lt;br /&gt;
editComm&lt;br /&gt;
editHome&lt;br /&gt;
editKey                editKey&lt;br /&gt;
editMiscOpts           editMiscOpts&lt;br /&gt;
editTags&lt;br /&gt;
editUser               editUser&lt;br /&gt;
forceAccountVerify     forceAccountVerify&lt;br /&gt;
getCommentListing      getCommentListing&lt;br /&gt;
getError               getError&lt;br /&gt;
_get_lastjournal       _get_lastjournal&lt;br /&gt;
getMessage             getMessage&lt;br /&gt;
getOtherUserParams     getOtherUserParams &lt;br /&gt;
getTitle               getTitle&lt;br /&gt;
getUserAdmin           getUserAdmin&lt;br /&gt;
listAbuses             listAbuses&lt;br /&gt;
listBanned             listBanned&lt;br /&gt;
listReadOnly           listReadOnly&lt;br /&gt;
mailPasswd             mailPasswd&lt;br /&gt;
main                   main&lt;br /&gt;
newUser                newUser&lt;br /&gt;
newUserForm            newUserForm&lt;br /&gt;
noUser                 noUser&lt;br /&gt;
previewSlashbox        previewSlashbox&lt;br /&gt;
saveComm&lt;br /&gt;
saveHome&lt;br /&gt;
saveMiscOpts           saveMiscOpts&lt;br /&gt;
savePasswd&lt;br /&gt;
saveTags&lt;br /&gt;
saveUser               saveUser&lt;br /&gt;
saveUserAdmin          saveUserAdmin&lt;br /&gt;
setToDefaults          setToDefaults&lt;br /&gt;
showBookmarks&lt;br /&gt;
showComments&lt;br /&gt;
showFireHose           showFireHose&lt;br /&gt;
showInfo               showInfo&lt;br /&gt;
showSubmissions&lt;br /&gt;
showTags&lt;br /&gt;
tildeEd                tildeEd&lt;br /&gt;
topAbusers             topAbusers&lt;br /&gt;
validateUser           validateUser&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Man page for users&amp;lt;/h2&amp;gt;&lt;br /&gt;
Don't waste your time...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# man Slash::Users&lt;br /&gt;
No manual entry for Slash::Users&lt;br /&gt;
[root@slashcode htdocs]# man Slash::Users2&lt;br /&gt;
Users2(3)             User Contributed Perl Documentation            Users2(3)&lt;br /&gt;
&lt;br /&gt;
NAME&lt;br /&gt;
       Slash::Users2&lt;br /&gt;
&lt;br /&gt;
SYNOPSIS&lt;br /&gt;
               use Slash::Users2;&lt;br /&gt;
&lt;br /&gt;
DESCRIPTION&lt;br /&gt;
       Provides homepages for users.&lt;br /&gt;
&lt;br /&gt;
AUTHOR&lt;br /&gt;
       Christopher Brown, cbrown@corp.sourcefore.com&lt;br /&gt;
&lt;br /&gt;
SEE ALSO&lt;br /&gt;
       perl(1).&lt;br /&gt;
&lt;br /&gt;
perl v5.10.1                      2014-02-20                         Users2(3)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Source of users.pl&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/bin/perl -w&lt;br /&gt;
# This code is a part of Slash, and is released under the GPL.&lt;br /&gt;
# Copyright 1997-2005 by Open Source Technology Group. See README&lt;br /&gt;
# and COPYING for more information, or see http://slashcode.com/.&lt;br /&gt;
# $Id$&lt;br /&gt;
&lt;br /&gt;
use strict;&lt;br /&gt;
use Digest::MD5 'md5_hex';&lt;br /&gt;
use Slash;&lt;br /&gt;
use Slash::Display;&lt;br /&gt;
use Slash::Utility;&lt;br /&gt;
use Slash::Constants qw(:messages);&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub main {&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $gSkin = getCurrentSkin();&lt;br /&gt;
        my $formname = $0;&lt;br /&gt;
        $formname =~ s/.*\/(\w+)\.pl/$1/;&lt;br /&gt;
&lt;br /&gt;
        my $error_flag = 0;&lt;br /&gt;
        my $formkey = $form-&amp;gt;{formkey};&lt;br /&gt;
&lt;br /&gt;
        my $suadmin_flag = $user-&amp;gt;{seclev} &amp;gt;= 10000 ? 1 : 0 ;&lt;br /&gt;
        my $postflag = $user-&amp;gt;{state}{post};&lt;br /&gt;
        my $op = lc($form-&amp;gt;{op});&lt;br /&gt;
&lt;br /&gt;
        # savepasswd is a special case, because once it's called, you&lt;br /&gt;
        # have to reload the form, and you don't want to do any checks if&lt;br /&gt;
        # you've just saved.&lt;br /&gt;
        my $savepass_flag = $op eq 'savepasswd' ? 1 : 0 ;&lt;br /&gt;
&lt;br /&gt;
        my $ops = {&lt;br /&gt;
                admin           =&amp;gt;  {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;adminDispatch,&lt;br /&gt;
                        seclev          =&amp;gt; 10000,       # if this should be lower,&lt;br /&gt;
                                                        # then something else is&lt;br /&gt;
                                                        # broken, because it allows&lt;br /&gt;
                                                        # anyone with this seclev&lt;br /&gt;
                                                        # to change their own seclev&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        # just in case we need it for something else, we have it ...&lt;br /&gt;
                        checks          =&amp;gt; [ qw (generate_formkey) ],&lt;br /&gt;
                },&lt;br /&gt;
#               userlogin       =&amp;gt;  {&lt;br /&gt;
#                       function        =&amp;gt; \&amp;amp;showInfo,&lt;br /&gt;
#                       seclev          =&amp;gt; 1,&lt;br /&gt;
#                       formname        =&amp;gt; $formname,&lt;br /&gt;
#                       checks          =&amp;gt; [],&lt;br /&gt;
#                       tab_selected_1  =&amp;gt; 'me',&lt;br /&gt;
#               },&lt;br /&gt;
                no_user =&amp;gt;  {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;noUser,&lt;br /&gt;
                        seclev          =&amp;gt; 0,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                },&lt;br /&gt;
                userinfo        =&amp;gt;  {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;showInfo,&lt;br /&gt;
                        #I made this change, not all sites are going to care. -Brian&lt;br /&gt;
                        seclev          =&amp;gt; $constants-&amp;gt;{users_show_info_seclev},&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'me',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'info',&lt;br /&gt;
                },&lt;br /&gt;
                userfirehose    =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;showFireHose,&lt;br /&gt;
                        seclev          =&amp;gt; 0,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'me',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'firehose'&lt;br /&gt;
                },&lt;br /&gt;
                usersubmissions =&amp;gt;  {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;showSubmissions,&lt;br /&gt;
                        #I made this change, not all sites are going to care. -Brian&lt;br /&gt;
                        seclev          =&amp;gt; $constants-&amp;gt;{users_show_info_seclev},&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'me',&lt;br /&gt;
                },&lt;br /&gt;
                usercomments    =&amp;gt;  {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;showComments,&lt;br /&gt;
                        #I made this change, not all sites are going to care. -Brian&lt;br /&gt;
                        seclev          =&amp;gt; $constants-&amp;gt;{users_show_info_seclev},&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'me',&lt;br /&gt;
                },&lt;br /&gt;
                display =&amp;gt;  {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;showInfo,&lt;br /&gt;
                        #I made this change, not all sites are going to care. -Brian&lt;br /&gt;
                        seclev          =&amp;gt; $constants-&amp;gt;{users_show_info_seclev},&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'me',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'info',&lt;br /&gt;
                },&lt;br /&gt;
#               savepasswd      =&amp;gt; {&lt;br /&gt;
#                       function        =&amp;gt; \&amp;amp;savePasswd,&lt;br /&gt;
#                       seclev          =&amp;gt; 1,&lt;br /&gt;
#                       post            =&amp;gt; 1,&lt;br /&gt;
#                       formname        =&amp;gt; $formname,&lt;br /&gt;
#                       checks          =&amp;gt; [ qw (max_post_check valid_check&lt;br /&gt;
#                                               formkey_check regen_formkey) ],&lt;br /&gt;
#                       tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
#                       tab_selected_2  =&amp;gt; 'password',&lt;br /&gt;
#               },&lt;br /&gt;
                saveuseradmin   =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;saveUserAdmin,&lt;br /&gt;
                        seclev          =&amp;gt; 10000,&lt;br /&gt;
                        post            =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                },&lt;br /&gt;
                savehome        =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;saveHome,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        post            =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [ qw (valid_check&lt;br /&gt;
                                                formkey_check regen_formkey) ],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'home',&lt;br /&gt;
                },&lt;br /&gt;
                savecomm        =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;saveComm,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        post            =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [ qw (valid_check&lt;br /&gt;
                                                formkey_check regen_formkey) ],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'comments',&lt;br /&gt;
                },&lt;br /&gt;
                saveuser        =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;saveUser,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        post            =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [ qw (valid_check&lt;br /&gt;
                                                formkey_check regen_formkey) ],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'user',&lt;br /&gt;
                },&lt;br /&gt;
#               changepasswd    =&amp;gt; {&lt;br /&gt;
#                       function        =&amp;gt; \&amp;amp;changePasswd,&lt;br /&gt;
#                       seclev          =&amp;gt; 1,&lt;br /&gt;
#                       formname        =&amp;gt; $formname,&lt;br /&gt;
#                       checks          =&amp;gt; $savepass_flag ? [] :&lt;br /&gt;
#                                               [ qw (generate_formkey) ],&lt;br /&gt;
#                       tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
#                       tab_selected_2  =&amp;gt; 'password',&lt;br /&gt;
#               },&lt;br /&gt;
                editmiscopts    =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;editMiscOpts,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [ ],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'misc',&lt;br /&gt;
                },&lt;br /&gt;
                savemiscopts    =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;saveMiscOpts,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [ ],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'misc',&lt;br /&gt;
                },&lt;br /&gt;
                edituser        =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;editUser,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [ qw (generate_formkey) ],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'user',&lt;br /&gt;
                },&lt;br /&gt;
                authoredit      =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;editUser,&lt;br /&gt;
                        seclev          =&amp;gt; 10000,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                },&lt;br /&gt;
                edithome        =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;editHome,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [ qw (generate_formkey) ],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'home',&lt;br /&gt;
                },&lt;br /&gt;
                editcomm        =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;editComm,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [ qw (generate_formkey) ],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'comments',&lt;br /&gt;
                },&lt;br /&gt;
#               newuser         =&amp;gt; {&lt;br /&gt;
#                       function        =&amp;gt; \&amp;amp;newUser,&lt;br /&gt;
#                       seclev          =&amp;gt; 0,&lt;br /&gt;
#                       formname        =&amp;gt; &amp;quot;${formname}/nu&amp;quot;,&lt;br /&gt;
#                       checks          =&amp;gt; [ qw (max_post_check valid_check&lt;br /&gt;
#                                               formkey_check regen_formkey) ],&lt;br /&gt;
#               },&lt;br /&gt;
                newuseradmin    =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;newUserForm,&lt;br /&gt;
                        seclev          =&amp;gt; 10000,&lt;br /&gt;
                        formname        =&amp;gt; &amp;quot;${formname}/nu&amp;quot;,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                },&lt;br /&gt;
                previewbox      =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;previewSlashbox,&lt;br /&gt;
                        seclev          =&amp;gt; 0,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                },&lt;br /&gt;
#               mailpasswd      =&amp;gt; {&lt;br /&gt;
#                       function        =&amp;gt; \&amp;amp;mailPasswd,&lt;br /&gt;
#                       seclev          =&amp;gt; 0,&lt;br /&gt;
#                       formname        =&amp;gt; &amp;quot;${formname}/mp&amp;quot;,&lt;br /&gt;
#                       checks          =&amp;gt; [ qw (max_post_check valid_check&lt;br /&gt;
#                                               interval_check formkey_check ) ],&lt;br /&gt;
#                       tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
#                       tab_selected_2  =&amp;gt; 'password',&lt;br /&gt;
#               },&lt;br /&gt;
                validateuser    =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;validateUser,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; ['regen_formkey'],&lt;br /&gt;
                },&lt;br /&gt;
                showtags =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;showTags,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        tab_selected    =&amp;gt; 'tags',&lt;br /&gt;
                },&lt;br /&gt;
                showbookmarks =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;showBookmarks,&lt;br /&gt;
                        seclev          =&amp;gt; 0,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        tab_selected    =&amp;gt; 'bookmarks',&lt;br /&gt;
                },&lt;br /&gt;
                edittags =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;editTags,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        tab_selected    =&amp;gt; 'tags',&lt;br /&gt;
                },&lt;br /&gt;
                savetags =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;saveTags,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        tab_selected    =&amp;gt; 'tags',&lt;br /&gt;
                },&lt;br /&gt;
#               userclose       =&amp;gt;  {&lt;br /&gt;
#                       function        =&amp;gt; \&amp;amp;displayForm,&lt;br /&gt;
#                       seclev          =&amp;gt; 0,&lt;br /&gt;
#                       formname        =&amp;gt; $formname,&lt;br /&gt;
#                       checks          =&amp;gt; [],&lt;br /&gt;
#               },&lt;br /&gt;
#               newuserform     =&amp;gt; {&lt;br /&gt;
#                       function        =&amp;gt; \&amp;amp;displayForm,&lt;br /&gt;
#                       seclev          =&amp;gt; 0,&lt;br /&gt;
#                       formname        =&amp;gt; &amp;quot;${formname}/nu&amp;quot;,&lt;br /&gt;
#                       checks          =&amp;gt; [ qw (max_post_check&lt;br /&gt;
#                                               generate_formkey) ],&lt;br /&gt;
#               },&lt;br /&gt;
#               mailpasswdform  =&amp;gt; {&lt;br /&gt;
#                       function        =&amp;gt; \&amp;amp;displayForm,&lt;br /&gt;
#                       seclev          =&amp;gt; 0,&lt;br /&gt;
#                       formname        =&amp;gt; &amp;quot;${formname}/mp&amp;quot;,&lt;br /&gt;
#                       checks          =&amp;gt; [ qw (max_post_check&lt;br /&gt;
#                                               generate_formkey) ],&lt;br /&gt;
#                       tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
#                       tab_selected_2  =&amp;gt; 'password',&lt;br /&gt;
#               },&lt;br /&gt;
                displayform     =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;displayForm,&lt;br /&gt;
                        seclev          =&amp;gt; 0,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [ qw (generate_formkey) ],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'me',&lt;br /&gt;
                },&lt;br /&gt;
                listreadonly =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;listReadOnly,&lt;br /&gt;
                        seclev          =&amp;gt; 100,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        adminmenu       =&amp;gt; 'security',&lt;br /&gt;
                        tab_selected    =&amp;gt; 'readonly',&lt;br /&gt;
                },&lt;br /&gt;
                listbanned =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;listBanned,&lt;br /&gt;
                        seclev          =&amp;gt; 100,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        adminmenu       =&amp;gt; 'security',&lt;br /&gt;
                        tab_selected    =&amp;gt; 'banned',&lt;br /&gt;
                },&lt;br /&gt;
                topabusers      =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;topAbusers,&lt;br /&gt;
                        seclev          =&amp;gt; 100,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        adminmenu       =&amp;gt; 'security',&lt;br /&gt;
                        tab_selected    =&amp;gt; 'abusers',&lt;br /&gt;
                },&lt;br /&gt;
                listabuses      =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;listAbuses,&lt;br /&gt;
                        seclev          =&amp;gt; 100,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                },&lt;br /&gt;
                force_acct_verify =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;forceAccountVerify,&lt;br /&gt;
                        seclev          =&amp;gt; 100,&lt;br /&gt;
                        post            =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; []&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
        } ;&lt;br /&gt;
&lt;br /&gt;
        # Note this is NOT the default op.  &amp;quot;userlogin&amp;quot; or &amp;quot;userinfo&amp;quot; is&lt;br /&gt;
        # the default op, and it's set either 5 lines down or about 100&lt;br /&gt;
        # lines down, depending.  Yes, that's dumb.  Yes, we should&lt;br /&gt;
        # change it.  It would require tracing through a fair bit of logic&lt;br /&gt;
        # though and I don't have the time right now. - Jamie&lt;br /&gt;
        $ops-&amp;gt;{default} = $ops-&amp;gt;{displayform};&lt;br /&gt;
        for (qw(newuser newuserform mailpasswd mailpasswdform changepasswd savepasswd userlogin userclose)) {&lt;br /&gt;
                $ops-&amp;gt;{$_} = $ops-&amp;gt;{default};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $errornote = &amp;quot;&amp;quot;;&lt;br /&gt;
        if ($form-&amp;gt;{op} &amp;amp;&amp;amp; ! defined $ops-&amp;gt;{$op}) {&lt;br /&gt;
                $errornote .= getError('bad_op', { op =&amp;gt; $form-&amp;gt;{op}}, 0, 1);&lt;br /&gt;
                $op = $user-&amp;gt;{is_anon} ? 'userlogin' : 'userinfo'; &lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($op eq 'userlogin' &amp;amp;&amp;amp; ! $user-&amp;gt;{is_anon}) {&lt;br /&gt;
                redirect(cleanRedirectUrl($form-&amp;gt;{returnto} || ''));&lt;br /&gt;
                return;&lt;br /&gt;
&lt;br /&gt;
        # this will only redirect if it is a section-based rootdir with&lt;br /&gt;
        # its rootdir different from real_rootdir&lt;br /&gt;
        } elsif ($op eq 'userclose' &amp;amp;&amp;amp; $gSkin-&amp;gt;{rootdir} ne $constants-&amp;gt;{real_rootdir}) {&lt;br /&gt;
                redirect($constants-&amp;gt;{real_rootdir} . '/login.pl?op=userclose');&lt;br /&gt;
                return;&lt;br /&gt;
&lt;br /&gt;
        } elsif ($op =~ /^(?:newuser|newuserform|mailpasswd|mailpasswdform|changepasswd|savepasswd|userlogin|userclose|displayform)$/) {&lt;br /&gt;
                my $op = $form-&amp;gt;{op};&lt;br /&gt;
                $op = 'changeprefs' if $op eq 'changepasswd';&lt;br /&gt;
                $op = 'saveprefs'   if $op eq 'savepasswd';&lt;br /&gt;
                redirect($constants-&amp;gt;{real_rootdir} . '/login.pl?op=' . $op);&lt;br /&gt;
                return;&lt;br /&gt;
&lt;br /&gt;
        # never get here now&lt;br /&gt;
        } elsif ($op eq 'savepasswd') {&lt;br /&gt;
                my $error_flag = 0;&lt;br /&gt;
                if ($user-&amp;gt;{seclev} &amp;lt; 100) {&lt;br /&gt;
                        for my $check (@{$ops-&amp;gt;{savepasswd}{checks}}) {&lt;br /&gt;
                                # the only way to save the error message is to pass by ref&lt;br /&gt;
                                # $errornote and add the message to note (you can't print&lt;br /&gt;
                                # it out before header is called)&lt;br /&gt;
                                $error_flag = formkeyHandler($check, $formname, $formkey, \$errornote);&lt;br /&gt;
                                last if $error_flag;&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                if (! $error_flag) {&lt;br /&gt;
                        $error_flag = savePasswd({ noteref =&amp;gt; \$errornote }) ;&lt;br /&gt;
                }&lt;br /&gt;
                # change op to edituser and let fall through;&lt;br /&gt;
                # we need to have savePasswd set the cookie before&lt;br /&gt;
                # header() is called -- pudge&lt;br /&gt;
                if ($user-&amp;gt;{seclev} &amp;lt; 100 &amp;amp;&amp;amp; ! $error_flag) {&lt;br /&gt;
                        $slashdb-&amp;gt;updateFormkey($formkey, length($ENV{QUERY_STRING}));&lt;br /&gt;
                }&lt;br /&gt;
                $op = $error_flag ? 'changepasswd' : 'userinfo';&lt;br /&gt;
                $form-&amp;gt;{userfield} = $user-&amp;gt;{uid};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Figure out what the op really is.&lt;br /&gt;
        $op = 'userinfo' if (! $form-&amp;gt;{op} &amp;amp;&amp;amp; ($form-&amp;gt;{uid} || $form-&amp;gt;{nick}));&lt;br /&gt;
        $op ||= $user-&amp;gt;{is_anon} ? 'userlogin' : 'userinfo';&lt;br /&gt;
        if ($user-&amp;gt;{is_anon} &amp;amp;&amp;amp; ( ($ops-&amp;gt;{$op}{seclev} &amp;gt; 0) || ($op =~ /^newuserform|mailpasswdform|displayform$/) )) {&lt;br /&gt;
                redirect($constants-&amp;gt;{real_rootdir} . '/login.pl');&lt;br /&gt;
                return;&lt;br /&gt;
        } elsif ($user-&amp;gt;{seclev} &amp;lt; $ops-&amp;gt;{$op}{seclev}) {&lt;br /&gt;
                $op = 'userinfo';&lt;br /&gt;
        }&lt;br /&gt;
        if ($ops-&amp;gt;{$op}{post} &amp;amp;&amp;amp; !$postflag) {&lt;br /&gt;
                $op = $user-&amp;gt;{is_anon} ? 'default' : 'userinfo';&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Print the header and very top stuff on the page.  We have&lt;br /&gt;
        # three ops that (may) end up routing into showInfo(), which&lt;br /&gt;
        # needs to do some stuff before it calls header(), so for&lt;br /&gt;
        # those three, don't bother.&lt;br /&gt;
        my $header;&lt;br /&gt;
        if ($op !~ /^(userinfo|display|saveuseradmin|admin|userfirehose$)/) {&lt;br /&gt;
                my $data = {&lt;br /&gt;
                        adminmenu =&amp;gt; $ops-&amp;gt;{$op}{adminmenu} || 'admin',&lt;br /&gt;
                        tab_selected =&amp;gt; $ops-&amp;gt;{$op}{tab_selected},&lt;br /&gt;
                };&lt;br /&gt;
                header(getMessage('user_header'), '', $data) or return;&lt;br /&gt;
                # This is a hardcoded position, bad idea and should be fixed -Brian&lt;br /&gt;
                # Yeah, we should pull this into a template somewhere...&lt;br /&gt;
                print getMessage('note', { note =&amp;gt; $errornote }) if defined $errornote;&lt;br /&gt;
                $header = 1;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($constants-&amp;gt;{admin_formkeys} || $user-&amp;gt;{seclev} &amp;lt; 100) {&lt;br /&gt;
&lt;br /&gt;
                my $done = 0;&lt;br /&gt;
                $done = 1 if $op eq 'savepasswd'; # special case&lt;br /&gt;
                $formname = $ops-&amp;gt;{$op}{formname};&lt;br /&gt;
&lt;br /&gt;
                # No need for HumanConf if the constant for it is not&lt;br /&gt;
                # switched on, or if the user's karma is high enough&lt;br /&gt;
                # to get out of it.  (But for &amp;quot;newuserform,&amp;quot; the current&lt;br /&gt;
                # user's karma doesn't get them out of having to prove&lt;br /&gt;
                # they're a human for creating a *new* user.)&lt;br /&gt;
                my $options = {};&lt;br /&gt;
                if (       !$constants-&amp;gt;{plugin}{HumanConf}&lt;br /&gt;
                        || !$constants-&amp;gt;{hc}&lt;br /&gt;
                        || !$constants-&amp;gt;{hc_sw_newuser}&lt;br /&gt;
                                &amp;amp;&amp;amp; ($formname eq 'users/nu' || $op eq 'newuserform')&lt;br /&gt;
                        || !$constants-&amp;gt;{hc_sw_mailpasswd}&lt;br /&gt;
                                &amp;amp;&amp;amp; ($formname eq 'users/mp' || $op eq 'mailpasswdform')&lt;br /&gt;
                        || $user-&amp;gt;{karma} &amp;gt; $constants-&amp;gt;{hc_maxkarma}&lt;br /&gt;
                                &amp;amp;&amp;amp; !$user-&amp;gt;{is_anon}&lt;br /&gt;
                                &amp;amp;&amp;amp; !($op eq 'newuser' || $op eq 'newuserform')&lt;br /&gt;
                ) {&lt;br /&gt;
                        $options-&amp;gt;{no_hc} = 1;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                DO_CHECKS: while (!$done) {&lt;br /&gt;
                        for my $check (@{$ops-&amp;gt;{$op}{checks}}) {&lt;br /&gt;
                                $ops-&amp;gt;{$op}{update_formkey} = 1 if $check eq 'formkey_check';&lt;br /&gt;
                                $error_flag = formkeyHandler($check, $formname, $formkey,&lt;br /&gt;
                                        undef, $options);&lt;br /&gt;
                                if ($error_flag == -1) {&lt;br /&gt;
                                        # Special error:  HumanConf failed.  Go&lt;br /&gt;
                                        # back to the previous op, start over.&lt;br /&gt;
                                        if ($op =~ /^(newuser|mailpasswd)$/) {&lt;br /&gt;
                                                $op .= &amp;quot;form&amp;quot;;&lt;br /&gt;
                                                $error_flag = 0;&lt;br /&gt;
                                                next DO_CHECKS;&lt;br /&gt;
                                        }&lt;br /&gt;
                                } elsif ($error_flag) {&lt;br /&gt;
                                        $done = 1;&lt;br /&gt;
                                        last;&lt;br /&gt;
                                }&lt;br /&gt;
                        }&lt;br /&gt;
                        $done = 1;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                if (!$error_flag &amp;amp;&amp;amp; !$options-&amp;gt;{no_hc}) {&lt;br /&gt;
                        my $hc = getObject(&amp;quot;Slash::HumanConf&amp;quot;);&lt;br /&gt;
                        $hc-&amp;gt;reloadFormkeyHC($formname) if $hc;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        errorLog(&amp;quot;users.pl error_flag '$error_flag'&amp;quot;) if $error_flag;&lt;br /&gt;
&lt;br /&gt;
        # call the method&lt;br /&gt;
        my $retval;&lt;br /&gt;
        $retval = $ops-&amp;gt;{$op}{function}-&amp;gt;({&lt;br /&gt;
                op              =&amp;gt; $op,&lt;br /&gt;
                tab_selected_1  =&amp;gt; $ops-&amp;gt;{$op}{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
                note            =&amp;gt; $errornote,&lt;br /&gt;
        }) if !$error_flag;&lt;br /&gt;
&lt;br /&gt;
        return if !$retval;&lt;br /&gt;
&lt;br /&gt;
        if ($op eq 'mailpasswd' &amp;amp;&amp;amp; $retval) {&lt;br /&gt;
                $ops-&amp;gt;{$op}{update_formkey} = 0;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($ops-&amp;gt;{$op}{update_formkey} &amp;amp;&amp;amp; $user-&amp;gt;{seclev} &amp;lt; 100 &amp;amp;&amp;amp; ! $error_flag) {&lt;br /&gt;
                # successful save action, no formkey errors, update existing formkey&lt;br /&gt;
                # why assign to an unused variable? -- pudge&lt;br /&gt;
                my $updated = $slashdb-&amp;gt;updateFormkey($formkey, length($ENV{QUERY_STRING}));&lt;br /&gt;
        }&lt;br /&gt;
        # if there were legit error levels returned from the save methods&lt;br /&gt;
        # I would have it clear the formkey in case of an error, but that&lt;br /&gt;
        # needs to be sorted out later&lt;br /&gt;
        # else { resetFormkey($formkey); }&lt;br /&gt;
&lt;br /&gt;
        writeLog($user-&amp;gt;{nickname});&lt;br /&gt;
        footer();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub checkList {&lt;br /&gt;
        my($string, $len) = @_;&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        $string =~ s/[^\w,-]//g;&lt;br /&gt;
        my @items = grep { $_ } split /,/, $string;&lt;br /&gt;
        $string = join &amp;quot;,&amp;quot;, @items;&lt;br /&gt;
&lt;br /&gt;
        $len ||= $constants-&amp;gt;{checklist_length} || 255;&lt;br /&gt;
        if (length($string) &amp;gt; $len) {&lt;br /&gt;
                print getError('checklist_err');&lt;br /&gt;
                $string = substr($string, 0, $len);&lt;br /&gt;
                $string =~ s/,?\w*$//g;&lt;br /&gt;
        } elsif (length($string) &amp;lt; 1) {&lt;br /&gt;
                $string = '';&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        return $string;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub previewSlashbox {&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
&lt;br /&gt;
        my $block = $reader-&amp;gt;getBlock($form-&amp;gt;{bid}, ['title', 'block', 'url']);&lt;br /&gt;
        my $is_editable = $user-&amp;gt;{seclev} &amp;gt;= 1000;&lt;br /&gt;
&lt;br /&gt;
        my $title = getTitle('previewslashbox_title', { blocktitle =&amp;gt; $block-&amp;gt;{title} });&lt;br /&gt;
        slashDisplay('previewSlashbox', {&lt;br /&gt;
                width           =&amp;gt; '100%',&lt;br /&gt;
                title           =&amp;gt; $title,&lt;br /&gt;
                block           =&amp;gt; $block,&lt;br /&gt;
                is_editable     =&amp;gt; $is_editable,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        print portalbox($constants-&amp;gt;{fancyboxwidth}, $block-&amp;gt;{title},&lt;br /&gt;
                $block-&amp;gt;{block}, '', $block-&amp;gt;{url});&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub newUserForm {&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $suadmin_flag = $user-&amp;gt;{seclev} &amp;gt;= 10000;&lt;br /&gt;
        my $title = getTitle('newUserForm_title');&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('newUserForm', {&lt;br /&gt;
                title           =&amp;gt; $title, &lt;br /&gt;
                suadmin_flag    =&amp;gt; $suadmin_flag,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub newUser {&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        my $plugins = $slashdb-&amp;gt;getDescriptions('plugins');&lt;br /&gt;
        my $title;&lt;br /&gt;
        my $suadmin_flag = $user-&amp;gt;{seclev} &amp;gt;= 10000 ? 1 : 0;&lt;br /&gt;
&lt;br /&gt;
        # Check if User Exists&lt;br /&gt;
        $form-&amp;gt;{newusernick} = nickFix($form-&amp;gt;{newusernick});&lt;br /&gt;
        my $matchname = nick2matchname($form-&amp;gt;{newusernick});&lt;br /&gt;
&lt;br /&gt;
        if (!$form-&amp;gt;{email} || $form-&amp;gt;{email} !~ /\@/) {&lt;br /&gt;
                print getError('email_invalid', 0, 1);&lt;br /&gt;
                return;&lt;br /&gt;
        } elsif ($form-&amp;gt;{email} ne $form-&amp;gt;{email2}) {&lt;br /&gt;
                print getError('email_do_not_match', 0, 1);&lt;br /&gt;
                return;&lt;br /&gt;
        } elsif ($slashdb-&amp;gt;existsEmail($form-&amp;gt;{email})) {&lt;br /&gt;
                print getError('emailexists_err', 0, 1);&lt;br /&gt;
                return;&lt;br /&gt;
        } elsif ($matchname ne '' &amp;amp;&amp;amp; $form-&amp;gt;{newusernick} ne '') {&lt;br /&gt;
                if ($constants-&amp;gt;{newuser_portscan}) {&lt;br /&gt;
                        my $is_trusted = $slashdb-&amp;gt;checkAL2($user-&amp;gt;{srcids}, 'trusted');&lt;br /&gt;
                        if (!$is_trusted) {&lt;br /&gt;
                                my $is_proxy = $slashdb-&amp;gt;checkForOpenProxy($user-&amp;gt;{hostip});&lt;br /&gt;
                                if ($is_proxy) {&lt;br /&gt;
                                        print getError('new user open proxy', {&lt;br /&gt;
                                                unencoded_ip    =&amp;gt; $ENV{REMOTE_ADDR},&lt;br /&gt;
                                                port            =&amp;gt; $is_proxy,&lt;br /&gt;
                                        });&lt;br /&gt;
                                        return;&lt;br /&gt;
                                }&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
                my $uid;&lt;br /&gt;
                my $rootdir = getCurrentSkin('rootdir');&lt;br /&gt;
&lt;br /&gt;
                $uid = $slashdb-&amp;gt;createUser(&lt;br /&gt;
                        $matchname, $form-&amp;gt;{email}, $form-&amp;gt;{newusernick}&lt;br /&gt;
                );&lt;br /&gt;
                if ($uid) {&lt;br /&gt;
                        my $data = {};&lt;br /&gt;
                        getOtherUserParams($data);&lt;br /&gt;
&lt;br /&gt;
                        for (qw(tzcode)) {&lt;br /&gt;
                                $data-&amp;gt;{$_} = $form-&amp;gt;{$_} if defined $form-&amp;gt;{$_};&lt;br /&gt;
                        }&lt;br /&gt;
                        $data-&amp;gt;{creation_ipid} = $user-&amp;gt;{ipid};&lt;br /&gt;
&lt;br /&gt;
                        $slashdb-&amp;gt;setUser($uid, $data) if keys %$data;&lt;br /&gt;
                        $title = getTitle('newUser_title');&lt;br /&gt;
&lt;br /&gt;
                        $form-&amp;gt;{pubkey} = $plugins-&amp;gt;{'Pubkey'} ?&lt;br /&gt;
                                strip_nohtml($form-&amp;gt;{pubkey}, 1) : '';&lt;br /&gt;
                        print getMessage('newuser_msg', { &lt;br /&gt;
                                suadmin_flag    =&amp;gt; $suadmin_flag, &lt;br /&gt;
                                title           =&amp;gt; $title, &lt;br /&gt;
                                uid             =&amp;gt; $uid&lt;br /&gt;
                        });&lt;br /&gt;
&lt;br /&gt;
                        if ($form-&amp;gt;{newsletter} || $form-&amp;gt;{comment_reply} || $form-&amp;gt;{headlines}) {&lt;br /&gt;
                                my $messages  = getObject('Slash::Messages');&lt;br /&gt;
                                my %params;&lt;br /&gt;
                                $params{MSG_CODE_COMMENT_REPLY()} = MSG_MODE_EMAIL()&lt;br /&gt;
                                        if $form-&amp;gt;{comment_reply};&lt;br /&gt;
                                $params{MSG_CODE_NEWSLETTER()}  = MSG_MODE_EMAIL()&lt;br /&gt;
                                        if $form-&amp;gt;{newsletter};&lt;br /&gt;
                                $params{MSG_CODE_HEADLINES()}   = MSG_MODE_EMAIL()&lt;br /&gt;
                                        if $form-&amp;gt;{headlines};&lt;br /&gt;
                                $messages-&amp;gt;setPrefs($uid, \%params);&lt;br /&gt;
                        }&lt;br /&gt;
&lt;br /&gt;
                        mailPasswd({ uid =&amp;gt; $uid });&lt;br /&gt;
&lt;br /&gt;
                        return;&lt;br /&gt;
                } else {&lt;br /&gt;
                        $slashdb-&amp;gt;resetFormkey($form-&amp;gt;{formkey});&lt;br /&gt;
                        print getError('duplicate_user', { &lt;br /&gt;
                                nick =&amp;gt; $form-&amp;gt;{newusernick},&lt;br /&gt;
                        });&lt;br /&gt;
                        return;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
        } else {&lt;br /&gt;
                print getError('duplicate_user', { &lt;br /&gt;
                        nick =&amp;gt; $form-&amp;gt;{newusernick},&lt;br /&gt;
                });&lt;br /&gt;
                return;&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub mailPasswd {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        my $uid = $hr-&amp;gt;{uid} || 0;&lt;br /&gt;
&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        if (! $uid) {&lt;br /&gt;
                if ($form-&amp;gt;{unickname} =~ /\@/) {&lt;br /&gt;
                        $uid = $slashdb-&amp;gt;getUserEmail($form-&amp;gt;{unickname});&lt;br /&gt;
&lt;br /&gt;
                } elsif ($form-&amp;gt;{unickname} =~ /^\d+$/) {&lt;br /&gt;
                        my $tmpuser = $slashdb-&amp;gt;getUser($form-&amp;gt;{unickname}, ['uid']);&lt;br /&gt;
                        $uid = $tmpuser-&amp;gt;{uid};&lt;br /&gt;
&lt;br /&gt;
                } else {&lt;br /&gt;
                        $uid = $slashdb-&amp;gt;getUserUID($form-&amp;gt;{unickname});&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $user_edit;&lt;br /&gt;
        my $err_name = '';&lt;br /&gt;
        my $err_opts = {};&lt;br /&gt;
        if (!$uid || isAnon($uid)) {&lt;br /&gt;
                $err_name = 'mailpasswd_notmailed_err';&lt;br /&gt;
        }&lt;br /&gt;
        if (!$err_name) {&lt;br /&gt;
                # Check permissions of _this_ user, not the target&lt;br /&gt;
                # user, to determine whether this IP is OK'd to&lt;br /&gt;
                # send the mail to the target user.&lt;br /&gt;
                # XXXSRCID This should check a separate field like&lt;br /&gt;
                # 'openproxy' instead of piggybacking off of the&lt;br /&gt;
                # existing nopost and spammer&lt;br /&gt;
                my $srcids_to_check = $user-&amp;gt;{srcids};&lt;br /&gt;
                $err_name = 'mailpasswd_readonly_err'&lt;br /&gt;
                        if $reader-&amp;gt;checkAL2($srcids_to_check, 'nopost');&lt;br /&gt;
        }&lt;br /&gt;
        if (!$err_name) {&lt;br /&gt;
                $err_name = 'mailpasswd_toooften_err'&lt;br /&gt;
                        if $slashdb-&amp;gt;checkMaxMailPasswords($user_edit);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if (!$err_name) {&lt;br /&gt;
                if ($constants-&amp;gt;{mailpasswd_portscan}) {&lt;br /&gt;
                        my $is_trusted = $slashdb-&amp;gt;checkAL2($user-&amp;gt;{srcids}, 'trusted');&lt;br /&gt;
                        if (!$is_trusted) {&lt;br /&gt;
                                my $is_proxy = $slashdb-&amp;gt;checkForOpenProxy($user-&amp;gt;{hostip});&lt;br /&gt;
                                if ($is_proxy) {&lt;br /&gt;
                                        $err_name = 'mailpasswd open proxy';&lt;br /&gt;
                                        $err_opts = { unencoded_ip =&amp;gt; $ENV{REMOTE_ADDR}, port =&amp;gt; $is_proxy }; &lt;br /&gt;
                                }&lt;br /&gt;
                        }&lt;br /&gt;
&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($err_name) {&lt;br /&gt;
                print getError($err_name, $err_opts);&lt;br /&gt;
                $slashdb-&amp;gt;resetFormkey($form-&amp;gt;{formkey});&lt;br /&gt;
                $form-&amp;gt;{op} = 'mailpasswdform';&lt;br /&gt;
                displayForm();&lt;br /&gt;
                return(1);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $newpasswd = $slashdb-&amp;gt;getNewPasswd($uid);&lt;br /&gt;
        my $tempnick = $user_edit-&amp;gt;{nickname};&lt;br /&gt;
&lt;br /&gt;
        my $emailtitle = getTitle('mailPassword_email_title', {&lt;br /&gt;
                nickname        =&amp;gt; $user_edit-&amp;gt;{nickname}&lt;br /&gt;
        }, 1);&lt;br /&gt;
&lt;br /&gt;
        # Pull out some data passed in with the request.  Only the IP&lt;br /&gt;
        # number is actually trustworthy, the others could be forged.&lt;br /&gt;
        # Note that we strip the forgeable ones to make sure there&lt;br /&gt;
        # aren't any &amp;quot;&amp;lt;&amp;gt;&amp;quot; chars which could fool a stupid mail client&lt;br /&gt;
        # into parsing a plaintext email as HTML.&lt;br /&gt;
        my $r = Apache-&amp;gt;request;&lt;br /&gt;
        my $remote_ip = $r-&amp;gt;connection-&amp;gt;remote_ip;&lt;br /&gt;
        my $xff = $r-&amp;gt;header_in('X-Forwarded-For') || '';&lt;br /&gt;
        $xff =~ s/\s+/ /g;&lt;br /&gt;
        $xff = substr(strip_notags($xff), 0, 20);&lt;br /&gt;
        my $ua = $r-&amp;gt;header_in('User-Agent') || '';&lt;br /&gt;
        $ua =~ s/\s+/ /g;&lt;br /&gt;
        $ua = substr(strip_attribute($ua), 0, 60);&lt;br /&gt;
&lt;br /&gt;
        my $msg = getMessage('mailpasswd_msg', {&lt;br /&gt;
                newpasswd       =&amp;gt; $newpasswd,&lt;br /&gt;
                tempnick        =&amp;gt; $tempnick,&lt;br /&gt;
                remote_ip       =&amp;gt; $remote_ip,&lt;br /&gt;
                x_forwarded_for =&amp;gt; $xff,&lt;br /&gt;
                user_agent      =&amp;gt; $ua,&lt;br /&gt;
        }, 1);&lt;br /&gt;
&lt;br /&gt;
        doEmail($uid, $emailtitle, $msg) if $user_edit-&amp;gt;{nickname};&lt;br /&gt;
        print getMessage('mailpasswd_mailed_msg', { name =&amp;gt; $user_edit-&amp;gt;{nickname} });&lt;br /&gt;
        $slashdb-&amp;gt;setUserMailPasswd($user_edit);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub showSubmissions {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my($uid, $nickname);&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        if ($form-&amp;gt;{uid} or $form-&amp;gt;{nick}) {&lt;br /&gt;
                $uid            = $form-&amp;gt;{uid} || $reader-&amp;gt;getUserUID($form-&amp;gt;{nick});&lt;br /&gt;
                $nickname       = $reader-&amp;gt;getUser($uid, 'nickname');&lt;br /&gt;
        } else {&lt;br /&gt;
                $nickname       = $user-&amp;gt;{nickname};&lt;br /&gt;
                $uid            = $user-&amp;gt;{uid};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $storycount = $reader-&amp;gt;countStoriesBySubmitter($uid);&lt;br /&gt;
        my $stories = $reader-&amp;gt;getStoriesBySubmitter(&lt;br /&gt;
                $uid,&lt;br /&gt;
                $constants-&amp;gt;{user_submitter_display_default}&lt;br /&gt;
        ) unless !$storycount;&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('userSub', {&lt;br /&gt;
                nick                    =&amp;gt; $nickname,&lt;br /&gt;
                uid                     =&amp;gt; $uid,&lt;br /&gt;
                nickmatch_flag          =&amp;gt; ($user-&amp;gt;{uid} == $uid ? 1 : 0),&lt;br /&gt;
                stories                 =&amp;gt; $stories,&lt;br /&gt;
                storycount              =&amp;gt; $storycount,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub showComments {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $commentstruct = [];&lt;br /&gt;
        my($uid, $nickname);&lt;br /&gt;
&lt;br /&gt;
        my $user_edit;&lt;br /&gt;
        if ($form-&amp;gt;{uid} || $form-&amp;gt;{nick}) {&lt;br /&gt;
                $uid = $form-&amp;gt;{uid} || $reader-&amp;gt;getUserUID($form-&amp;gt;{nick});&lt;br /&gt;
                $user_edit = $reader-&amp;gt;getUser($uid);&lt;br /&gt;
        } else {&lt;br /&gt;
                $uid = $user-&amp;gt;{uid};&lt;br /&gt;
                $user_edit = $user;&lt;br /&gt;
        }&lt;br /&gt;
        $nickname = $user_edit-&amp;gt;{nickname};&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $user_edit-&amp;gt;{uid} == $user-&amp;gt;{uid} ? 'me' : 'otheruser',&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        my $min_comment = $form-&amp;gt;{min_comment} || 0;&lt;br /&gt;
        $min_comment = 0 unless $user-&amp;gt;{seclev} &amp;gt; $constants-&amp;gt;{comments_more_seclev}&lt;br /&gt;
                || $constants-&amp;gt;{comments_more_seclev} == 2 &amp;amp;&amp;amp; $user-&amp;gt;{is_subscriber};&lt;br /&gt;
        my $comments_wanted = $user-&amp;gt;{show_comments_num}&lt;br /&gt;
                || $constants-&amp;gt;{user_comment_display_default};&lt;br /&gt;
        my $commentcount = $reader-&amp;gt;countCommentsByUID($uid);&lt;br /&gt;
        my $comments = $reader-&amp;gt;getCommentsByUID(&lt;br /&gt;
                $uid, $comments_wanted, $min_comment&lt;br /&gt;
        ) if $commentcount;&lt;br /&gt;
&lt;br /&gt;
        if (ref($comments) eq 'ARRAY') {&lt;br /&gt;
                my $kinds = $reader-&amp;gt;getDescriptions('discussion_kinds');&lt;br /&gt;
                for my $comment (@$comments) {&lt;br /&gt;
                        # This works since $sid is numeric.&lt;br /&gt;
                        $comment-&amp;gt;{replies} = $reader-&amp;gt;countCommentsBySidPid($comment-&amp;gt;{sid}, $comment-&amp;gt;{cid});&lt;br /&gt;
&lt;br /&gt;
                        # This is ok, since with all luck we will not be hitting the DB&lt;br /&gt;
                        # ...however, the &amp;quot;sid&amp;quot; parameter here must be the string&lt;br /&gt;
                        # based SID from either the &amp;quot;stories&amp;quot; table or from&lt;br /&gt;
                        # pollquestions.&lt;br /&gt;
                        my $discussion = $reader-&amp;gt;getDiscussion($comment-&amp;gt;{sid});&lt;br /&gt;
&lt;br /&gt;
                        if ($kinds-&amp;gt;{ $discussion-&amp;gt;{dkid} } =~ /^journal(?:-story)?$/) {&lt;br /&gt;
                                $comment-&amp;gt;{type} = 'journal';&lt;br /&gt;
                        } elsif ($kinds-&amp;gt;{ $discussion-&amp;gt;{dkid} } eq 'poll') {&lt;br /&gt;
                                $comment-&amp;gt;{type} = 'poll';&lt;br /&gt;
                        } else {&lt;br /&gt;
                                $comment-&amp;gt;{type} = 'story';&lt;br /&gt;
                        }&lt;br /&gt;
                        $comment-&amp;gt;{disc_title}  = $discussion-&amp;gt;{title};&lt;br /&gt;
                        $comment-&amp;gt;{url} = $discussion-&amp;gt;{url};&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $mod_reader = getObject(&amp;quot;Slash::$constants-&amp;gt;{m1_pluginname}&amp;quot;, { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        slashDisplay('userCom', {&lt;br /&gt;
                nick                    =&amp;gt; $nickname,&lt;br /&gt;
                useredit                =&amp;gt; $user_edit,&lt;br /&gt;
                nickmatch_flag          =&amp;gt; ($user-&amp;gt;{uid} == $uid ? 1 : 0),&lt;br /&gt;
                commentstruct           =&amp;gt; $comments,&lt;br /&gt;
                commentcount            =&amp;gt; $commentcount,&lt;br /&gt;
                min_comment             =&amp;gt; $min_comment,&lt;br /&gt;
                reasons                 =&amp;gt; $mod_reader-&amp;gt;getReasons(),&lt;br /&gt;
                karma_flag              =&amp;gt; 0,&lt;br /&gt;
                admin_flag              =&amp;gt; $user-&amp;gt;{is_admin},&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub noUser {&lt;br /&gt;
        print getData(&amp;quot;no_user&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub showFireHose {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
        my $uid = $form-&amp;gt;{uid} || $user-&amp;gt;{uid};&lt;br /&gt;
        my $user_edit = $reader-&amp;gt;getUser($uid);&lt;br /&gt;
&lt;br /&gt;
        $user-&amp;gt;{state}{firehose_page} = &amp;quot;user&amp;quot;;&lt;br /&gt;
        $user-&amp;gt;{state}{firehose_user_uid} = $uid;&lt;br /&gt;
&lt;br /&gt;
        my $firehose = getObject(&amp;quot;Slash::FireHose&amp;quot;);&lt;br /&gt;
        header(getMessage('userfirehose_header', { useredit =&amp;gt; $user_edit })) or return;&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $user_edit-&amp;gt;{uid} == $user-&amp;gt;{uid} ? 'me' : 'otheruser',&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        $form-&amp;gt;{mode} = &amp;quot;full&amp;quot;;&lt;br /&gt;
        $form-&amp;gt;{color} = &amp;quot;black&amp;quot;;&lt;br /&gt;
        $form-&amp;gt;{orderby} = &amp;quot;createtime&amp;quot;;&lt;br /&gt;
        $form-&amp;gt;{orderdir} = &amp;quot;DESC&amp;quot;;&lt;br /&gt;
        $form-&amp;gt;{skipmenu} = 1;&lt;br /&gt;
        $form-&amp;gt;{duration} = -1;&lt;br /&gt;
        $form-&amp;gt;{fhfilter} = &amp;quot;\&amp;quot;user:$user_edit-&amp;gt;{nickname}\&amp;quot;&amp;quot;;&lt;br /&gt;
        $form-&amp;gt;{pause} = 1;&lt;br /&gt;
        $form-&amp;gt;{listonly} = 1;&lt;br /&gt;
        $form-&amp;gt;{legacy} = 1;&lt;br /&gt;
&lt;br /&gt;
        my $fhbox = $firehose-&amp;gt;listView({ fh_page =&amp;gt; 'users.pl', tab =&amp;gt; 'userfirehose', user_view =&amp;gt; $user_edit });&lt;br /&gt;
        slashDisplay(&amp;quot;userFireHose&amp;quot;, { firehosebox =&amp;gt; $fhbox, uid =&amp;gt; $uid, useredit =&amp;gt; $user_edit });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
# arhgghgh. I love torture. I love pain. This subroutine satisfies&lt;br /&gt;
# these needs of mine&lt;br /&gt;
sub showInfo {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $id = $hr-&amp;gt;{uid} || 0;&lt;br /&gt;
&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        my $admin_flag = ($user-&amp;gt;{is_admin}) ? 1 : 0;&lt;br /&gt;
        my $suadmin_flag = $user-&amp;gt;{seclev} &amp;gt;= 10000 ? 1 : 0;&lt;br /&gt;
        my($title, $admin_block, $fieldkey) = ('', '', '');&lt;br /&gt;
        my $comments = undef;&lt;br /&gt;
        my $commentcount = 0;&lt;br /&gt;
        my $commentcount_time = 0;&lt;br /&gt;
        my $commentstruct = [];&lt;br /&gt;
        my $requested_user = {};&lt;br /&gt;
        my $time_period = $constants-&amp;gt;{admin_comment_display_days} || 30;&lt;br /&gt;
        my $cid_for_time_period = $reader-&amp;gt;getVar(&amp;quot;min_cid_last_$time_period\_days&amp;quot;,'value', 1) || 0;&lt;br /&gt;
        my $admin_time_period_limit = $constants-&amp;gt;{admin_daysback_commentlimit} || 100;&lt;br /&gt;
        my $admin_non_time_limit    = $constants-&amp;gt;{admin_comment_subsequent_pagesize} || 24;&lt;br /&gt;
&lt;br /&gt;
        my($points, $nickmatch_flag, $uid, $nick);&lt;br /&gt;
        my($mod_flag, $karma_flag, $n) = (0, 0, 0);&lt;br /&gt;
&lt;br /&gt;
        if ($admin_flag&lt;br /&gt;
                &amp;amp;&amp;amp; (defined($form-&amp;gt;{show_m2s}) || defined($form-&amp;gt;{show_m1s}) || defined($form-&amp;gt;{m2_listing})))&lt;br /&gt;
         {&lt;br /&gt;
                my $update_hr = {};&lt;br /&gt;
                $update_hr-&amp;gt;{mod_with_comm} = $form-&amp;gt;{show_m1s}&lt;br /&gt;
                        if defined $form-&amp;gt;{show_m1s};&lt;br /&gt;
                $update_hr-&amp;gt;{m2_with_mod} =     ($constants-&amp;gt;{m2} ? $form-&amp;gt;{show_m2s} : undef)&lt;br /&gt;
                        if defined $form-&amp;gt;{show_m2s};&lt;br /&gt;
                $update_hr-&amp;gt;{show_m2_listing} = ($constants-&amp;gt;{m2} ? $form-&amp;gt;{m2_listing} : undef)&lt;br /&gt;
                        if defined $form-&amp;gt;{m2_listing};&lt;br /&gt;
                $slashdb-&amp;gt;setUser($user-&amp;gt;{uid}, $update_hr);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if (!$id &amp;amp;&amp;amp; !$form-&amp;gt;{userfield}) {&lt;br /&gt;
                if ($form-&amp;gt;{uid} &amp;amp;&amp;amp; ! $id) {&lt;br /&gt;
                        $fieldkey = 'uid';&lt;br /&gt;
                        ($uid, $id) = ($form-&amp;gt;{uid}, $form-&amp;gt;{uid});&lt;br /&gt;
                        $requested_user = isAnon($uid) ? $user : $reader-&amp;gt;getUser($id);&lt;br /&gt;
                        $nick = $requested_user-&amp;gt;{nickname};&lt;br /&gt;
                        $form-&amp;gt;{userfield} = $nick if $admin_flag;&lt;br /&gt;
&lt;br /&gt;
                } elsif ($form-&amp;gt;{nick} &amp;amp;&amp;amp; ! $id) {&lt;br /&gt;
                        $fieldkey = 'nickname';&lt;br /&gt;
                        ($nick, $id) = ($form-&amp;gt;{nick}, $form-&amp;gt;{nick});&lt;br /&gt;
                        $uid = $reader-&amp;gt;getUserUID($id);&lt;br /&gt;
                        if (isAnon($uid)) {&lt;br /&gt;
                                $requested_user = $user;&lt;br /&gt;
                                ($nick, $uid, $id) = @{$user}{qw(nickname uid nickname)};&lt;br /&gt;
                        } else {&lt;br /&gt;
                                $requested_user = $reader-&amp;gt;getUser($uid);&lt;br /&gt;
                        }&lt;br /&gt;
                        $form-&amp;gt;{userfield} = $uid if $admin_flag;&lt;br /&gt;
&lt;br /&gt;
                } else {&lt;br /&gt;
                        $fieldkey = 'uid';&lt;br /&gt;
                        ($id, $uid) = ($user-&amp;gt;{uid}, $user-&amp;gt;{uid});&lt;br /&gt;
                        $requested_user = $reader-&amp;gt;getUser($uid);&lt;br /&gt;
                        $form-&amp;gt;{userfield} = $uid if $admin_flag;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
        } elsif ($user-&amp;gt;{is_admin}) {&lt;br /&gt;
                $id ||= $form-&amp;gt;{userfield} || $user-&amp;gt;{uid};&lt;br /&gt;
                if ($id =~ /^[0-9a-f]{16}$/) {&lt;br /&gt;
                        $requested_user-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                        $fieldkey = &amp;quot;srcid&amp;quot;;&lt;br /&gt;
                        $requested_user-&amp;gt;{$fieldkey} = $id;&lt;br /&gt;
                } elsif ($id =~ /^\d+$/) {&lt;br /&gt;
                        # If it's longer than a uid could possibly be, it&lt;br /&gt;
                        # must be a srcid.  The uid column right now is a&lt;br /&gt;
                        # MEDIUMINT (max 16M) but at most might someday&lt;br /&gt;
                        # be an INT (max 4G).&lt;br /&gt;
                        if (length($id) &amp;gt; 11) {&lt;br /&gt;
                                $requested_user-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                                $fieldkey = &amp;quot;srcid&amp;quot;;&lt;br /&gt;
                                $requested_user-&amp;gt;{$fieldkey} = $id;&lt;br /&gt;
                        } else {&lt;br /&gt;
                                $fieldkey = 'uid';&lt;br /&gt;
                                $requested_user = $reader-&amp;gt;getUser($id);&lt;br /&gt;
                                $uid = $requested_user-&amp;gt;{uid};&lt;br /&gt;
                                $nick = $requested_user-&amp;gt;{nickname};&lt;br /&gt;
                                if ((my $conflict_id = $reader-&amp;gt;getUserUID($id)) &amp;amp;&amp;amp; $form-&amp;gt;{userinfo}) {&lt;br /&gt;
                                        slashDisplay('showInfoConflict', {&lt;br /&gt;
                                                op              =&amp;gt; 'userinfo',&lt;br /&gt;
                                                id              =&amp;gt; $uid,&lt;br /&gt;
                                                nick            =&amp;gt; $nick,&lt;br /&gt;
                                                conflict_id     =&amp;gt; $conflict_id&lt;br /&gt;
                                        });&lt;br /&gt;
                                        return 1;&lt;br /&gt;
                                }&lt;br /&gt;
                        }&lt;br /&gt;
&lt;br /&gt;
                } elsif (length($id) == 32) {&lt;br /&gt;
                        $requested_user-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                        if ($form-&amp;gt;{fieldname}&lt;br /&gt;
                                &amp;amp;&amp;amp; $form-&amp;gt;{fieldname} =~ /^(ipid|subnetid)$/) {&lt;br /&gt;
                                $fieldkey = $form-&amp;gt;{fieldname};&lt;br /&gt;
                        } else {&lt;br /&gt;
                                $fieldkey = 'md5id';&lt;br /&gt;
                        }&lt;br /&gt;
                        $requested_user-&amp;gt;{$fieldkey} = $id;&lt;br /&gt;
                } elsif ($id =~ /^(\d{1,3}\.\d{1,3}.\d{1,3}\.0)$/ &lt;br /&gt;
                                || $id =~ /^(\d{1,3}\.\d{1,3}\.\d{1,3})\.?$/) {&lt;br /&gt;
                        $fieldkey = 'subnetid';&lt;br /&gt;
                        $requested_user-&amp;gt;{subnetid} = $1; &lt;br /&gt;
                        $requested_user-&amp;gt;{subnetid} .= '.0' if $requested_user-&amp;gt;{subnetid} =~ /^\d{1,3}\.\d{1,3}\.\d{1,3}$/; &lt;br /&gt;
                        $requested_user-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                        $requested_user-&amp;gt;{subnetid} = md5_hex($requested_user-&amp;gt;{subnetid});&lt;br /&gt;
&lt;br /&gt;
                } elsif ($id =~ /^([\d+\.]+)$/) {&lt;br /&gt;
                        $fieldkey = 'ipid';&lt;br /&gt;
                        $requested_user-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                        $id ||= $1;&lt;br /&gt;
                        $requested_user-&amp;gt;{ipid} = md5_hex($1);&lt;br /&gt;
&lt;br /&gt;
                } elsif ($id =~ /^(.*@.*\..*?)$/) {&lt;br /&gt;
                        # check for email addy, but make it by uid&lt;br /&gt;
                        $fieldkey = 'uid';&lt;br /&gt;
                        $id = $uid = $reader-&amp;gt;getUserEmail($id);&lt;br /&gt;
                        $requested_user = $reader-&amp;gt;getUser($uid);&lt;br /&gt;
                        $nick = $requested_user-&amp;gt;{nickname};&lt;br /&gt;
&lt;br /&gt;
                } else {  # go by nickname, but make it by uid&lt;br /&gt;
                        $fieldkey = 'uid';&lt;br /&gt;
                        $id = $uid = $reader-&amp;gt;getUserUID($id);&lt;br /&gt;
                        $requested_user = $reader-&amp;gt;getUser($uid);&lt;br /&gt;
                        $nick = $requested_user-&amp;gt;{nickname};&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
        } else {&lt;br /&gt;
                $fieldkey = 'uid';&lt;br /&gt;
                ($id, $uid) = ($user-&amp;gt;{uid}, $user-&amp;gt;{uid});&lt;br /&gt;
                $requested_user = $reader-&amp;gt;getUser($uid);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Can't get user data for the anonymous user.&lt;br /&gt;
        if ($fieldkey eq 'uid' &amp;amp;&amp;amp; isAnon($uid)) {&lt;br /&gt;
                header(getMessage('user_header')) or return;&lt;br /&gt;
                return displayForm();&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $user_change = { };&lt;br /&gt;
        if ($fieldkey eq 'uid' &amp;amp;&amp;amp; !$user-&amp;gt;{is_anon}&lt;br /&gt;
                &amp;amp;&amp;amp; $uid != $user-&amp;gt;{uid} &amp;amp;&amp;amp; !isAnon($uid)) {&lt;br /&gt;
                # Store the fact that this user last looked at that user.&lt;br /&gt;
                # For maximal convenience in stalking.&lt;br /&gt;
                $user_change-&amp;gt;{lastlookuid} = $uid;&lt;br /&gt;
                $user_change-&amp;gt;{lastlooktime} = time;&lt;br /&gt;
                $user-&amp;gt;{lastlookuid} = $uid;&lt;br /&gt;
                $user-&amp;gt;{lastlooktime} = time;&lt;br /&gt;
                $hr-&amp;gt;{tab_selected_1} = 'otheruser';&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # showInfo's header information is delayed until here, because&lt;br /&gt;
        # the target user's info is not available until here.&lt;br /&gt;
        vislenify($requested_user);&lt;br /&gt;
        header(getMessage('user_header', { useredit =&amp;gt; $requested_user, fieldkey =&amp;gt; $fieldkey })) or return;&lt;br /&gt;
        # This is a hardcoded position, bad idea and should be fixed -Brian&lt;br /&gt;
        # Yeah, we should pull this into a template somewhere...&lt;br /&gt;
        print getMessage('note', { note =&amp;gt; $hr-&amp;gt;{note} }) if defined $hr-&amp;gt;{note};&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        my $comments_wanted = $user-&amp;gt;{show_comments_num}&lt;br /&gt;
                || $constants-&amp;gt;{user_comment_display_default};&lt;br /&gt;
        my $min_comment = $form-&amp;gt;{min_comment} || 0;&lt;br /&gt;
        $min_comment = 0 unless $user-&amp;gt;{seclev} &amp;gt; $constants-&amp;gt;{comments_more_seclev}&lt;br /&gt;
                || $constants-&amp;gt;{comments_more_seclev} == 2 &amp;amp;&amp;amp; $user-&amp;gt;{is_subscriber};&lt;br /&gt;
&lt;br /&gt;
        my($netid, $netid_vis) = ('', '');&lt;br /&gt;
&lt;br /&gt;
        my $comment_time;&lt;br /&gt;
        my $non_admin_limit = $comments_wanted;&lt;br /&gt;
&lt;br /&gt;
        if ($requested_user-&amp;gt;{nonuid}) {&lt;br /&gt;
                $requested_user-&amp;gt;{fg} = $user-&amp;gt;{fg};&lt;br /&gt;
                $requested_user-&amp;gt;{bg} = $user-&amp;gt;{bg};&lt;br /&gt;
&lt;br /&gt;
                if ($requested_user-&amp;gt;{ipid}) {&lt;br /&gt;
                        $netid = $requested_user-&amp;gt;{ipid} ;&lt;br /&gt;
&lt;br /&gt;
                } elsif ($requested_user-&amp;gt;{md5id}) {&lt;br /&gt;
                        $netid = $requested_user-&amp;gt;{md5id} ;&lt;br /&gt;
&lt;br /&gt;
                } elsif ($requested_user-&amp;gt;{srcid}) {&lt;br /&gt;
                        $netid = $requested_user-&amp;gt;{srcid} ;&lt;br /&gt;
                } else {&lt;br /&gt;
                        $netid = $requested_user-&amp;gt;{subnetid} ;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                my $data = {&lt;br /&gt;
                        id =&amp;gt; $id,&lt;br /&gt;
                        md5id =&amp;gt; $netid,&lt;br /&gt;
                };&lt;br /&gt;
                vislenify($data); # add $data-&amp;gt;{md5id_vis}&lt;br /&gt;
                $netid_vis = $data-&amp;gt;{md5id_vis};&lt;br /&gt;
&lt;br /&gt;
                $title = getTitle('user_netID_user_title', $data);&lt;br /&gt;
&lt;br /&gt;
                $admin_block = getUserAdmin($netid, $fieldkey, 0) if $admin_flag;&lt;br /&gt;
&lt;br /&gt;
                if ($form-&amp;gt;{fieldname}) {&lt;br /&gt;
                        if ($form-&amp;gt;{fieldname} eq 'ipid') {&lt;br /&gt;
                                $commentcount           = $reader-&amp;gt;countCommentsByIPID($netid);&lt;br /&gt;
                                $commentcount_time      = $reader-&amp;gt;countCommentsByIPID($netid, { cid_at_or_after =&amp;gt; $cid_for_time_period });&lt;br /&gt;
                                $comments = getCommentListing(&amp;quot;ipid&amp;quot;, $netid,&lt;br /&gt;
                                        $min_comment, $time_period, $commentcount, $commentcount_time, $cid_for_time_period, &lt;br /&gt;
                                        $non_admin_limit, $admin_time_period_limit, $admin_non_time_limit)&lt;br /&gt;
                                                if $commentcount;&lt;br /&gt;
                        } elsif ($form-&amp;gt;{fieldname} eq 'subnetid') {&lt;br /&gt;
                                $commentcount           = $reader-&amp;gt;countCommentsBySubnetID($netid);&lt;br /&gt;
                                $commentcount_time      = $reader-&amp;gt;countCommentsBySubnetID($netid, { cid_at_or_after =&amp;gt; $cid_for_time_period });&lt;br /&gt;
                                $comments = getCommentListing(&amp;quot;subnetid&amp;quot;, $netid,&lt;br /&gt;
                                        $min_comment, $time_period, $commentcount, $commentcount_time, $cid_for_time_period,&lt;br /&gt;
                                        $non_admin_limit, $admin_time_period_limit, $admin_non_time_limit)&lt;br /&gt;
                                                if $commentcount;&lt;br /&gt;
&lt;br /&gt;
                        } else {&lt;br /&gt;
                                delete $form-&amp;gt;{fieldname};&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
                if (!defined($comments)) {&lt;br /&gt;
                        # Last resort; here for backwards compatibility mostly.&lt;br /&gt;
                        my $type;&lt;br /&gt;
                        ($commentcount,$type) = $reader-&amp;gt;countCommentsByIPIDOrSubnetID($netid);&lt;br /&gt;
                        $commentcount_time = $reader-&amp;gt;countCommentsByIPIDOrSubnetID($netid, { cid_at_or_after =&amp;gt; $cid_for_time_period });&lt;br /&gt;
                        if ($type eq &amp;quot;ipid&amp;quot;) {&lt;br /&gt;
                                $comments = getCommentListing(&amp;quot;ipid&amp;quot;, $netid,&lt;br /&gt;
                                        $min_comment, $time_period, $commentcount, $commentcount_time, $cid_for_time_period,&lt;br /&gt;
                                        $non_admin_limit, $admin_time_period_limit, $admin_non_time_limit)&lt;br /&gt;
                                                if $commentcount;&lt;br /&gt;
                        } elsif ($type eq &amp;quot;subnetid&amp;quot;) {&lt;br /&gt;
                                $comments = getCommentListing(&amp;quot;subnetid&amp;quot;, $netid,&lt;br /&gt;
                                        $min_comment, $time_period, $commentcount, $commentcount_time,  $cid_for_time_period,&lt;br /&gt;
                                        $non_admin_limit, $admin_time_period_limit, $admin_non_time_limit)&lt;br /&gt;
                                                if $commentcount;&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
        } else {&lt;br /&gt;
                $admin_block = getUserAdmin($id, $fieldkey, 1) if $admin_flag;&lt;br /&gt;
&lt;br /&gt;
                $commentcount      = $reader-&amp;gt;countCommentsByUID($requested_user-&amp;gt;{uid});&lt;br /&gt;
                $commentcount_time = $reader-&amp;gt;countCommentsByUID($requested_user-&amp;gt;{uid}, { cid_at_or_after =&amp;gt; $cid_for_time_period });&lt;br /&gt;
                $comments = getCommentListing(&amp;quot;uid&amp;quot;, $requested_user-&amp;gt;{uid},&lt;br /&gt;
                        $min_comment, $time_period, $commentcount, $commentcount_time, $cid_for_time_period,&lt;br /&gt;
                        $non_admin_limit, $admin_time_period_limit, $admin_non_time_limit,&lt;br /&gt;
                        { use_uid_cid_cutoff =&amp;gt; 1 })&lt;br /&gt;
                                if $commentcount;&lt;br /&gt;
                $netid = $requested_user-&amp;gt;{uid};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Grab the nicks of the uids we have, we're going to be adding them&lt;br /&gt;
        # into the struct.&lt;br /&gt;
        my @users_extra_cols_wanted       = qw( nickname );&lt;br /&gt;
        my @discussions_extra_cols_wanted = qw( type );&lt;br /&gt;
        my $uid_hr = { };&lt;br /&gt;
        my $sid_hr = { };&lt;br /&gt;
        if ($comments &amp;amp;&amp;amp; @$comments) {&lt;br /&gt;
                my %uids = ();&lt;br /&gt;
                my %sids = ();&lt;br /&gt;
                for my $c (@$comments) {&lt;br /&gt;
                        $uids{$c-&amp;gt;{uid}}++;&lt;br /&gt;
                        $sids{$c-&amp;gt;{sid}}++;&lt;br /&gt;
                }&lt;br /&gt;
                my $uids = join(&amp;quot;, &amp;quot;, sort { $a &amp;lt;=&amp;gt; $b } keys %uids);&lt;br /&gt;
                my $sids = join(&amp;quot;, &amp;quot;, sort { $a &amp;lt;=&amp;gt; $b } keys %sids);&lt;br /&gt;
                $uid_hr = $reader-&amp;gt;sqlSelectAllHashref(&lt;br /&gt;
                        &amp;quot;uid&amp;quot;,&lt;br /&gt;
                        &amp;quot;uid, &amp;quot; . join(&amp;quot;, &amp;quot;, @users_extra_cols_wanted),&lt;br /&gt;
                        &amp;quot;users&amp;quot;,&lt;br /&gt;
                        &amp;quot;uid IN ($uids)&amp;quot;&lt;br /&gt;
                );&lt;br /&gt;
&lt;br /&gt;
                $sid_hr = $reader-&amp;gt;sqlSelectAllHashref(&lt;br /&gt;
                        &amp;quot;id&amp;quot;,&lt;br /&gt;
                        &amp;quot;id, &amp;quot; . join(&amp;quot;, &amp;quot;, @discussions_extra_cols_wanted),&lt;br /&gt;
                        &amp;quot;discussions&amp;quot;,&lt;br /&gt;
                        &amp;quot;id IN ($sids)&amp;quot;&lt;br /&gt;
                );&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $cids_seen = {};&lt;br /&gt;
        my $kinds = $slashdb-&amp;gt;getDescriptions('discussion_kinds');&lt;br /&gt;
        for my $comment (@$comments) {&lt;br /&gt;
                $cids_seen-&amp;gt;{$comment-&amp;gt;{cid}}++;&lt;br /&gt;
                my $type;&lt;br /&gt;
                # This works since $sid is numeric.&lt;br /&gt;
                my $replies = $reader-&amp;gt;countCommentsBySidPid($comment-&amp;gt;{sid}, $comment-&amp;gt;{cid});&lt;br /&gt;
&lt;br /&gt;
                # This is cached.&lt;br /&gt;
                my $discussion = $reader-&amp;gt;getDiscussion($comment-&amp;gt;{sid});&lt;br /&gt;
#use Data::Dumper; if ($discussion &amp;amp;&amp;amp; !$discussion-&amp;gt;{dkid}) { print STDERR scalar(gmtime) . &amp;quot; users.pl discussion but no dkid: &amp;quot; . Dumper($discussion) }&lt;br /&gt;
                if (!$discussion || !$discussion-&amp;gt;{dkid}) {&lt;br /&gt;
                        # A comment with no accompanying discussion;&lt;br /&gt;
                        # basically we pretend it doesn't exist.&lt;br /&gt;
                        next;&lt;br /&gt;
                } elsif ($kinds-&amp;gt;{ $discussion-&amp;gt;{dkid} } =~ /^journal(?:-story)?$/) {&lt;br /&gt;
                        $type = 'journal';&lt;br /&gt;
                } elsif ($kinds-&amp;gt;{ $discussion-&amp;gt;{dkid} } eq 'poll') {&lt;br /&gt;
                        $type = 'poll';&lt;br /&gt;
                } else {&lt;br /&gt;
                        $type = 'story';&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                $comment-&amp;gt;{points} += $user-&amp;gt;{karma_bonus}&lt;br /&gt;
                        if $user-&amp;gt;{karma_bonus} &amp;amp;&amp;amp; $comment-&amp;gt;{karma_bonus} eq 'yes';&lt;br /&gt;
                $comment-&amp;gt;{points} += $user-&amp;gt;{subscriber_bonus}&lt;br /&gt;
                        if $user-&amp;gt;{subscriber_bonus} &amp;amp;&amp;amp; $comment-&amp;gt;{subscriber_bonus} eq 'yes';&lt;br /&gt;
&lt;br /&gt;
                # fix points in case they are out of bounds&lt;br /&gt;
                $comment-&amp;gt;{points} = $constants-&amp;gt;{comment_minscore} if $comment-&amp;gt;{points} &amp;lt; $constants-&amp;gt;{comment_minscore};&lt;br /&gt;
                $comment-&amp;gt;{points} = $constants-&amp;gt;{comment_maxscore} if $comment-&amp;gt;{points} &amp;gt; $constants-&amp;gt;{comment_maxscore};&lt;br /&gt;
                vislenify($comment);&lt;br /&gt;
                my $data = {&lt;br /&gt;
                        pid             =&amp;gt; $comment-&amp;gt;{pid},&lt;br /&gt;
                        url             =&amp;gt; $discussion-&amp;gt;{url},&lt;br /&gt;
                        disc_type       =&amp;gt; $type,&lt;br /&gt;
                        disc_title      =&amp;gt; $discussion-&amp;gt;{title},&lt;br /&gt;
                        disc_time       =&amp;gt; $discussion-&amp;gt;{ts},&lt;br /&gt;
                        sid             =&amp;gt; $comment-&amp;gt;{sid},&lt;br /&gt;
                        cid             =&amp;gt; $comment-&amp;gt;{cid},&lt;br /&gt;
                        subj            =&amp;gt; $comment-&amp;gt;{subject},&lt;br /&gt;
                        cdate           =&amp;gt; $comment-&amp;gt;{date},&lt;br /&gt;
                        pts             =&amp;gt; $comment-&amp;gt;{points},&lt;br /&gt;
                        reason          =&amp;gt; $comment-&amp;gt;{reason},&lt;br /&gt;
                        uid             =&amp;gt; $comment-&amp;gt;{uid},&lt;br /&gt;
                        replies         =&amp;gt; $replies,&lt;br /&gt;
                        ipid            =&amp;gt; $comment-&amp;gt;{ipid},&lt;br /&gt;
                        ipid_vis        =&amp;gt; $comment-&amp;gt;{ipid_vis},&lt;br /&gt;
                        karma           =&amp;gt; $comment-&amp;gt;{karma},&lt;br /&gt;
                        tweak           =&amp;gt; $comment-&amp;gt;{tweak},&lt;br /&gt;
                        tweak_orig      =&amp;gt; $comment-&amp;gt;{tweak_orig},&lt;br /&gt;
&lt;br /&gt;
                };&lt;br /&gt;
                #Karma bonus time&lt;br /&gt;
&lt;br /&gt;
                for my $col (@users_extra_cols_wanted) {&lt;br /&gt;
                        $data-&amp;gt;{$col} = $uid_hr-&amp;gt;{$comment-&amp;gt;{uid}}{$col} if defined $uid_hr-&amp;gt;{$comment-&amp;gt;{uid}}{$col};&lt;br /&gt;
                }&lt;br /&gt;
                for my $col(@discussions_extra_cols_wanted) {&lt;br /&gt;
                        $data-&amp;gt;{$col} = $sid_hr-&amp;gt;{$comment-&amp;gt;{sid}}{$col} if defined $sid_hr-&amp;gt;{$comment-&amp;gt;{sid}}{$col};&lt;br /&gt;
                }&lt;br /&gt;
                push @$commentstruct, $data;&lt;br /&gt;
        }&lt;br /&gt;
#       if (grep { !defined($_-&amp;gt;{disc_time}) || !defined($_-&amp;gt;{sid}) } @$commentstruct) { use Data::Dumper; print STDERR &amp;quot;showInfo undef in commentstruct for id=$id: &amp;quot; . Dumper($commentstruct) }&lt;br /&gt;
        # Sort so the chosen group of comments is sorted by discussion&lt;br /&gt;
        @$commentstruct = sort {&lt;br /&gt;
                $b-&amp;gt;{disc_time} cmp $a-&amp;gt;{disc_time} || $b-&amp;gt;{sid} &amp;lt;=&amp;gt; $a-&amp;gt;{sid}&lt;br /&gt;
        } @$commentstruct&lt;br /&gt;
                unless $user-&amp;gt;{user_comment_sort_type} &amp;amp;&amp;amp; $user-&amp;gt;{user_comment_sort_type} == 1;&lt;br /&gt;
&lt;br /&gt;
        my $cid_list = [ keys %$cids_seen ];&lt;br /&gt;
        my $cids_to_mods = {};&lt;br /&gt;
        my $mod_reader = getObject(&amp;quot;Slash::$constants-&amp;gt;{m1_pluginname}&amp;quot;, { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        if ($constants-&amp;gt;{m1} &amp;amp;&amp;amp; $admin_flag &amp;amp;&amp;amp; $constants-&amp;gt;{show_mods_with_comments}) {&lt;br /&gt;
                my $comment_mods = $mod_reader-&amp;gt;getModeratorCommentLog(&amp;quot;DESC&amp;quot;,&lt;br /&gt;
                        $constants-&amp;gt;{mod_limit_with_comments}, &amp;quot;cidin&amp;quot;, $cid_list);&lt;br /&gt;
&lt;br /&gt;
                # Loop through mods and group them by the sid they're attached to&lt;br /&gt;
                while (my $mod = shift @$comment_mods) {&lt;br /&gt;
                        push @{$cids_to_mods-&amp;gt;{$mod-&amp;gt;{cid}}}, $mod;&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $sub_limit = ((($admin_flag || $user-&amp;gt;{uid} == $requested_user-&amp;gt;{uid}) ? $constants-&amp;gt;{submissions_all_page_size} : $constants-&amp;gt;{submissions_accepted_only_page_size}) || &amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        my $sub_options = { limit_days =&amp;gt; 365 };&lt;br /&gt;
        $sub_options-&amp;gt;{accepted_only} = 1 if !$admin_flag &amp;amp;&amp;amp; $user-&amp;gt;{uid} != $requested_user-&amp;gt;{uid};&lt;br /&gt;
&lt;br /&gt;
        my $sub_field = $form-&amp;gt;{fieldname};&lt;br /&gt;
&lt;br /&gt;
        my ($subcount, $ret_field) = $reader-&amp;gt;countSubmissionsByNetID($netid, $sub_field)&lt;br /&gt;
                if $requested_user-&amp;gt;{nonuid};&lt;br /&gt;
        my $submissions = $reader-&amp;gt;getSubmissionsByNetID($netid, $ret_field, $sub_limit, $sub_options)&lt;br /&gt;
                if $requested_user-&amp;gt;{nonuid};&lt;br /&gt;
&lt;br /&gt;
        my $ipid_hoursback = $constants-&amp;gt;{istroll_ipid_hours} || 72;&lt;br /&gt;
        my $uid_hoursback = $constants-&amp;gt;{istroll_uid_hours} || 72;&lt;br /&gt;
&lt;br /&gt;
        if ($requested_user-&amp;gt;{nonuid}) {&lt;br /&gt;
                slashDisplay('netIDInfo', {&lt;br /&gt;
                        title                   =&amp;gt; $title,&lt;br /&gt;
                        id                      =&amp;gt; $id,&lt;br /&gt;
                        useredit                =&amp;gt; $requested_user,&lt;br /&gt;
                        commentstruct           =&amp;gt; $commentstruct || [],&lt;br /&gt;
                        commentcount            =&amp;gt; $commentcount,&lt;br /&gt;
                        min_comment             =&amp;gt; $min_comment,&lt;br /&gt;
                        admin_flag              =&amp;gt; $admin_flag,&lt;br /&gt;
                        admin_block             =&amp;gt; $admin_block,&lt;br /&gt;
                        netid                   =&amp;gt; $netid,&lt;br /&gt;
                        netid_vis               =&amp;gt; $netid_vis,&lt;br /&gt;
                        reasons                 =&amp;gt; $mod_reader-&amp;gt;getReasons(),&lt;br /&gt;
                        subcount                =&amp;gt; $subcount,&lt;br /&gt;
                        submissions             =&amp;gt; $submissions,&lt;br /&gt;
                        hr_hours_back           =&amp;gt; $ipid_hoursback,&lt;br /&gt;
                        cids_to_mods            =&amp;gt; $cids_to_mods,&lt;br /&gt;
                        comment_time            =&amp;gt; $comment_time&lt;br /&gt;
                });&lt;br /&gt;
&lt;br /&gt;
        } else {&lt;br /&gt;
                if (! $requested_user-&amp;gt;{uid}) {&lt;br /&gt;
                        print getError('userinfo_idnf_err', { id =&amp;gt; $id, fieldkey =&amp;gt; $fieldkey});&lt;br /&gt;
                        return 1;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                $karma_flag = 1 if $admin_flag;&lt;br /&gt;
                $requested_user-&amp;gt;{nick_plain} = $nick ||= $requested_user-&amp;gt;{nickname};&lt;br /&gt;
                $nick = strip_literal($nick);&lt;br /&gt;
&lt;br /&gt;
                if ($requested_user-&amp;gt;{uid} == $user-&amp;gt;{uid}) {&lt;br /&gt;
                        $karma_flag = 1;&lt;br /&gt;
                        $nickmatch_flag = 1;&lt;br /&gt;
                        $points = $requested_user-&amp;gt;{points};&lt;br /&gt;
&lt;br /&gt;
                        $mod_flag = 1 if $points &amp;gt; 0;&lt;br /&gt;
&lt;br /&gt;
                        $title = getTitle('userInfo_main_title', { nick =&amp;gt; $nick, uid =&amp;gt; $uid });&lt;br /&gt;
&lt;br /&gt;
                } else {&lt;br /&gt;
                        $title = getTitle('userInfo_user_title', { nick =&amp;gt; $nick, uid =&amp;gt; $uid });&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                my $lastjournal = _get_lastjournal($uid);&lt;br /&gt;
&lt;br /&gt;
                my $subcount = $reader-&amp;gt;countSubmissionsByUID($uid);&lt;br /&gt;
&lt;br /&gt;
                my $submissions = $reader-&amp;gt;getSubmissionsByUID($uid, $sub_limit, $sub_options);&lt;br /&gt;
                my $metamods;&lt;br /&gt;
                if ($constants-&amp;gt;{m2} &amp;amp;&amp;amp; $admin_flag) {&lt;br /&gt;
                        my $metamod_reader = getObject('Slash::Metamod', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
                        $metamods = $metamod_reader-&amp;gt;getMetamodlogForUser($uid, 30);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                my $tags_reader = getObject('Slash::Tags', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
                my $tagshist = [];&lt;br /&gt;
                if ($tags_reader &amp;amp;&amp;amp; $user-&amp;gt;{is_admin}) {&lt;br /&gt;
                        $tagshist = $tags_reader-&amp;gt;getAllTagsFromUser($requested_user-&amp;gt;{uid}, { orderby =&amp;gt; 'created_at', orderdir =&amp;gt; 'DESC', limit =&amp;gt; 30, include_private =&amp;gt; 1 });&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                slashDisplay('userInfo', {&lt;br /&gt;
                        title                   =&amp;gt; $title,&lt;br /&gt;
                        uid                     =&amp;gt; $uid,&lt;br /&gt;
                        useredit                =&amp;gt; $requested_user,&lt;br /&gt;
                        points                  =&amp;gt; $points,&lt;br /&gt;
                        commentstruct           =&amp;gt; $commentstruct || [],&lt;br /&gt;
                        commentcount            =&amp;gt; $commentcount,&lt;br /&gt;
                        min_comment             =&amp;gt; $min_comment,&lt;br /&gt;
                        nickmatch_flag          =&amp;gt; $nickmatch_flag,&lt;br /&gt;
                        mod_flag                =&amp;gt; $mod_flag,&lt;br /&gt;
                        karma_flag              =&amp;gt; $karma_flag,&lt;br /&gt;
                        admin_block             =&amp;gt; $admin_block,&lt;br /&gt;
                        admin_flag              =&amp;gt; $admin_flag,&lt;br /&gt;
                        suadmin_flag            =&amp;gt; $suadmin_flag,&lt;br /&gt;
                        reasons                 =&amp;gt; $mod_reader-&amp;gt;getReasons(),&lt;br /&gt;
                        lastjournal             =&amp;gt; $lastjournal,&lt;br /&gt;
                        hr_hours_back           =&amp;gt; $ipid_hoursback,&lt;br /&gt;
                        cids_to_mods            =&amp;gt; $cids_to_mods,&lt;br /&gt;
                        comment_time            =&amp;gt; $comment_time,&lt;br /&gt;
                        submissions             =&amp;gt; $submissions,&lt;br /&gt;
                        subcount                =&amp;gt; $subcount,&lt;br /&gt;
                        metamods                =&amp;gt; $metamods,&lt;br /&gt;
                        tagshist                =&amp;gt; $tagshist&lt;br /&gt;
                });&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($user_change &amp;amp;&amp;amp; %$user_change) {&lt;br /&gt;
                $slashdb-&amp;gt;setUser($user-&amp;gt;{uid}, $user_change);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        return 1;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub _get_lastjournal {&lt;br /&gt;
        my($uid) = @_;&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $lastjournal = undef;&lt;br /&gt;
        if (my $journal = getObject('Slash::Journal', { db_type =&amp;gt; 'reader' })) {&lt;br /&gt;
                my $j = $journal-&amp;gt;getsByUid($uid, 0, 1);&lt;br /&gt;
                if ($j &amp;amp;&amp;amp; @$j) {&lt;br /&gt;
                        # Yep, there are 1 or more journals... get the first.&lt;br /&gt;
                        $j = $j-&amp;gt;[0];&lt;br /&gt;
                }&lt;br /&gt;
                if ($j &amp;amp;&amp;amp; @$j) {&lt;br /&gt;
                        # Yep, that first journal exists and has entries...&lt;br /&gt;
                        # convert from stupid numeric array to a hashref.&lt;br /&gt;
                        my @field = qw( date article description id&lt;br /&gt;
                                        posttype tid discussion         );&lt;br /&gt;
                        $lastjournal = { };&lt;br /&gt;
                        for my $i (0..$#field) {&lt;br /&gt;
                                $lastjournal-&amp;gt;{$field[$i]} = $j-&amp;gt;[$i];&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($lastjournal) {&lt;br /&gt;
&lt;br /&gt;
                # Strip the article field for display.&lt;br /&gt;
                $lastjournal-&amp;gt;{article} = strip_mode($lastjournal-&amp;gt;{article},&lt;br /&gt;
                        $lastjournal-&amp;gt;{posttype});&lt;br /&gt;
&lt;br /&gt;
                # For display, include a reduced-size version, where the&lt;br /&gt;
                # size is based on the user's maxcomment size (which&lt;br /&gt;
                # defaults to 4K) and can't have too many line-breaking&lt;br /&gt;
                # tags.&lt;br /&gt;
                my $art_shrunk = $lastjournal-&amp;gt;{article};&lt;br /&gt;
                my $maxsize = int($constants-&amp;gt;{default_maxcommentsize} / 25);&lt;br /&gt;
                $maxsize =  80 if $maxsize &amp;lt;  80;&lt;br /&gt;
                $maxsize = 600 if $maxsize &amp;gt; 600;&lt;br /&gt;
                $art_shrunk = chopEntity($art_shrunk, $maxsize);&lt;br /&gt;
&lt;br /&gt;
                my $approvedtags_break = $constants-&amp;gt;{approvedtags_break} || [];&lt;br /&gt;
                my $break_tag = join '|', @$approvedtags_break;&lt;br /&gt;
                if (scalar(() = $art_shrunk =~ /&amp;lt;(?:$break_tag)&amp;gt;/gi) &amp;gt; 2) {&lt;br /&gt;
                        $art_shrunk =~ s/\A&lt;br /&gt;
                        (&lt;br /&gt;
                                (?: &amp;lt;(?:$break_tag)&amp;gt; )?&lt;br /&gt;
                                .*?   &amp;lt;(?:$break_tag)&amp;gt;&lt;br /&gt;
                                .*?&lt;br /&gt;
                        )       &amp;lt;(?:$break_tag)&amp;gt;.*&lt;br /&gt;
                        /$1/six;&lt;br /&gt;
                        if (length($art_shrunk) &amp;lt; 15) {&lt;br /&gt;
                                # This journal entry has too much whitespace&lt;br /&gt;
                                # in its first few chars;  scrap it.&lt;br /&gt;
                                undef $art_shrunk;&lt;br /&gt;
                        }&lt;br /&gt;
                        $art_shrunk = chopEntity($art_shrunk) if defined($art_shrunk);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                if (defined $art_shrunk) {&lt;br /&gt;
                        if (length($art_shrunk) &amp;lt; length($lastjournal-&amp;gt;{article})) {&lt;br /&gt;
                                $art_shrunk .= &amp;quot; ...&amp;quot;;&lt;br /&gt;
                        }&lt;br /&gt;
                        $art_shrunk = strip_html($art_shrunk);&lt;br /&gt;
                        $art_shrunk = balanceTags($art_shrunk);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                $lastjournal-&amp;gt;{article_shrunk} = $art_shrunk;&lt;br /&gt;
&lt;br /&gt;
                if ($lastjournal-&amp;gt;{discussion}) {&lt;br /&gt;
                        $lastjournal-&amp;gt;{commentcount} = $reader-&amp;gt;getDiscussion(&lt;br /&gt;
                                $lastjournal-&amp;gt;{discussion}, 'commentcount');&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
        return $lastjournal;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#####################################################################&lt;br /&gt;
sub validateUser {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        # If we aren't expiring accounts in some way, we don't belong here.&lt;br /&gt;
        if (! allowExpiry()) {&lt;br /&gt;
                displayForm();&lt;br /&gt;
                return;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        # Since we are here, if the minimum values for the comment trigger and&lt;br /&gt;
        # the day trigger are -1, then they should be reset to 1.&lt;br /&gt;
        $constants-&amp;gt;{min_expiry_comm} = $constants-&amp;gt;{min_expiry_days} = 1&lt;br /&gt;
                if $constants-&amp;gt;{min_expiry_comm} &amp;lt;= 0 ||&lt;br /&gt;
                   $constants-&amp;gt;{min_expiry_days} &amp;lt;= 0;&lt;br /&gt;
&lt;br /&gt;
        if ($user-&amp;gt;{is_anon} || $user-&amp;gt;{registered}) {&lt;br /&gt;
                if ($user-&amp;gt;{is_anon}) {&lt;br /&gt;
                        print getError('anon_validation_attempt');&lt;br /&gt;
                        displayForm();&lt;br /&gt;
                        return;&lt;br /&gt;
                } else {&lt;br /&gt;
                        print getMessage('no_registration_needed')&lt;br /&gt;
                                if !$user-&amp;gt;{reg_id};&lt;br /&gt;
                        showInfo({ uid =&amp;gt; $user-&amp;gt;{uid} });&lt;br /&gt;
                        return;&lt;br /&gt;
                }&lt;br /&gt;
        # Maybe this should be taken care of in a more centralized location?&lt;br /&gt;
        } elsif ($user-&amp;gt;{reg_id} eq $form-&amp;gt;{id}) {&lt;br /&gt;
                # We have a user and the registration IDs match. We are happy!&lt;br /&gt;
                my($maxComm, $maxDays) = ($constants-&amp;gt;{max_expiry_comm},&lt;br /&gt;
                                          $constants-&amp;gt;{max_expiry_days});&lt;br /&gt;
                my($userComm, $userDays) =&lt;br /&gt;
                        ($user-&amp;gt;{user_expiry_comm}, $user-&amp;gt;{user_expiry_days});&lt;br /&gt;
&lt;br /&gt;
                # Ensure both $userComm and $userDays aren't -1 (expiry has&lt;br /&gt;
                # just been turned on).&lt;br /&gt;
                $userComm = $constants-&amp;gt;{min_expiry_comm}&lt;br /&gt;
                        if $userComm &amp;lt; $constants-&amp;gt;{min_expiry_comm};&lt;br /&gt;
                $userDays = $constants-&amp;gt;{min_expiry_days}&lt;br /&gt;
                        if $userDays &amp;lt; $constants-&amp;gt;{min_expiry_days};&lt;br /&gt;
&lt;br /&gt;
                my $exp = $constants-&amp;gt;{expiry_exponent};&lt;br /&gt;
&lt;br /&gt;
                # Increment only the trigger that was used.&lt;br /&gt;
                my $new_comment_expiry = ($maxComm &amp;gt; 0 &amp;amp;&amp;amp; $userComm &amp;gt; $maxComm)&lt;br /&gt;
                        ? $maxComm&lt;br /&gt;
                        : $userComm * (($user-&amp;gt;{expiry_comm} &amp;lt; 0)&lt;br /&gt;
                                ? $exp&lt;br /&gt;
                                : 1&lt;br /&gt;
                );&lt;br /&gt;
                my $new_days_expiry = ($maxDays &amp;gt; 0 &amp;amp;&amp;amp; $userDays &amp;gt; $maxDays)&lt;br /&gt;
                        ? $maxDays&lt;br /&gt;
                        : $userDays * (($user-&amp;gt;{expiry_days} &amp;lt; 0)&lt;br /&gt;
                                ? $exp&lt;br /&gt;
                                : 1&lt;br /&gt;
                );&lt;br /&gt;
&lt;br /&gt;
                # Reset re-registration triggers for user.&lt;br /&gt;
                $slashdb-&amp;gt;setUser($user-&amp;gt;{uid}, {&lt;br /&gt;
                        'expiry_comm'           =&amp;gt; $new_comment_expiry,&lt;br /&gt;
                        'expiry_days'           =&amp;gt; $new_days_expiry,&lt;br /&gt;
                        'user_expiry_comm'      =&amp;gt; $new_comment_expiry,&lt;br /&gt;
                        'user_expiry_days'      =&amp;gt; $new_days_expiry,&lt;br /&gt;
                });&lt;br /&gt;
&lt;br /&gt;
                # Handles rest of re-registration process.&lt;br /&gt;
                setUserExpired($user-&amp;gt;{uid}, 0);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('regResult');&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#####################################################################&lt;br /&gt;
sub editTags {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $user = getCurrentUser(); &lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $note = $hr-&amp;gt;{note} || &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        return if $user-&amp;gt;{is_anon}; # shouldn't be, but can't hurt to check&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        my $user_edit = $slashdb-&amp;gt;getUser($user-&amp;gt;{uid});&lt;br /&gt;
        my $title = getTitle('editTags_title');&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('editTags', {&lt;br /&gt;
                user_edit       =&amp;gt; $user_edit,&lt;br /&gt;
                title           =&amp;gt; $title,&lt;br /&gt;
                note            =&amp;gt; $note,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub saveTags {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        return if $user-&amp;gt;{is_anon}; # shouldn't be, but can't hurt to check&lt;br /&gt;
&lt;br /&gt;
        $slashdb-&amp;gt;setUser($user-&amp;gt;{uid}, {&lt;br /&gt;
                tags_turnedoff =&amp;gt;       $form-&amp;gt;{showtags} ? '' : 1 });&lt;br /&gt;
        editTags({ note =&amp;gt; getMessage('savetags_msg') });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#####################################################################&lt;br /&gt;
sub showTags {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $tags_reader = getObject('Slash::Tags', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
        # XXX if $user_edit-&amp;gt;{acl}{spammer}, either abort or put ref=nofollow in all links&lt;br /&gt;
&lt;br /&gt;
        my $tagname = $form-&amp;gt;{tagname} || '';&lt;br /&gt;
        $tagname = '' if !$tags_reader-&amp;gt;tagnameSyntaxOK($tagname);&lt;br /&gt;
&lt;br /&gt;
        my($uid, $user_edit);&lt;br /&gt;
        if ($form-&amp;gt;{uid} || $form-&amp;gt;{nick}) {&lt;br /&gt;
                $uid = $form-&amp;gt;{uid} || $tags_reader-&amp;gt;getUserUID($form-&amp;gt;{nick});&lt;br /&gt;
                $user_edit = $tags_reader-&amp;gt;getUser($uid);&lt;br /&gt;
        }&lt;br /&gt;
        if (!$user_edit || $user_edit-&amp;gt;{is_anon}) {&lt;br /&gt;
                $uid = $user-&amp;gt;{uid};&lt;br /&gt;
                $user_edit = $user;&lt;br /&gt;
        }&lt;br /&gt;
        my $nickname = $user_edit-&amp;gt;{nickname};&lt;br /&gt;
&lt;br /&gt;
        if (!$constants-&amp;gt;{plugin}{Tags}) {&lt;br /&gt;
                print getError('bad_op', { op =&amp;gt; $form-&amp;gt;{op}});&lt;br /&gt;
                return;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $tagnameid = $tags_reader-&amp;gt;getTagnameidFromNameIfExists($tagname);&lt;br /&gt;
        if ($tagnameid) {&lt;br /&gt;
                # Show all user's tags for one particular tagname.&lt;br /&gt;
                my $tags_hr = $tags_reader-&amp;gt;getGroupedTagsFromUser($user_edit-&amp;gt;{uid},&lt;br /&gt;
                        { tagnameid =&amp;gt; $tagnameid });&lt;br /&gt;
                my $tags_ar = $tags_hr-&amp;gt;{$tagname} || [ ];&lt;br /&gt;
                slashDisplay('usertagsforname', {&lt;br /&gt;
                        useredit        =&amp;gt; $user_edit,&lt;br /&gt;
                        tagname         =&amp;gt; $tagname,&lt;br /&gt;
                        tags            =&amp;gt; $tags_ar,&lt;br /&gt;
                });&lt;br /&gt;
&lt;br /&gt;
        } else {&lt;br /&gt;
                my $tags_hr = $tags_reader-&amp;gt;getGroupedTagsFromUser($user_edit-&amp;gt;{uid});&lt;br /&gt;
                my $num_tags = 0;&lt;br /&gt;
                for my $tn (keys %$tags_hr) {&lt;br /&gt;
                        $num_tags += scalar @{ $tags_hr-&amp;gt;{$tn} };&lt;br /&gt;
                }&lt;br /&gt;
                my $cutoff = $constants-&amp;gt;{tags_usershow_cutoff} || 200;&lt;br /&gt;
                if ($num_tags &amp;lt;= $cutoff) {&lt;br /&gt;
                        # Show all user's tags, grouped by tagname.&lt;br /&gt;
                        slashDisplay('usertags', {&lt;br /&gt;
                                useredit        =&amp;gt; $user_edit,&lt;br /&gt;
                                tags_grouped    =&amp;gt; $tags_hr,&lt;br /&gt;
                        });&lt;br /&gt;
                } else {&lt;br /&gt;
                        # Show all user's tagnames, with links to show all&lt;br /&gt;
                        # tags for each particular tagname.&lt;br /&gt;
                        my $tagname_ar = [ sort keys %$tags_hr ];&lt;br /&gt;
                        slashDisplay('usertagnames', {&lt;br /&gt;
                                useredit        =&amp;gt; $user_edit,&lt;br /&gt;
                                tagnames        =&amp;gt; $tagname_ar,&lt;br /&gt;
                        });&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub showBookmarks {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $tags_reader = getObject('Slash::Tags', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
        my($uid, $user_edit);&lt;br /&gt;
        if ($form-&amp;gt;{uid} || $form-&amp;gt;{nick}) {&lt;br /&gt;
                $uid = $form-&amp;gt;{uid} || $tags_reader-&amp;gt;getUserUID($form-&amp;gt;{nick});&lt;br /&gt;
                $user_edit = $tags_reader-&amp;gt;getUser($uid);&lt;br /&gt;
        }&lt;br /&gt;
        if (!$user_edit || $user_edit-&amp;gt;{is_anon}) {&lt;br /&gt;
                $uid = $user-&amp;gt;{uid};&lt;br /&gt;
                $user_edit = $user;&lt;br /&gt;
        }&lt;br /&gt;
        my $nickname = $user_edit-&amp;gt;{nickname};&lt;br /&gt;
&lt;br /&gt;
        if (!$constants-&amp;gt;{plugin}{Tags}) {&lt;br /&gt;
                print getError('bad_op', { op =&amp;gt; $form-&amp;gt;{op}});&lt;br /&gt;
                return;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $tags_ar = $tags_reader-&amp;gt;getGroupedTagsFromUser($user_edit-&amp;gt;{uid}, { type =&amp;gt; &amp;quot;urls&amp;quot;, only_bookmarked =&amp;gt; 1 });&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('userbookmarks', {&lt;br /&gt;
                useredit        =&amp;gt; $user_edit,&lt;br /&gt;
                tags_grouped    =&amp;gt; $tags_ar,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub editKey {&lt;br /&gt;
        my($uid) = @_;&lt;br /&gt;
&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
&lt;br /&gt;
        my $pubkey = $slashdb-&amp;gt;getUser($uid, 'pubkey');&lt;br /&gt;
        my $editkey = slashDisplay('editKey', { pubkey =&amp;gt; $pubkey }, 1);&lt;br /&gt;
        return $editkey;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
# We arrive here without header() having been called.  Some of the&lt;br /&gt;
# functions we dispatch to call it, some do not.&lt;br /&gt;
sub adminDispatch {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $op = $hr-&amp;gt;{op} || $form-&amp;gt;{op};&lt;br /&gt;
&lt;br /&gt;
        if ($op eq 'authoredit') {&lt;br /&gt;
                # editUser() does not call header(), so we DO need to.&lt;br /&gt;
                header(getMessage('user_header'), '', {}) or return;&lt;br /&gt;
                editUser($hr);&lt;br /&gt;
&lt;br /&gt;
        } elsif ($form-&amp;gt;{saveuseradmin}) {&lt;br /&gt;
                # saveUserAdmin() tail-calls showInfo(), which calls&lt;br /&gt;
                # header(), so we need to NOT.&lt;br /&gt;
                saveUserAdmin($hr);&lt;br /&gt;
&lt;br /&gt;
        } elsif ($form-&amp;gt;{userinfo}) {&lt;br /&gt;
                # showInfo() calls header(), so we need to NOT.&lt;br /&gt;
                showInfo($hr);&lt;br /&gt;
&lt;br /&gt;
        } elsif ($form-&amp;gt;{userfield}) {&lt;br /&gt;
                # none of these calls header(), so we DO need to.&lt;br /&gt;
                header(getMessage('user_header'), '', {}) or return;&lt;br /&gt;
                if ($form-&amp;gt;{edituser}) {&lt;br /&gt;
                        editUser($hr);&lt;br /&gt;
&lt;br /&gt;
                } elsif ($form-&amp;gt;{edithome}) {&lt;br /&gt;
                        editHome($hr);&lt;br /&gt;
&lt;br /&gt;
                } elsif ($form-&amp;gt;{editcomm}) {&lt;br /&gt;
                        editComm($hr);&lt;br /&gt;
&lt;br /&gt;
                } elsif ($form-&amp;gt;{changepasswd}) {&lt;br /&gt;
                        changePasswd($hr);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
        } else {&lt;br /&gt;
                # showInfo() calls header(), so we need to NOT.&lt;br /&gt;
                showInfo($hr);&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub tildeEd {&lt;br /&gt;
        my($user_edit) = @_;&lt;br /&gt;
&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        my %story023_default = (&lt;br /&gt;
                author  =&amp;gt; { },&lt;br /&gt;
                nexus   =&amp;gt; { },&lt;br /&gt;
                topic   =&amp;gt; { },&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        my %prefs = ( );&lt;br /&gt;
        for my $field (qw(&lt;br /&gt;
                story_never_topic       story_never_author      story_never_nexus&lt;br /&gt;
                story_always_topic      story_always_author     story_always_nexus      story_brief_always_nexus&lt;br /&gt;
                story_full_brief_nexus  story_full_best_nexus   story_brief_best_nexus&lt;br /&gt;
        )) {&lt;br /&gt;
                for my $id (&lt;br /&gt;
                        grep /^\d+$/,&lt;br /&gt;
                        split /,/,&lt;br /&gt;
                        ($user_edit-&amp;gt;{$field} || &amp;quot;&amp;quot;)&lt;br /&gt;
                ) {&lt;br /&gt;
                        $prefs{$field}{$id} = 1;&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
#print STDERR scalar(localtime) . &amp;quot; prefs: &amp;quot; . Dumper(\%prefs);&lt;br /&gt;
&lt;br /&gt;
        # Set up $author_hr, @aid_order, and $story023_default{author}.&lt;br /&gt;
&lt;br /&gt;
        my $author_hr = $reader-&amp;gt;getDescriptions('authors');&lt;br /&gt;
        my @aid_order = sort { lc $author_hr-&amp;gt;{$a} cmp lc $author_hr-&amp;gt;{$b} } keys %$author_hr;&lt;br /&gt;
        for my $aid (@aid_order) {&lt;br /&gt;
                     if ($prefs{story_never_author}{$aid}) {&lt;br /&gt;
                        $story023_default{author}{$aid} = 0;&lt;br /&gt;
                } elsif ($prefs{story_always_author}{$aid}) {&lt;br /&gt;
                        $story023_default{author}{$aid} = 3;&lt;br /&gt;
                } else {&lt;br /&gt;
                        $story023_default{author}{$aid} = 2;&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Set up $topic_hr, @topictid_order, and $story023_default{topic}.&lt;br /&gt;
&lt;br /&gt;
        my $topic_hr = $reader-&amp;gt;getDescriptions('non_nexus_topics-storypickable');&lt;br /&gt;
        my @topictid_order = sort { lc $topic_hr-&amp;gt;{$a} cmp lc $topic_hr-&amp;gt;{$b} } keys %$topic_hr;&lt;br /&gt;
        for my $tid (@topictid_order) {&lt;br /&gt;
                     if ($prefs{story_never_topic}{$tid}) {&lt;br /&gt;
                        $story023_default{topic}{$tid} = 0;&lt;br /&gt;
                } elsif ($prefs{story_always_topic}{$tid}) {&lt;br /&gt;
                        $story023_default{topic}{$tid} = 3;&lt;br /&gt;
                } else {&lt;br /&gt;
                        $story023_default{topic}{$tid} = 2;&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Set up $nexus_hr, @nexustid_order, and $story023_default{nexus}.&lt;br /&gt;
        my $topic_tree = $reader-&amp;gt;getTopicTree();&lt;br /&gt;
        my $nexus_tids_ar = $reader-&amp;gt;getStorypickableNexusChildren($constants-&amp;gt;{mainpage_nexus_tid}, 1);&lt;br /&gt;
        my $nexus_hr = { };&lt;br /&gt;
&lt;br /&gt;
        for my $tid (@$nexus_tids_ar) {&lt;br /&gt;
                $nexus_hr-&amp;gt;{$tid} = $topic_tree-&amp;gt;{$tid}{textname};&lt;br /&gt;
        }&lt;br /&gt;
        my @nexustid_order = sort {($b == $constants-&amp;gt;{mainpage_nexus_tid}) &amp;lt;=&amp;gt; ($a == $constants-&amp;gt;{mainpage_nexus_tid}) || &lt;br /&gt;
                                    lc $nexus_hr-&amp;gt;{$a} cmp lc $nexus_hr-&amp;gt;{$b} } keys %$nexus_hr;&lt;br /&gt;
&lt;br /&gt;
        my $mp_disp_nexuses = $reader-&amp;gt;getMainpageDisplayableNexuses();&lt;br /&gt;
        my %mp_disp_nexus = ( map { ($_, 1) } @$mp_disp_nexuses );&lt;br /&gt;
        for my $tid (@nexustid_order) {&lt;br /&gt;
                     if ($prefs{story_never_nexus}{$tid}) {&lt;br /&gt;
                        $story023_default{nexus}{$tid} = 0;&lt;br /&gt;
                } elsif ($prefs{story_always_nexus}{$tid}) {&lt;br /&gt;
                        $story023_default{nexus}{$tid} = 5;&lt;br /&gt;
                } elsif ($prefs{story_full_brief_nexus}{$tid}) {&lt;br /&gt;
                        $story023_default{nexus}{$tid} = 4;&lt;br /&gt;
                } elsif ($prefs{story_brief_always_nexus}{$tid}) {&lt;br /&gt;
                        $story023_default{nexus}{$tid} = 3;&lt;br /&gt;
                } elsif ($prefs{story_full_best_nexus}{$tid}) {&lt;br /&gt;
                        $story023_default{nexus}{$tid} = 2;&lt;br /&gt;
                } elsif ($prefs{story_brief_best_nexus}{$tid}) {&lt;br /&gt;
                        $story023_default{nexus}{$tid} = 1;&lt;br /&gt;
                } else {&lt;br /&gt;
                        # If brief_sectional_mainpage is set, then all&lt;br /&gt;
                        # nexuses in getMainpageDisplayableNexuses are,&lt;br /&gt;
                        # by default, shown as brief on the mainpage.&lt;br /&gt;
                        if ($constants-&amp;gt;{brief_sectional_mainpage}&lt;br /&gt;
                                &amp;amp;&amp;amp; $mp_disp_nexus{$tid}&lt;br /&gt;
                        ) {&lt;br /&gt;
                                $story023_default{nexus}{$tid} = 4;&lt;br /&gt;
                        } else {&lt;br /&gt;
                                $story023_default{nexus}{$tid} = 2;&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Set up $section_descref and $box_order, used to decide which&lt;br /&gt;
        # slashboxes appear.  Really this doesn't seem to have anything&lt;br /&gt;
        # to do with sections, so I'm not sure why it's called&lt;br /&gt;
        # &amp;quot;section&amp;quot;_descref.&lt;br /&gt;
&lt;br /&gt;
        my $section_descref = { };&lt;br /&gt;
        my $box_order;&lt;br /&gt;
        my $sections_description = $reader-&amp;gt;getSectionBlocks();&lt;br /&gt;
&lt;br /&gt;
        # the names of all the boxes in @{$skinBoxes-&amp;gt;{$constants-&amp;gt;{mainpage_skid}}}&lt;br /&gt;
        # should be unioned into sections_description.  whether the&lt;br /&gt;
        # values are 0 or 1 is calculated correctly, but we're&lt;br /&gt;
        # missing some 0's that should appear, I think, under&lt;br /&gt;
        # some circumstances.  ah heck, the whole concept of&lt;br /&gt;
        # sectional slashboxes should be redone (why the heck&lt;br /&gt;
        # do we have skinname_more instead of just a block&lt;br /&gt;
        # called olderstories?)&lt;br /&gt;
&lt;br /&gt;
        my $slashboxes_hr = { };&lt;br /&gt;
        my $slashboxes_textlist = $user_edit-&amp;gt;{slashboxes};&lt;br /&gt;
        if (!$slashboxes_textlist) {&lt;br /&gt;
                # Use the default.&lt;br /&gt;
                my($boxes, $skinBoxes) = $reader-&amp;gt;getPortalsCommon();&lt;br /&gt;
                $slashboxes_textlist = join &amp;quot;,&amp;quot;, @{$skinBoxes-&amp;gt;{$constants-&amp;gt;{mainpage_skid}}};&lt;br /&gt;
        }&lt;br /&gt;
        for my $bid (&lt;br /&gt;
                map { /^'?([^']+)'?$/; $1 }&lt;br /&gt;
                split /,/,&lt;br /&gt;
                $slashboxes_textlist&lt;br /&gt;
        ) {&lt;br /&gt;
                $slashboxes_hr-&amp;gt;{$bid} = 1;&lt;br /&gt;
        }&lt;br /&gt;
        for my $ary (sort { lc $a-&amp;gt;[1] cmp lc $b-&amp;gt;[1]} @$sections_description) {&lt;br /&gt;
                my($bid, $title, $boldflag) = @$ary;&lt;br /&gt;
                push @$box_order, $bid;&lt;br /&gt;
                $section_descref-&amp;gt;{$bid}{checked} =&lt;br /&gt;
                        $slashboxes_hr-&amp;gt;{$bid}&lt;br /&gt;
                                ? $constants-&amp;gt;{markup_checked_attribute}&lt;br /&gt;
                                : '';&lt;br /&gt;
                $title =~ s/&amp;lt;(.*?)&amp;gt;//g;&lt;br /&gt;
                $section_descref-&amp;gt;{$bid}{title} = $title;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $dynamic_blocks = getObject(&amp;quot;Slash::DynamicBlocks&amp;quot;);&lt;br /&gt;
        my $extra_blocks = [];&lt;br /&gt;
        if ($dynamic_blocks) {&lt;br /&gt;
                my $userblocks = $dynamic_blocks-&amp;gt;getUserBlocks(&amp;quot;name&amp;quot;, $user_edit-&amp;gt;{uid}) || {};&lt;br /&gt;
                my $friendblocks = $dynamic_blocks-&amp;gt;getFriendBlocks(&amp;quot;name&amp;quot;, $user_edit-&amp;gt;{uid}) || {};&lt;br /&gt;
                push(@$extra_blocks, grep { $slashboxes_textlist =~ $_; } (keys(%$userblocks), keys(%$friendblocks)));&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Userspace.&lt;br /&gt;
        my $userspace = $user_edit-&amp;gt;{mylinks} || &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        # Titles of stuff.&lt;br /&gt;
        my $tildeEd_title = getTitle('tildeEd_title');&lt;br /&gt;
        my $criteria_msg = getMessage('tilded_criteria_msg');&lt;br /&gt;
        my $customize_title = getTitle('tildeEd_customize_title');&lt;br /&gt;
        my $tilded_customize_msg = getMessage('tilded_customize_msg',&lt;br /&gt;
                { userspace =&amp;gt; $userspace });&lt;br /&gt;
        my $tilded_box_msg = getMessage('tilded_box_msg');&lt;br /&gt;
&lt;br /&gt;
        my $tilde_ed = slashDisplay('tildeEd', {&lt;br /&gt;
                user_edit               =&amp;gt; $user_edit,&lt;br /&gt;
                title                   =&amp;gt; $tildeEd_title,&lt;br /&gt;
                criteria_msg            =&amp;gt; $criteria_msg,&lt;br /&gt;
                customize_title         =&amp;gt; $customize_title,&lt;br /&gt;
                tilded_customize_msg    =&amp;gt; $tilded_customize_msg,&lt;br /&gt;
                tilded_box_msg          =&amp;gt; $tilded_box_msg,&lt;br /&gt;
&lt;br /&gt;
                story023_default        =&amp;gt; \%story023_default,&lt;br /&gt;
                authorref               =&amp;gt; $author_hr,&lt;br /&gt;
                aid_order               =&amp;gt; \@aid_order,&lt;br /&gt;
                topicref                =&amp;gt; $topic_hr,&lt;br /&gt;
                topictid_order          =&amp;gt; \@topictid_order,&lt;br /&gt;
                nexusref                =&amp;gt; $nexus_hr,&lt;br /&gt;
                nexustid_order          =&amp;gt; \@nexustid_order,&lt;br /&gt;
&lt;br /&gt;
                section_descref         =&amp;gt; $section_descref,&lt;br /&gt;
                box_order               =&amp;gt; $box_order,&lt;br /&gt;
&lt;br /&gt;
                userspace               =&amp;gt; $userspace,&lt;br /&gt;
                extra_blocks            =&amp;gt; $extra_blocks,&lt;br /&gt;
        }, 1);&lt;br /&gt;
&lt;br /&gt;
        return $tilde_ed;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub changePasswd {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        my $user_edit = {};&lt;br /&gt;
        my $title;&lt;br /&gt;
        my $suadmin_flag = ($user-&amp;gt;{seclev} &amp;gt;= 10000) ? 1 : 0;&lt;br /&gt;
&lt;br /&gt;
        my $admin_flag = ($user-&amp;gt;{is_admin}) ? 1 : 0;&lt;br /&gt;
        my $admin_block = '';&lt;br /&gt;
&lt;br /&gt;
        my $id = '';&lt;br /&gt;
        if ($admin_flag) {&lt;br /&gt;
                if ($form-&amp;gt;{userfield}) {&lt;br /&gt;
                        $id ||= $form-&amp;gt;{userfield};&lt;br /&gt;
                        if ($id =~ /^\d+$/) {&lt;br /&gt;
                                $user_edit = $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                        } else {&lt;br /&gt;
                                $user_edit = $slashdb-&amp;gt;getUser($slashdb-&amp;gt;getUserUID($id));&lt;br /&gt;
                        }&lt;br /&gt;
                } else {&lt;br /&gt;
                        $user_edit = $id eq '' ? $user : $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                        $id = $user_edit-&amp;gt;{uid};&lt;br /&gt;
                }&lt;br /&gt;
        } else {&lt;br /&gt;
                $id = $user-&amp;gt;{uid};&lt;br /&gt;
                $user_edit = $user;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        $admin_block = getUserAdmin($id, 'uid', 1) if $admin_flag;&lt;br /&gt;
&lt;br /&gt;
        # print getMessage('note', { note =&amp;gt; $form-&amp;gt;{note}}) if $form-&amp;gt;{note};&lt;br /&gt;
&lt;br /&gt;
        $title = getTitle('changePasswd_title', { user_edit =&amp;gt; $user_edit });&lt;br /&gt;
&lt;br /&gt;
        my $session = $slashdb-&amp;gt;getDescriptions('session_login');&lt;br /&gt;
        my $session_select = createSelect('session_login', $session, $user_edit-&amp;gt;{session_login}, 1);&lt;br /&gt;
&lt;br /&gt;
        my $clocation = $slashdb-&amp;gt;getDescriptions('cookie_location');&lt;br /&gt;
        my @clocation_order = grep { exists $clocation-&amp;gt;{$_} } qw(none classbid subnetid ipid);&lt;br /&gt;
        my $clocation_select = createSelect('cookie_location', $clocation,&lt;br /&gt;
                $user_edit-&amp;gt;{cookie_location}, 1, 0, \@clocation_order&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        my $got_oldpass = 0;&lt;br /&gt;
        if ($form-&amp;gt;{oldpass}) {&lt;br /&gt;
                my $return_uid = $slashdb-&amp;gt;getUserAuthenticate($id, $form-&amp;gt;{oldpass}, 1);&lt;br /&gt;
                $got_oldpass = 1 if $return_uid &amp;amp;&amp;amp; $id == $return_uid;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('changePasswd', {&lt;br /&gt;
                useredit                =&amp;gt; $user_edit,&lt;br /&gt;
                admin_flag              =&amp;gt; $suadmin_flag,&lt;br /&gt;
                title                   =&amp;gt; $title,&lt;br /&gt;
                session                 =&amp;gt; $session_select,&lt;br /&gt;
                clocation               =&amp;gt; $clocation_select,&lt;br /&gt;
                admin_block             =&amp;gt; $admin_block,&lt;br /&gt;
                got_oldpass             =&amp;gt; $got_oldpass&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub editUser {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $id = $hr-&amp;gt;{uid} || '';&lt;br /&gt;
        my $note = $hr-&amp;gt;{note} || '';&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $plugins = $slashdb-&amp;gt;getDescriptions('plugins');&lt;br /&gt;
&lt;br /&gt;
        my $user_edit = {};&lt;br /&gt;
        my($admin_block, $title);&lt;br /&gt;
        my $admin_flag = ($user-&amp;gt;{is_admin}) ? 1 : 0;&lt;br /&gt;
        my $fieldkey;&lt;br /&gt;
&lt;br /&gt;
        if ($admin_flag &amp;amp;&amp;amp; $form-&amp;gt;{userfield}) {&lt;br /&gt;
                $id ||= $form-&amp;gt;{userfield};&lt;br /&gt;
                if ($form-&amp;gt;{userfield} =~ /^\d+$/) {&lt;br /&gt;
                        $user_edit = $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                        $fieldkey = 'uid';&lt;br /&gt;
                } else {&lt;br /&gt;
                        $user_edit = $slashdb-&amp;gt;getUser($slashdb-&amp;gt;getUserUID($id));&lt;br /&gt;
                        $fieldkey = 'nickname';&lt;br /&gt;
                }&lt;br /&gt;
        } else {&lt;br /&gt;
                $user_edit = $id eq '' ? $user : $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                $fieldkey = 'uid';&lt;br /&gt;
                $id = $user_edit-&amp;gt;{uid};&lt;br /&gt;
        }&lt;br /&gt;
        return if isAnon($user_edit-&amp;gt;{uid}) &amp;amp;&amp;amp; ! $admin_flag;&lt;br /&gt;
&lt;br /&gt;
        $admin_block = getUserAdmin($id, $fieldkey, 1) if $admin_flag;&lt;br /&gt;
        $user_edit-&amp;gt;{homepage} ||= &amp;quot;http://&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        # Remove domain tags, they'll be added back in, in saveUser.&lt;br /&gt;
        for my $dat (@{$user_edit}{qw(sig bio)}) {&lt;br /&gt;
                $dat = parseDomainTags($dat, 0, 1);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        $title = getTitle('editUser_title', { user_edit =&amp;gt; $user_edit});&lt;br /&gt;
&lt;br /&gt;
        my $editkey = &amp;quot;&amp;quot;;&lt;br /&gt;
        $editkey = editKey($user_edit-&amp;gt;{uid}) if $fieldkey eq 'uid' &amp;amp;&amp;amp; $plugins-&amp;gt;{PubKey};&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('editUser', {&lt;br /&gt;
                useredit                =&amp;gt; $user_edit,&lt;br /&gt;
                admin_flag              =&amp;gt; $admin_flag,&lt;br /&gt;
                title                   =&amp;gt; $title,&lt;br /&gt;
                editkey                 =&amp;gt; $editkey,&lt;br /&gt;
                admin_block             =&amp;gt; $admin_block,&lt;br /&gt;
                note                    =&amp;gt; $note,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub editHome {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $id = $hr-&amp;gt;{uid} || '';&lt;br /&gt;
        my $note = $hr-&amp;gt;{note} || '';&lt;br /&gt;
&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        my($formats, $title, $tzformat_select);&lt;br /&gt;
        my $user_edit = {};&lt;br /&gt;
        my $fieldkey;&lt;br /&gt;
&lt;br /&gt;
        my $admin_flag = ($user-&amp;gt;{is_admin}) ? 1 : 0;&lt;br /&gt;
        my $admin_block = '';&lt;br /&gt;
&lt;br /&gt;
        if ($admin_flag &amp;amp;&amp;amp; $form-&amp;gt;{userfield}) {&lt;br /&gt;
                $id ||= $form-&amp;gt;{userfield};&lt;br /&gt;
                if ($form-&amp;gt;{userfield} =~ /^\d+$/) {&lt;br /&gt;
                        $user_edit = $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                        $fieldkey = 'uid';&lt;br /&gt;
                } else {&lt;br /&gt;
                        $user_edit = $slashdb-&amp;gt;getUser($slashdb-&amp;gt;getUserUID($id));&lt;br /&gt;
                        $fieldkey = 'nickname';&lt;br /&gt;
                }&lt;br /&gt;
        } else {&lt;br /&gt;
                $user_edit = $id eq '' ? $user : $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                $fieldkey = 'uid';&lt;br /&gt;
        }&lt;br /&gt;
#use Data::Dumper; $Data::Dumper::Sortkeys = 1; print STDERR scalar(localtime) . &amp;quot; user_edit: &amp;quot; . Dumper($user_edit);&lt;br /&gt;
&lt;br /&gt;
        return if isAnon($user_edit-&amp;gt;{uid}) &amp;amp;&amp;amp; ! $admin_flag;&lt;br /&gt;
        $admin_block = getUserAdmin($id, $fieldkey, 1) if $admin_flag;&lt;br /&gt;
&lt;br /&gt;
        $title = getTitle('editHome_title');&lt;br /&gt;
&lt;br /&gt;
        return if $user-&amp;gt;{seclev} &amp;lt; 100 &amp;amp;&amp;amp; isAnon($user_edit-&amp;gt;{uid});&lt;br /&gt;
&lt;br /&gt;
        $formats = $slashdb-&amp;gt;getDescriptions('dateformats');&lt;br /&gt;
        $tzformat_select = createSelect('tzformat', $formats, $user_edit-&amp;gt;{dfid}, 1);&lt;br /&gt;
&lt;br /&gt;
        my $lb_check = $user_edit-&amp;gt;{lowbandwidth} ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $sd_check = $user_edit-&amp;gt;{simpledesign} ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $i_check = $user_edit-&amp;gt;{noicons}     ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $w_check = $user_edit-&amp;gt;{willing}     ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $classic_check = $user_edit-&amp;gt;{index_classic} ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
&lt;br /&gt;
        my $tilde_ed = tildeEd($user_edit);&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('editHome', {&lt;br /&gt;
                title                   =&amp;gt; $title,&lt;br /&gt;
                admin_block             =&amp;gt; $admin_block,&lt;br /&gt;
                user_edit               =&amp;gt; $user_edit,&lt;br /&gt;
                tzformat_select         =&amp;gt; $tzformat_select,&lt;br /&gt;
                i_check                 =&amp;gt; $i_check,&lt;br /&gt;
                w_check                 =&amp;gt; $w_check,&lt;br /&gt;
                lb_check                =&amp;gt; $lb_check,&lt;br /&gt;
                sd_check                =&amp;gt; $sd_check,&lt;br /&gt;
                classic_check           =&amp;gt; $classic_check,&lt;br /&gt;
                tilde_ed                =&amp;gt; $tilde_ed,&lt;br /&gt;
                note                    =&amp;gt; $note,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub editComm {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $id = $hr-&amp;gt;{uid} || '';&lt;br /&gt;
        my $note = $hr-&amp;gt;{note} || '';&lt;br /&gt;
&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user_edit = {};&lt;br /&gt;
        my($formats, $commentmodes_select, $commentsort_select, $title,&lt;br /&gt;
                $uthreshold_select, $highlightthresh_select, $posttype_select,&lt;br /&gt;
                $bytelimit_select);&lt;br /&gt;
&lt;br /&gt;
        my $admin_block = '';&lt;br /&gt;
        my $fieldkey;&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        my $admin_flag = $user-&amp;gt;{is_admin} ? 1 : 0;&lt;br /&gt;
&lt;br /&gt;
        if ($admin_flag &amp;amp;&amp;amp; $form-&amp;gt;{userfield}) {&lt;br /&gt;
                $id ||= $form-&amp;gt;{userfield};&lt;br /&gt;
                if ($form-&amp;gt;{userfield} =~ /^\d+$/) {&lt;br /&gt;
                        $user_edit = $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                        $fieldkey = 'uid';&lt;br /&gt;
                } else {&lt;br /&gt;
                        $user_edit = $slashdb-&amp;gt;getUser($slashdb-&amp;gt;getUserUID($id));&lt;br /&gt;
                        $fieldkey = 'nickname';&lt;br /&gt;
                }&lt;br /&gt;
        } else {&lt;br /&gt;
                $user_edit = $id eq '' ? $user : $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                $fieldkey = 'uid';&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $hi = $constants-&amp;gt;{comment_maxscore} - $constants-&amp;gt;{comment_minscore};&lt;br /&gt;
        my $lo = -$hi;&lt;br /&gt;
        my @range = map { $_ &amp;gt; 0 ? &amp;quot;+$_&amp;quot; : $_ } ($lo .. $hi);&lt;br /&gt;
&lt;br /&gt;
        my @reasons = ( );&lt;br /&gt;
        my %reason_select = ( );&lt;br /&gt;
        if ($constants-&amp;gt;{m1}) {&lt;br /&gt;
                my $mod_reader = getObject(&amp;quot;Slash::$constants-&amp;gt;{m1_pluginname}&amp;quot;, { db_type =&amp;gt; 'reader' });&lt;br /&gt;
                my $reasons = $mod_reader-&amp;gt;getReasons();&lt;br /&gt;
                for my $id (sort { $a &amp;lt;=&amp;gt; $b } keys %$reasons) {&lt;br /&gt;
                        push @reasons, $reasons-&amp;gt;{$id}{name};&lt;br /&gt;
                }&lt;br /&gt;
                # Reason modifiers&lt;br /&gt;
                for my $reason_name (@reasons) {&lt;br /&gt;
                        my $key = &amp;quot;reason_alter_$reason_name&amp;quot;;&lt;br /&gt;
                        $reason_select{$reason_name} = createSelect(&lt;br /&gt;
                                $key, \@range, &lt;br /&gt;
                                $user_edit-&amp;gt;{$key} || 0, 1, 1&lt;br /&gt;
                        );&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Zoo relation modifiers&lt;br /&gt;
        my %people_select;&lt;br /&gt;
        my @people =  qw(friend foe anonymous fof eof freak fan);&lt;br /&gt;
        for (@people) {&lt;br /&gt;
                my $key = &amp;quot;people_bonus_$_&amp;quot;;&lt;br /&gt;
                $people_select{$_} = createSelect($key, \@range, &lt;br /&gt;
                        $user_edit-&amp;gt;{$key} || 0, 1, 1&lt;br /&gt;
                );&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # New-user modifier&lt;br /&gt;
        my $new_user_bonus_select = createSelect('new_user_bonus', \@range, &lt;br /&gt;
                        $user_edit-&amp;gt;{new_user_bonus} || 0, 1, 1);&lt;br /&gt;
        my $new_user_percent_select = createSelect('new_user_percent',&lt;br /&gt;
                        [( 1..15, 20, 25, 30, 35, 40, 45, 50, 55,&lt;br /&gt;
                          60, 65, 70, 75, 80, 85, 90, 95 )], &lt;br /&gt;
                        $user_edit-&amp;gt;{new_user_percent} || 100, 1, 1);&lt;br /&gt;
        # Karma modifier&lt;br /&gt;
        my $karma_bonus = createSelect('karma_bonus', \@range, &lt;br /&gt;
                        $user_edit-&amp;gt;{karma_bonus} || 0, 1, 1);&lt;br /&gt;
        # Subscriber modifier&lt;br /&gt;
        my $subscriber_bonus = createSelect('subscriber_bonus', \@range, &lt;br /&gt;
                        $user_edit-&amp;gt;{subscriber_bonus} || 0, 1, 1);&lt;br /&gt;
&lt;br /&gt;
        # Length modifier&lt;br /&gt;
        my $small_length_bonus_select = createSelect('clsmall_bonus', \@range, &lt;br /&gt;
                        $user_edit-&amp;gt;{clsmall_bonus} || 0, 1, 1);&lt;br /&gt;
        my $long_length_bonus_select = createSelect('clbig_bonus', \@range, &lt;br /&gt;
                        $user_edit-&amp;gt;{clbig_bonus} || 0, 1, 1);&lt;br /&gt;
&lt;br /&gt;
        return if isAnon($user_edit-&amp;gt;{uid}) &amp;amp;&amp;amp; ! $admin_flag;&lt;br /&gt;
        $admin_block = getUserAdmin($id, $fieldkey, 1) if $admin_flag;&lt;br /&gt;
&lt;br /&gt;
        $title = getTitle('editComm_title');&lt;br /&gt;
&lt;br /&gt;
        $formats = $slashdb-&amp;gt;getDescriptions('commentmodes');&lt;br /&gt;
        $commentmodes_select=createSelect('umode', $formats, $user_edit-&amp;gt;{mode}, 1);&lt;br /&gt;
&lt;br /&gt;
        $formats = $slashdb-&amp;gt;getDescriptions('sortcodes');&lt;br /&gt;
        $commentsort_select = createSelect(&lt;br /&gt;
                'commentsort', $formats, $user_edit-&amp;gt;{commentsort}, 1&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        $formats = $slashdb-&amp;gt;getDescriptions('threshcodes');&lt;br /&gt;
        $uthreshold_select = createSelect(&lt;br /&gt;
                'uthreshold', $formats, $user_edit-&amp;gt;{threshold}, 1&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        $formats = $slashdb-&amp;gt;getDescriptions('threshcodes');&lt;br /&gt;
        $highlightthresh_select = createSelect(&lt;br /&gt;
                'highlightthresh', $formats, $user_edit-&amp;gt;{highlightthresh}, 1&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        $user_edit-&amp;gt;{bytelimit} = $constants-&amp;gt;{defaultbytelimit}&lt;br /&gt;
                if $user_edit-&amp;gt;{bytelimit} &amp;lt; 0 || $user_edit-&amp;gt;{bytelimit} &amp;gt; 7;&lt;br /&gt;
        my $bytelimit_desc = $user_edit-&amp;gt;{is_subscriber} ? 'bytelimit' : 'bytelimit_sub';&lt;br /&gt;
        $formats = $slashdb-&amp;gt;getDescriptions($bytelimit_desc);&lt;br /&gt;
        $bytelimit_select = createSelect(&lt;br /&gt;
                'bytelimit', $formats, $user_edit-&amp;gt;{bytelimit}, 1&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        my $h_check  = $user_edit-&amp;gt;{hardthresh}          ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $r_check  = $user_edit-&amp;gt;{reparent}            ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $n_check  = $user_edit-&amp;gt;{noscores}            ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $s_check  = $user_edit-&amp;gt;{nosigs}              ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $b_check  = $user_edit-&amp;gt;{nobonus}             ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $sb_check = $user_edit-&amp;gt;{nosubscriberbonus}   ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $p_check  = $user_edit-&amp;gt;{postanon}            ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $nospell_check = $user_edit-&amp;gt;{no_spell}       ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $s_mod_check = $user_edit-&amp;gt;{mod_with_comm}    ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $s_m2_check = $user_edit-&amp;gt;{m2_with_mod}       ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $s_m2c_check = $user_edit-&amp;gt;{m2_with_comm_mod} ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
&lt;br /&gt;
        $formats = $slashdb-&amp;gt;getDescriptions('postmodes');&lt;br /&gt;
        $posttype_select = createSelect(&lt;br /&gt;
                'posttype', $formats, $user_edit-&amp;gt;{posttype}, 1&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('editComm', {&lt;br /&gt;
                title                   =&amp;gt; $title,&lt;br /&gt;
                admin_block             =&amp;gt; $admin_block,&lt;br /&gt;
                user_edit               =&amp;gt; $user_edit,&lt;br /&gt;
                h_check                 =&amp;gt; $h_check,&lt;br /&gt;
                r_check                 =&amp;gt; $r_check,&lt;br /&gt;
                n_check                 =&amp;gt; $n_check,&lt;br /&gt;
                s_check                 =&amp;gt; $s_check,&lt;br /&gt;
                b_check                 =&amp;gt; $b_check,&lt;br /&gt;
                sb_check                =&amp;gt; $sb_check,&lt;br /&gt;
                p_check                 =&amp;gt; $p_check,&lt;br /&gt;
                s_mod_check             =&amp;gt; $s_mod_check,&lt;br /&gt;
                s_m2_check              =&amp;gt; $s_m2_check,&lt;br /&gt;
                s_m2c_check             =&amp;gt; $s_m2c_check,&lt;br /&gt;
                nospell_check           =&amp;gt; $nospell_check,&lt;br /&gt;
                commentmodes_select     =&amp;gt; $commentmodes_select,&lt;br /&gt;
                commentsort_select      =&amp;gt; $commentsort_select,&lt;br /&gt;
                highlightthresh_select  =&amp;gt; $highlightthresh_select,&lt;br /&gt;
                uthreshold_select       =&amp;gt; $uthreshold_select,&lt;br /&gt;
                posttype_select         =&amp;gt; $posttype_select,&lt;br /&gt;
                reasons                 =&amp;gt; \@reasons,&lt;br /&gt;
                reason_select           =&amp;gt; \%reason_select,&lt;br /&gt;
                people                  =&amp;gt; \@people,&lt;br /&gt;
                people_select           =&amp;gt; \%people_select,&lt;br /&gt;
                new_user_percent_select =&amp;gt; $new_user_percent_select,&lt;br /&gt;
                new_user_bonus_select   =&amp;gt; $new_user_bonus_select,&lt;br /&gt;
                note                    =&amp;gt; $note,&lt;br /&gt;
                karma_bonus             =&amp;gt; $karma_bonus,&lt;br /&gt;
                subscriber_bonus        =&amp;gt; $subscriber_bonus,&lt;br /&gt;
                small_length_bonus_select =&amp;gt; $small_length_bonus_select,&lt;br /&gt;
                long_length_bonus_select =&amp;gt; $long_length_bonus_select,&lt;br /&gt;
                bytelimit_select        =&amp;gt; $bytelimit_select,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub saveUserAdmin {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        my($user_edits_table, $user_edit) = ({}, {});&lt;br /&gt;
        my $author_flag;&lt;br /&gt;
        my $note = '';&lt;br /&gt;
        my $srcid;&lt;br /&gt;
        my $id;&lt;br /&gt;
        my $user_editfield_flag;&lt;br /&gt;
        my $banned = 0;&lt;br /&gt;
        my $banref;&lt;br /&gt;
        if ($form-&amp;gt;{uid}) {&lt;br /&gt;
                $user_editfield_flag = 'uid';&lt;br /&gt;
                $id = $form-&amp;gt;{uid};&lt;br /&gt;
                $user_edit = $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                $srcid = $id;&lt;br /&gt;
&lt;br /&gt;
        } elsif ($form-&amp;gt;{subnetid}) {&lt;br /&gt;
                $user_editfield_flag = 'subnetid';&lt;br /&gt;
                ($id, $user_edit-&amp;gt;{subnetid})  = ($form-&amp;gt;{subnetid}, $form-&amp;gt;{subnetid});&lt;br /&gt;
                $user_edit-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                $srcid = convert_srcid(subnetid =&amp;gt; $id);&lt;br /&gt;
&lt;br /&gt;
        } elsif ($form-&amp;gt;{ipid}) {&lt;br /&gt;
                $user_editfield_flag = 'ipid';&lt;br /&gt;
                ($id, $user_edit-&amp;gt;{ipid})  = ($form-&amp;gt;{ipid}, $form-&amp;gt;{ipid});&lt;br /&gt;
                $user_edit-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                $srcid = convert_srcid(ipid =&amp;gt; $id);&lt;br /&gt;
&lt;br /&gt;
        } elsif ($form-&amp;gt;{md5id}) {&lt;br /&gt;
                $user_editfield_flag = 'md5id';&lt;br /&gt;
                my $fieldname = $form-&amp;gt;{fieldname} || 'md5id';&lt;br /&gt;
                ($id, $user_edit-&amp;gt;{$fieldname})&lt;br /&gt;
                        = ($form-&amp;gt;{md5id}, $form-&amp;gt;{md5id});&lt;br /&gt;
                warn &amp;quot;form field md5id specified, no srcid saving possible&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        } elsif ($form-&amp;gt;{srcid}) {&lt;br /&gt;
                $user_editfield_flag = 'srcid';&lt;br /&gt;
                my $fieldname = $form-&amp;gt;{fieldname} || 'srcid';&lt;br /&gt;
                ($id, $user_edit-&amp;gt;{$fieldname})&lt;br /&gt;
                        = ($form-&amp;gt;{srcid}, $form-&amp;gt;{srcid});&lt;br /&gt;
                $srcid = $id;&lt;br /&gt;
&lt;br /&gt;
        } else {&lt;br /&gt;
                # If we were not fed valid data, don't do anything.&lt;br /&gt;
                return ;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $all_al2types = $reader-&amp;gt;getAL2Types;&lt;br /&gt;
        my $al2_change = { };&lt;br /&gt;
&lt;br /&gt;
        # First, get a hash of what aclams (AL2's and ACLs) this user&lt;br /&gt;
        # had when the previous admin page was loaded.&lt;br /&gt;
        # XXXSRCID Right now acl_old is just calculated for debugging&lt;br /&gt;
        # printing purposes, not actually used.&lt;br /&gt;
        my @al2_old = ( );&lt;br /&gt;
        @al2_old =&lt;br /&gt;
                @{ $form-&amp;gt;{al2_old_multiple}   } if $form-&amp;gt;{al2_old_multiple};&lt;br /&gt;
        my %al2_old = ( map { ($_, 1) } @al2_old );&lt;br /&gt;
        my @acl_old = ( );&lt;br /&gt;
        @acl_old =&lt;br /&gt;
                @{ $form-&amp;gt;{acl_old_multiple}   } if $form-&amp;gt;{acl_old_multiple};&lt;br /&gt;
        my %acl_old = ( map { ($_, 1) } @acl_old );&lt;br /&gt;
&lt;br /&gt;
        # Next, get the list of the new data submitted.  Separate&lt;br /&gt;
        # it out into AL2's which are legitimate.  Anything left&lt;br /&gt;
        # over is an ACL.&lt;br /&gt;
        my @al2_new_formfields = ( );&lt;br /&gt;
        @al2_new_formfields = @{ $form-&amp;gt;{aclams_new_multiple} } if $form-&amp;gt;{aclams_new_multiple};&lt;br /&gt;
        my @al2_new_submitted = map { s/^aclam_//; $_ } @al2_new_formfields;&lt;br /&gt;
        my @al2_new = grep { exists $all_al2types-&amp;gt;{$_} } @al2_new_submitted;&lt;br /&gt;
        my %al2_new = ( map { ($_, 1) } @al2_new );&lt;br /&gt;
        my @acl_new = grep { !$al2_new{$_} } @al2_new_submitted;&lt;br /&gt;
        my %acl_new = ( map { ($_, 1) } @acl_new );&lt;br /&gt;
&lt;br /&gt;
        # Find out what changed for AL2's.&lt;br /&gt;
        for my $al2 (@al2_old, @al2_new) {&lt;br /&gt;
                next if defined($al2_old{$al2}) &amp;amp;&amp;amp; defined($al2_new{$al2})&lt;br /&gt;
                        &amp;amp;&amp;amp; $al2_old{$al2} == $al2_new{$al2};&lt;br /&gt;
                $al2_change-&amp;gt;{$al2} = $al2_new{$al2} ? 1 : 0;&lt;br /&gt;
        }&lt;br /&gt;
#print STDERR &amp;quot;al2_change for '$srcid': &amp;quot; . Dumper($al2_change);&lt;br /&gt;
        # If there's a comment, throw that in.&lt;br /&gt;
        if ($form-&amp;gt;{al2_new_comment}) {&lt;br /&gt;
                $al2_change-&amp;gt;{comment} = $form-&amp;gt;{al2_new_comment};&lt;br /&gt;
        }&lt;br /&gt;
        $al2_change = undef if !keys %$al2_change;&lt;br /&gt;
&lt;br /&gt;
        # Find out what changed for ACL's.&lt;br /&gt;
        my $acl_change = { };&lt;br /&gt;
        for my $acl (@acl_old, @acl_new) {&lt;br /&gt;
                next if $acl_old{$acl} == $acl_new{$acl};&lt;br /&gt;
                $acl_change-&amp;gt;{$acl} = $acl_new{$acl} ? 1 : 0;&lt;br /&gt;
        }&lt;br /&gt;
        $acl_change = undef if !keys %$acl_change;&lt;br /&gt;
&lt;br /&gt;
        if ($user-&amp;gt;{is_admin} &amp;amp;&amp;amp; $srcid) {&lt;br /&gt;
                $slashdb-&amp;gt;setAL2($srcid, $al2_change);&lt;br /&gt;
        }&lt;br /&gt;
        if ($user-&amp;gt;{is_admin} &amp;amp;&amp;amp; ($user_editfield_flag eq 'uid' ||&lt;br /&gt;
                $user_editfield_flag eq 'nickname')) {&lt;br /&gt;
&lt;br /&gt;
                # This admin user cannot assign a seclev higher than he/she&lt;br /&gt;
                # already has.&lt;br /&gt;
                my $seclev = $form-&amp;gt;{seclev};&lt;br /&gt;
                $seclev = $user-&amp;gt;{seclev} if $seclev &amp;gt; $user-&amp;gt;{seclev};&lt;br /&gt;
                $user_edits_table-&amp;gt;{seclev} = $seclev;&lt;br /&gt;
&lt;br /&gt;
                $user_edits_table-&amp;gt;{section} = $form-&amp;gt;{section};&lt;br /&gt;
                $user_edits_table-&amp;gt;{author} = $form-&amp;gt;{author} ? 1 : 0 ;&lt;br /&gt;
                $user_edits_table-&amp;gt;{defaultpoints} = $form-&amp;gt;{defaultpoints};&lt;br /&gt;
                $user_edits_table-&amp;gt;{tokens} = $form-&amp;gt;{tokens};&lt;br /&gt;
                $user_edits_table-&amp;gt;{tag_clout} = $form-&amp;gt;{tag_clout};&lt;br /&gt;
                $user_edits_table-&amp;gt;{m2info} = $form-&amp;gt;{m2info};&lt;br /&gt;
                $user_edits_table-&amp;gt;{acl} = $acl_change if $acl_change;&lt;br /&gt;
                $user_edits_table-&amp;gt;{shill_static_marquee} = $form-&amp;gt;{shill_static_marquee} ? 1 : undef;&lt;br /&gt;
                $user_edits_table-&amp;gt;{u2_friends_bios} = $form-&amp;gt;{u2_friends_bios} ? 1 : undef;&lt;br /&gt;
                $user_edits_table-&amp;gt;{shill_rss_url} = $form-&amp;gt;{shill_rss_url} ? $form-&amp;gt;{shill_rss_url} : undef;&lt;br /&gt;
&lt;br /&gt;
                my $author = $slashdb-&amp;gt;getAuthor($id);&lt;br /&gt;
                my $was_author = ($author &amp;amp;&amp;amp; $author-&amp;gt;{author}) ? 1 : 0;&lt;br /&gt;
&lt;br /&gt;
                $slashdb-&amp;gt;setUser($id, $user_edits_table);&lt;br /&gt;
&lt;br /&gt;
                $note .= getMessage('saveuseradmin_saveduser', { field =&amp;gt; $user_editfield_flag, id =&amp;gt; $id });&lt;br /&gt;
&lt;br /&gt;
                if ($was_author xor $user_edits_table-&amp;gt;{author}) {&lt;br /&gt;
                        # A frequently-asked question for new Slash admins is&lt;br /&gt;
                        # why their authors aren't showing up immediately.&lt;br /&gt;
                        # Give them some help here with an informative message.&lt;br /&gt;
                        $note .= getMessage('saveuseradmin_authorchg', {&lt;br /&gt;
                                basedir =&amp;gt;      $slashdb-&amp;gt;getDescriptions(&amp;quot;site_info&amp;quot;)&lt;br /&gt;
                                        -&amp;gt;{base_install_directory},&lt;br /&gt;
                                virtuser =&amp;gt;     $slashdb-&amp;gt;{virtual_user},&lt;br /&gt;
                        });&lt;br /&gt;
&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if (!$user_edit-&amp;gt;{nonuid}) {&lt;br /&gt;
                if ($form-&amp;gt;{expired} &amp;amp;&amp;amp; $form-&amp;gt;{expired} eq 'on') {&lt;br /&gt;
#                       $slashdb-&amp;gt;setExpired($user_edit-&amp;gt;{uid});&lt;br /&gt;
&lt;br /&gt;
                } else {&lt;br /&gt;
#                       $slashdb-&amp;gt;setUnexpired($user_edit-&amp;gt;{uid});&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $data = { uid =&amp;gt; $id };&lt;br /&gt;
        $data-&amp;gt;{note} = $note if defined $note;&lt;br /&gt;
        showInfo($data);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub savePasswd {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $note = $hr-&amp;gt;{noteref} || undef;&lt;br /&gt;
&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        my $error_flag = 0;&lt;br /&gt;
        my $user_edit = {};&lt;br /&gt;
        my $uid;&lt;br /&gt;
&lt;br /&gt;
        my $user_edits_table = {};&lt;br /&gt;
&lt;br /&gt;
        if ($user-&amp;gt;{is_admin}) {&lt;br /&gt;
                $uid = $form-&amp;gt;{uid} || $user-&amp;gt;{uid};&lt;br /&gt;
        } else {&lt;br /&gt;
                $uid = ($user-&amp;gt;{uid} == $form-&amp;gt;{uid}) ? $form-&amp;gt;{uid} : $user-&amp;gt;{uid};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        $user_edit = $slashdb-&amp;gt;getUser($uid);&lt;br /&gt;
&lt;br /&gt;
        if (!$user_edit-&amp;gt;{nickname}) {&lt;br /&gt;
                $$note .= getError('cookie_err', { titlebar =&amp;gt; 0 }, 0, 1)&lt;br /&gt;
                        if $note;&lt;br /&gt;
                $error_flag++;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($form-&amp;gt;{pass1} ne $form-&amp;gt;{pass2}) {&lt;br /&gt;
                $$note .= getError('saveuser_passnomatch_err', { titlebar =&amp;gt; 0 }, 0, 1)&lt;br /&gt;
                        if $note;&lt;br /&gt;
                $error_flag++;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if (!$form-&amp;gt;{pass1} || length $form-&amp;gt;{pass1} &amp;lt; 6) {&lt;br /&gt;
                $$note .= getError('saveuser_passtooshort_err', { titlebar =&amp;gt; 0 }, 0, 1)&lt;br /&gt;
                        if $note;&lt;br /&gt;
                $error_flag++;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if (!$user-&amp;gt;{is_admin}){&lt;br /&gt;
                # not an admin -- check old password before changing passwd&lt;br /&gt;
                my $return_uid = $slashdb-&amp;gt;getUserAuthenticate($uid, $form-&amp;gt;{oldpass}, 1);&lt;br /&gt;
                if (!$return_uid || $return_uid != $uid) {&lt;br /&gt;
                        $$note .= getError('saveuser_badoldpass_err', { titlebar =&amp;gt; 0 }, 0, 1) &lt;br /&gt;
                                if $note;&lt;br /&gt;
                        $error_flag++;&lt;br /&gt;
&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if (! $error_flag) {&lt;br /&gt;
                $user_edits_table-&amp;gt;{passwd} = $form-&amp;gt;{pass1} if $form-&amp;gt;{pass1};&lt;br /&gt;
                $user_edits_table-&amp;gt;{session_login} = $form-&amp;gt;{session_login};&lt;br /&gt;
                $user_edits_table-&amp;gt;{cookie_location} = $form-&amp;gt;{cookie_location};&lt;br /&gt;
&lt;br /&gt;
                # changed pass, so delete all logtokens&lt;br /&gt;
                $slashdb-&amp;gt;deleteLogToken($form-&amp;gt;{uid}, 1);&lt;br /&gt;
&lt;br /&gt;
                if ($user-&amp;gt;{admin_clearpass}&lt;br /&gt;
                        &amp;amp;&amp;amp; !$user-&amp;gt;{state}{admin_clearpass_thisclick}) {&lt;br /&gt;
                        # User is an admin who sent their password in the clear&lt;br /&gt;
                        # some time ago; now that it's been changed, we'll forget&lt;br /&gt;
                        # about that incident, unless this click was sent in the&lt;br /&gt;
                        # clear as well.&lt;br /&gt;
                        $user_edits_table-&amp;gt;{admin_clearpass} = '';&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                getOtherUserParams($user_edits_table);&lt;br /&gt;
                $slashdb-&amp;gt;setUser($uid, $user_edits_table) ;&lt;br /&gt;
                $$note .= getMessage('saveuser_passchanged_msg',&lt;br /&gt;
                        { nick =&amp;gt; $user_edit-&amp;gt;{nickname}, uid =&amp;gt; $user_edit-&amp;gt;{uid} },&lt;br /&gt;
                0, 1) if $note;&lt;br /&gt;
&lt;br /&gt;
                # only set cookie if user is current user&lt;br /&gt;
                if ($form-&amp;gt;{uid} eq $user-&amp;gt;{uid}) {&lt;br /&gt;
                        $user-&amp;gt;{logtoken} = bakeUserCookie($uid, $slashdb-&amp;gt;getLogToken($form-&amp;gt;{uid}, 1));&lt;br /&gt;
                        setCookie('user', $user-&amp;gt;{logtoken}, $user_edits_table-&amp;gt;{session_login});&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        return $error_flag;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub saveUser {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $gSkin = getCurrentSkin();&lt;br /&gt;
        my $plugins = $slashdb-&amp;gt;getDescriptions('plugins');&lt;br /&gt;
        my $uid;&lt;br /&gt;
        my $user_editfield_flag;&lt;br /&gt;
&lt;br /&gt;
        $uid = $user-&amp;gt;{is_admin} &amp;amp;&amp;amp; $form-&amp;gt;{uid} ? $form-&amp;gt;{uid} : $user-&amp;gt;{uid};&lt;br /&gt;
        my $user_edit = $slashdb-&amp;gt;getUser($uid);&lt;br /&gt;
&lt;br /&gt;
        my($note, $formname);&lt;br /&gt;
&lt;br /&gt;
        $note .= getMessage('savenickname_msg', {&lt;br /&gt;
                nickname =&amp;gt; $user_edit-&amp;gt;{nickname},&lt;br /&gt;
        }, 1);&lt;br /&gt;
&lt;br /&gt;
        if (!$user_edit-&amp;gt;{nickname}) {&lt;br /&gt;
                $note .= getError('cookie_err', 0, 1);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Check to ensure that if a user is changing his email address, that&lt;br /&gt;
        # it doesn't already exist in the userbase.&lt;br /&gt;
        if ($user_edit-&amp;gt;{realemail} ne $form-&amp;gt;{realemail}) {&lt;br /&gt;
                if ($slashdb-&amp;gt;existsEmail($form-&amp;gt;{realemail})) {&lt;br /&gt;
                        $note .= getError('emailexists_err', 0, 1);&lt;br /&gt;
                        $form-&amp;gt;{realemail} = $user_edit-&amp;gt;{realemail}; # can't change!&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my(%extr, $err_message, %limit);&lt;br /&gt;
        $limit{sig} = 120;  # schema is 200, give an extra buffer for domain tags&lt;br /&gt;
        $limit{bio} = $constants-&amp;gt;{users_bio_length} || 1024; # can be up to 2^16&lt;br /&gt;
&lt;br /&gt;
        for my $key (keys %limit) {&lt;br /&gt;
                my $dat = chopEntity($form-&amp;gt;{$key}, $limit{$key});&lt;br /&gt;
                $dat = strip_html($dat);&lt;br /&gt;
                $dat = balanceTags($dat, { deep_nesting =&amp;gt; 2, length =&amp;gt; $limit{$key} });&lt;br /&gt;
                $dat = addDomainTags($dat) if $dat;&lt;br /&gt;
&lt;br /&gt;
                # If the sig becomes too long to fit (domain tagging causes&lt;br /&gt;
                # string expansion and tag balancing can too), warn the user to&lt;br /&gt;
                # use shorter domain names and don't save their change.&lt;br /&gt;
                if ($key eq 'sig' &amp;amp;&amp;amp; defined($dat) &amp;amp;&amp;amp; length($dat) &amp;gt; 200) {&lt;br /&gt;
                        print getError('sig_too_long_err');&lt;br /&gt;
                        $extr{sig} = undef;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                # really, comment filters should ignore short length IMO ... oh well.&lt;br /&gt;
                if (length($dat) &amp;gt; 1 &amp;amp;&amp;amp; ! filterOk('comments', 'postersubj', $dat, \$err_message)) {&lt;br /&gt;
                        print getError('filter message', {&lt;br /&gt;
                                err_message     =&amp;gt; $err_message,&lt;br /&gt;
                                item            =&amp;gt; $key,&lt;br /&gt;
                        });&lt;br /&gt;
                        $extr{$key} = undef;&lt;br /&gt;
                } elsif (! compressOk('comments', 'postersubj', $dat)) {&lt;br /&gt;
                        print getError('compress filter', {&lt;br /&gt;
                                ratio           =&amp;gt; 'postersubj',&lt;br /&gt;
                                item            =&amp;gt; $key,&lt;br /&gt;
                        });&lt;br /&gt;
                        $extr{$key} = undef;&lt;br /&gt;
                } else {&lt;br /&gt;
                        $extr{$key} = $dat;&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # We should do some conformance checking on a user's pubkey,&lt;br /&gt;
        # make sure it looks like one of the known types of public&lt;br /&gt;
        # key.  Until then, just make sure it doesn't have HTML.&lt;br /&gt;
        $form-&amp;gt;{pubkey} = $plugins-&amp;gt;{'PubKey'} ? strip_nohtml($form-&amp;gt;{pubkey}, 1) : '';&lt;br /&gt;
&lt;br /&gt;
        my $homepage = $form-&amp;gt;{homepage};&lt;br /&gt;
        $homepage = '' if $homepage eq 'http://';&lt;br /&gt;
        $homepage = fudgeurl($homepage);&lt;br /&gt;
        $homepage = URI-&amp;gt;new_abs($homepage, $gSkin-&amp;gt;{absolutedir})&lt;br /&gt;
                        -&amp;gt;canonical&lt;br /&gt;
                        -&amp;gt;as_string if $homepage ne '';&lt;br /&gt;
        $homepage = substr($homepage, 0, 100) if $homepage ne '';&lt;br /&gt;
&lt;br /&gt;
        my $calendar_url = $form-&amp;gt;{calendar_url};&lt;br /&gt;
        if (length $calendar_url) {&lt;br /&gt;
                # fudgeurl() doesn't like webcal; will remove later anyway&lt;br /&gt;
                $calendar_url =~ s/^webcal/http/i;&lt;br /&gt;
                $calendar_url = fudgeurl($calendar_url);&lt;br /&gt;
                $calendar_url = URI-&amp;gt;new_abs($calendar_url, $gSkin-&amp;gt;{absolutedir})&lt;br /&gt;
                        -&amp;gt;canonical&lt;br /&gt;
                        -&amp;gt;as_string if $calendar_url ne '';&lt;br /&gt;
&lt;br /&gt;
                $calendar_url =~ s|^http://||i;&lt;br /&gt;
                $calendar_url = substr($calendar_url, 0, 200) if $calendar_url ne '';&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # for the users table&lt;br /&gt;
        my $user_edits_table = {&lt;br /&gt;
                homepage        =&amp;gt; $homepage,&lt;br /&gt;
                realname        =&amp;gt; $form-&amp;gt;{realname},&lt;br /&gt;
                pubkey          =&amp;gt; $form-&amp;gt;{pubkey},&lt;br /&gt;
                copy            =&amp;gt; $form-&amp;gt;{copy},&lt;br /&gt;
                quote           =&amp;gt; $form-&amp;gt;{quote},&lt;br /&gt;
                calendar_url    =&amp;gt; $calendar_url,&lt;br /&gt;
                yahoo           =&amp;gt; $form-&amp;gt;{yahoo},&lt;br /&gt;
                jabber          =&amp;gt; $form-&amp;gt;{jabber},&lt;br /&gt;
                aim             =&amp;gt; $form-&amp;gt;{aim},&lt;br /&gt;
                aimdisplay      =&amp;gt; $form-&amp;gt;{aimdisplay},&lt;br /&gt;
                icq             =&amp;gt; $form-&amp;gt;{icq},&lt;br /&gt;
                playing         =&amp;gt; $form-&amp;gt;{playing},&lt;br /&gt;
                mobile_text_address =&amp;gt; $form-&amp;gt;{mobile_text_address},&lt;br /&gt;
        };&lt;br /&gt;
&lt;br /&gt;
        if ($constants-&amp;gt;{wow}) {&lt;br /&gt;
                my $wowdb = getObject(&amp;quot;Slash::WoW&amp;quot;);&lt;br /&gt;
                if ($wowdb) {&lt;br /&gt;
                        $user_edits_table-&amp;gt;{wow_main_name} = &amp;quot;\L\u$form-&amp;gt;{wow_main_name}&amp;quot;;&lt;br /&gt;
                        $user_edits_table-&amp;gt;{wow_main_realm} = $form-&amp;gt;{wow_main_realm};&lt;br /&gt;
                        my $charid = $wowdb-&amp;gt;getCharidCreate($user_edits_table-&amp;gt;{wow_main_realm},&lt;br /&gt;
                                $user_edits_table-&amp;gt;{wow_main_name});&lt;br /&gt;
                        $wowdb-&amp;gt;setChar($charid, { uid =&amp;gt; $uid }, { if_unclaimed =&amp;gt; 1 }) if $charid;&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        for (keys %extr) {&lt;br /&gt;
                $user_edits_table-&amp;gt;{$_} = $extr{$_} if defined $extr{$_};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # don't want undef, want to be empty string so they&lt;br /&gt;
        # will overwrite the existing record&lt;br /&gt;
        for (keys %$user_edits_table) {&lt;br /&gt;
                $user_edits_table-&amp;gt;{$_} = '' unless defined $user_edits_table-&amp;gt;{$_};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($user_edit-&amp;gt;{realemail} ne $form-&amp;gt;{realemail}) {&lt;br /&gt;
                $user_edits_table-&amp;gt;{realemail} =&lt;br /&gt;
                        chopEntity($form-&amp;gt;{realemail}, 50);&lt;br /&gt;
                my $new_fakeemail = ''; # at emaildisplay 0, don't show any email address&lt;br /&gt;
                if ($user-&amp;gt;{emaildisplay}) {&lt;br /&gt;
                        $new_fakeemail = getArmoredEmail($uid, $user_edits_table-&amp;gt;{realemail})&lt;br /&gt;
                                if $user-&amp;gt;{emaildisplay} == 1;&lt;br /&gt;
                        $new_fakeemail = $user_edits_table-&amp;gt;{realemail}&lt;br /&gt;
                                if $user-&amp;gt;{emaildisplay} == 2;&lt;br /&gt;
                }&lt;br /&gt;
                $user_edits_table-&amp;gt;{fakeemail} = $new_fakeemail;&lt;br /&gt;
&lt;br /&gt;
                $note .= getMessage('changeemail_msg', {&lt;br /&gt;
                        realemail =&amp;gt; $user_edit-&amp;gt;{realemail}&lt;br /&gt;
                }, 1);&lt;br /&gt;
&lt;br /&gt;
                my $saveuser_emailtitle = getTitle('saveUser_email_title', {&lt;br /&gt;
                        nickname  =&amp;gt; $user_edit-&amp;gt;{nickname},&lt;br /&gt;
                        realemail =&amp;gt; $form-&amp;gt;{realemail}&lt;br /&gt;
                }, 1);&lt;br /&gt;
                my $saveuser_email_msg = getMessage('saveuser_email_msg', {&lt;br /&gt;
                        nickname  =&amp;gt; $user_edit-&amp;gt;{nickname},&lt;br /&gt;
                        realemail =&amp;gt; $form-&amp;gt;{realemail}&lt;br /&gt;
                }, 1);&lt;br /&gt;
&lt;br /&gt;
                sendEmail($form-&amp;gt;{realemail}, $saveuser_emailtitle, $saveuser_email_msg);&lt;br /&gt;
                doEmail($uid, $saveuser_emailtitle, $saveuser_email_msg);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        getOtherUserParams($user_edits_table);&lt;br /&gt;
        $slashdb-&amp;gt;setUser($uid, $user_edits_table);&lt;br /&gt;
&lt;br /&gt;
        editUser({ uid =&amp;gt; $uid, note =&amp;gt; $note });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub saveComm {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my($uid, $user_fakeemail);&lt;br /&gt;
&lt;br /&gt;
        if ($user-&amp;gt;{is_admin}) {&lt;br /&gt;
                $uid = $form-&amp;gt;{uid} || $user-&amp;gt;{uid};&lt;br /&gt;
        } else {&lt;br /&gt;
                $uid = ($user-&amp;gt;{uid} == $form-&amp;gt;{uid}) ?&lt;br /&gt;
                        $form-&amp;gt;{uid} : $user-&amp;gt;{uid};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Do the right thing with respect to the chosen email display mode&lt;br /&gt;
        # and the options that can be displayed.&lt;br /&gt;
        my $user_edit = $slashdb-&amp;gt;getUser($uid);&lt;br /&gt;
        my $new_fakeemail = '';         # at emaildisplay 0, don't show any email address&lt;br /&gt;
        if ($form-&amp;gt;{emaildisplay}) {&lt;br /&gt;
                $new_fakeemail = getArmoredEmail($uid)          if $form-&amp;gt;{emaildisplay} == 1;&lt;br /&gt;
                $new_fakeemail = $user_edit-&amp;gt;{realemail}        if $form-&amp;gt;{emaildisplay} == 2;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $name = $user-&amp;gt;{seclev} &amp;amp;&amp;amp; $form-&amp;gt;{name} ?&lt;br /&gt;
                $form-&amp;gt;{name} : $user-&amp;gt;{nickname};&lt;br /&gt;
&lt;br /&gt;
        my $note = getMessage('savenickname_msg',&lt;br /&gt;
                { nickname =&amp;gt; $name });&lt;br /&gt;
&lt;br /&gt;
        print getError('cookie_err') if isAnon($uid) || !$name;&lt;br /&gt;
&lt;br /&gt;
        # Take care of the lists&lt;br /&gt;
        # Enforce Ranges for variables that need it&lt;br /&gt;
        $form-&amp;gt;{commentlimit} = 0 if $form-&amp;gt;{commentlimit} &amp;lt; 1;&lt;br /&gt;
        my $cl_max = $constants-&amp;gt;{comment_commentlimit} || 0;&lt;br /&gt;
        $form-&amp;gt;{commentlimit} = $cl_max if $cl_max &amp;gt; 0 &amp;amp;&amp;amp; $form-&amp;gt;{commentlimit} &amp;gt; $cl_max;&lt;br /&gt;
        $form-&amp;gt;{commentspill} = 0 if $form-&amp;gt;{commentspill} &amp;lt; 1;&lt;br /&gt;
&lt;br /&gt;
        # For some of these values, namely the ones that we happen to&lt;br /&gt;
        # know get stored in users_param, we change them to 'undef'&lt;br /&gt;
        # if they are the default value.  This deletes them from the&lt;br /&gt;
        # users_param table, which has the same effect as storing the&lt;br /&gt;
        # default except it's faster all around.  If we ever change&lt;br /&gt;
        # the schema to promote these fields from params into a&lt;br /&gt;
        # proper users_* table, then this will no longer be correct.&lt;br /&gt;
        # See prepareUser().&lt;br /&gt;
        my $max = $constants-&amp;gt;{comment_maxscore} - $constants-&amp;gt;{comment_minscore};&lt;br /&gt;
        my $min = -$max;&lt;br /&gt;
        my $karma_bonus = ($form-&amp;gt;{karma_bonus} !~ /^[\-+]?\d+$/) ? &amp;quot;+1&amp;quot; : $form-&amp;gt;{karma_bonus};&lt;br /&gt;
        my $subscriber_bonus = ($form-&amp;gt;{subscriber_bonus} !~ /^[\-+]?\d+$/) ? &amp;quot;+1&amp;quot; : $form-&amp;gt;{subscriber_bonus};&lt;br /&gt;
        my $new_user_bonus = ($form-&amp;gt;{new_user_bonus} !~ /^[\-+]?\d+$/) ? 0 : $form-&amp;gt;{new_user_bonus};&lt;br /&gt;
        my $new_user_percent = (($form-&amp;gt;{new_user_percent} &amp;lt;= 100 &amp;amp;&amp;amp; $form-&amp;gt;{new_user_percent} &amp;gt;= 0) &lt;br /&gt;
                        ? $form-&amp;gt;{new_user_percent}&lt;br /&gt;
                        : 100); &lt;br /&gt;
        my $clsmall_bonus = ($form-&amp;gt;{clsmall_bonus} !~ /^[\-+]?\d+$/) ? 0 : $form-&amp;gt;{clsmall_bonus};&lt;br /&gt;
        my $clbig_bonus = ($form-&amp;gt;{clbig_bonus} !~ /^[\-+]?\d+$/) ? 0 : $form-&amp;gt;{clbig_bonus};&lt;br /&gt;
&lt;br /&gt;
        # plum&lt;br /&gt;
        $form-&amp;gt;{d2_comment_q} = (isSubscriber($user_edit) || $user_edit-&amp;gt;{seclev} &amp;gt;= 100)&lt;br /&gt;
                ? $form-&amp;gt;{d2_comment_q}&lt;br /&gt;
                : ($form-&amp;gt;{d2_comment_q} eq '0')&lt;br /&gt;
                        ? 1&lt;br /&gt;
                        : $form-&amp;gt;{d2_comment_q};&lt;br /&gt;
&lt;br /&gt;
        my $user_edits_table = {&lt;br /&gt;
                # MC: More D2 neutring&lt;br /&gt;
                #discussion2            =&amp;gt; $form-&amp;gt;{discussion2} || undef,&lt;br /&gt;
                #d2_comment_q           =&amp;gt; $form-&amp;gt;{d2_comment_q} || undef,&lt;br /&gt;
                #d2_comment_order       =&amp;gt; $form-&amp;gt;{d2_comment_order} || undef,&lt;br /&gt;
                clsmall                 =&amp;gt; $form-&amp;gt;{clsmall},&lt;br /&gt;
                clsmall_bonus           =&amp;gt; ($clsmall_bonus || undef),&lt;br /&gt;
                clbig                   =&amp;gt; $form-&amp;gt;{clbig},&lt;br /&gt;
                clbig_bonus             =&amp;gt; ($clbig_bonus || undef),&lt;br /&gt;
                commentlimit            =&amp;gt; $form-&amp;gt;{commentlimit},&lt;br /&gt;
                bytelimit               =&amp;gt; $form-&amp;gt;{bytelimit},&lt;br /&gt;
                commentsort             =&amp;gt; $form-&amp;gt;{commentsort},&lt;br /&gt;
                commentspill            =&amp;gt; $form-&amp;gt;{commentspill},&lt;br /&gt;
                domaintags              =&amp;gt; ($form-&amp;gt;{domaintags} != 2 ? $form-&amp;gt;{domaintags} : undef),&lt;br /&gt;
                emaildisplay            =&amp;gt; $form-&amp;gt;{emaildisplay} || undef,&lt;br /&gt;
                fakeemail               =&amp;gt; $new_fakeemail,&lt;br /&gt;
                highlightthresh         =&amp;gt; $form-&amp;gt;{highlightthresh},&lt;br /&gt;
                mode                    =&amp;gt; $form-&amp;gt;{umode},&lt;br /&gt;
                posttype                =&amp;gt; $form-&amp;gt;{posttype},&lt;br /&gt;
                threshold               =&amp;gt; $form-&amp;gt;{uthreshold},&lt;br /&gt;
                nosigs                  =&amp;gt; ($form-&amp;gt;{nosigs}     ? 1 : 0),&lt;br /&gt;
                reparent                =&amp;gt; ($form-&amp;gt;{reparent}   ? 1 : 0),&lt;br /&gt;
                noscores                =&amp;gt; ($form-&amp;gt;{noscores}   ? 1 : 0),&lt;br /&gt;
                hardthresh              =&amp;gt; ($form-&amp;gt;{hardthresh} ? 1 : 0),&lt;br /&gt;
                no_spell                =&amp;gt; ($form-&amp;gt;{no_spell}   ? 1 : undef),&lt;br /&gt;
                nobonus                 =&amp;gt; ($form-&amp;gt;{nobonus} ? 1 : undef),&lt;br /&gt;
                nosubscriberbonus       =&amp;gt; ($form-&amp;gt;{nosubscriberbonus} ? 1 : undef),&lt;br /&gt;
                postanon                =&amp;gt; ($form-&amp;gt;{postanon} ? 1 : undef),&lt;br /&gt;
                new_user_percent        =&amp;gt; ($new_user_percent &amp;amp;&amp;amp; $new_user_percent != 100&lt;br /&gt;
                                                ? $new_user_percent : undef),&lt;br /&gt;
                new_user_bonus          =&amp;gt; ($new_user_bonus || undef),&lt;br /&gt;
                karma_bonus             =&amp;gt; ($karma_bonus ne '+1' ? $karma_bonus : undef),&lt;br /&gt;
                subscriber_bonus        =&amp;gt; ($subscriber_bonus || undef),&lt;br /&gt;
                textarea_rows           =&amp;gt; ($form-&amp;gt;{textarea_rows} != $constants-&amp;gt;{textarea_rows}&lt;br /&gt;
                                                ? $form-&amp;gt;{textarea_rows} : undef),&lt;br /&gt;
                textarea_cols           =&amp;gt; ($form-&amp;gt;{textarea_cols} != $constants-&amp;gt;{textarea_cols}&lt;br /&gt;
                                                ? $form-&amp;gt;{textarea_cols} : undef),&lt;br /&gt;
                user_comment_sort_type  =&amp;gt; ($form-&amp;gt;{user_comment_sort_type} != 2&lt;br /&gt;
                                                ? $form-&amp;gt;{user_comment_sort_type} : undef ),&lt;br /&gt;
                mod_with_comm           =&amp;gt; ($form-&amp;gt;{mod_with_comm} ? 1 : undef),&lt;br /&gt;
                m2_with_mod             =&amp;gt; ($form-&amp;gt;{m2_with_mod} ? 1 : undef),&lt;br /&gt;
                m2_with_comm_mod                =&amp;gt; ($form-&amp;gt;{m2_with_mod_on_comm} ? 1 : undef),&lt;br /&gt;
&lt;br /&gt;
        };&lt;br /&gt;
&lt;br /&gt;
        # set our default values for the items where an empty-string won't do &lt;br /&gt;
        my $defaults = {&lt;br /&gt;
                posttype        =&amp;gt; 2,&lt;br /&gt;
                highlightthresh =&amp;gt; 4,&lt;br /&gt;
                reparent        =&amp;gt; 1,&lt;br /&gt;
                commentlimit    =&amp;gt; 100,&lt;br /&gt;
                commentspill    =&amp;gt; 50,&lt;br /&gt;
                mode            =&amp;gt; 'thread'&lt;br /&gt;
        };&lt;br /&gt;
&lt;br /&gt;
        my $mod_reader = getObject(&amp;quot;Slash::$constants-&amp;gt;{m1_pluginname}&amp;quot;, { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my @reasons = ( );&lt;br /&gt;
        my $reasons = $mod_reader-&amp;gt;getReasons();&lt;br /&gt;
        for my $id (sort { $a &amp;lt;=&amp;gt; $b } keys %$reasons) {&lt;br /&gt;
                push @reasons, $reasons-&amp;gt;{$id}{name};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        for my $reason_name (@reasons) {&lt;br /&gt;
                my $key = &amp;quot;reason_alter_$reason_name&amp;quot;;&lt;br /&gt;
                my $answer = $form-&amp;gt;{$key} || 0;&lt;br /&gt;
                $answer = 0 if !$answer || $answer !~ /^[\-+]?\d+$/;&lt;br /&gt;
                $user_edits_table-&amp;gt;{$key} = ($answer == 0) ? '' : $answer;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        for (qw| friend foe anonymous fof eof freak fan |) {&lt;br /&gt;
                my $answer = $form-&amp;gt;{&amp;quot;people_bonus_$_&amp;quot;};&lt;br /&gt;
                $answer = 0 if $answer !~ /^[\-+]?\d+$/;&lt;br /&gt;
                $user_edits_table-&amp;gt;{&amp;quot;people_bonus_$_&amp;quot;} = ($answer == 0) ? '' : $answer;&lt;br /&gt;
        }&lt;br /&gt;
        getOtherUserParams($user_edits_table);&lt;br /&gt;
        setToDefaults($user_edits_table, {}, $defaults) if $form-&amp;gt;{restore_defaults};&lt;br /&gt;
        $slashdb-&amp;gt;setUser($uid, $user_edits_table);&lt;br /&gt;
&lt;br /&gt;
        editComm({ uid =&amp;gt; $uid, note =&amp;gt; $note });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub saveHome {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my($uid, $error);&lt;br /&gt;
&lt;br /&gt;
        if ($user-&amp;gt;{is_admin}) {&lt;br /&gt;
                $uid = $form-&amp;gt;{uid} || $user-&amp;gt;{uid} ;&lt;br /&gt;
        } else {&lt;br /&gt;
                $uid = ($user-&amp;gt;{uid} == $form-&amp;gt;{uid}) ?&lt;br /&gt;
                        $form-&amp;gt;{uid} : $user-&amp;gt;{uid};&lt;br /&gt;
        }&lt;br /&gt;
        my $edit_user = $slashdb-&amp;gt;getUser($uid);&lt;br /&gt;
&lt;br /&gt;
        my $name = $user-&amp;gt;{seclev} &amp;amp;&amp;amp; $form-&amp;gt;{name} ?&lt;br /&gt;
                $form-&amp;gt;{name} : $user-&amp;gt;{nickname};&lt;br /&gt;
        $name = substr($name, 0, 20);&lt;br /&gt;
&lt;br /&gt;
        my $note = getMessage('savenickname_msg',&lt;br /&gt;
                { nickname =&amp;gt; $name });&lt;br /&gt;
&lt;br /&gt;
        if (isAnon($uid) || !$name) {&lt;br /&gt;
                my $cookiemsg = getError('cookie_err');&lt;br /&gt;
                print $cookiemsg;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Using the existing list of slashboxes and the set of&lt;br /&gt;
        # what's checked and not, build up the new list.&lt;br /&gt;
        # (New arrivals go at the end.)&lt;br /&gt;
        my $slashboxes = $edit_user-&amp;gt;{slashboxes};&lt;br /&gt;
        # Only go through all this if the user clicked save,&lt;br /&gt;
        # not &amp;quot;Restore Slashbox Defaults&amp;quot;!&lt;br /&gt;
        my($boxes, $skinBoxes) = $slashdb-&amp;gt;getPortalsCommon();&lt;br /&gt;
        my $default_slashboxes_textlist = join &amp;quot;,&amp;quot;,&lt;br /&gt;
                @{$skinBoxes-&amp;gt;{$constants-&amp;gt;{mainpage_skid}}};&lt;br /&gt;
        if (!$form-&amp;gt;{restore_slashbox_defaults}) {&lt;br /&gt;
                $slashboxes = $default_slashboxes_textlist if !$slashboxes;&lt;br /&gt;
                my @slashboxes = split /,/, $slashboxes;&lt;br /&gt;
                my %slashboxes = ( );&lt;br /&gt;
                for my $i (0..$#slashboxes) {&lt;br /&gt;
                        $slashboxes{$slashboxes[$i]} = $i;&lt;br /&gt;
                }&lt;br /&gt;
                # Add new boxes in.&lt;br /&gt;
                for my $key (sort grep /^showbox_/, keys %$form) {&lt;br /&gt;
                        my($bid) = $key =~ /^showbox_(\w+)$/;&lt;br /&gt;
                        next if length($bid) &amp;lt; 1 || length($bid) &amp;gt; 30 || $bid !~ /^\w+$/;&lt;br /&gt;
                        if (! exists $slashboxes{$bid}) {&lt;br /&gt;
                                $slashboxes{$bid} = 999; # put it at the end&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
                # Remove any boxes that weren't checked.&lt;br /&gt;
                for my $bid (@slashboxes) {&lt;br /&gt;
                        delete $slashboxes{$bid} unless $form-&amp;gt;{&amp;quot;showbox_$bid&amp;quot;};&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                for my $key (sort grep /^dynamic_/, keys %$form) {&lt;br /&gt;
                        my($bid) = $key =~ /^dynamic_(.+)$/;&lt;br /&gt;
                        next if length($bid) &amp;lt; 1;&lt;br /&gt;
                        if (! exists $slashboxes{$bid}) {&lt;br /&gt;
                                $slashboxes{$bid} = 999;&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                @slashboxes = sort {&lt;br /&gt;
                        $slashboxes{$a} &amp;lt;=&amp;gt; $slashboxes{$b}&lt;br /&gt;
                        ||&lt;br /&gt;
                        $a cmp $b&lt;br /&gt;
                } keys %slashboxes;&lt;br /&gt;
                # This probably should be a var (and appear in tilded_customize_msg)&lt;br /&gt;
                $#slashboxes = 19 if $#slashboxes &amp;gt; 19;&lt;br /&gt;
                $slashboxes = join &amp;quot;,&amp;quot;, @slashboxes;&lt;br /&gt;
        }&lt;br /&gt;
        # If we're right back to the default, that means the&lt;br /&gt;
        # empty string.&lt;br /&gt;
        if ($slashboxes eq $default_slashboxes_textlist) {&lt;br /&gt;
                $slashboxes = &amp;quot;&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Set the story_never and story_always fields.&lt;br /&gt;
        my $author_hr = $slashdb-&amp;gt;getDescriptions('authors');&lt;br /&gt;
        my $tree = $slashdb-&amp;gt;getTopicTree();&lt;br /&gt;
        my(@story_never_topic,  @story_never_author,  @story_never_nexus);&lt;br /&gt;
        my(@story_always_topic, @story_always_author);&lt;br /&gt;
        my(@story_always_nexus, @story_full_brief_nexus, @story_brief_always_nexus, @story_full_best_nexus, @story_brief_best_nexus);&lt;br /&gt;
        my($story_topic_all, $story_author_all, $story_nexus_all) = (0, 0, 0);&lt;br /&gt;
&lt;br /&gt;
        # Topics are either present (value=2) or absent (value=0).  If absent,&lt;br /&gt;
        # push them onto the never list.  Otherwise, do nothing.  (There's no&lt;br /&gt;
        # way to have an &amp;quot;always&amp;quot; topic, at the moment.)  If the hidden&lt;br /&gt;
        # field topictids_present is false, then there are no topic tids,&lt;br /&gt;
        # skip this.&lt;br /&gt;
        if ($form-&amp;gt;{topictids_present}) {&lt;br /&gt;
                for my $tid (&lt;br /&gt;
                        sort { $a &amp;lt;=&amp;gt; $b }&lt;br /&gt;
                        grep { !$tree-&amp;gt;{$_}{nexus} }&lt;br /&gt;
                        keys %$tree&lt;br /&gt;
                ) {&lt;br /&gt;
                        my $key = &amp;quot;topictid$tid&amp;quot;;&lt;br /&gt;
                        $story_topic_all++;&lt;br /&gt;
                        if (!$form-&amp;gt;{$key}) {           push @story_never_topic, $tid   }&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
        # Authors are either present (value=2) or absent (value=0).  If&lt;br /&gt;
        # absent, push them onto the never list.  Otherwise, do nothing.&lt;br /&gt;
        # (There's no way to have an &amp;quot;always&amp;quot; author, at the moment.)&lt;br /&gt;
        for my $aid (sort { $a &amp;lt;=&amp;gt; $b } keys %$author_hr) {&lt;br /&gt;
                my $key = &amp;quot;aid$aid&amp;quot;;&lt;br /&gt;
                $story_author_all++;&lt;br /&gt;
                if (!$form-&amp;gt;{$key}) {                   push @story_never_author, $aid  }&lt;br /&gt;
        }&lt;br /&gt;
        # Nexuses can have value 0, 1, 2, 3, 4, 5.  &lt;br /&gt;
        # 0 means the never list,&lt;br /&gt;
        # 1 means brief view of mainpage articles only&lt;br /&gt;
        # 2 means full view of mainpage articles only&lt;br /&gt;
        # 3 means brief view of all content&lt;br /&gt;
        # 4 means full view of mainpage content, brief view of sectional&lt;br /&gt;
        # 5 means full view of all content&lt;br /&gt;
        for my $tid (&lt;br /&gt;
                sort { $a &amp;lt;=&amp;gt; $b }&lt;br /&gt;
                map { /^nexustid(\d+)$/; $1 }&lt;br /&gt;
                grep { /^nexustid\d+$/ }&lt;br /&gt;
                keys %$form&lt;br /&gt;
        ) {&lt;br /&gt;
                my $key = &amp;quot;nexustid$tid&amp;quot;;&lt;br /&gt;
                next unless $tid &amp;amp;&amp;amp; $tree-&amp;gt;{$tid} &amp;amp;&amp;amp; $tree-&amp;gt;{$tid}{nexus};&lt;br /&gt;
                $story_nexus_all++;&lt;br /&gt;
                   if (!$form-&amp;gt;{$key}) {                push @story_never_nexus, $tid   }&lt;br /&gt;
                elsif ($form-&amp;gt;{$key} == 5 ) {           push @story_always_nexus, $tid  }&lt;br /&gt;
                elsif ($form-&amp;gt;{$key} == 4 ) {           push @story_full_brief_nexus, $tid }&lt;br /&gt;
                elsif ($form-&amp;gt;{$key} == 3 ) {           push @story_brief_always_nexus, $tid }&lt;br /&gt;
                elsif ($form-&amp;gt;{$key} == 2 ) {           push @story_full_best_nexus, $tid }&lt;br /&gt;
                elsif ($form-&amp;gt;{$key} == 1 ) {           push @story_brief_best_nexus, $tid }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
#use Data::Dumper; $Data::Dumper::Sortkeys = 1; print STDERR scalar(localtime) . &amp;quot; s_n_t '@story_never_topic' s_n_a '@story_never_author' s_n_n '@story_never_nexus' s_a_n '@story_always_nexus' form: &amp;quot; . Dumper($form);&lt;br /&gt;
        # Sanity check.&lt;br /&gt;
        $#story_never_topic             = 299 if $#story_never_topic   &amp;gt; 299;&lt;br /&gt;
        $#story_never_author            = 299 if $#story_never_author  &amp;gt; 299;&lt;br /&gt;
        $#story_never_nexus             = 299 if $#story_never_nexus   &amp;gt; 299;&lt;br /&gt;
        $#story_always_topic            = 299 if $#story_always_topic  &amp;gt; 299;&lt;br /&gt;
        $#story_always_author           = 299 if $#story_always_author &amp;gt; 299;&lt;br /&gt;
        $#story_always_nexus            = 299 if $#story_always_nexus  &amp;gt; 299;&lt;br /&gt;
        $#story_full_brief_nexus        = 299 if $#story_full_brief_nexus &amp;gt; 299;&lt;br /&gt;
        $#story_brief_always_nexus      = 299 if $#story_brief_always_nexus &amp;gt; 299;&lt;br /&gt;
        $#story_brief_best_nexus        = 299 if $#story_brief_best_nexus &amp;gt; 299;&lt;br /&gt;
        $#story_full_best_nexus         = 299 if $#story_full_best_nexus &amp;gt; 299;&lt;br /&gt;
&lt;br /&gt;
        my $story_never_topic   = join &amp;quot;,&amp;quot;, @story_never_topic;&lt;br /&gt;
        $story_never_topic = ($constants-&amp;gt;{subscribe} &amp;amp;&amp;amp; $user-&amp;gt;{is_subscriber})&lt;br /&gt;
                ? checkList($story_never_topic, 1024)&lt;br /&gt;
                : checkList($story_never_topic);&lt;br /&gt;
        my $story_never_author          = checkList(join &amp;quot;,&amp;quot;, @story_never_author);&lt;br /&gt;
        my $story_never_nexus           = checkList(join &amp;quot;,&amp;quot;, @story_never_nexus);&lt;br /&gt;
        my $story_always_topic          = checkList(join &amp;quot;,&amp;quot;, @story_always_topic);&lt;br /&gt;
        $story_always_topic = ($constants-&amp;gt;{subscribe} &amp;amp;&amp;amp; $user-&amp;gt;{is_subscriber})&lt;br /&gt;
                ? checkList($story_always_topic, 1024)&lt;br /&gt;
                : checkList($story_always_topic);&lt;br /&gt;
        my $story_always_author         = checkList(join &amp;quot;,&amp;quot;, @story_always_author);&lt;br /&gt;
&lt;br /&gt;
        my $story_always_nexus          = checkList(join &amp;quot;,&amp;quot;, @story_always_nexus);&lt;br /&gt;
        my $story_full_brief_nexus      = checkList(join &amp;quot;,&amp;quot;, @story_full_brief_nexus);&lt;br /&gt;
        my $story_brief_always_nexus    = checkList(join &amp;quot;,&amp;quot;, @story_brief_always_nexus);&lt;br /&gt;
        my $story_brief_best_nexus      = checkList(join &amp;quot;,&amp;quot;, @story_brief_best_nexus);&lt;br /&gt;
        my $story_full_best_nexus       = checkList(join &amp;quot;,&amp;quot;, @story_full_best_nexus);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        my $user_edits_table = {&lt;br /&gt;
                story_never_topic               =&amp;gt; $story_never_topic,&lt;br /&gt;
                story_never_author              =&amp;gt; $story_never_author,&lt;br /&gt;
                story_never_nexus               =&amp;gt; $story_never_nexus,&lt;br /&gt;
                story_always_topic              =&amp;gt; $story_always_topic,&lt;br /&gt;
                story_always_author             =&amp;gt; $story_always_author,&lt;br /&gt;
                story_always_nexus              =&amp;gt; $story_always_nexus,&lt;br /&gt;
                story_brief_always_nexus        =&amp;gt; $story_brief_always_nexus,&lt;br /&gt;
                story_full_brief_nexus          =&amp;gt; $story_full_brief_nexus,&lt;br /&gt;
                story_full_best_nexus           =&amp;gt; $story_full_best_nexus,&lt;br /&gt;
                story_brief_best_nexus          =&amp;gt; $story_brief_best_nexus,&lt;br /&gt;
&lt;br /&gt;
                slashboxes      =&amp;gt; checkList($slashboxes, 1024),&lt;br /&gt;
&lt;br /&gt;
                maxstories      =&amp;gt; 30, # XXXSKIN fix this later&lt;br /&gt;
                noboxes         =&amp;gt; ($form-&amp;gt;{useslashboxes} ? 0 : 1),&lt;br /&gt;
                lowbandwidth    =&amp;gt; ($form-&amp;gt;{lowbandwidth} ? 1 : 0),&lt;br /&gt;
                simpledesign    =&amp;gt; ($form-&amp;gt;{simpledesign} ? 1 : 0),&lt;br /&gt;
                noicons         =&amp;gt; ($form-&amp;gt;{noicons} ? 1 : 0),&lt;br /&gt;
                willing         =&amp;gt; ($form-&amp;gt;{willing} ? 1 : 0),&lt;br /&gt;
                index_classic   =&amp;gt; ($form-&amp;gt;{index_classic} ? 1 : undef),&lt;br /&gt;
        };&lt;br /&gt;
&lt;br /&gt;
        if (defined $form-&amp;gt;{tzcode} &amp;amp;&amp;amp; defined $form-&amp;gt;{tzformat}) {&lt;br /&gt;
                $user_edits_table-&amp;gt;{tzcode} = $form-&amp;gt;{tzcode};&lt;br /&gt;
                $user_edits_table-&amp;gt;{dfid}   = $form-&amp;gt;{tzformat};&lt;br /&gt;
                $user_edits_table-&amp;gt;{dst}    = $form-&amp;gt;{dst};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Force the User Space area to contain only known-good HTML tags.&lt;br /&gt;
        # Unfortunately the cookie login model makes it just too risky&lt;br /&gt;
        # to allow scripts in here;  CSS's steal passwords.  There are&lt;br /&gt;
        # no known vulnerabilities at this time, but a combination of the&lt;br /&gt;
        # social engineering taking place (inviting users to put Javascript&lt;br /&gt;
        # from websites in here, and making available script URLs for that&lt;br /&gt;
        # purpose), plus the fact that this could be used to amplify the&lt;br /&gt;
        # seriousness of any future vulnerabilities, means it's way past&lt;br /&gt;
        # time to shut this feature down.  - Jamie 2002/03/06&lt;br /&gt;
&lt;br /&gt;
        # it's a VARCHAR ...&lt;br /&gt;
        my $mylinks_limit = 255;&lt;br /&gt;
        $user_edits_table-&amp;gt;{mylinks} = balanceTags(strip_html(&lt;br /&gt;
                chopEntity($form-&amp;gt;{mylinks} || '', $mylinks_limit)&lt;br /&gt;
        ), { deep_nesting =&amp;gt; 2, length =&amp;gt; $mylinks_limit });&lt;br /&gt;
&lt;br /&gt;
        $user_edits_table-&amp;gt;{mylinks} = '' unless defined $user_edits_table-&amp;gt;{mylinks};&lt;br /&gt;
&lt;br /&gt;
        $error = 1;&lt;br /&gt;
        # must select at least 1/4 of nexuses, topics, authors&lt;br /&gt;
        if      ( scalar(@story_never_author) &amp;gt; ($story_author_all * 3/4) ) {&lt;br /&gt;
                $note = getError('editHome_too_many_disabled');&lt;br /&gt;
        } elsif ( scalar(@story_never_nexus) &amp;gt; ($story_nexus_all * 3/4) ) {&lt;br /&gt;
                $note = getError('editHome_too_many_disabled');&lt;br /&gt;
        } elsif ( scalar(@story_never_topic) &amp;gt; ($story_topic_all * 3/4) ) {&lt;br /&gt;
                $note = getError('editHome_too_many_disabled');&lt;br /&gt;
        } else {&lt;br /&gt;
                $error = 0;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        unless ($error) {&lt;br /&gt;
                # If a user is unwilling to moderate, we should cancel all points, lest&lt;br /&gt;
                # they be preserved when they shouldn't be.&lt;br /&gt;
                if (!isAnon($uid) &amp;amp;&amp;amp; !$form-&amp;gt;{willing}) {&lt;br /&gt;
                        $slashdb-&amp;gt;setUser($uid, { points =&amp;gt; 0 });&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                getOtherUserParams($user_edits_table);&lt;br /&gt;
                if ($form-&amp;gt;{restore_defaults}) {&lt;br /&gt;
                        setToDefaults($user_edits_table, {}, {&lt;br /&gt;
                                maxstories      =&amp;gt; 30,&lt;br /&gt;
                                tzcode          =&amp;gt; &amp;quot;EST&amp;quot;,&lt;br /&gt;
                                # XXX shouldn't this reset ALL the defaults,&lt;br /&gt;
                                # not just these two?&lt;br /&gt;
                        });&lt;br /&gt;
                }&lt;br /&gt;
                if ($form-&amp;gt;{restore_slashbox_defaults}) {&lt;br /&gt;
                        setToDefaults($user_edits_table, {&lt;br /&gt;
                                'story_never_topic' =&amp;gt; 1,&lt;br /&gt;
                                'story_never_author' =&amp;gt; 1,&lt;br /&gt;
                                'story_never_nexus' =&amp;gt; 1,&lt;br /&gt;
                                'story_always_topic' =&amp;gt; 1,&lt;br /&gt;
                                'story_always_author' =&amp;gt; 1,&lt;br /&gt;
                                'story_always_nexus' =&amp;gt; 1,&lt;br /&gt;
                                'story_full_brief_nexus' =&amp;gt; 1,&lt;br /&gt;
                                'story_brief_always_nexus' =&amp;gt; 1,&lt;br /&gt;
                                'story_full_best_nexus' =&amp;gt; 1,&lt;br /&gt;
                                'story_brief_best_nexus' =&amp;gt; 1,&lt;br /&gt;
                                'maxstories' =&amp;gt; 1,&lt;br /&gt;
                                'noboxes' =&amp;gt; 1,&lt;br /&gt;
                                'light' =&amp;gt; 1,&lt;br /&gt;
                                'noicons' =&amp;gt; 1,&lt;br /&gt;
                                'willing' =&amp;gt; 1&lt;br /&gt;
                        }, { slashboxes =&amp;gt; &amp;quot;&amp;quot; });&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
#print scalar(localtime) . &amp;quot; uet: &amp;quot; . Dumper($user_edits_table);&lt;br /&gt;
                $slashdb-&amp;gt;setUser($uid, $user_edits_table);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        editHome({ uid =&amp;gt; $uid, note =&amp;gt; $note });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
# A generic way for a site to allow users to edit data about themselves.&lt;br /&gt;
# Most useful when your plugin or theme wants to let the user change&lt;br /&gt;
# minor settings but you don't want to write a whole new version&lt;br /&gt;
# of users.pl to provide a user interface.  The user can save any&lt;br /&gt;
# param of the format &amp;quot;opt_foo&amp;quot;, as long as &amp;quot;foo&amp;quot; shows up in&lt;br /&gt;
# getMiscUserOpts which lists all the misc opts that this user can edit.&lt;br /&gt;
# This is *not* protected by formkeys (yet), so assume attackers can make&lt;br /&gt;
# users click and accidentally edit their own settings: no really important&lt;br /&gt;
# data should be stored in this way.&lt;br /&gt;
sub editMiscOpts {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $user = getCurrentUser(); &lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $note = $hr-&amp;gt;{note} || &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        return if $user-&amp;gt;{is_anon}; # shouldn't be, but can't hurt to check&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        my $edit_user = $slashdb-&amp;gt;getUser($user-&amp;gt;{uid});&lt;br /&gt;
        my $title = getTitle('editMiscOpts_title');&lt;br /&gt;
&lt;br /&gt;
        my $opts = $slashdb-&amp;gt;getMiscUserOpts();&lt;br /&gt;
        for my $opt (@$opts) {&lt;br /&gt;
                my $opt_name = &amp;quot;opt_&amp;quot; . $opt-&amp;gt;{name};&lt;br /&gt;
                $opt-&amp;gt;{checked} = $edit_user-&amp;gt;{$opt_name} ? 1 : 0;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('editMiscOpts', {&lt;br /&gt;
#               useredit        =&amp;gt; $user_edit,&lt;br /&gt;
                title           =&amp;gt; $title,&lt;br /&gt;
                opts            =&amp;gt; $opts,&lt;br /&gt;
                note            =&amp;gt; $note,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
sub saveMiscOpts {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        return if $user-&amp;gt;{is_anon}; # shouldn't be, but can't hurt to check&lt;br /&gt;
&lt;br /&gt;
        my $edit_user = $slashdb-&amp;gt;getUser($user-&amp;gt;{uid});&lt;br /&gt;
        my %opts_ok_hash = ( );&lt;br /&gt;
        my $opts = $slashdb-&amp;gt;getMiscUserOpts();&lt;br /&gt;
        for my $opt (@$opts) {&lt;br /&gt;
                $opts_ok_hash{&amp;quot;opt_$opt-&amp;gt;{name}&amp;quot;} = 1;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $update = { };&lt;br /&gt;
        for my $opt (grep /^opt_/, keys %$form) {&lt;br /&gt;
                next unless $opts_ok_hash{$opt};&lt;br /&gt;
                $update-&amp;gt;{$opt} = $form-&amp;gt;{$opt} ? 1 : 0;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Make the changes.&lt;br /&gt;
        $slashdb-&amp;gt;setUser($edit_user-&amp;gt;{uid}, $update);&lt;br /&gt;
&lt;br /&gt;
        # Inform the user the change was made.  Since we don't&lt;br /&gt;
        # require formkeys, we always want to print a message to&lt;br /&gt;
        # make sure the user sees what s/he did.  This is done&lt;br /&gt;
        # by passing in a note which ends up passed to the&lt;br /&gt;
        # editMiscOpts template, which displays it.&lt;br /&gt;
        editMiscOpts({ note =&amp;gt; getMessage('savemiscopts_msg') });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub listReadOnly {&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
        my $readonlylist = $reader-&amp;gt;getAL2List('nopost');&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('listReadOnly', {&lt;br /&gt;
                readonlylist =&amp;gt; $readonlylist,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub listBanned {&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
        my $bannedlist = $reader-&amp;gt;getAL2List('ban');&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('listBanned', {&lt;br /&gt;
                bannedlist =&amp;gt; $bannedlist,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub topAbusers {&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
        my $topabusers = $reader-&amp;gt;getTopAbusers();&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('topAbusers', {&lt;br /&gt;
                topabusers =&amp;gt; $topabusers,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub listAbuses {&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        my $abuses = $reader-&amp;gt;getAbuses($form-&amp;gt;{key}, $form-&amp;gt;{abuseid});&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('listAbuses', {&lt;br /&gt;
                abuseid =&amp;gt; $form-&amp;gt;{abuseid},&lt;br /&gt;
                abuses  =&amp;gt; $abuses,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub forceAccountVerify {&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        my $uid = $form-&amp;gt;{uid};&lt;br /&gt;
        my $useredit = $slashdb-&amp;gt;getUser($uid);&lt;br /&gt;
&lt;br /&gt;
        if ($useredit-&amp;gt;{uid}) {&lt;br /&gt;
                my $newpasswd = $slashdb-&amp;gt;resetUserAccount($uid);&lt;br /&gt;
                $slashdb-&amp;gt;deleteLogToken($uid, 1);&lt;br /&gt;
                my $emailtitle = getTitle('reset_acct_email_title', {&lt;br /&gt;
                        nickname        =&amp;gt; $useredit-&amp;gt;{nickname}&lt;br /&gt;
                }, 1);&lt;br /&gt;
&lt;br /&gt;
                my $msg = getMessage('reset_acct_msg', {&lt;br /&gt;
                        newpasswd       =&amp;gt; $newpasswd,&lt;br /&gt;
                        tempnick        =&amp;gt; $useredit-&amp;gt;{nickname},&lt;br /&gt;
                }, 1);&lt;br /&gt;
&lt;br /&gt;
                $slashdb-&amp;gt;setUser($useredit-&amp;gt;{uid}, {&lt;br /&gt;
                        waiting_for_account_verify =&amp;gt; 1,&lt;br /&gt;
                        account_verify_request_time =&amp;gt; $slashdb-&amp;gt;getTime()&lt;br /&gt;
                });&lt;br /&gt;
&lt;br /&gt;
                doEmail($useredit-&amp;gt;{uid}, $emailtitle, $msg) if $useredit-&amp;gt;{uid};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        print getMessage(&amp;quot;reset_acct_complete&amp;quot;, { useredit =&amp;gt; $useredit }, 1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub displayForm {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        my $suadmin_flag = $user-&amp;gt;{seclev} &amp;gt;= 10000 ? 1 : 0;&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        my $op = $hr-&amp;gt;{op} || $form-&amp;gt;{op} || 'displayform';&lt;br /&gt;
&lt;br /&gt;
        my $ops = {&lt;br /&gt;
                displayform     =&amp;gt; 'loginForm',&lt;br /&gt;
                edithome        =&amp;gt; 'loginForm',&lt;br /&gt;
                editcomm        =&amp;gt; 'loginForm',&lt;br /&gt;
                edituser        =&amp;gt; 'loginForm',&lt;br /&gt;
#               mailpasswdform  =&amp;gt; 'sendPasswdForm',&lt;br /&gt;
#               newuserform     =&amp;gt; 'newUserForm',&lt;br /&gt;
                userclose       =&amp;gt; 'loginForm',&lt;br /&gt;
                userlogin       =&amp;gt; 'loginForm',&lt;br /&gt;
                editmiscopts    =&amp;gt; 'loginForm',&lt;br /&gt;
                savemiscopts    =&amp;gt; 'loginForm',&lt;br /&gt;
                default         =&amp;gt; 'loginForm'&lt;br /&gt;
        };&lt;br /&gt;
&lt;br /&gt;
        $op = 'default' if !defined($ops-&amp;gt;{$op});&lt;br /&gt;
&lt;br /&gt;
        my($title, $title2, $msg1, $msg2) = ('', '', '', '');&lt;br /&gt;
&lt;br /&gt;
        if ($op eq 'userclose') {&lt;br /&gt;
                $title = getMessage('userclose');&lt;br /&gt;
&lt;br /&gt;
        } elsif ($op eq 'displayForm') {&lt;br /&gt;
                $title = $form-&amp;gt;{unickname}&lt;br /&gt;
                        ? getTitle('displayForm_err_title')&lt;br /&gt;
                        : getTitle('displayForm_title');&lt;br /&gt;
        } elsif ($op eq 'mailpasswdform') {&lt;br /&gt;
                $title = getTitle('mailPasswdForm_title');&lt;br /&gt;
        } elsif ($op eq 'newuserform') {&lt;br /&gt;
                $title = getTitle('newUserForm_title');&lt;br /&gt;
        } else {&lt;br /&gt;
                $title = getTitle('displayForm_title');&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        $form-&amp;gt;{unickname} ||= $form-&amp;gt;{newusernick};&lt;br /&gt;
&lt;br /&gt;
        if ($form-&amp;gt;{newusernick}) {&lt;br /&gt;
                $title2 = getTitle('displayForm_dup_title');&lt;br /&gt;
        } else {&lt;br /&gt;
                $title2 = getTitle('displayForm_new_title');&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        $msg1 = getMessage('dispform_new_msg_1');&lt;br /&gt;
        if (! $form-&amp;gt;{newusernick} &amp;amp;&amp;amp; $op eq 'newuserform') {&lt;br /&gt;
                $msg2 = getMessage('dispform_new_msg_2');&lt;br /&gt;
        } elsif ($op eq 'displayform' || $op eq 'userlogin') {&lt;br /&gt;
                $msg2 = getMessage('newuserform_msg');&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        slashDisplay($ops-&amp;gt;{$op}, {&lt;br /&gt;
                newnick         =&amp;gt; nickFix($form-&amp;gt;{newusernick}),&lt;br /&gt;
                suadmin_flag    =&amp;gt; $suadmin_flag,&lt;br /&gt;
                title           =&amp;gt; $title,&lt;br /&gt;
                title2          =&amp;gt; $title2,&lt;br /&gt;
                logged_in       =&amp;gt; $user-&amp;gt;{is_anon} ? 0 : 1,&lt;br /&gt;
                msg1            =&amp;gt; $msg1,&lt;br /&gt;
                msg2            =&amp;gt; $msg2&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
# this groups all the messages together in&lt;br /&gt;
# one template, called &amp;quot;messages;users;default&amp;quot;&lt;br /&gt;
sub getMessage {&lt;br /&gt;
        my($value, $hashref, $nocomm) = @_;&lt;br /&gt;
        $hashref ||= {};&lt;br /&gt;
        $hashref-&amp;gt;{value} = $value;&lt;br /&gt;
        return slashDisplay('messages', $hashref,&lt;br /&gt;
                { Return =&amp;gt; 1, Nocomm =&amp;gt; $nocomm });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
# this groups all the errors together in&lt;br /&gt;
# one template, called &amp;quot;errors;users;default&amp;quot;&lt;br /&gt;
sub getError {&lt;br /&gt;
        my($value, $hashref, $nocomm) = @_;&lt;br /&gt;
        $hashref ||= {};&lt;br /&gt;
        $hashref-&amp;gt;{value} = $value;&lt;br /&gt;
        return slashDisplay('errors', $hashref,&lt;br /&gt;
                { Return =&amp;gt; 1, Nocomm =&amp;gt; $nocomm });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
# this groups all the titles together in&lt;br /&gt;
# one template, called &amp;quot;users-titles&amp;quot;&lt;br /&gt;
sub getTitle {&lt;br /&gt;
        my($value, $hashref, $nocomm) = @_;&lt;br /&gt;
        $hashref ||= {};&lt;br /&gt;
        $hashref-&amp;gt;{value} = $value;&lt;br /&gt;
        return slashDisplay('titles', $hashref,&lt;br /&gt;
                { Return =&amp;gt; 1, Nocomm =&amp;gt; $nocomm });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
# getUserAdmin - returns a block of HTML text that provides&lt;br /&gt;
# information and editing capabilities for admin users.&lt;br /&gt;
# Most of this data is already in the getUserAdmin template,&lt;br /&gt;
# but really, we should try to get more of this logic into&lt;br /&gt;
# that template.&lt;br /&gt;
sub getUserAdmin {&lt;br /&gt;
        my($id, $field, $seclev_field) = @_;&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $logdb = getObject('Slash::DB', { db_type =&amp;gt; 'log_slave' });&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        my $user        = getCurrentUser();&lt;br /&gt;
        my $form        = getCurrentForm();&lt;br /&gt;
        my $constants   = getCurrentStatic();&lt;br /&gt;
        my $slashdb     = getCurrentDB();&lt;br /&gt;
        $id ||= $user-&amp;gt;{uid};&lt;br /&gt;
&lt;br /&gt;
        my($expired, $uidstruct, $readonly);&lt;br /&gt;
        my($user_edit, $user_editfield, $ipstruct, $ipstruct_order, $authors, $author_flag, $topabusers, $thresh_select,$section_select);&lt;br /&gt;
        my $srcid;&lt;br /&gt;
        my $proxy_check = {};&lt;br /&gt;
        my @accesshits;&lt;br /&gt;
        my $user_editinfo_flag = (!$form-&amp;gt;{op} || $form-&amp;gt;{op} eq 'userinfo'&lt;br /&gt;
                || $form-&amp;gt;{userinfo} || $form-&amp;gt;{saveuseradmin}&lt;br /&gt;
                ) ? 1 : 0;&lt;br /&gt;
        my $authoredit_flag = ($user-&amp;gt;{seclev} &amp;gt;= 10000) ? 1 : 0;&lt;br /&gt;
        my $sectionref = $reader-&amp;gt;getDescriptions('skins');&lt;br /&gt;
        $sectionref-&amp;gt;{''} = getData('all_sections');&lt;br /&gt;
&lt;br /&gt;
        $field ||= 'uid';&lt;br /&gt;
        if ($field eq 'uid') {&lt;br /&gt;
                $user_edit = $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                $user_editfield = $user_edit-&amp;gt;{uid};&lt;br /&gt;
                $srcid = convert_srcid( uid =&amp;gt; $id );&lt;br /&gt;
                #$expired = $slashdb-&amp;gt;checkExpired($user_edit-&amp;gt;{uid}) ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
                $ipstruct = $slashdb-&amp;gt;getNetIDStruct($user_edit-&amp;gt;{uid});&lt;br /&gt;
                @accesshits = $logdb-&amp;gt;countAccessLogHitsInLastX($field, $user_edit-&amp;gt;{uid}) if defined($logdb);&lt;br /&gt;
                $section_select = createSelect('section', $sectionref, $user_edit-&amp;gt;{section}, 1);&lt;br /&gt;
&lt;br /&gt;
        } elsif ($field eq 'nickname') {&lt;br /&gt;
                $user_edit = $slashdb-&amp;gt;getUser($slashdb-&amp;gt;getUserUID($id));&lt;br /&gt;
                $user_editfield = $user_edit-&amp;gt;{nickname};&lt;br /&gt;
                #$expired = $slashdb-&amp;gt;checkExpired($user_edit-&amp;gt;{uid}) ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
                $ipstruct = $slashdb-&amp;gt;getNetIDStruct($user_edit-&amp;gt;{uid});&lt;br /&gt;
                @accesshits = $logdb-&amp;gt;countAccessLogHitsInLastX('uid', $user_edit-&amp;gt;{uid}) if defined($logdb);&lt;br /&gt;
                $section_select = createSelect('section', $sectionref, $user_edit-&amp;gt;{section}, 1);&lt;br /&gt;
&lt;br /&gt;
        } elsif ($field eq 'md5id') {&lt;br /&gt;
                $user_edit-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                $user_edit-&amp;gt;{md5id} = $id;&lt;br /&gt;
                if ($form-&amp;gt;{fieldname} &amp;amp;&amp;amp; $form-&amp;gt;{fieldname} =~ /^(ipid|subnetid)$/) {&lt;br /&gt;
                        $uidstruct = $slashdb-&amp;gt;getUIDStruct($form-&amp;gt;{fieldname}, $user_edit-&amp;gt;{md5id});&lt;br /&gt;
                        @accesshits = $logdb-&amp;gt;countAccessLogHitsInLastX($form-&amp;gt;{fieldname}, $user_edit-&amp;gt;{md5id}) if defined($logdb);&lt;br /&gt;
                } else {&lt;br /&gt;
                        $uidstruct = $slashdb-&amp;gt;getUIDStruct('md5id', $user_edit-&amp;gt;{md5id});&lt;br /&gt;
                        @accesshits = $logdb-&amp;gt;countAccessLogHitsInLastX($field, $user_edit-&amp;gt;{md5id}) if defined($logdb);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
        } elsif ($field eq 'ipid') {&lt;br /&gt;
                $user_edit-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                $user_edit-&amp;gt;{ipid} = $id;&lt;br /&gt;
                $srcid = convert_srcid( ipid =&amp;gt; $id );&lt;br /&gt;
                $user_editfield = $id;&lt;br /&gt;
                $uidstruct = $slashdb-&amp;gt;getUIDStruct('ipid', $user_edit-&amp;gt;{ipid});&lt;br /&gt;
                @accesshits = $logdb-&amp;gt;countAccessLogHitsInLastX('host_addr', $user_edit-&amp;gt;{ipid}) if defined($logdb);&lt;br /&gt;
&lt;br /&gt;
                if ($form-&amp;gt;{userfield} =~/^\d+\.\d+\.\d+\.(\d+)$/) {&lt;br /&gt;
                        if ($1 ne &amp;quot;0&amp;quot;){&lt;br /&gt;
                                $proxy_check-&amp;gt;{available} = 1;&lt;br /&gt;
                                $proxy_check-&amp;gt;{results} = $slashdb-&amp;gt;checkForOpenProxy($form-&amp;gt;{userfield}) if $form-&amp;gt;{check_proxy};&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
        } elsif ($field eq 'subnetid') {&lt;br /&gt;
                $user_edit-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                $srcid = convert_srcid( ipid =&amp;gt; $id );&lt;br /&gt;
                if ($id =~ /^(\d+\.\d+\.\d+)(?:\.\d)?/) {&lt;br /&gt;
                        $id = $1 . &amp;quot;.0&amp;quot;;&lt;br /&gt;
                        $user_edit-&amp;gt;{subnetid} = $id;&lt;br /&gt;
                } else {&lt;br /&gt;
                        $user_edit-&amp;gt;{subnetid} = $id;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                $user_editfield = $id;&lt;br /&gt;
                $uidstruct = $slashdb-&amp;gt;getUIDStruct('subnetid', $user_edit-&amp;gt;{subnetid});&lt;br /&gt;
                @accesshits = $logdb-&amp;gt;countAccessLogHitsInLastX($field, $user_edit-&amp;gt;{subnetid}) if defined($logdb);&lt;br /&gt;
&lt;br /&gt;
        } elsif ($field eq &amp;quot;srcid&amp;quot;) {&lt;br /&gt;
                $user_edit-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                $user_edit-&amp;gt;{srcid}  = $id;&lt;br /&gt;
                $srcid = $id;&lt;br /&gt;
&lt;br /&gt;
        } else {&lt;br /&gt;
                $user_edit = $id ? $slashdb-&amp;gt;getUser($id) : $user;&lt;br /&gt;
                $user_editfield = $user_edit-&amp;gt;{uid};&lt;br /&gt;
                $ipstruct = $slashdb-&amp;gt;getNetIDStruct($user_edit-&amp;gt;{uid});&lt;br /&gt;
                @accesshits = $logdb-&amp;gt;countAccessLogHitsInLastX('uid', $user_edit-&amp;gt;{uid}) if defined($logdb);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        ##########&lt;br /&gt;
        # Put together the array and hashref that the template will need&lt;br /&gt;
        # to construct the list for display to the admin.&lt;br /&gt;
        # Note that currently a srcid which is not a uid (i.e. which&lt;br /&gt;
        # represents an IP address or masked IP network) cannot have&lt;br /&gt;
        # any ACLs assigned to it.  This may change in the future.&lt;br /&gt;
        # The term &amp;quot;aclam&amp;quot; is used because it has a field set for both&lt;br /&gt;
        # every ACL and every access modifier (i.e. AL2 bit) that is set&lt;br /&gt;
        # for this user or srcid.&lt;br /&gt;
        # For now, ACLs will be listed for IPs as well.&lt;br /&gt;
        # First get the list of ACLs that can be used.&lt;br /&gt;
        my $all_acls_ar = $reader-&amp;gt;getAllACLNames();&lt;br /&gt;
        my $all_acls_hr = { map { ( $_, 1 ) } @$all_acls_ar };&lt;br /&gt;
        # Add in any ACLs selected for this user (just in case&lt;br /&gt;
        # getAllACLNames is cached and stale).&lt;br /&gt;
        for my $acl (keys %{$user_edit-&amp;gt;{acl}}) {&lt;br /&gt;
                $all_acls_hr-&amp;gt;{$acl} = 1;&lt;br /&gt;
        }&lt;br /&gt;
        # Start creating the $all_aclam_hr data, in which the keys are&lt;br /&gt;
        # the HTML selection names that all begin with aclam_ and the&lt;br /&gt;
        # the values are their names/descriptions shown to the admin.&lt;br /&gt;
        # First put all the ACLs into the hash, if we're editing a user.&lt;br /&gt;
        my $all_aclam_hr = { };&lt;br /&gt;
        if (!$user_edit-&amp;gt;{nonuid}) {&lt;br /&gt;
                $all_aclam_hr = { map { ( &amp;quot;aclam_$_&amp;quot;, &amp;quot;ACL: $_&amp;quot; ) } keys %$all_acls_hr };&lt;br /&gt;
        }&lt;br /&gt;
        # Next put in all the al2 types.&lt;br /&gt;
        my $all_al2types = $reader-&amp;gt;getAL2Types;&lt;br /&gt;
        for my $key (keys %$all_al2types) {&lt;br /&gt;
                next if $key eq 'comment'; # skip the 'comment' type&lt;br /&gt;
                $all_aclam_hr-&amp;gt;{&amp;quot;aclam_$key&amp;quot;} = $all_al2types-&amp;gt;{$key}{title};&lt;br /&gt;
        }&lt;br /&gt;
        # Finally, sort the keys of the hash into the order that we&lt;br /&gt;
        # want them displayed to the admin (ACLs first).&lt;br /&gt;
        my $all_acls_longkeys_hr = { map { ( &amp;quot;aclam_$_&amp;quot;, 1 ) } keys %$all_acls_hr };&lt;br /&gt;
        my $all_aclam_ar = [&lt;br /&gt;
                sort {&lt;br /&gt;
                        (exists($all_acls_longkeys_hr-&amp;gt;{$a}) ? -1 : 1) &amp;lt;=&amp;gt; (exists($all_acls_longkeys_hr-&amp;gt;{$b}) ? -1 : 1)&lt;br /&gt;
                        ||&lt;br /&gt;
                        $all_aclam_hr-&amp;gt;{$a} cmp $all_aclam_hr-&amp;gt;{$b}&lt;br /&gt;
                } keys %$all_aclam_hr&lt;br /&gt;
        ];&lt;br /&gt;
        # Now put together the hashref that identifies which of those&lt;br /&gt;
        # items are selected for this user.&lt;br /&gt;
        my $user_aclam_hr = { };&lt;br /&gt;
        for my $acl (keys %{ $user_edit-&amp;gt;{acl} }) {&lt;br /&gt;
                $user_aclam_hr-&amp;gt;{&amp;quot;aclam_$acl&amp;quot;} = 1;&lt;br /&gt;
        }&lt;br /&gt;
        my $al2_tid_comment = $all_al2types-&amp;gt;{comment}{al2tid} || 0;&lt;br /&gt;
        my $al2_log_ar = [ ];&lt;br /&gt;
        my $al2_hr = { };&lt;br /&gt;
        # XXXSRCID Once we get rid of the silly 'md5id' field and all the&lt;br /&gt;
        # other bizarre backward-compatibility code paths early in this&lt;br /&gt;
        # function, this won't be necessary, but until then we need this&lt;br /&gt;
        # sanity check...&lt;br /&gt;
        if ($srcid) {&lt;br /&gt;
                # getAL2 works with either a srcids hashref or a single srcid&lt;br /&gt;
                $al2_hr = $slashdb-&amp;gt;getAL2($srcid);&lt;br /&gt;
                for my $al2 (keys %{ $al2_hr }) {&lt;br /&gt;
                        $user_aclam_hr-&amp;gt;{&amp;quot;aclam_$al2&amp;quot;} = 1;&lt;br /&gt;
                }&lt;br /&gt;
                $al2_log_ar = $slashdb-&amp;gt;getAL2Log($srcid);&lt;br /&gt;
        }&lt;br /&gt;
        # Generate al2_nick_hr, which will be populated with keys of all&lt;br /&gt;
        # the (presumably) admin uids who have logged rows for this al2,&lt;br /&gt;
        # and values of their nicks.&lt;br /&gt;
        my $al2_nick_hr = { };&lt;br /&gt;
        for my $al2_log (@$al2_log_ar) {&lt;br /&gt;
                my $uid = $al2_log-&amp;gt;{adminuid};&lt;br /&gt;
                next if !$uid; # odd error, might want to flag this&lt;br /&gt;
                $al2_nick_hr-&amp;gt;{$uid} ||= $slashdb-&amp;gt;getUser($uid, 'nickname');&lt;br /&gt;
        }&lt;br /&gt;
        ##########&lt;br /&gt;
&lt;br /&gt;
        $user_edit-&amp;gt;{author} = ($user_edit-&amp;gt;{author} &amp;amp;&amp;amp; $user_edit-&amp;gt;{author} == 1)&lt;br /&gt;
                ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        if (! $user-&amp;gt;{nonuid}) {&lt;br /&gt;
                my $threshcodes = $reader-&amp;gt;getDescriptions('threshcode_values','',1);&lt;br /&gt;
                $thresh_select = createSelect('defaultpoints', $threshcodes, $user_edit-&amp;gt;{defaultpoints}, 1);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if (!ref $ipstruct) {&lt;br /&gt;
                undef $ipstruct;&lt;br /&gt;
        } else {&lt;br /&gt;
                @$ipstruct_order = sort { $ipstruct-&amp;gt;{$b}{dmin} cmp $ipstruct-&amp;gt;{$a}{dmin} } keys %$ipstruct;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $m2total = ($user_edit-&amp;gt;{m2fair} || 0) + ($user_edit-&amp;gt;{m2unfair} || 0);&lt;br /&gt;
        if ($m2total) {&lt;br /&gt;
                $user_edit-&amp;gt;{m2unfairpercent} = sprintf(&amp;quot;%.2f&amp;quot;,&lt;br /&gt;
                        $user_edit-&amp;gt;{m2unfair}*100/$m2total);&lt;br /&gt;
        }&lt;br /&gt;
        my $mod_total = ($user_edit-&amp;gt;{totalmods} || 0) + ($user_edit-&amp;gt;{stirred} || 0);&lt;br /&gt;
        if ($mod_total) {&lt;br /&gt;
                $user_edit-&amp;gt;{stirredpercent} = sprintf(&amp;quot;%.2f&amp;quot;,&lt;br /&gt;
                        $user_edit-&amp;gt;{stirred}*100/$mod_total);&lt;br /&gt;
        }&lt;br /&gt;
        if ($constants-&amp;gt;{subscribe} and my $subscribe = getObject('Slash::Subscribe')) {&lt;br /&gt;
                $user_edit-&amp;gt;{subscribe_payments} =&lt;br /&gt;
                        $subscribe-&amp;gt;getSubscriptionsForUser($user_edit-&amp;gt;{uid});&lt;br /&gt;
                $user_edit-&amp;gt;{subscribe_purchases} =&lt;br /&gt;
                        $subscribe-&amp;gt;getSubscriptionsPurchasedByUser($user_edit-&amp;gt;{uid},{ only_types =&amp;gt; [ &amp;quot;grant&amp;quot;, &amp;quot;gift&amp;quot; ] });&lt;br /&gt;
        }&lt;br /&gt;
        my $ipid = $user_edit-&amp;gt;{ipid};&lt;br /&gt;
        my $subnetid = $user_edit-&amp;gt;{subnetid};&lt;br /&gt;
        my $post_restrictions = {};&lt;br /&gt;
        my ($subnet_karma, $ipid_karma);&lt;br /&gt;
&lt;br /&gt;
        if ($ipid &amp;amp;&amp;amp; !$subnetid) {&lt;br /&gt;
                $ipid = md5_hex($ipid) if length($ipid) != 32;&lt;br /&gt;
                $proxy_check-&amp;gt;{ipid} = $ipid;&lt;br /&gt;
                $proxy_check-&amp;gt;{currently} = $slashdb-&amp;gt;getKnownOpenProxy($ipid, &amp;quot;ipid&amp;quot;);&lt;br /&gt;
                # This next call is very slow.&lt;br /&gt;
                $subnetid = $reader-&amp;gt;getSubnetFromIPIDBasedOnComments($ipid);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($subnetid) {&lt;br /&gt;
                $subnetid = md5_hex($subnetid) if length($subnetid) != 32;&lt;br /&gt;
                # These next three calls can be very slow.  In fact, getNetIDKarma&lt;br /&gt;
                # is actually called twice on the same subnetid;  if we can cache&lt;br /&gt;
                # that data somehow that wouldn't be a bad idea.&lt;br /&gt;
                $post_restrictions = $reader-&amp;gt;getNetIDPostingRestrictions(&amp;quot;subnetid&amp;quot;, $subnetid);&lt;br /&gt;
                $subnet_karma = $reader-&amp;gt;getNetIDKarma(&amp;quot;subnetid&amp;quot;, $subnetid);&lt;br /&gt;
                $ipid_karma = $reader-&amp;gt;getNetIDKarma(&amp;quot;ipid&amp;quot;, $ipid) if $ipid;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $clout_types_ar = [ sort grep /\D/, keys %{$slashdb-&amp;gt;getCloutTypes} ];&lt;br /&gt;
&lt;br /&gt;
        return slashDisplay('getUserAdmin', {&lt;br /&gt;
                field                   =&amp;gt; $field,&lt;br /&gt;
                useredit                =&amp;gt; $user_edit,&lt;br /&gt;
                srcid                   =&amp;gt; $srcid,&lt;br /&gt;
                all_aclam_ar            =&amp;gt; $all_aclam_ar,&lt;br /&gt;
                all_aclam_hr            =&amp;gt; $all_aclam_hr,&lt;br /&gt;
                user_aclam_hr           =&amp;gt; $user_aclam_hr,&lt;br /&gt;
                al2_old                 =&amp;gt; $al2_hr,&lt;br /&gt;
                al2_log                 =&amp;gt; $al2_log_ar,&lt;br /&gt;
                al2_tid_comment         =&amp;gt; $al2_tid_comment,&lt;br /&gt;
                al2_nick                =&amp;gt; $al2_nick_hr,&lt;br /&gt;
&lt;br /&gt;
                userinfo_flag           =&amp;gt; $user_editinfo_flag,&lt;br /&gt;
                userfield               =&amp;gt; $user_editfield,&lt;br /&gt;
                ipstruct                =&amp;gt; $ipstruct,&lt;br /&gt;
                ipstruct_order          =&amp;gt; $ipstruct_order,&lt;br /&gt;
                uidstruct               =&amp;gt; $uidstruct,&lt;br /&gt;
                accesshits              =&amp;gt; \@accesshits,&lt;br /&gt;
                seclev_field            =&amp;gt; $seclev_field,&lt;br /&gt;
                expired                 =&amp;gt; $expired,&lt;br /&gt;
                topabusers              =&amp;gt; $topabusers,&lt;br /&gt;
                readonly                =&amp;gt; $readonly,&lt;br /&gt;
                thresh_select           =&amp;gt; $thresh_select,&lt;br /&gt;
                authoredit_flag         =&amp;gt; $authoredit_flag,&lt;br /&gt;
                section_select          =&amp;gt; $section_select,&lt;br /&gt;
                all_acls                =&amp;gt; $all_acls_hr,&lt;br /&gt;
                proxy_check             =&amp;gt; $proxy_check,&lt;br /&gt;
                subnet_karma            =&amp;gt; $subnet_karma,&lt;br /&gt;
                ipid_karma              =&amp;gt; $ipid_karma,&lt;br /&gt;
                post_restrictions       =&amp;gt; $post_restrictions,&lt;br /&gt;
&lt;br /&gt;
                clout_types_ar          =&amp;gt; $clout_types_ar,&lt;br /&gt;
        }, 1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
# this is to allow alternate parameters to be specified.  pass in&lt;br /&gt;
# your hash reference to be passed to setUser(), and this will&lt;br /&gt;
# add in those extra parameters.  add the parameters to string_param,&lt;br /&gt;
# type = otherusersparam, code = name of the param.  they will&lt;br /&gt;
# be checked for the main user prefs editing screens, and on&lt;br /&gt;
# user creation -- pudge&lt;br /&gt;
sub getOtherUserParams {&lt;br /&gt;
        my($data) = @_;&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
        my $user    = getCurrentUser();&lt;br /&gt;
        my $form    = getCurrentForm();&lt;br /&gt;
        my $params  = $reader-&amp;gt;getDescriptions('otherusersparam');&lt;br /&gt;
&lt;br /&gt;
        for my $param (keys %$params) {&lt;br /&gt;
                if (exists $form-&amp;gt;{$param}) {&lt;br /&gt;
                        # set user too for output in this request&lt;br /&gt;
                        $data-&amp;gt;{$param} = $user-&amp;gt;{$param} = $form-&amp;gt;{$param} || undef;&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
###############################################################&lt;br /&gt;
# This modifies a hashref to default values -- if nothing&lt;br /&gt;
# else we assume the empty string which clears items in the&lt;br /&gt;
# user_param table &lt;br /&gt;
#&lt;br /&gt;
# takes 3 hashrefs currently&lt;br /&gt;
# $data     - hashref to change to defaults&lt;br /&gt;
# $skip     - hashref of keys to skip modifying&lt;br /&gt;
# $defaults - hashref of defaults to set to something other &lt;br /&gt;
#             than the empty string&lt;br /&gt;
sub setToDefaults {&lt;br /&gt;
        my($data, $skip, $defaults) = @_;&lt;br /&gt;
        foreach my $key (keys %$data) {&lt;br /&gt;
                next if $skip-&amp;gt;{$key};&lt;br /&gt;
                $data-&amp;gt;{$key} = exists $defaults-&amp;gt;{$key} ? $defaults-&amp;gt;{$key} : &amp;quot;&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub getCommentListing {&lt;br /&gt;
        my ($type, $value,&lt;br /&gt;
                $min_comment, $time_period, $cc_all, $cc_time_period, $cid_for_time_period,&lt;br /&gt;
                $non_admin_limit, $admin_time_limit, $admin_non_time_limit,&lt;br /&gt;
                $options) = @_;&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $store_cutoff = $options-&amp;gt;{use_uid_cid_cutoff} ? $constants-&amp;gt;{store_com_page1_min_cid_for_user_com_cnt} : 0;&lt;br /&gt;
&lt;br /&gt;
        my $s_opt = {};&lt;br /&gt;
        my $num_wanted = 0;&lt;br /&gt;
        if ($min_comment) {&lt;br /&gt;
                if ($user-&amp;gt;{is_admin}) {&lt;br /&gt;
                        $num_wanted = $admin_non_time_limit;&lt;br /&gt;
                } else {&lt;br /&gt;
                        $num_wanted = $non_admin_limit;&lt;br /&gt;
                }&lt;br /&gt;
        } else {&lt;br /&gt;
&lt;br /&gt;
                if ($user-&amp;gt;{is_admin}) {&lt;br /&gt;
                        if ($cc_time_period &amp;gt;= $admin_non_time_limit) {&lt;br /&gt;
                                $s_opt-&amp;gt;{cid_at_or_after} = $cid_for_time_period;&lt;br /&gt;
                                $num_wanted = $admin_time_limit;&lt;br /&gt;
                        } else {&lt;br /&gt;
                                $num_wanted = $admin_non_time_limit;&lt;br /&gt;
                                if($store_cutoff){&lt;br /&gt;
                                        my $min_cid = $reader-&amp;gt;getUser($value,&lt;br /&gt;
                                                &amp;quot;com_num_&amp;quot;.$num_wanted.&amp;quot;_at_or_after_cid&amp;quot;);&lt;br /&gt;
                                        $s_opt-&amp;gt;{cid_at_or_after} = $min_cid&lt;br /&gt;
                                                if $min_cid &amp;amp;&amp;amp; $min_cid =~ /^\d+$/;&lt;br /&gt;
                                }&lt;br /&gt;
                        }&lt;br /&gt;
                } else {&lt;br /&gt;
                        if ($cc_time_period &amp;gt;= $non_admin_limit ) {&lt;br /&gt;
                                $s_opt-&amp;gt;{cid_at_or_after} = $cid_for_time_period;&lt;br /&gt;
                                $num_wanted = $non_admin_limit;&lt;br /&gt;
                        } else {&lt;br /&gt;
                                $num_wanted = $non_admin_limit;&lt;br /&gt;
                                if($store_cutoff){&lt;br /&gt;
                                        my $min_cid = $reader-&amp;gt;getUser($value,&lt;br /&gt;
                                                &amp;quot;com_num_&amp;quot;.$num_wanted.&amp;quot;_at_or_after_cid&amp;quot;);&lt;br /&gt;
                                        $s_opt-&amp;gt;{cid_at_or_after} = $min_cid&lt;br /&gt;
                                                if $min_cid &amp;amp;&amp;amp; $min_cid =~ /^\d+$/;&lt;br /&gt;
                                }&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
        if ($type eq &amp;quot;uid&amp;quot;) {&lt;br /&gt;
&lt;br /&gt;
                my $comments = $reader-&amp;gt;getCommentsByUID($value, $num_wanted, $min_comment, $s_opt) if $cc_all;&lt;br /&gt;
                if ($store_cutoff&lt;br /&gt;
                        &amp;amp;&amp;amp; $comments &amp;amp;&amp;amp; $cc_all &amp;gt;= $store_cutoff &amp;amp;&amp;amp; $min_comment == 0 &lt;br /&gt;
                        &amp;amp;&amp;amp; scalar(@$comments) == $num_wanted) {&lt;br /&gt;
                        my $min_cid = 0;&lt;br /&gt;
                        for my $comment (@$comments) {&lt;br /&gt;
                                $min_cid = $comment-&amp;gt;{cid}&lt;br /&gt;
                                        if !$min_cid || ($comment-&amp;gt;{cid} &amp;lt; $min_cid); &lt;br /&gt;
                        }&lt;br /&gt;
                        if ($min_cid &amp;amp;&amp;amp; $min_cid =~/^\d+$/) {&lt;br /&gt;
                                $slashdb-&amp;gt;setUser($value, {&lt;br /&gt;
                                        &amp;quot;com_num_&amp;quot;.$num_wanted.&amp;quot;_at_or_after_cid&amp;quot; =&amp;gt; $min_cid&lt;br /&gt;
                                });&lt;br /&gt;
                        }&lt;br /&gt;
&lt;br /&gt;
                }&lt;br /&gt;
                return $comments;&lt;br /&gt;
        } elsif ($type eq &amp;quot;ipid&amp;quot;){&lt;br /&gt;
                return $reader-&amp;gt;getCommentsByIPID($value, $num_wanted, $min_comment, $s_opt) if $cc_all;&lt;br /&gt;
        } elsif ($type eq &amp;quot;subnetid&amp;quot;){&lt;br /&gt;
                return $reader-&amp;gt;getCommentsBySubnetID($value, $num_wanted, $min_comment, $s_opt) if $cc_all;&lt;br /&gt;
        } else {&lt;br /&gt;
                return $reader-&amp;gt;getCommentsByIPIDOrSubnetID($value, $num_wanted, $min_comment, $s_opt) if $cc_all;&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
createEnvironment();&lt;br /&gt;
main();&lt;br /&gt;
&lt;br /&gt;
1;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=PerlModuleUsers&amp;diff=5373</id>
		<title>PerlModuleUsers</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=PerlModuleUsers&amp;diff=5373"/>
		<updated>2014-03-01T19:19:07Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[CssWork]] parent&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Functions in users&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
users.pl:&lt;br /&gt;
    adminDispatch, changePasswd, checkList, displayForm, &lt;br /&gt;
    editComm, editHome, editKey, editMiscOpts, &lt;br /&gt;
    editTags, editUser, forceAccountVerify, getCommentListing, &lt;br /&gt;
    getError, _get_lastjournal, getMessage, getOtherUserParams, &lt;br /&gt;
    getTitle, getUserAdmin, listAbuses, listBanned, &lt;br /&gt;
    listReadOnly, mailPasswd, main, newUser, &lt;br /&gt;
    newUserForm, noUser, previewSlashbox, saveComm, &lt;br /&gt;
    saveHome, saveMiscOpts, savePasswd, saveTags, &lt;br /&gt;
    saveUser, saveUserAdmin, setToDefaults, showBookmarks, &lt;br /&gt;
    showComments, showFireHose, showInfo, showSubmissions, &lt;br /&gt;
    showTags, tildeEd, topAbusers, validateUser, &lt;br /&gt;
  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
users2.pl:&lt;br /&gt;
    adminDispatch, checkList, displayForm, editKey, &lt;br /&gt;
    editMiscOpts, editUser, forceAccountVerify, getCommentListing, &lt;br /&gt;
    getError, _get_lastjournal, getMessage, getOtherUserParams, &lt;br /&gt;
    getTitle, getUserAdmin, listAbuses, listBanned, &lt;br /&gt;
    listReadOnly, mailPasswd, main, newUser, &lt;br /&gt;
    newUserForm, noUser, previewSlashbox, saveMiscOpts, &lt;br /&gt;
    saveUser, saveUserAdmin, setToDefaults, showFireHose, &lt;br /&gt;
    showInfo, tildeEd, topAbusers, validateUser, &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Man page for users&amp;lt;/h2&amp;gt;&lt;br /&gt;
Don't waste your time...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# man Slash::Users&lt;br /&gt;
No manual entry for Slash::Users&lt;br /&gt;
[root@slashcode htdocs]# man Slash::Users2&lt;br /&gt;
Users2(3)             User Contributed Perl Documentation            Users2(3)&lt;br /&gt;
&lt;br /&gt;
NAME&lt;br /&gt;
       Slash::Users2&lt;br /&gt;
&lt;br /&gt;
SYNOPSIS&lt;br /&gt;
               use Slash::Users2;&lt;br /&gt;
&lt;br /&gt;
DESCRIPTION&lt;br /&gt;
       Provides homepages for users.&lt;br /&gt;
&lt;br /&gt;
AUTHOR&lt;br /&gt;
       Christopher Brown, cbrown@corp.sourcefore.com&lt;br /&gt;
&lt;br /&gt;
SEE ALSO&lt;br /&gt;
       perl(1).&lt;br /&gt;
&lt;br /&gt;
perl v5.10.1                      2014-02-20                         Users2(3)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Source of users.pl&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/bin/perl -w&lt;br /&gt;
# This code is a part of Slash, and is released under the GPL.&lt;br /&gt;
# Copyright 1997-2005 by Open Source Technology Group. See README&lt;br /&gt;
# and COPYING for more information, or see http://slashcode.com/.&lt;br /&gt;
# $Id$&lt;br /&gt;
&lt;br /&gt;
use strict;&lt;br /&gt;
use Digest::MD5 'md5_hex';&lt;br /&gt;
use Slash;&lt;br /&gt;
use Slash::Display;&lt;br /&gt;
use Slash::Utility;&lt;br /&gt;
use Slash::Constants qw(:messages);&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub main {&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $gSkin = getCurrentSkin();&lt;br /&gt;
        my $formname = $0;&lt;br /&gt;
        $formname =~ s/.*\/(\w+)\.pl/$1/;&lt;br /&gt;
&lt;br /&gt;
        my $error_flag = 0;&lt;br /&gt;
        my $formkey = $form-&amp;gt;{formkey};&lt;br /&gt;
&lt;br /&gt;
        my $suadmin_flag = $user-&amp;gt;{seclev} &amp;gt;= 10000 ? 1 : 0 ;&lt;br /&gt;
        my $postflag = $user-&amp;gt;{state}{post};&lt;br /&gt;
        my $op = lc($form-&amp;gt;{op});&lt;br /&gt;
&lt;br /&gt;
        # savepasswd is a special case, because once it's called, you&lt;br /&gt;
        # have to reload the form, and you don't want to do any checks if&lt;br /&gt;
        # you've just saved.&lt;br /&gt;
        my $savepass_flag = $op eq 'savepasswd' ? 1 : 0 ;&lt;br /&gt;
&lt;br /&gt;
        my $ops = {&lt;br /&gt;
                admin           =&amp;gt;  {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;adminDispatch,&lt;br /&gt;
                        seclev          =&amp;gt; 10000,       # if this should be lower,&lt;br /&gt;
                                                        # then something else is&lt;br /&gt;
                                                        # broken, because it allows&lt;br /&gt;
                                                        # anyone with this seclev&lt;br /&gt;
                                                        # to change their own seclev&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        # just in case we need it for something else, we have it ...&lt;br /&gt;
                        checks          =&amp;gt; [ qw (generate_formkey) ],&lt;br /&gt;
                },&lt;br /&gt;
#               userlogin       =&amp;gt;  {&lt;br /&gt;
#                       function        =&amp;gt; \&amp;amp;showInfo,&lt;br /&gt;
#                       seclev          =&amp;gt; 1,&lt;br /&gt;
#                       formname        =&amp;gt; $formname,&lt;br /&gt;
#                       checks          =&amp;gt; [],&lt;br /&gt;
#                       tab_selected_1  =&amp;gt; 'me',&lt;br /&gt;
#               },&lt;br /&gt;
                no_user =&amp;gt;  {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;noUser,&lt;br /&gt;
                        seclev          =&amp;gt; 0,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                },&lt;br /&gt;
                userinfo        =&amp;gt;  {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;showInfo,&lt;br /&gt;
                        #I made this change, not all sites are going to care. -Brian&lt;br /&gt;
                        seclev          =&amp;gt; $constants-&amp;gt;{users_show_info_seclev},&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'me',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'info',&lt;br /&gt;
                },&lt;br /&gt;
                userfirehose    =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;showFireHose,&lt;br /&gt;
                        seclev          =&amp;gt; 0,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'me',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'firehose'&lt;br /&gt;
                },&lt;br /&gt;
                usersubmissions =&amp;gt;  {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;showSubmissions,&lt;br /&gt;
                        #I made this change, not all sites are going to care. -Brian&lt;br /&gt;
                        seclev          =&amp;gt; $constants-&amp;gt;{users_show_info_seclev},&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'me',&lt;br /&gt;
                },&lt;br /&gt;
                usercomments    =&amp;gt;  {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;showComments,&lt;br /&gt;
                        #I made this change, not all sites are going to care. -Brian&lt;br /&gt;
                        seclev          =&amp;gt; $constants-&amp;gt;{users_show_info_seclev},&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'me',&lt;br /&gt;
                },&lt;br /&gt;
                display =&amp;gt;  {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;showInfo,&lt;br /&gt;
                        #I made this change, not all sites are going to care. -Brian&lt;br /&gt;
                        seclev          =&amp;gt; $constants-&amp;gt;{users_show_info_seclev},&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'me',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'info',&lt;br /&gt;
                },&lt;br /&gt;
#               savepasswd      =&amp;gt; {&lt;br /&gt;
#                       function        =&amp;gt; \&amp;amp;savePasswd,&lt;br /&gt;
#                       seclev          =&amp;gt; 1,&lt;br /&gt;
#                       post            =&amp;gt; 1,&lt;br /&gt;
#                       formname        =&amp;gt; $formname,&lt;br /&gt;
#                       checks          =&amp;gt; [ qw (max_post_check valid_check&lt;br /&gt;
#                                               formkey_check regen_formkey) ],&lt;br /&gt;
#                       tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
#                       tab_selected_2  =&amp;gt; 'password',&lt;br /&gt;
#               },&lt;br /&gt;
                saveuseradmin   =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;saveUserAdmin,&lt;br /&gt;
                        seclev          =&amp;gt; 10000,&lt;br /&gt;
                        post            =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                },&lt;br /&gt;
                savehome        =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;saveHome,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        post            =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [ qw (valid_check&lt;br /&gt;
                                                formkey_check regen_formkey) ],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'home',&lt;br /&gt;
                },&lt;br /&gt;
                savecomm        =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;saveComm,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        post            =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [ qw (valid_check&lt;br /&gt;
                                                formkey_check regen_formkey) ],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'comments',&lt;br /&gt;
                },&lt;br /&gt;
                saveuser        =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;saveUser,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        post            =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [ qw (valid_check&lt;br /&gt;
                                                formkey_check regen_formkey) ],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'user',&lt;br /&gt;
                },&lt;br /&gt;
#               changepasswd    =&amp;gt; {&lt;br /&gt;
#                       function        =&amp;gt; \&amp;amp;changePasswd,&lt;br /&gt;
#                       seclev          =&amp;gt; 1,&lt;br /&gt;
#                       formname        =&amp;gt; $formname,&lt;br /&gt;
#                       checks          =&amp;gt; $savepass_flag ? [] :&lt;br /&gt;
#                                               [ qw (generate_formkey) ],&lt;br /&gt;
#                       tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
#                       tab_selected_2  =&amp;gt; 'password',&lt;br /&gt;
#               },&lt;br /&gt;
                editmiscopts    =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;editMiscOpts,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [ ],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'misc',&lt;br /&gt;
                },&lt;br /&gt;
                savemiscopts    =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;saveMiscOpts,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [ ],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'misc',&lt;br /&gt;
                },&lt;br /&gt;
                edituser        =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;editUser,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [ qw (generate_formkey) ],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'user',&lt;br /&gt;
                },&lt;br /&gt;
                authoredit      =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;editUser,&lt;br /&gt;
                        seclev          =&amp;gt; 10000,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                },&lt;br /&gt;
                edithome        =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;editHome,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [ qw (generate_formkey) ],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'home',&lt;br /&gt;
                },&lt;br /&gt;
                editcomm        =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;editComm,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [ qw (generate_formkey) ],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'comments',&lt;br /&gt;
                },&lt;br /&gt;
#               newuser         =&amp;gt; {&lt;br /&gt;
#                       function        =&amp;gt; \&amp;amp;newUser,&lt;br /&gt;
#                       seclev          =&amp;gt; 0,&lt;br /&gt;
#                       formname        =&amp;gt; &amp;quot;${formname}/nu&amp;quot;,&lt;br /&gt;
#                       checks          =&amp;gt; [ qw (max_post_check valid_check&lt;br /&gt;
#                                               formkey_check regen_formkey) ],&lt;br /&gt;
#               },&lt;br /&gt;
                newuseradmin    =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;newUserForm,&lt;br /&gt;
                        seclev          =&amp;gt; 10000,&lt;br /&gt;
                        formname        =&amp;gt; &amp;quot;${formname}/nu&amp;quot;,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                },&lt;br /&gt;
                previewbox      =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;previewSlashbox,&lt;br /&gt;
                        seclev          =&amp;gt; 0,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                },&lt;br /&gt;
#               mailpasswd      =&amp;gt; {&lt;br /&gt;
#                       function        =&amp;gt; \&amp;amp;mailPasswd,&lt;br /&gt;
#                       seclev          =&amp;gt; 0,&lt;br /&gt;
#                       formname        =&amp;gt; &amp;quot;${formname}/mp&amp;quot;,&lt;br /&gt;
#                       checks          =&amp;gt; [ qw (max_post_check valid_check&lt;br /&gt;
#                                               interval_check formkey_check ) ],&lt;br /&gt;
#                       tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
#                       tab_selected_2  =&amp;gt; 'password',&lt;br /&gt;
#               },&lt;br /&gt;
                validateuser    =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;validateUser,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; ['regen_formkey'],&lt;br /&gt;
                },&lt;br /&gt;
                showtags =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;showTags,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        tab_selected    =&amp;gt; 'tags',&lt;br /&gt;
                },&lt;br /&gt;
                showbookmarks =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;showBookmarks,&lt;br /&gt;
                        seclev          =&amp;gt; 0,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        tab_selected    =&amp;gt; 'bookmarks',&lt;br /&gt;
                },&lt;br /&gt;
                edittags =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;editTags,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        tab_selected    =&amp;gt; 'tags',&lt;br /&gt;
                },&lt;br /&gt;
                savetags =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;saveTags,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        tab_selected    =&amp;gt; 'tags',&lt;br /&gt;
                },&lt;br /&gt;
#               userclose       =&amp;gt;  {&lt;br /&gt;
#                       function        =&amp;gt; \&amp;amp;displayForm,&lt;br /&gt;
#                       seclev          =&amp;gt; 0,&lt;br /&gt;
#                       formname        =&amp;gt; $formname,&lt;br /&gt;
#                       checks          =&amp;gt; [],&lt;br /&gt;
#               },&lt;br /&gt;
#               newuserform     =&amp;gt; {&lt;br /&gt;
#                       function        =&amp;gt; \&amp;amp;displayForm,&lt;br /&gt;
#                       seclev          =&amp;gt; 0,&lt;br /&gt;
#                       formname        =&amp;gt; &amp;quot;${formname}/nu&amp;quot;,&lt;br /&gt;
#                       checks          =&amp;gt; [ qw (max_post_check&lt;br /&gt;
#                                               generate_formkey) ],&lt;br /&gt;
#               },&lt;br /&gt;
#               mailpasswdform  =&amp;gt; {&lt;br /&gt;
#                       function        =&amp;gt; \&amp;amp;displayForm,&lt;br /&gt;
#                       seclev          =&amp;gt; 0,&lt;br /&gt;
#                       formname        =&amp;gt; &amp;quot;${formname}/mp&amp;quot;,&lt;br /&gt;
#                       checks          =&amp;gt; [ qw (max_post_check&lt;br /&gt;
#                                               generate_formkey) ],&lt;br /&gt;
#                       tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
#                       tab_selected_2  =&amp;gt; 'password',&lt;br /&gt;
#               },&lt;br /&gt;
                displayform     =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;displayForm,&lt;br /&gt;
                        seclev          =&amp;gt; 0,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [ qw (generate_formkey) ],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'me',&lt;br /&gt;
                },&lt;br /&gt;
                listreadonly =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;listReadOnly,&lt;br /&gt;
                        seclev          =&amp;gt; 100,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        adminmenu       =&amp;gt; 'security',&lt;br /&gt;
                        tab_selected    =&amp;gt; 'readonly',&lt;br /&gt;
                },&lt;br /&gt;
                listbanned =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;listBanned,&lt;br /&gt;
                        seclev          =&amp;gt; 100,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        adminmenu       =&amp;gt; 'security',&lt;br /&gt;
                        tab_selected    =&amp;gt; 'banned',&lt;br /&gt;
                },&lt;br /&gt;
                topabusers      =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;topAbusers,&lt;br /&gt;
                        seclev          =&amp;gt; 100,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        adminmenu       =&amp;gt; 'security',&lt;br /&gt;
                        tab_selected    =&amp;gt; 'abusers',&lt;br /&gt;
                },&lt;br /&gt;
                listabuses      =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;listAbuses,&lt;br /&gt;
                        seclev          =&amp;gt; 100,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                },&lt;br /&gt;
                force_acct_verify =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;forceAccountVerify,&lt;br /&gt;
                        seclev          =&amp;gt; 100,&lt;br /&gt;
                        post            =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; []&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
        } ;&lt;br /&gt;
&lt;br /&gt;
        # Note this is NOT the default op.  &amp;quot;userlogin&amp;quot; or &amp;quot;userinfo&amp;quot; is&lt;br /&gt;
        # the default op, and it's set either 5 lines down or about 100&lt;br /&gt;
        # lines down, depending.  Yes, that's dumb.  Yes, we should&lt;br /&gt;
        # change it.  It would require tracing through a fair bit of logic&lt;br /&gt;
        # though and I don't have the time right now. - Jamie&lt;br /&gt;
        $ops-&amp;gt;{default} = $ops-&amp;gt;{displayform};&lt;br /&gt;
        for (qw(newuser newuserform mailpasswd mailpasswdform changepasswd savepasswd userlogin userclose)) {&lt;br /&gt;
                $ops-&amp;gt;{$_} = $ops-&amp;gt;{default};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $errornote = &amp;quot;&amp;quot;;&lt;br /&gt;
        if ($form-&amp;gt;{op} &amp;amp;&amp;amp; ! defined $ops-&amp;gt;{$op}) {&lt;br /&gt;
                $errornote .= getError('bad_op', { op =&amp;gt; $form-&amp;gt;{op}}, 0, 1);&lt;br /&gt;
                $op = $user-&amp;gt;{is_anon} ? 'userlogin' : 'userinfo'; &lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($op eq 'userlogin' &amp;amp;&amp;amp; ! $user-&amp;gt;{is_anon}) {&lt;br /&gt;
                redirect(cleanRedirectUrl($form-&amp;gt;{returnto} || ''));&lt;br /&gt;
                return;&lt;br /&gt;
&lt;br /&gt;
        # this will only redirect if it is a section-based rootdir with&lt;br /&gt;
        # its rootdir different from real_rootdir&lt;br /&gt;
        } elsif ($op eq 'userclose' &amp;amp;&amp;amp; $gSkin-&amp;gt;{rootdir} ne $constants-&amp;gt;{real_rootdir}) {&lt;br /&gt;
                redirect($constants-&amp;gt;{real_rootdir} . '/login.pl?op=userclose');&lt;br /&gt;
                return;&lt;br /&gt;
&lt;br /&gt;
        } elsif ($op =~ /^(?:newuser|newuserform|mailpasswd|mailpasswdform|changepasswd|savepasswd|userlogin|userclose|displayform)$/) {&lt;br /&gt;
                my $op = $form-&amp;gt;{op};&lt;br /&gt;
                $op = 'changeprefs' if $op eq 'changepasswd';&lt;br /&gt;
                $op = 'saveprefs'   if $op eq 'savepasswd';&lt;br /&gt;
                redirect($constants-&amp;gt;{real_rootdir} . '/login.pl?op=' . $op);&lt;br /&gt;
                return;&lt;br /&gt;
&lt;br /&gt;
        # never get here now&lt;br /&gt;
        } elsif ($op eq 'savepasswd') {&lt;br /&gt;
                my $error_flag = 0;&lt;br /&gt;
                if ($user-&amp;gt;{seclev} &amp;lt; 100) {&lt;br /&gt;
                        for my $check (@{$ops-&amp;gt;{savepasswd}{checks}}) {&lt;br /&gt;
                                # the only way to save the error message is to pass by ref&lt;br /&gt;
                                # $errornote and add the message to note (you can't print&lt;br /&gt;
                                # it out before header is called)&lt;br /&gt;
                                $error_flag = formkeyHandler($check, $formname, $formkey, \$errornote);&lt;br /&gt;
                                last if $error_flag;&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                if (! $error_flag) {&lt;br /&gt;
                        $error_flag = savePasswd({ noteref =&amp;gt; \$errornote }) ;&lt;br /&gt;
                }&lt;br /&gt;
                # change op to edituser and let fall through;&lt;br /&gt;
                # we need to have savePasswd set the cookie before&lt;br /&gt;
                # header() is called -- pudge&lt;br /&gt;
                if ($user-&amp;gt;{seclev} &amp;lt; 100 &amp;amp;&amp;amp; ! $error_flag) {&lt;br /&gt;
                        $slashdb-&amp;gt;updateFormkey($formkey, length($ENV{QUERY_STRING}));&lt;br /&gt;
                }&lt;br /&gt;
                $op = $error_flag ? 'changepasswd' : 'userinfo';&lt;br /&gt;
                $form-&amp;gt;{userfield} = $user-&amp;gt;{uid};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Figure out what the op really is.&lt;br /&gt;
        $op = 'userinfo' if (! $form-&amp;gt;{op} &amp;amp;&amp;amp; ($form-&amp;gt;{uid} || $form-&amp;gt;{nick}));&lt;br /&gt;
        $op ||= $user-&amp;gt;{is_anon} ? 'userlogin' : 'userinfo';&lt;br /&gt;
        if ($user-&amp;gt;{is_anon} &amp;amp;&amp;amp; ( ($ops-&amp;gt;{$op}{seclev} &amp;gt; 0) || ($op =~ /^newuserform|mailpasswdform|displayform$/) )) {&lt;br /&gt;
                redirect($constants-&amp;gt;{real_rootdir} . '/login.pl');&lt;br /&gt;
                return;&lt;br /&gt;
        } elsif ($user-&amp;gt;{seclev} &amp;lt; $ops-&amp;gt;{$op}{seclev}) {&lt;br /&gt;
                $op = 'userinfo';&lt;br /&gt;
        }&lt;br /&gt;
        if ($ops-&amp;gt;{$op}{post} &amp;amp;&amp;amp; !$postflag) {&lt;br /&gt;
                $op = $user-&amp;gt;{is_anon} ? 'default' : 'userinfo';&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Print the header and very top stuff on the page.  We have&lt;br /&gt;
        # three ops that (may) end up routing into showInfo(), which&lt;br /&gt;
        # needs to do some stuff before it calls header(), so for&lt;br /&gt;
        # those three, don't bother.&lt;br /&gt;
        my $header;&lt;br /&gt;
        if ($op !~ /^(userinfo|display|saveuseradmin|admin|userfirehose$)/) {&lt;br /&gt;
                my $data = {&lt;br /&gt;
                        adminmenu =&amp;gt; $ops-&amp;gt;{$op}{adminmenu} || 'admin',&lt;br /&gt;
                        tab_selected =&amp;gt; $ops-&amp;gt;{$op}{tab_selected},&lt;br /&gt;
                };&lt;br /&gt;
                header(getMessage('user_header'), '', $data) or return;&lt;br /&gt;
                # This is a hardcoded position, bad idea and should be fixed -Brian&lt;br /&gt;
                # Yeah, we should pull this into a template somewhere...&lt;br /&gt;
                print getMessage('note', { note =&amp;gt; $errornote }) if defined $errornote;&lt;br /&gt;
                $header = 1;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($constants-&amp;gt;{admin_formkeys} || $user-&amp;gt;{seclev} &amp;lt; 100) {&lt;br /&gt;
&lt;br /&gt;
                my $done = 0;&lt;br /&gt;
                $done = 1 if $op eq 'savepasswd'; # special case&lt;br /&gt;
                $formname = $ops-&amp;gt;{$op}{formname};&lt;br /&gt;
&lt;br /&gt;
                # No need for HumanConf if the constant for it is not&lt;br /&gt;
                # switched on, or if the user's karma is high enough&lt;br /&gt;
                # to get out of it.  (But for &amp;quot;newuserform,&amp;quot; the current&lt;br /&gt;
                # user's karma doesn't get them out of having to prove&lt;br /&gt;
                # they're a human for creating a *new* user.)&lt;br /&gt;
                my $options = {};&lt;br /&gt;
                if (       !$constants-&amp;gt;{plugin}{HumanConf}&lt;br /&gt;
                        || !$constants-&amp;gt;{hc}&lt;br /&gt;
                        || !$constants-&amp;gt;{hc_sw_newuser}&lt;br /&gt;
                                &amp;amp;&amp;amp; ($formname eq 'users/nu' || $op eq 'newuserform')&lt;br /&gt;
                        || !$constants-&amp;gt;{hc_sw_mailpasswd}&lt;br /&gt;
                                &amp;amp;&amp;amp; ($formname eq 'users/mp' || $op eq 'mailpasswdform')&lt;br /&gt;
                        || $user-&amp;gt;{karma} &amp;gt; $constants-&amp;gt;{hc_maxkarma}&lt;br /&gt;
                                &amp;amp;&amp;amp; !$user-&amp;gt;{is_anon}&lt;br /&gt;
                                &amp;amp;&amp;amp; !($op eq 'newuser' || $op eq 'newuserform')&lt;br /&gt;
                ) {&lt;br /&gt;
                        $options-&amp;gt;{no_hc} = 1;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                DO_CHECKS: while (!$done) {&lt;br /&gt;
                        for my $check (@{$ops-&amp;gt;{$op}{checks}}) {&lt;br /&gt;
                                $ops-&amp;gt;{$op}{update_formkey} = 1 if $check eq 'formkey_check';&lt;br /&gt;
                                $error_flag = formkeyHandler($check, $formname, $formkey,&lt;br /&gt;
                                        undef, $options);&lt;br /&gt;
                                if ($error_flag == -1) {&lt;br /&gt;
                                        # Special error:  HumanConf failed.  Go&lt;br /&gt;
                                        # back to the previous op, start over.&lt;br /&gt;
                                        if ($op =~ /^(newuser|mailpasswd)$/) {&lt;br /&gt;
                                                $op .= &amp;quot;form&amp;quot;;&lt;br /&gt;
                                                $error_flag = 0;&lt;br /&gt;
                                                next DO_CHECKS;&lt;br /&gt;
                                        }&lt;br /&gt;
                                } elsif ($error_flag) {&lt;br /&gt;
                                        $done = 1;&lt;br /&gt;
                                        last;&lt;br /&gt;
                                }&lt;br /&gt;
                        }&lt;br /&gt;
                        $done = 1;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                if (!$error_flag &amp;amp;&amp;amp; !$options-&amp;gt;{no_hc}) {&lt;br /&gt;
                        my $hc = getObject(&amp;quot;Slash::HumanConf&amp;quot;);&lt;br /&gt;
                        $hc-&amp;gt;reloadFormkeyHC($formname) if $hc;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        errorLog(&amp;quot;users.pl error_flag '$error_flag'&amp;quot;) if $error_flag;&lt;br /&gt;
&lt;br /&gt;
        # call the method&lt;br /&gt;
        my $retval;&lt;br /&gt;
        $retval = $ops-&amp;gt;{$op}{function}-&amp;gt;({&lt;br /&gt;
                op              =&amp;gt; $op,&lt;br /&gt;
                tab_selected_1  =&amp;gt; $ops-&amp;gt;{$op}{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
                note            =&amp;gt; $errornote,&lt;br /&gt;
        }) if !$error_flag;&lt;br /&gt;
&lt;br /&gt;
        return if !$retval;&lt;br /&gt;
&lt;br /&gt;
        if ($op eq 'mailpasswd' &amp;amp;&amp;amp; $retval) {&lt;br /&gt;
                $ops-&amp;gt;{$op}{update_formkey} = 0;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($ops-&amp;gt;{$op}{update_formkey} &amp;amp;&amp;amp; $user-&amp;gt;{seclev} &amp;lt; 100 &amp;amp;&amp;amp; ! $error_flag) {&lt;br /&gt;
                # successful save action, no formkey errors, update existing formkey&lt;br /&gt;
                # why assign to an unused variable? -- pudge&lt;br /&gt;
                my $updated = $slashdb-&amp;gt;updateFormkey($formkey, length($ENV{QUERY_STRING}));&lt;br /&gt;
        }&lt;br /&gt;
        # if there were legit error levels returned from the save methods&lt;br /&gt;
        # I would have it clear the formkey in case of an error, but that&lt;br /&gt;
        # needs to be sorted out later&lt;br /&gt;
        # else { resetFormkey($formkey); }&lt;br /&gt;
&lt;br /&gt;
        writeLog($user-&amp;gt;{nickname});&lt;br /&gt;
        footer();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub checkList {&lt;br /&gt;
        my($string, $len) = @_;&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        $string =~ s/[^\w,-]//g;&lt;br /&gt;
        my @items = grep { $_ } split /,/, $string;&lt;br /&gt;
        $string = join &amp;quot;,&amp;quot;, @items;&lt;br /&gt;
&lt;br /&gt;
        $len ||= $constants-&amp;gt;{checklist_length} || 255;&lt;br /&gt;
        if (length($string) &amp;gt; $len) {&lt;br /&gt;
                print getError('checklist_err');&lt;br /&gt;
                $string = substr($string, 0, $len);&lt;br /&gt;
                $string =~ s/,?\w*$//g;&lt;br /&gt;
        } elsif (length($string) &amp;lt; 1) {&lt;br /&gt;
                $string = '';&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        return $string;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub previewSlashbox {&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
&lt;br /&gt;
        my $block = $reader-&amp;gt;getBlock($form-&amp;gt;{bid}, ['title', 'block', 'url']);&lt;br /&gt;
        my $is_editable = $user-&amp;gt;{seclev} &amp;gt;= 1000;&lt;br /&gt;
&lt;br /&gt;
        my $title = getTitle('previewslashbox_title', { blocktitle =&amp;gt; $block-&amp;gt;{title} });&lt;br /&gt;
        slashDisplay('previewSlashbox', {&lt;br /&gt;
                width           =&amp;gt; '100%',&lt;br /&gt;
                title           =&amp;gt; $title,&lt;br /&gt;
                block           =&amp;gt; $block,&lt;br /&gt;
                is_editable     =&amp;gt; $is_editable,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        print portalbox($constants-&amp;gt;{fancyboxwidth}, $block-&amp;gt;{title},&lt;br /&gt;
                $block-&amp;gt;{block}, '', $block-&amp;gt;{url});&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub newUserForm {&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $suadmin_flag = $user-&amp;gt;{seclev} &amp;gt;= 10000;&lt;br /&gt;
        my $title = getTitle('newUserForm_title');&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('newUserForm', {&lt;br /&gt;
                title           =&amp;gt; $title, &lt;br /&gt;
                suadmin_flag    =&amp;gt; $suadmin_flag,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub newUser {&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        my $plugins = $slashdb-&amp;gt;getDescriptions('plugins');&lt;br /&gt;
        my $title;&lt;br /&gt;
        my $suadmin_flag = $user-&amp;gt;{seclev} &amp;gt;= 10000 ? 1 : 0;&lt;br /&gt;
&lt;br /&gt;
        # Check if User Exists&lt;br /&gt;
        $form-&amp;gt;{newusernick} = nickFix($form-&amp;gt;{newusernick});&lt;br /&gt;
        my $matchname = nick2matchname($form-&amp;gt;{newusernick});&lt;br /&gt;
&lt;br /&gt;
        if (!$form-&amp;gt;{email} || $form-&amp;gt;{email} !~ /\@/) {&lt;br /&gt;
                print getError('email_invalid', 0, 1);&lt;br /&gt;
                return;&lt;br /&gt;
        } elsif ($form-&amp;gt;{email} ne $form-&amp;gt;{email2}) {&lt;br /&gt;
                print getError('email_do_not_match', 0, 1);&lt;br /&gt;
                return;&lt;br /&gt;
        } elsif ($slashdb-&amp;gt;existsEmail($form-&amp;gt;{email})) {&lt;br /&gt;
                print getError('emailexists_err', 0, 1);&lt;br /&gt;
                return;&lt;br /&gt;
        } elsif ($matchname ne '' &amp;amp;&amp;amp; $form-&amp;gt;{newusernick} ne '') {&lt;br /&gt;
                if ($constants-&amp;gt;{newuser_portscan}) {&lt;br /&gt;
                        my $is_trusted = $slashdb-&amp;gt;checkAL2($user-&amp;gt;{srcids}, 'trusted');&lt;br /&gt;
                        if (!$is_trusted) {&lt;br /&gt;
                                my $is_proxy = $slashdb-&amp;gt;checkForOpenProxy($user-&amp;gt;{hostip});&lt;br /&gt;
                                if ($is_proxy) {&lt;br /&gt;
                                        print getError('new user open proxy', {&lt;br /&gt;
                                                unencoded_ip    =&amp;gt; $ENV{REMOTE_ADDR},&lt;br /&gt;
                                                port            =&amp;gt; $is_proxy,&lt;br /&gt;
                                        });&lt;br /&gt;
                                        return;&lt;br /&gt;
                                }&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
                my $uid;&lt;br /&gt;
                my $rootdir = getCurrentSkin('rootdir');&lt;br /&gt;
&lt;br /&gt;
                $uid = $slashdb-&amp;gt;createUser(&lt;br /&gt;
                        $matchname, $form-&amp;gt;{email}, $form-&amp;gt;{newusernick}&lt;br /&gt;
                );&lt;br /&gt;
                if ($uid) {&lt;br /&gt;
                        my $data = {};&lt;br /&gt;
                        getOtherUserParams($data);&lt;br /&gt;
&lt;br /&gt;
                        for (qw(tzcode)) {&lt;br /&gt;
                                $data-&amp;gt;{$_} = $form-&amp;gt;{$_} if defined $form-&amp;gt;{$_};&lt;br /&gt;
                        }&lt;br /&gt;
                        $data-&amp;gt;{creation_ipid} = $user-&amp;gt;{ipid};&lt;br /&gt;
&lt;br /&gt;
                        $slashdb-&amp;gt;setUser($uid, $data) if keys %$data;&lt;br /&gt;
                        $title = getTitle('newUser_title');&lt;br /&gt;
&lt;br /&gt;
                        $form-&amp;gt;{pubkey} = $plugins-&amp;gt;{'Pubkey'} ?&lt;br /&gt;
                                strip_nohtml($form-&amp;gt;{pubkey}, 1) : '';&lt;br /&gt;
                        print getMessage('newuser_msg', { &lt;br /&gt;
                                suadmin_flag    =&amp;gt; $suadmin_flag, &lt;br /&gt;
                                title           =&amp;gt; $title, &lt;br /&gt;
                                uid             =&amp;gt; $uid&lt;br /&gt;
                        });&lt;br /&gt;
&lt;br /&gt;
                        if ($form-&amp;gt;{newsletter} || $form-&amp;gt;{comment_reply} || $form-&amp;gt;{headlines}) {&lt;br /&gt;
                                my $messages  = getObject('Slash::Messages');&lt;br /&gt;
                                my %params;&lt;br /&gt;
                                $params{MSG_CODE_COMMENT_REPLY()} = MSG_MODE_EMAIL()&lt;br /&gt;
                                        if $form-&amp;gt;{comment_reply};&lt;br /&gt;
                                $params{MSG_CODE_NEWSLETTER()}  = MSG_MODE_EMAIL()&lt;br /&gt;
                                        if $form-&amp;gt;{newsletter};&lt;br /&gt;
                                $params{MSG_CODE_HEADLINES()}   = MSG_MODE_EMAIL()&lt;br /&gt;
                                        if $form-&amp;gt;{headlines};&lt;br /&gt;
                                $messages-&amp;gt;setPrefs($uid, \%params);&lt;br /&gt;
                        }&lt;br /&gt;
&lt;br /&gt;
                        mailPasswd({ uid =&amp;gt; $uid });&lt;br /&gt;
&lt;br /&gt;
                        return;&lt;br /&gt;
                } else {&lt;br /&gt;
                        $slashdb-&amp;gt;resetFormkey($form-&amp;gt;{formkey});&lt;br /&gt;
                        print getError('duplicate_user', { &lt;br /&gt;
                                nick =&amp;gt; $form-&amp;gt;{newusernick},&lt;br /&gt;
                        });&lt;br /&gt;
                        return;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
        } else {&lt;br /&gt;
                print getError('duplicate_user', { &lt;br /&gt;
                        nick =&amp;gt; $form-&amp;gt;{newusernick},&lt;br /&gt;
                });&lt;br /&gt;
                return;&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub mailPasswd {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        my $uid = $hr-&amp;gt;{uid} || 0;&lt;br /&gt;
&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        if (! $uid) {&lt;br /&gt;
                if ($form-&amp;gt;{unickname} =~ /\@/) {&lt;br /&gt;
                        $uid = $slashdb-&amp;gt;getUserEmail($form-&amp;gt;{unickname});&lt;br /&gt;
&lt;br /&gt;
                } elsif ($form-&amp;gt;{unickname} =~ /^\d+$/) {&lt;br /&gt;
                        my $tmpuser = $slashdb-&amp;gt;getUser($form-&amp;gt;{unickname}, ['uid']);&lt;br /&gt;
                        $uid = $tmpuser-&amp;gt;{uid};&lt;br /&gt;
&lt;br /&gt;
                } else {&lt;br /&gt;
                        $uid = $slashdb-&amp;gt;getUserUID($form-&amp;gt;{unickname});&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $user_edit;&lt;br /&gt;
        my $err_name = '';&lt;br /&gt;
        my $err_opts = {};&lt;br /&gt;
        if (!$uid || isAnon($uid)) {&lt;br /&gt;
                $err_name = 'mailpasswd_notmailed_err';&lt;br /&gt;
        }&lt;br /&gt;
        if (!$err_name) {&lt;br /&gt;
                # Check permissions of _this_ user, not the target&lt;br /&gt;
                # user, to determine whether this IP is OK'd to&lt;br /&gt;
                # send the mail to the target user.&lt;br /&gt;
                # XXXSRCID This should check a separate field like&lt;br /&gt;
                # 'openproxy' instead of piggybacking off of the&lt;br /&gt;
                # existing nopost and spammer&lt;br /&gt;
                my $srcids_to_check = $user-&amp;gt;{srcids};&lt;br /&gt;
                $err_name = 'mailpasswd_readonly_err'&lt;br /&gt;
                        if $reader-&amp;gt;checkAL2($srcids_to_check, 'nopost');&lt;br /&gt;
        }&lt;br /&gt;
        if (!$err_name) {&lt;br /&gt;
                $err_name = 'mailpasswd_toooften_err'&lt;br /&gt;
                        if $slashdb-&amp;gt;checkMaxMailPasswords($user_edit);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if (!$err_name) {&lt;br /&gt;
                if ($constants-&amp;gt;{mailpasswd_portscan}) {&lt;br /&gt;
                        my $is_trusted = $slashdb-&amp;gt;checkAL2($user-&amp;gt;{srcids}, 'trusted');&lt;br /&gt;
                        if (!$is_trusted) {&lt;br /&gt;
                                my $is_proxy = $slashdb-&amp;gt;checkForOpenProxy($user-&amp;gt;{hostip});&lt;br /&gt;
                                if ($is_proxy) {&lt;br /&gt;
                                        $err_name = 'mailpasswd open proxy';&lt;br /&gt;
                                        $err_opts = { unencoded_ip =&amp;gt; $ENV{REMOTE_ADDR}, port =&amp;gt; $is_proxy }; &lt;br /&gt;
                                }&lt;br /&gt;
                        }&lt;br /&gt;
&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($err_name) {&lt;br /&gt;
                print getError($err_name, $err_opts);&lt;br /&gt;
                $slashdb-&amp;gt;resetFormkey($form-&amp;gt;{formkey});&lt;br /&gt;
                $form-&amp;gt;{op} = 'mailpasswdform';&lt;br /&gt;
                displayForm();&lt;br /&gt;
                return(1);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $newpasswd = $slashdb-&amp;gt;getNewPasswd($uid);&lt;br /&gt;
        my $tempnick = $user_edit-&amp;gt;{nickname};&lt;br /&gt;
&lt;br /&gt;
        my $emailtitle = getTitle('mailPassword_email_title', {&lt;br /&gt;
                nickname        =&amp;gt; $user_edit-&amp;gt;{nickname}&lt;br /&gt;
        }, 1);&lt;br /&gt;
&lt;br /&gt;
        # Pull out some data passed in with the request.  Only the IP&lt;br /&gt;
        # number is actually trustworthy, the others could be forged.&lt;br /&gt;
        # Note that we strip the forgeable ones to make sure there&lt;br /&gt;
        # aren't any &amp;quot;&amp;lt;&amp;gt;&amp;quot; chars which could fool a stupid mail client&lt;br /&gt;
        # into parsing a plaintext email as HTML.&lt;br /&gt;
        my $r = Apache-&amp;gt;request;&lt;br /&gt;
        my $remote_ip = $r-&amp;gt;connection-&amp;gt;remote_ip;&lt;br /&gt;
        my $xff = $r-&amp;gt;header_in('X-Forwarded-For') || '';&lt;br /&gt;
        $xff =~ s/\s+/ /g;&lt;br /&gt;
        $xff = substr(strip_notags($xff), 0, 20);&lt;br /&gt;
        my $ua = $r-&amp;gt;header_in('User-Agent') || '';&lt;br /&gt;
        $ua =~ s/\s+/ /g;&lt;br /&gt;
        $ua = substr(strip_attribute($ua), 0, 60);&lt;br /&gt;
&lt;br /&gt;
        my $msg = getMessage('mailpasswd_msg', {&lt;br /&gt;
                newpasswd       =&amp;gt; $newpasswd,&lt;br /&gt;
                tempnick        =&amp;gt; $tempnick,&lt;br /&gt;
                remote_ip       =&amp;gt; $remote_ip,&lt;br /&gt;
                x_forwarded_for =&amp;gt; $xff,&lt;br /&gt;
                user_agent      =&amp;gt; $ua,&lt;br /&gt;
        }, 1);&lt;br /&gt;
&lt;br /&gt;
        doEmail($uid, $emailtitle, $msg) if $user_edit-&amp;gt;{nickname};&lt;br /&gt;
        print getMessage('mailpasswd_mailed_msg', { name =&amp;gt; $user_edit-&amp;gt;{nickname} });&lt;br /&gt;
        $slashdb-&amp;gt;setUserMailPasswd($user_edit);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub showSubmissions {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my($uid, $nickname);&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        if ($form-&amp;gt;{uid} or $form-&amp;gt;{nick}) {&lt;br /&gt;
                $uid            = $form-&amp;gt;{uid} || $reader-&amp;gt;getUserUID($form-&amp;gt;{nick});&lt;br /&gt;
                $nickname       = $reader-&amp;gt;getUser($uid, 'nickname');&lt;br /&gt;
        } else {&lt;br /&gt;
                $nickname       = $user-&amp;gt;{nickname};&lt;br /&gt;
                $uid            = $user-&amp;gt;{uid};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $storycount = $reader-&amp;gt;countStoriesBySubmitter($uid);&lt;br /&gt;
        my $stories = $reader-&amp;gt;getStoriesBySubmitter(&lt;br /&gt;
                $uid,&lt;br /&gt;
                $constants-&amp;gt;{user_submitter_display_default}&lt;br /&gt;
        ) unless !$storycount;&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('userSub', {&lt;br /&gt;
                nick                    =&amp;gt; $nickname,&lt;br /&gt;
                uid                     =&amp;gt; $uid,&lt;br /&gt;
                nickmatch_flag          =&amp;gt; ($user-&amp;gt;{uid} == $uid ? 1 : 0),&lt;br /&gt;
                stories                 =&amp;gt; $stories,&lt;br /&gt;
                storycount              =&amp;gt; $storycount,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub showComments {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $commentstruct = [];&lt;br /&gt;
        my($uid, $nickname);&lt;br /&gt;
&lt;br /&gt;
        my $user_edit;&lt;br /&gt;
        if ($form-&amp;gt;{uid} || $form-&amp;gt;{nick}) {&lt;br /&gt;
                $uid = $form-&amp;gt;{uid} || $reader-&amp;gt;getUserUID($form-&amp;gt;{nick});&lt;br /&gt;
                $user_edit = $reader-&amp;gt;getUser($uid);&lt;br /&gt;
        } else {&lt;br /&gt;
                $uid = $user-&amp;gt;{uid};&lt;br /&gt;
                $user_edit = $user;&lt;br /&gt;
        }&lt;br /&gt;
        $nickname = $user_edit-&amp;gt;{nickname};&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $user_edit-&amp;gt;{uid} == $user-&amp;gt;{uid} ? 'me' : 'otheruser',&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        my $min_comment = $form-&amp;gt;{min_comment} || 0;&lt;br /&gt;
        $min_comment = 0 unless $user-&amp;gt;{seclev} &amp;gt; $constants-&amp;gt;{comments_more_seclev}&lt;br /&gt;
                || $constants-&amp;gt;{comments_more_seclev} == 2 &amp;amp;&amp;amp; $user-&amp;gt;{is_subscriber};&lt;br /&gt;
        my $comments_wanted = $user-&amp;gt;{show_comments_num}&lt;br /&gt;
                || $constants-&amp;gt;{user_comment_display_default};&lt;br /&gt;
        my $commentcount = $reader-&amp;gt;countCommentsByUID($uid);&lt;br /&gt;
        my $comments = $reader-&amp;gt;getCommentsByUID(&lt;br /&gt;
                $uid, $comments_wanted, $min_comment&lt;br /&gt;
        ) if $commentcount;&lt;br /&gt;
&lt;br /&gt;
        if (ref($comments) eq 'ARRAY') {&lt;br /&gt;
                my $kinds = $reader-&amp;gt;getDescriptions('discussion_kinds');&lt;br /&gt;
                for my $comment (@$comments) {&lt;br /&gt;
                        # This works since $sid is numeric.&lt;br /&gt;
                        $comment-&amp;gt;{replies} = $reader-&amp;gt;countCommentsBySidPid($comment-&amp;gt;{sid}, $comment-&amp;gt;{cid});&lt;br /&gt;
&lt;br /&gt;
                        # This is ok, since with all luck we will not be hitting the DB&lt;br /&gt;
                        # ...however, the &amp;quot;sid&amp;quot; parameter here must be the string&lt;br /&gt;
                        # based SID from either the &amp;quot;stories&amp;quot; table or from&lt;br /&gt;
                        # pollquestions.&lt;br /&gt;
                        my $discussion = $reader-&amp;gt;getDiscussion($comment-&amp;gt;{sid});&lt;br /&gt;
&lt;br /&gt;
                        if ($kinds-&amp;gt;{ $discussion-&amp;gt;{dkid} } =~ /^journal(?:-story)?$/) {&lt;br /&gt;
                                $comment-&amp;gt;{type} = 'journal';&lt;br /&gt;
                        } elsif ($kinds-&amp;gt;{ $discussion-&amp;gt;{dkid} } eq 'poll') {&lt;br /&gt;
                                $comment-&amp;gt;{type} = 'poll';&lt;br /&gt;
                        } else {&lt;br /&gt;
                                $comment-&amp;gt;{type} = 'story';&lt;br /&gt;
                        }&lt;br /&gt;
                        $comment-&amp;gt;{disc_title}  = $discussion-&amp;gt;{title};&lt;br /&gt;
                        $comment-&amp;gt;{url} = $discussion-&amp;gt;{url};&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $mod_reader = getObject(&amp;quot;Slash::$constants-&amp;gt;{m1_pluginname}&amp;quot;, { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        slashDisplay('userCom', {&lt;br /&gt;
                nick                    =&amp;gt; $nickname,&lt;br /&gt;
                useredit                =&amp;gt; $user_edit,&lt;br /&gt;
                nickmatch_flag          =&amp;gt; ($user-&amp;gt;{uid} == $uid ? 1 : 0),&lt;br /&gt;
                commentstruct           =&amp;gt; $comments,&lt;br /&gt;
                commentcount            =&amp;gt; $commentcount,&lt;br /&gt;
                min_comment             =&amp;gt; $min_comment,&lt;br /&gt;
                reasons                 =&amp;gt; $mod_reader-&amp;gt;getReasons(),&lt;br /&gt;
                karma_flag              =&amp;gt; 0,&lt;br /&gt;
                admin_flag              =&amp;gt; $user-&amp;gt;{is_admin},&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub noUser {&lt;br /&gt;
        print getData(&amp;quot;no_user&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub showFireHose {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
        my $uid = $form-&amp;gt;{uid} || $user-&amp;gt;{uid};&lt;br /&gt;
        my $user_edit = $reader-&amp;gt;getUser($uid);&lt;br /&gt;
&lt;br /&gt;
        $user-&amp;gt;{state}{firehose_page} = &amp;quot;user&amp;quot;;&lt;br /&gt;
        $user-&amp;gt;{state}{firehose_user_uid} = $uid;&lt;br /&gt;
&lt;br /&gt;
        my $firehose = getObject(&amp;quot;Slash::FireHose&amp;quot;);&lt;br /&gt;
        header(getMessage('userfirehose_header', { useredit =&amp;gt; $user_edit })) or return;&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $user_edit-&amp;gt;{uid} == $user-&amp;gt;{uid} ? 'me' : 'otheruser',&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        $form-&amp;gt;{mode} = &amp;quot;full&amp;quot;;&lt;br /&gt;
        $form-&amp;gt;{color} = &amp;quot;black&amp;quot;;&lt;br /&gt;
        $form-&amp;gt;{orderby} = &amp;quot;createtime&amp;quot;;&lt;br /&gt;
        $form-&amp;gt;{orderdir} = &amp;quot;DESC&amp;quot;;&lt;br /&gt;
        $form-&amp;gt;{skipmenu} = 1;&lt;br /&gt;
        $form-&amp;gt;{duration} = -1;&lt;br /&gt;
        $form-&amp;gt;{fhfilter} = &amp;quot;\&amp;quot;user:$user_edit-&amp;gt;{nickname}\&amp;quot;&amp;quot;;&lt;br /&gt;
        $form-&amp;gt;{pause} = 1;&lt;br /&gt;
        $form-&amp;gt;{listonly} = 1;&lt;br /&gt;
        $form-&amp;gt;{legacy} = 1;&lt;br /&gt;
&lt;br /&gt;
        my $fhbox = $firehose-&amp;gt;listView({ fh_page =&amp;gt; 'users.pl', tab =&amp;gt; 'userfirehose', user_view =&amp;gt; $user_edit });&lt;br /&gt;
        slashDisplay(&amp;quot;userFireHose&amp;quot;, { firehosebox =&amp;gt; $fhbox, uid =&amp;gt; $uid, useredit =&amp;gt; $user_edit });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
# arhgghgh. I love torture. I love pain. This subroutine satisfies&lt;br /&gt;
# these needs of mine&lt;br /&gt;
sub showInfo {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $id = $hr-&amp;gt;{uid} || 0;&lt;br /&gt;
&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        my $admin_flag = ($user-&amp;gt;{is_admin}) ? 1 : 0;&lt;br /&gt;
        my $suadmin_flag = $user-&amp;gt;{seclev} &amp;gt;= 10000 ? 1 : 0;&lt;br /&gt;
        my($title, $admin_block, $fieldkey) = ('', '', '');&lt;br /&gt;
        my $comments = undef;&lt;br /&gt;
        my $commentcount = 0;&lt;br /&gt;
        my $commentcount_time = 0;&lt;br /&gt;
        my $commentstruct = [];&lt;br /&gt;
        my $requested_user = {};&lt;br /&gt;
        my $time_period = $constants-&amp;gt;{admin_comment_display_days} || 30;&lt;br /&gt;
        my $cid_for_time_period = $reader-&amp;gt;getVar(&amp;quot;min_cid_last_$time_period\_days&amp;quot;,'value', 1) || 0;&lt;br /&gt;
        my $admin_time_period_limit = $constants-&amp;gt;{admin_daysback_commentlimit} || 100;&lt;br /&gt;
        my $admin_non_time_limit    = $constants-&amp;gt;{admin_comment_subsequent_pagesize} || 24;&lt;br /&gt;
&lt;br /&gt;
        my($points, $nickmatch_flag, $uid, $nick);&lt;br /&gt;
        my($mod_flag, $karma_flag, $n) = (0, 0, 0);&lt;br /&gt;
&lt;br /&gt;
        if ($admin_flag&lt;br /&gt;
                &amp;amp;&amp;amp; (defined($form-&amp;gt;{show_m2s}) || defined($form-&amp;gt;{show_m1s}) || defined($form-&amp;gt;{m2_listing})))&lt;br /&gt;
         {&lt;br /&gt;
                my $update_hr = {};&lt;br /&gt;
                $update_hr-&amp;gt;{mod_with_comm} = $form-&amp;gt;{show_m1s}&lt;br /&gt;
                        if defined $form-&amp;gt;{show_m1s};&lt;br /&gt;
                $update_hr-&amp;gt;{m2_with_mod} =     ($constants-&amp;gt;{m2} ? $form-&amp;gt;{show_m2s} : undef)&lt;br /&gt;
                        if defined $form-&amp;gt;{show_m2s};&lt;br /&gt;
                $update_hr-&amp;gt;{show_m2_listing} = ($constants-&amp;gt;{m2} ? $form-&amp;gt;{m2_listing} : undef)&lt;br /&gt;
                        if defined $form-&amp;gt;{m2_listing};&lt;br /&gt;
                $slashdb-&amp;gt;setUser($user-&amp;gt;{uid}, $update_hr);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if (!$id &amp;amp;&amp;amp; !$form-&amp;gt;{userfield}) {&lt;br /&gt;
                if ($form-&amp;gt;{uid} &amp;amp;&amp;amp; ! $id) {&lt;br /&gt;
                        $fieldkey = 'uid';&lt;br /&gt;
                        ($uid, $id) = ($form-&amp;gt;{uid}, $form-&amp;gt;{uid});&lt;br /&gt;
                        $requested_user = isAnon($uid) ? $user : $reader-&amp;gt;getUser($id);&lt;br /&gt;
                        $nick = $requested_user-&amp;gt;{nickname};&lt;br /&gt;
                        $form-&amp;gt;{userfield} = $nick if $admin_flag;&lt;br /&gt;
&lt;br /&gt;
                } elsif ($form-&amp;gt;{nick} &amp;amp;&amp;amp; ! $id) {&lt;br /&gt;
                        $fieldkey = 'nickname';&lt;br /&gt;
                        ($nick, $id) = ($form-&amp;gt;{nick}, $form-&amp;gt;{nick});&lt;br /&gt;
                        $uid = $reader-&amp;gt;getUserUID($id);&lt;br /&gt;
                        if (isAnon($uid)) {&lt;br /&gt;
                                $requested_user = $user;&lt;br /&gt;
                                ($nick, $uid, $id) = @{$user}{qw(nickname uid nickname)};&lt;br /&gt;
                        } else {&lt;br /&gt;
                                $requested_user = $reader-&amp;gt;getUser($uid);&lt;br /&gt;
                        }&lt;br /&gt;
                        $form-&amp;gt;{userfield} = $uid if $admin_flag;&lt;br /&gt;
&lt;br /&gt;
                } else {&lt;br /&gt;
                        $fieldkey = 'uid';&lt;br /&gt;
                        ($id, $uid) = ($user-&amp;gt;{uid}, $user-&amp;gt;{uid});&lt;br /&gt;
                        $requested_user = $reader-&amp;gt;getUser($uid);&lt;br /&gt;
                        $form-&amp;gt;{userfield} = $uid if $admin_flag;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
        } elsif ($user-&amp;gt;{is_admin}) {&lt;br /&gt;
                $id ||= $form-&amp;gt;{userfield} || $user-&amp;gt;{uid};&lt;br /&gt;
                if ($id =~ /^[0-9a-f]{16}$/) {&lt;br /&gt;
                        $requested_user-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                        $fieldkey = &amp;quot;srcid&amp;quot;;&lt;br /&gt;
                        $requested_user-&amp;gt;{$fieldkey} = $id;&lt;br /&gt;
                } elsif ($id =~ /^\d+$/) {&lt;br /&gt;
                        # If it's longer than a uid could possibly be, it&lt;br /&gt;
                        # must be a srcid.  The uid column right now is a&lt;br /&gt;
                        # MEDIUMINT (max 16M) but at most might someday&lt;br /&gt;
                        # be an INT (max 4G).&lt;br /&gt;
                        if (length($id) &amp;gt; 11) {&lt;br /&gt;
                                $requested_user-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                                $fieldkey = &amp;quot;srcid&amp;quot;;&lt;br /&gt;
                                $requested_user-&amp;gt;{$fieldkey} = $id;&lt;br /&gt;
                        } else {&lt;br /&gt;
                                $fieldkey = 'uid';&lt;br /&gt;
                                $requested_user = $reader-&amp;gt;getUser($id);&lt;br /&gt;
                                $uid = $requested_user-&amp;gt;{uid};&lt;br /&gt;
                                $nick = $requested_user-&amp;gt;{nickname};&lt;br /&gt;
                                if ((my $conflict_id = $reader-&amp;gt;getUserUID($id)) &amp;amp;&amp;amp; $form-&amp;gt;{userinfo}) {&lt;br /&gt;
                                        slashDisplay('showInfoConflict', {&lt;br /&gt;
                                                op              =&amp;gt; 'userinfo',&lt;br /&gt;
                                                id              =&amp;gt; $uid,&lt;br /&gt;
                                                nick            =&amp;gt; $nick,&lt;br /&gt;
                                                conflict_id     =&amp;gt; $conflict_id&lt;br /&gt;
                                        });&lt;br /&gt;
                                        return 1;&lt;br /&gt;
                                }&lt;br /&gt;
                        }&lt;br /&gt;
&lt;br /&gt;
                } elsif (length($id) == 32) {&lt;br /&gt;
                        $requested_user-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                        if ($form-&amp;gt;{fieldname}&lt;br /&gt;
                                &amp;amp;&amp;amp; $form-&amp;gt;{fieldname} =~ /^(ipid|subnetid)$/) {&lt;br /&gt;
                                $fieldkey = $form-&amp;gt;{fieldname};&lt;br /&gt;
                        } else {&lt;br /&gt;
                                $fieldkey = 'md5id';&lt;br /&gt;
                        }&lt;br /&gt;
                        $requested_user-&amp;gt;{$fieldkey} = $id;&lt;br /&gt;
                } elsif ($id =~ /^(\d{1,3}\.\d{1,3}.\d{1,3}\.0)$/ &lt;br /&gt;
                                || $id =~ /^(\d{1,3}\.\d{1,3}\.\d{1,3})\.?$/) {&lt;br /&gt;
                        $fieldkey = 'subnetid';&lt;br /&gt;
                        $requested_user-&amp;gt;{subnetid} = $1; &lt;br /&gt;
                        $requested_user-&amp;gt;{subnetid} .= '.0' if $requested_user-&amp;gt;{subnetid} =~ /^\d{1,3}\.\d{1,3}\.\d{1,3}$/; &lt;br /&gt;
                        $requested_user-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                        $requested_user-&amp;gt;{subnetid} = md5_hex($requested_user-&amp;gt;{subnetid});&lt;br /&gt;
&lt;br /&gt;
                } elsif ($id =~ /^([\d+\.]+)$/) {&lt;br /&gt;
                        $fieldkey = 'ipid';&lt;br /&gt;
                        $requested_user-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                        $id ||= $1;&lt;br /&gt;
                        $requested_user-&amp;gt;{ipid} = md5_hex($1);&lt;br /&gt;
&lt;br /&gt;
                } elsif ($id =~ /^(.*@.*\..*?)$/) {&lt;br /&gt;
                        # check for email addy, but make it by uid&lt;br /&gt;
                        $fieldkey = 'uid';&lt;br /&gt;
                        $id = $uid = $reader-&amp;gt;getUserEmail($id);&lt;br /&gt;
                        $requested_user = $reader-&amp;gt;getUser($uid);&lt;br /&gt;
                        $nick = $requested_user-&amp;gt;{nickname};&lt;br /&gt;
&lt;br /&gt;
                } else {  # go by nickname, but make it by uid&lt;br /&gt;
                        $fieldkey = 'uid';&lt;br /&gt;
                        $id = $uid = $reader-&amp;gt;getUserUID($id);&lt;br /&gt;
                        $requested_user = $reader-&amp;gt;getUser($uid);&lt;br /&gt;
                        $nick = $requested_user-&amp;gt;{nickname};&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
        } else {&lt;br /&gt;
                $fieldkey = 'uid';&lt;br /&gt;
                ($id, $uid) = ($user-&amp;gt;{uid}, $user-&amp;gt;{uid});&lt;br /&gt;
                $requested_user = $reader-&amp;gt;getUser($uid);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Can't get user data for the anonymous user.&lt;br /&gt;
        if ($fieldkey eq 'uid' &amp;amp;&amp;amp; isAnon($uid)) {&lt;br /&gt;
                header(getMessage('user_header')) or return;&lt;br /&gt;
                return displayForm();&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $user_change = { };&lt;br /&gt;
        if ($fieldkey eq 'uid' &amp;amp;&amp;amp; !$user-&amp;gt;{is_anon}&lt;br /&gt;
                &amp;amp;&amp;amp; $uid != $user-&amp;gt;{uid} &amp;amp;&amp;amp; !isAnon($uid)) {&lt;br /&gt;
                # Store the fact that this user last looked at that user.&lt;br /&gt;
                # For maximal convenience in stalking.&lt;br /&gt;
                $user_change-&amp;gt;{lastlookuid} = $uid;&lt;br /&gt;
                $user_change-&amp;gt;{lastlooktime} = time;&lt;br /&gt;
                $user-&amp;gt;{lastlookuid} = $uid;&lt;br /&gt;
                $user-&amp;gt;{lastlooktime} = time;&lt;br /&gt;
                $hr-&amp;gt;{tab_selected_1} = 'otheruser';&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # showInfo's header information is delayed until here, because&lt;br /&gt;
        # the target user's info is not available until here.&lt;br /&gt;
        vislenify($requested_user);&lt;br /&gt;
        header(getMessage('user_header', { useredit =&amp;gt; $requested_user, fieldkey =&amp;gt; $fieldkey })) or return;&lt;br /&gt;
        # This is a hardcoded position, bad idea and should be fixed -Brian&lt;br /&gt;
        # Yeah, we should pull this into a template somewhere...&lt;br /&gt;
        print getMessage('note', { note =&amp;gt; $hr-&amp;gt;{note} }) if defined $hr-&amp;gt;{note};&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        my $comments_wanted = $user-&amp;gt;{show_comments_num}&lt;br /&gt;
                || $constants-&amp;gt;{user_comment_display_default};&lt;br /&gt;
        my $min_comment = $form-&amp;gt;{min_comment} || 0;&lt;br /&gt;
        $min_comment = 0 unless $user-&amp;gt;{seclev} &amp;gt; $constants-&amp;gt;{comments_more_seclev}&lt;br /&gt;
                || $constants-&amp;gt;{comments_more_seclev} == 2 &amp;amp;&amp;amp; $user-&amp;gt;{is_subscriber};&lt;br /&gt;
&lt;br /&gt;
        my($netid, $netid_vis) = ('', '');&lt;br /&gt;
&lt;br /&gt;
        my $comment_time;&lt;br /&gt;
        my $non_admin_limit = $comments_wanted;&lt;br /&gt;
&lt;br /&gt;
        if ($requested_user-&amp;gt;{nonuid}) {&lt;br /&gt;
                $requested_user-&amp;gt;{fg} = $user-&amp;gt;{fg};&lt;br /&gt;
                $requested_user-&amp;gt;{bg} = $user-&amp;gt;{bg};&lt;br /&gt;
&lt;br /&gt;
                if ($requested_user-&amp;gt;{ipid}) {&lt;br /&gt;
                        $netid = $requested_user-&amp;gt;{ipid} ;&lt;br /&gt;
&lt;br /&gt;
                } elsif ($requested_user-&amp;gt;{md5id}) {&lt;br /&gt;
                        $netid = $requested_user-&amp;gt;{md5id} ;&lt;br /&gt;
&lt;br /&gt;
                } elsif ($requested_user-&amp;gt;{srcid}) {&lt;br /&gt;
                        $netid = $requested_user-&amp;gt;{srcid} ;&lt;br /&gt;
                } else {&lt;br /&gt;
                        $netid = $requested_user-&amp;gt;{subnetid} ;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                my $data = {&lt;br /&gt;
                        id =&amp;gt; $id,&lt;br /&gt;
                        md5id =&amp;gt; $netid,&lt;br /&gt;
                };&lt;br /&gt;
                vislenify($data); # add $data-&amp;gt;{md5id_vis}&lt;br /&gt;
                $netid_vis = $data-&amp;gt;{md5id_vis};&lt;br /&gt;
&lt;br /&gt;
                $title = getTitle('user_netID_user_title', $data);&lt;br /&gt;
&lt;br /&gt;
                $admin_block = getUserAdmin($netid, $fieldkey, 0) if $admin_flag;&lt;br /&gt;
&lt;br /&gt;
                if ($form-&amp;gt;{fieldname}) {&lt;br /&gt;
                        if ($form-&amp;gt;{fieldname} eq 'ipid') {&lt;br /&gt;
                                $commentcount           = $reader-&amp;gt;countCommentsByIPID($netid);&lt;br /&gt;
                                $commentcount_time      = $reader-&amp;gt;countCommentsByIPID($netid, { cid_at_or_after =&amp;gt; $cid_for_time_period });&lt;br /&gt;
                                $comments = getCommentListing(&amp;quot;ipid&amp;quot;, $netid,&lt;br /&gt;
                                        $min_comment, $time_period, $commentcount, $commentcount_time, $cid_for_time_period, &lt;br /&gt;
                                        $non_admin_limit, $admin_time_period_limit, $admin_non_time_limit)&lt;br /&gt;
                                                if $commentcount;&lt;br /&gt;
                        } elsif ($form-&amp;gt;{fieldname} eq 'subnetid') {&lt;br /&gt;
                                $commentcount           = $reader-&amp;gt;countCommentsBySubnetID($netid);&lt;br /&gt;
                                $commentcount_time      = $reader-&amp;gt;countCommentsBySubnetID($netid, { cid_at_or_after =&amp;gt; $cid_for_time_period });&lt;br /&gt;
                                $comments = getCommentListing(&amp;quot;subnetid&amp;quot;, $netid,&lt;br /&gt;
                                        $min_comment, $time_period, $commentcount, $commentcount_time, $cid_for_time_period,&lt;br /&gt;
                                        $non_admin_limit, $admin_time_period_limit, $admin_non_time_limit)&lt;br /&gt;
                                                if $commentcount;&lt;br /&gt;
&lt;br /&gt;
                        } else {&lt;br /&gt;
                                delete $form-&amp;gt;{fieldname};&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
                if (!defined($comments)) {&lt;br /&gt;
                        # Last resort; here for backwards compatibility mostly.&lt;br /&gt;
                        my $type;&lt;br /&gt;
                        ($commentcount,$type) = $reader-&amp;gt;countCommentsByIPIDOrSubnetID($netid);&lt;br /&gt;
                        $commentcount_time = $reader-&amp;gt;countCommentsByIPIDOrSubnetID($netid, { cid_at_or_after =&amp;gt; $cid_for_time_period });&lt;br /&gt;
                        if ($type eq &amp;quot;ipid&amp;quot;) {&lt;br /&gt;
                                $comments = getCommentListing(&amp;quot;ipid&amp;quot;, $netid,&lt;br /&gt;
                                        $min_comment, $time_period, $commentcount, $commentcount_time, $cid_for_time_period,&lt;br /&gt;
                                        $non_admin_limit, $admin_time_period_limit, $admin_non_time_limit)&lt;br /&gt;
                                                if $commentcount;&lt;br /&gt;
                        } elsif ($type eq &amp;quot;subnetid&amp;quot;) {&lt;br /&gt;
                                $comments = getCommentListing(&amp;quot;subnetid&amp;quot;, $netid,&lt;br /&gt;
                                        $min_comment, $time_period, $commentcount, $commentcount_time,  $cid_for_time_period,&lt;br /&gt;
                                        $non_admin_limit, $admin_time_period_limit, $admin_non_time_limit)&lt;br /&gt;
                                                if $commentcount;&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
        } else {&lt;br /&gt;
                $admin_block = getUserAdmin($id, $fieldkey, 1) if $admin_flag;&lt;br /&gt;
&lt;br /&gt;
                $commentcount      = $reader-&amp;gt;countCommentsByUID($requested_user-&amp;gt;{uid});&lt;br /&gt;
                $commentcount_time = $reader-&amp;gt;countCommentsByUID($requested_user-&amp;gt;{uid}, { cid_at_or_after =&amp;gt; $cid_for_time_period });&lt;br /&gt;
                $comments = getCommentListing(&amp;quot;uid&amp;quot;, $requested_user-&amp;gt;{uid},&lt;br /&gt;
                        $min_comment, $time_period, $commentcount, $commentcount_time, $cid_for_time_period,&lt;br /&gt;
                        $non_admin_limit, $admin_time_period_limit, $admin_non_time_limit,&lt;br /&gt;
                        { use_uid_cid_cutoff =&amp;gt; 1 })&lt;br /&gt;
                                if $commentcount;&lt;br /&gt;
                $netid = $requested_user-&amp;gt;{uid};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Grab the nicks of the uids we have, we're going to be adding them&lt;br /&gt;
        # into the struct.&lt;br /&gt;
        my @users_extra_cols_wanted       = qw( nickname );&lt;br /&gt;
        my @discussions_extra_cols_wanted = qw( type );&lt;br /&gt;
        my $uid_hr = { };&lt;br /&gt;
        my $sid_hr = { };&lt;br /&gt;
        if ($comments &amp;amp;&amp;amp; @$comments) {&lt;br /&gt;
                my %uids = ();&lt;br /&gt;
                my %sids = ();&lt;br /&gt;
                for my $c (@$comments) {&lt;br /&gt;
                        $uids{$c-&amp;gt;{uid}}++;&lt;br /&gt;
                        $sids{$c-&amp;gt;{sid}}++;&lt;br /&gt;
                }&lt;br /&gt;
                my $uids = join(&amp;quot;, &amp;quot;, sort { $a &amp;lt;=&amp;gt; $b } keys %uids);&lt;br /&gt;
                my $sids = join(&amp;quot;, &amp;quot;, sort { $a &amp;lt;=&amp;gt; $b } keys %sids);&lt;br /&gt;
                $uid_hr = $reader-&amp;gt;sqlSelectAllHashref(&lt;br /&gt;
                        &amp;quot;uid&amp;quot;,&lt;br /&gt;
                        &amp;quot;uid, &amp;quot; . join(&amp;quot;, &amp;quot;, @users_extra_cols_wanted),&lt;br /&gt;
                        &amp;quot;users&amp;quot;,&lt;br /&gt;
                        &amp;quot;uid IN ($uids)&amp;quot;&lt;br /&gt;
                );&lt;br /&gt;
&lt;br /&gt;
                $sid_hr = $reader-&amp;gt;sqlSelectAllHashref(&lt;br /&gt;
                        &amp;quot;id&amp;quot;,&lt;br /&gt;
                        &amp;quot;id, &amp;quot; . join(&amp;quot;, &amp;quot;, @discussions_extra_cols_wanted),&lt;br /&gt;
                        &amp;quot;discussions&amp;quot;,&lt;br /&gt;
                        &amp;quot;id IN ($sids)&amp;quot;&lt;br /&gt;
                );&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $cids_seen = {};&lt;br /&gt;
        my $kinds = $slashdb-&amp;gt;getDescriptions('discussion_kinds');&lt;br /&gt;
        for my $comment (@$comments) {&lt;br /&gt;
                $cids_seen-&amp;gt;{$comment-&amp;gt;{cid}}++;&lt;br /&gt;
                my $type;&lt;br /&gt;
                # This works since $sid is numeric.&lt;br /&gt;
                my $replies = $reader-&amp;gt;countCommentsBySidPid($comment-&amp;gt;{sid}, $comment-&amp;gt;{cid});&lt;br /&gt;
&lt;br /&gt;
                # This is cached.&lt;br /&gt;
                my $discussion = $reader-&amp;gt;getDiscussion($comment-&amp;gt;{sid});&lt;br /&gt;
#use Data::Dumper; if ($discussion &amp;amp;&amp;amp; !$discussion-&amp;gt;{dkid}) { print STDERR scalar(gmtime) . &amp;quot; users.pl discussion but no dkid: &amp;quot; . Dumper($discussion) }&lt;br /&gt;
                if (!$discussion || !$discussion-&amp;gt;{dkid}) {&lt;br /&gt;
                        # A comment with no accompanying discussion;&lt;br /&gt;
                        # basically we pretend it doesn't exist.&lt;br /&gt;
                        next;&lt;br /&gt;
                } elsif ($kinds-&amp;gt;{ $discussion-&amp;gt;{dkid} } =~ /^journal(?:-story)?$/) {&lt;br /&gt;
                        $type = 'journal';&lt;br /&gt;
                } elsif ($kinds-&amp;gt;{ $discussion-&amp;gt;{dkid} } eq 'poll') {&lt;br /&gt;
                        $type = 'poll';&lt;br /&gt;
                } else {&lt;br /&gt;
                        $type = 'story';&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                $comment-&amp;gt;{points} += $user-&amp;gt;{karma_bonus}&lt;br /&gt;
                        if $user-&amp;gt;{karma_bonus} &amp;amp;&amp;amp; $comment-&amp;gt;{karma_bonus} eq 'yes';&lt;br /&gt;
                $comment-&amp;gt;{points} += $user-&amp;gt;{subscriber_bonus}&lt;br /&gt;
                        if $user-&amp;gt;{subscriber_bonus} &amp;amp;&amp;amp; $comment-&amp;gt;{subscriber_bonus} eq 'yes';&lt;br /&gt;
&lt;br /&gt;
                # fix points in case they are out of bounds&lt;br /&gt;
                $comment-&amp;gt;{points} = $constants-&amp;gt;{comment_minscore} if $comment-&amp;gt;{points} &amp;lt; $constants-&amp;gt;{comment_minscore};&lt;br /&gt;
                $comment-&amp;gt;{points} = $constants-&amp;gt;{comment_maxscore} if $comment-&amp;gt;{points} &amp;gt; $constants-&amp;gt;{comment_maxscore};&lt;br /&gt;
                vislenify($comment);&lt;br /&gt;
                my $data = {&lt;br /&gt;
                        pid             =&amp;gt; $comment-&amp;gt;{pid},&lt;br /&gt;
                        url             =&amp;gt; $discussion-&amp;gt;{url},&lt;br /&gt;
                        disc_type       =&amp;gt; $type,&lt;br /&gt;
                        disc_title      =&amp;gt; $discussion-&amp;gt;{title},&lt;br /&gt;
                        disc_time       =&amp;gt; $discussion-&amp;gt;{ts},&lt;br /&gt;
                        sid             =&amp;gt; $comment-&amp;gt;{sid},&lt;br /&gt;
                        cid             =&amp;gt; $comment-&amp;gt;{cid},&lt;br /&gt;
                        subj            =&amp;gt; $comment-&amp;gt;{subject},&lt;br /&gt;
                        cdate           =&amp;gt; $comment-&amp;gt;{date},&lt;br /&gt;
                        pts             =&amp;gt; $comment-&amp;gt;{points},&lt;br /&gt;
                        reason          =&amp;gt; $comment-&amp;gt;{reason},&lt;br /&gt;
                        uid             =&amp;gt; $comment-&amp;gt;{uid},&lt;br /&gt;
                        replies         =&amp;gt; $replies,&lt;br /&gt;
                        ipid            =&amp;gt; $comment-&amp;gt;{ipid},&lt;br /&gt;
                        ipid_vis        =&amp;gt; $comment-&amp;gt;{ipid_vis},&lt;br /&gt;
                        karma           =&amp;gt; $comment-&amp;gt;{karma},&lt;br /&gt;
                        tweak           =&amp;gt; $comment-&amp;gt;{tweak},&lt;br /&gt;
                        tweak_orig      =&amp;gt; $comment-&amp;gt;{tweak_orig},&lt;br /&gt;
&lt;br /&gt;
                };&lt;br /&gt;
                #Karma bonus time&lt;br /&gt;
&lt;br /&gt;
                for my $col (@users_extra_cols_wanted) {&lt;br /&gt;
                        $data-&amp;gt;{$col} = $uid_hr-&amp;gt;{$comment-&amp;gt;{uid}}{$col} if defined $uid_hr-&amp;gt;{$comment-&amp;gt;{uid}}{$col};&lt;br /&gt;
                }&lt;br /&gt;
                for my $col(@discussions_extra_cols_wanted) {&lt;br /&gt;
                        $data-&amp;gt;{$col} = $sid_hr-&amp;gt;{$comment-&amp;gt;{sid}}{$col} if defined $sid_hr-&amp;gt;{$comment-&amp;gt;{sid}}{$col};&lt;br /&gt;
                }&lt;br /&gt;
                push @$commentstruct, $data;&lt;br /&gt;
        }&lt;br /&gt;
#       if (grep { !defined($_-&amp;gt;{disc_time}) || !defined($_-&amp;gt;{sid}) } @$commentstruct) { use Data::Dumper; print STDERR &amp;quot;showInfo undef in commentstruct for id=$id: &amp;quot; . Dumper($commentstruct) }&lt;br /&gt;
        # Sort so the chosen group of comments is sorted by discussion&lt;br /&gt;
        @$commentstruct = sort {&lt;br /&gt;
                $b-&amp;gt;{disc_time} cmp $a-&amp;gt;{disc_time} || $b-&amp;gt;{sid} &amp;lt;=&amp;gt; $a-&amp;gt;{sid}&lt;br /&gt;
        } @$commentstruct&lt;br /&gt;
                unless $user-&amp;gt;{user_comment_sort_type} &amp;amp;&amp;amp; $user-&amp;gt;{user_comment_sort_type} == 1;&lt;br /&gt;
&lt;br /&gt;
        my $cid_list = [ keys %$cids_seen ];&lt;br /&gt;
        my $cids_to_mods = {};&lt;br /&gt;
        my $mod_reader = getObject(&amp;quot;Slash::$constants-&amp;gt;{m1_pluginname}&amp;quot;, { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        if ($constants-&amp;gt;{m1} &amp;amp;&amp;amp; $admin_flag &amp;amp;&amp;amp; $constants-&amp;gt;{show_mods_with_comments}) {&lt;br /&gt;
                my $comment_mods = $mod_reader-&amp;gt;getModeratorCommentLog(&amp;quot;DESC&amp;quot;,&lt;br /&gt;
                        $constants-&amp;gt;{mod_limit_with_comments}, &amp;quot;cidin&amp;quot;, $cid_list);&lt;br /&gt;
&lt;br /&gt;
                # Loop through mods and group them by the sid they're attached to&lt;br /&gt;
                while (my $mod = shift @$comment_mods) {&lt;br /&gt;
                        push @{$cids_to_mods-&amp;gt;{$mod-&amp;gt;{cid}}}, $mod;&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $sub_limit = ((($admin_flag || $user-&amp;gt;{uid} == $requested_user-&amp;gt;{uid}) ? $constants-&amp;gt;{submissions_all_page_size} : $constants-&amp;gt;{submissions_accepted_only_page_size}) || &amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        my $sub_options = { limit_days =&amp;gt; 365 };&lt;br /&gt;
        $sub_options-&amp;gt;{accepted_only} = 1 if !$admin_flag &amp;amp;&amp;amp; $user-&amp;gt;{uid} != $requested_user-&amp;gt;{uid};&lt;br /&gt;
&lt;br /&gt;
        my $sub_field = $form-&amp;gt;{fieldname};&lt;br /&gt;
&lt;br /&gt;
        my ($subcount, $ret_field) = $reader-&amp;gt;countSubmissionsByNetID($netid, $sub_field)&lt;br /&gt;
                if $requested_user-&amp;gt;{nonuid};&lt;br /&gt;
        my $submissions = $reader-&amp;gt;getSubmissionsByNetID($netid, $ret_field, $sub_limit, $sub_options)&lt;br /&gt;
                if $requested_user-&amp;gt;{nonuid};&lt;br /&gt;
&lt;br /&gt;
        my $ipid_hoursback = $constants-&amp;gt;{istroll_ipid_hours} || 72;&lt;br /&gt;
        my $uid_hoursback = $constants-&amp;gt;{istroll_uid_hours} || 72;&lt;br /&gt;
&lt;br /&gt;
        if ($requested_user-&amp;gt;{nonuid}) {&lt;br /&gt;
                slashDisplay('netIDInfo', {&lt;br /&gt;
                        title                   =&amp;gt; $title,&lt;br /&gt;
                        id                      =&amp;gt; $id,&lt;br /&gt;
                        useredit                =&amp;gt; $requested_user,&lt;br /&gt;
                        commentstruct           =&amp;gt; $commentstruct || [],&lt;br /&gt;
                        commentcount            =&amp;gt; $commentcount,&lt;br /&gt;
                        min_comment             =&amp;gt; $min_comment,&lt;br /&gt;
                        admin_flag              =&amp;gt; $admin_flag,&lt;br /&gt;
                        admin_block             =&amp;gt; $admin_block,&lt;br /&gt;
                        netid                   =&amp;gt; $netid,&lt;br /&gt;
                        netid_vis               =&amp;gt; $netid_vis,&lt;br /&gt;
                        reasons                 =&amp;gt; $mod_reader-&amp;gt;getReasons(),&lt;br /&gt;
                        subcount                =&amp;gt; $subcount,&lt;br /&gt;
                        submissions             =&amp;gt; $submissions,&lt;br /&gt;
                        hr_hours_back           =&amp;gt; $ipid_hoursback,&lt;br /&gt;
                        cids_to_mods            =&amp;gt; $cids_to_mods,&lt;br /&gt;
                        comment_time            =&amp;gt; $comment_time&lt;br /&gt;
                });&lt;br /&gt;
&lt;br /&gt;
        } else {&lt;br /&gt;
                if (! $requested_user-&amp;gt;{uid}) {&lt;br /&gt;
                        print getError('userinfo_idnf_err', { id =&amp;gt; $id, fieldkey =&amp;gt; $fieldkey});&lt;br /&gt;
                        return 1;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                $karma_flag = 1 if $admin_flag;&lt;br /&gt;
                $requested_user-&amp;gt;{nick_plain} = $nick ||= $requested_user-&amp;gt;{nickname};&lt;br /&gt;
                $nick = strip_literal($nick);&lt;br /&gt;
&lt;br /&gt;
                if ($requested_user-&amp;gt;{uid} == $user-&amp;gt;{uid}) {&lt;br /&gt;
                        $karma_flag = 1;&lt;br /&gt;
                        $nickmatch_flag = 1;&lt;br /&gt;
                        $points = $requested_user-&amp;gt;{points};&lt;br /&gt;
&lt;br /&gt;
                        $mod_flag = 1 if $points &amp;gt; 0;&lt;br /&gt;
&lt;br /&gt;
                        $title = getTitle('userInfo_main_title', { nick =&amp;gt; $nick, uid =&amp;gt; $uid });&lt;br /&gt;
&lt;br /&gt;
                } else {&lt;br /&gt;
                        $title = getTitle('userInfo_user_title', { nick =&amp;gt; $nick, uid =&amp;gt; $uid });&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                my $lastjournal = _get_lastjournal($uid);&lt;br /&gt;
&lt;br /&gt;
                my $subcount = $reader-&amp;gt;countSubmissionsByUID($uid);&lt;br /&gt;
&lt;br /&gt;
                my $submissions = $reader-&amp;gt;getSubmissionsByUID($uid, $sub_limit, $sub_options);&lt;br /&gt;
                my $metamods;&lt;br /&gt;
                if ($constants-&amp;gt;{m2} &amp;amp;&amp;amp; $admin_flag) {&lt;br /&gt;
                        my $metamod_reader = getObject('Slash::Metamod', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
                        $metamods = $metamod_reader-&amp;gt;getMetamodlogForUser($uid, 30);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                my $tags_reader = getObject('Slash::Tags', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
                my $tagshist = [];&lt;br /&gt;
                if ($tags_reader &amp;amp;&amp;amp; $user-&amp;gt;{is_admin}) {&lt;br /&gt;
                        $tagshist = $tags_reader-&amp;gt;getAllTagsFromUser($requested_user-&amp;gt;{uid}, { orderby =&amp;gt; 'created_at', orderdir =&amp;gt; 'DESC', limit =&amp;gt; 30, include_private =&amp;gt; 1 });&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                slashDisplay('userInfo', {&lt;br /&gt;
                        title                   =&amp;gt; $title,&lt;br /&gt;
                        uid                     =&amp;gt; $uid,&lt;br /&gt;
                        useredit                =&amp;gt; $requested_user,&lt;br /&gt;
                        points                  =&amp;gt; $points,&lt;br /&gt;
                        commentstruct           =&amp;gt; $commentstruct || [],&lt;br /&gt;
                        commentcount            =&amp;gt; $commentcount,&lt;br /&gt;
                        min_comment             =&amp;gt; $min_comment,&lt;br /&gt;
                        nickmatch_flag          =&amp;gt; $nickmatch_flag,&lt;br /&gt;
                        mod_flag                =&amp;gt; $mod_flag,&lt;br /&gt;
                        karma_flag              =&amp;gt; $karma_flag,&lt;br /&gt;
                        admin_block             =&amp;gt; $admin_block,&lt;br /&gt;
                        admin_flag              =&amp;gt; $admin_flag,&lt;br /&gt;
                        suadmin_flag            =&amp;gt; $suadmin_flag,&lt;br /&gt;
                        reasons                 =&amp;gt; $mod_reader-&amp;gt;getReasons(),&lt;br /&gt;
                        lastjournal             =&amp;gt; $lastjournal,&lt;br /&gt;
                        hr_hours_back           =&amp;gt; $ipid_hoursback,&lt;br /&gt;
                        cids_to_mods            =&amp;gt; $cids_to_mods,&lt;br /&gt;
                        comment_time            =&amp;gt; $comment_time,&lt;br /&gt;
                        submissions             =&amp;gt; $submissions,&lt;br /&gt;
                        subcount                =&amp;gt; $subcount,&lt;br /&gt;
                        metamods                =&amp;gt; $metamods,&lt;br /&gt;
                        tagshist                =&amp;gt; $tagshist&lt;br /&gt;
                });&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($user_change &amp;amp;&amp;amp; %$user_change) {&lt;br /&gt;
                $slashdb-&amp;gt;setUser($user-&amp;gt;{uid}, $user_change);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        return 1;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub _get_lastjournal {&lt;br /&gt;
        my($uid) = @_;&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $lastjournal = undef;&lt;br /&gt;
        if (my $journal = getObject('Slash::Journal', { db_type =&amp;gt; 'reader' })) {&lt;br /&gt;
                my $j = $journal-&amp;gt;getsByUid($uid, 0, 1);&lt;br /&gt;
                if ($j &amp;amp;&amp;amp; @$j) {&lt;br /&gt;
                        # Yep, there are 1 or more journals... get the first.&lt;br /&gt;
                        $j = $j-&amp;gt;[0];&lt;br /&gt;
                }&lt;br /&gt;
                if ($j &amp;amp;&amp;amp; @$j) {&lt;br /&gt;
                        # Yep, that first journal exists and has entries...&lt;br /&gt;
                        # convert from stupid numeric array to a hashref.&lt;br /&gt;
                        my @field = qw( date article description id&lt;br /&gt;
                                        posttype tid discussion         );&lt;br /&gt;
                        $lastjournal = { };&lt;br /&gt;
                        for my $i (0..$#field) {&lt;br /&gt;
                                $lastjournal-&amp;gt;{$field[$i]} = $j-&amp;gt;[$i];&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($lastjournal) {&lt;br /&gt;
&lt;br /&gt;
                # Strip the article field for display.&lt;br /&gt;
                $lastjournal-&amp;gt;{article} = strip_mode($lastjournal-&amp;gt;{article},&lt;br /&gt;
                        $lastjournal-&amp;gt;{posttype});&lt;br /&gt;
&lt;br /&gt;
                # For display, include a reduced-size version, where the&lt;br /&gt;
                # size is based on the user's maxcomment size (which&lt;br /&gt;
                # defaults to 4K) and can't have too many line-breaking&lt;br /&gt;
                # tags.&lt;br /&gt;
                my $art_shrunk = $lastjournal-&amp;gt;{article};&lt;br /&gt;
                my $maxsize = int($constants-&amp;gt;{default_maxcommentsize} / 25);&lt;br /&gt;
                $maxsize =  80 if $maxsize &amp;lt;  80;&lt;br /&gt;
                $maxsize = 600 if $maxsize &amp;gt; 600;&lt;br /&gt;
                $art_shrunk = chopEntity($art_shrunk, $maxsize);&lt;br /&gt;
&lt;br /&gt;
                my $approvedtags_break = $constants-&amp;gt;{approvedtags_break} || [];&lt;br /&gt;
                my $break_tag = join '|', @$approvedtags_break;&lt;br /&gt;
                if (scalar(() = $art_shrunk =~ /&amp;lt;(?:$break_tag)&amp;gt;/gi) &amp;gt; 2) {&lt;br /&gt;
                        $art_shrunk =~ s/\A&lt;br /&gt;
                        (&lt;br /&gt;
                                (?: &amp;lt;(?:$break_tag)&amp;gt; )?&lt;br /&gt;
                                .*?   &amp;lt;(?:$break_tag)&amp;gt;&lt;br /&gt;
                                .*?&lt;br /&gt;
                        )       &amp;lt;(?:$break_tag)&amp;gt;.*&lt;br /&gt;
                        /$1/six;&lt;br /&gt;
                        if (length($art_shrunk) &amp;lt; 15) {&lt;br /&gt;
                                # This journal entry has too much whitespace&lt;br /&gt;
                                # in its first few chars;  scrap it.&lt;br /&gt;
                                undef $art_shrunk;&lt;br /&gt;
                        }&lt;br /&gt;
                        $art_shrunk = chopEntity($art_shrunk) if defined($art_shrunk);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                if (defined $art_shrunk) {&lt;br /&gt;
                        if (length($art_shrunk) &amp;lt; length($lastjournal-&amp;gt;{article})) {&lt;br /&gt;
                                $art_shrunk .= &amp;quot; ...&amp;quot;;&lt;br /&gt;
                        }&lt;br /&gt;
                        $art_shrunk = strip_html($art_shrunk);&lt;br /&gt;
                        $art_shrunk = balanceTags($art_shrunk);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                $lastjournal-&amp;gt;{article_shrunk} = $art_shrunk;&lt;br /&gt;
&lt;br /&gt;
                if ($lastjournal-&amp;gt;{discussion}) {&lt;br /&gt;
                        $lastjournal-&amp;gt;{commentcount} = $reader-&amp;gt;getDiscussion(&lt;br /&gt;
                                $lastjournal-&amp;gt;{discussion}, 'commentcount');&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
        return $lastjournal;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#####################################################################&lt;br /&gt;
sub validateUser {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        # If we aren't expiring accounts in some way, we don't belong here.&lt;br /&gt;
        if (! allowExpiry()) {&lt;br /&gt;
                displayForm();&lt;br /&gt;
                return;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        # Since we are here, if the minimum values for the comment trigger and&lt;br /&gt;
        # the day trigger are -1, then they should be reset to 1.&lt;br /&gt;
        $constants-&amp;gt;{min_expiry_comm} = $constants-&amp;gt;{min_expiry_days} = 1&lt;br /&gt;
                if $constants-&amp;gt;{min_expiry_comm} &amp;lt;= 0 ||&lt;br /&gt;
                   $constants-&amp;gt;{min_expiry_days} &amp;lt;= 0;&lt;br /&gt;
&lt;br /&gt;
        if ($user-&amp;gt;{is_anon} || $user-&amp;gt;{registered}) {&lt;br /&gt;
                if ($user-&amp;gt;{is_anon}) {&lt;br /&gt;
                        print getError('anon_validation_attempt');&lt;br /&gt;
                        displayForm();&lt;br /&gt;
                        return;&lt;br /&gt;
                } else {&lt;br /&gt;
                        print getMessage('no_registration_needed')&lt;br /&gt;
                                if !$user-&amp;gt;{reg_id};&lt;br /&gt;
                        showInfo({ uid =&amp;gt; $user-&amp;gt;{uid} });&lt;br /&gt;
                        return;&lt;br /&gt;
                }&lt;br /&gt;
        # Maybe this should be taken care of in a more centralized location?&lt;br /&gt;
        } elsif ($user-&amp;gt;{reg_id} eq $form-&amp;gt;{id}) {&lt;br /&gt;
                # We have a user and the registration IDs match. We are happy!&lt;br /&gt;
                my($maxComm, $maxDays) = ($constants-&amp;gt;{max_expiry_comm},&lt;br /&gt;
                                          $constants-&amp;gt;{max_expiry_days});&lt;br /&gt;
                my($userComm, $userDays) =&lt;br /&gt;
                        ($user-&amp;gt;{user_expiry_comm}, $user-&amp;gt;{user_expiry_days});&lt;br /&gt;
&lt;br /&gt;
                # Ensure both $userComm and $userDays aren't -1 (expiry has&lt;br /&gt;
                # just been turned on).&lt;br /&gt;
                $userComm = $constants-&amp;gt;{min_expiry_comm}&lt;br /&gt;
                        if $userComm &amp;lt; $constants-&amp;gt;{min_expiry_comm};&lt;br /&gt;
                $userDays = $constants-&amp;gt;{min_expiry_days}&lt;br /&gt;
                        if $userDays &amp;lt; $constants-&amp;gt;{min_expiry_days};&lt;br /&gt;
&lt;br /&gt;
                my $exp = $constants-&amp;gt;{expiry_exponent};&lt;br /&gt;
&lt;br /&gt;
                # Increment only the trigger that was used.&lt;br /&gt;
                my $new_comment_expiry = ($maxComm &amp;gt; 0 &amp;amp;&amp;amp; $userComm &amp;gt; $maxComm)&lt;br /&gt;
                        ? $maxComm&lt;br /&gt;
                        : $userComm * (($user-&amp;gt;{expiry_comm} &amp;lt; 0)&lt;br /&gt;
                                ? $exp&lt;br /&gt;
                                : 1&lt;br /&gt;
                );&lt;br /&gt;
                my $new_days_expiry = ($maxDays &amp;gt; 0 &amp;amp;&amp;amp; $userDays &amp;gt; $maxDays)&lt;br /&gt;
                        ? $maxDays&lt;br /&gt;
                        : $userDays * (($user-&amp;gt;{expiry_days} &amp;lt; 0)&lt;br /&gt;
                                ? $exp&lt;br /&gt;
                                : 1&lt;br /&gt;
                );&lt;br /&gt;
&lt;br /&gt;
                # Reset re-registration triggers for user.&lt;br /&gt;
                $slashdb-&amp;gt;setUser($user-&amp;gt;{uid}, {&lt;br /&gt;
                        'expiry_comm'           =&amp;gt; $new_comment_expiry,&lt;br /&gt;
                        'expiry_days'           =&amp;gt; $new_days_expiry,&lt;br /&gt;
                        'user_expiry_comm'      =&amp;gt; $new_comment_expiry,&lt;br /&gt;
                        'user_expiry_days'      =&amp;gt; $new_days_expiry,&lt;br /&gt;
                });&lt;br /&gt;
&lt;br /&gt;
                # Handles rest of re-registration process.&lt;br /&gt;
                setUserExpired($user-&amp;gt;{uid}, 0);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('regResult');&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#####################################################################&lt;br /&gt;
sub editTags {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $user = getCurrentUser(); &lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $note = $hr-&amp;gt;{note} || &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        return if $user-&amp;gt;{is_anon}; # shouldn't be, but can't hurt to check&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        my $user_edit = $slashdb-&amp;gt;getUser($user-&amp;gt;{uid});&lt;br /&gt;
        my $title = getTitle('editTags_title');&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('editTags', {&lt;br /&gt;
                user_edit       =&amp;gt; $user_edit,&lt;br /&gt;
                title           =&amp;gt; $title,&lt;br /&gt;
                note            =&amp;gt; $note,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub saveTags {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        return if $user-&amp;gt;{is_anon}; # shouldn't be, but can't hurt to check&lt;br /&gt;
&lt;br /&gt;
        $slashdb-&amp;gt;setUser($user-&amp;gt;{uid}, {&lt;br /&gt;
                tags_turnedoff =&amp;gt;       $form-&amp;gt;{showtags} ? '' : 1 });&lt;br /&gt;
        editTags({ note =&amp;gt; getMessage('savetags_msg') });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#####################################################################&lt;br /&gt;
sub showTags {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $tags_reader = getObject('Slash::Tags', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
        # XXX if $user_edit-&amp;gt;{acl}{spammer}, either abort or put ref=nofollow in all links&lt;br /&gt;
&lt;br /&gt;
        my $tagname = $form-&amp;gt;{tagname} || '';&lt;br /&gt;
        $tagname = '' if !$tags_reader-&amp;gt;tagnameSyntaxOK($tagname);&lt;br /&gt;
&lt;br /&gt;
        my($uid, $user_edit);&lt;br /&gt;
        if ($form-&amp;gt;{uid} || $form-&amp;gt;{nick}) {&lt;br /&gt;
                $uid = $form-&amp;gt;{uid} || $tags_reader-&amp;gt;getUserUID($form-&amp;gt;{nick});&lt;br /&gt;
                $user_edit = $tags_reader-&amp;gt;getUser($uid);&lt;br /&gt;
        }&lt;br /&gt;
        if (!$user_edit || $user_edit-&amp;gt;{is_anon}) {&lt;br /&gt;
                $uid = $user-&amp;gt;{uid};&lt;br /&gt;
                $user_edit = $user;&lt;br /&gt;
        }&lt;br /&gt;
        my $nickname = $user_edit-&amp;gt;{nickname};&lt;br /&gt;
&lt;br /&gt;
        if (!$constants-&amp;gt;{plugin}{Tags}) {&lt;br /&gt;
                print getError('bad_op', { op =&amp;gt; $form-&amp;gt;{op}});&lt;br /&gt;
                return;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $tagnameid = $tags_reader-&amp;gt;getTagnameidFromNameIfExists($tagname);&lt;br /&gt;
        if ($tagnameid) {&lt;br /&gt;
                # Show all user's tags for one particular tagname.&lt;br /&gt;
                my $tags_hr = $tags_reader-&amp;gt;getGroupedTagsFromUser($user_edit-&amp;gt;{uid},&lt;br /&gt;
                        { tagnameid =&amp;gt; $tagnameid });&lt;br /&gt;
                my $tags_ar = $tags_hr-&amp;gt;{$tagname} || [ ];&lt;br /&gt;
                slashDisplay('usertagsforname', {&lt;br /&gt;
                        useredit        =&amp;gt; $user_edit,&lt;br /&gt;
                        tagname         =&amp;gt; $tagname,&lt;br /&gt;
                        tags            =&amp;gt; $tags_ar,&lt;br /&gt;
                });&lt;br /&gt;
&lt;br /&gt;
        } else {&lt;br /&gt;
                my $tags_hr = $tags_reader-&amp;gt;getGroupedTagsFromUser($user_edit-&amp;gt;{uid});&lt;br /&gt;
                my $num_tags = 0;&lt;br /&gt;
                for my $tn (keys %$tags_hr) {&lt;br /&gt;
                        $num_tags += scalar @{ $tags_hr-&amp;gt;{$tn} };&lt;br /&gt;
                }&lt;br /&gt;
                my $cutoff = $constants-&amp;gt;{tags_usershow_cutoff} || 200;&lt;br /&gt;
                if ($num_tags &amp;lt;= $cutoff) {&lt;br /&gt;
                        # Show all user's tags, grouped by tagname.&lt;br /&gt;
                        slashDisplay('usertags', {&lt;br /&gt;
                                useredit        =&amp;gt; $user_edit,&lt;br /&gt;
                                tags_grouped    =&amp;gt; $tags_hr,&lt;br /&gt;
                        });&lt;br /&gt;
                } else {&lt;br /&gt;
                        # Show all user's tagnames, with links to show all&lt;br /&gt;
                        # tags for each particular tagname.&lt;br /&gt;
                        my $tagname_ar = [ sort keys %$tags_hr ];&lt;br /&gt;
                        slashDisplay('usertagnames', {&lt;br /&gt;
                                useredit        =&amp;gt; $user_edit,&lt;br /&gt;
                                tagnames        =&amp;gt; $tagname_ar,&lt;br /&gt;
                        });&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub showBookmarks {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $tags_reader = getObject('Slash::Tags', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
        my($uid, $user_edit);&lt;br /&gt;
        if ($form-&amp;gt;{uid} || $form-&amp;gt;{nick}) {&lt;br /&gt;
                $uid = $form-&amp;gt;{uid} || $tags_reader-&amp;gt;getUserUID($form-&amp;gt;{nick});&lt;br /&gt;
                $user_edit = $tags_reader-&amp;gt;getUser($uid);&lt;br /&gt;
        }&lt;br /&gt;
        if (!$user_edit || $user_edit-&amp;gt;{is_anon}) {&lt;br /&gt;
                $uid = $user-&amp;gt;{uid};&lt;br /&gt;
                $user_edit = $user;&lt;br /&gt;
        }&lt;br /&gt;
        my $nickname = $user_edit-&amp;gt;{nickname};&lt;br /&gt;
&lt;br /&gt;
        if (!$constants-&amp;gt;{plugin}{Tags}) {&lt;br /&gt;
                print getError('bad_op', { op =&amp;gt; $form-&amp;gt;{op}});&lt;br /&gt;
                return;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $tags_ar = $tags_reader-&amp;gt;getGroupedTagsFromUser($user_edit-&amp;gt;{uid}, { type =&amp;gt; &amp;quot;urls&amp;quot;, only_bookmarked =&amp;gt; 1 });&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('userbookmarks', {&lt;br /&gt;
                useredit        =&amp;gt; $user_edit,&lt;br /&gt;
                tags_grouped    =&amp;gt; $tags_ar,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub editKey {&lt;br /&gt;
        my($uid) = @_;&lt;br /&gt;
&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
&lt;br /&gt;
        my $pubkey = $slashdb-&amp;gt;getUser($uid, 'pubkey');&lt;br /&gt;
        my $editkey = slashDisplay('editKey', { pubkey =&amp;gt; $pubkey }, 1);&lt;br /&gt;
        return $editkey;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
# We arrive here without header() having been called.  Some of the&lt;br /&gt;
# functions we dispatch to call it, some do not.&lt;br /&gt;
sub adminDispatch {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $op = $hr-&amp;gt;{op} || $form-&amp;gt;{op};&lt;br /&gt;
&lt;br /&gt;
        if ($op eq 'authoredit') {&lt;br /&gt;
                # editUser() does not call header(), so we DO need to.&lt;br /&gt;
                header(getMessage('user_header'), '', {}) or return;&lt;br /&gt;
                editUser($hr);&lt;br /&gt;
&lt;br /&gt;
        } elsif ($form-&amp;gt;{saveuseradmin}) {&lt;br /&gt;
                # saveUserAdmin() tail-calls showInfo(), which calls&lt;br /&gt;
                # header(), so we need to NOT.&lt;br /&gt;
                saveUserAdmin($hr);&lt;br /&gt;
&lt;br /&gt;
        } elsif ($form-&amp;gt;{userinfo}) {&lt;br /&gt;
                # showInfo() calls header(), so we need to NOT.&lt;br /&gt;
                showInfo($hr);&lt;br /&gt;
&lt;br /&gt;
        } elsif ($form-&amp;gt;{userfield}) {&lt;br /&gt;
                # none of these calls header(), so we DO need to.&lt;br /&gt;
                header(getMessage('user_header'), '', {}) or return;&lt;br /&gt;
                if ($form-&amp;gt;{edituser}) {&lt;br /&gt;
                        editUser($hr);&lt;br /&gt;
&lt;br /&gt;
                } elsif ($form-&amp;gt;{edithome}) {&lt;br /&gt;
                        editHome($hr);&lt;br /&gt;
&lt;br /&gt;
                } elsif ($form-&amp;gt;{editcomm}) {&lt;br /&gt;
                        editComm($hr);&lt;br /&gt;
&lt;br /&gt;
                } elsif ($form-&amp;gt;{changepasswd}) {&lt;br /&gt;
                        changePasswd($hr);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
        } else {&lt;br /&gt;
                # showInfo() calls header(), so we need to NOT.&lt;br /&gt;
                showInfo($hr);&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub tildeEd {&lt;br /&gt;
        my($user_edit) = @_;&lt;br /&gt;
&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        my %story023_default = (&lt;br /&gt;
                author  =&amp;gt; { },&lt;br /&gt;
                nexus   =&amp;gt; { },&lt;br /&gt;
                topic   =&amp;gt; { },&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        my %prefs = ( );&lt;br /&gt;
        for my $field (qw(&lt;br /&gt;
                story_never_topic       story_never_author      story_never_nexus&lt;br /&gt;
                story_always_topic      story_always_author     story_always_nexus      story_brief_always_nexus&lt;br /&gt;
                story_full_brief_nexus  story_full_best_nexus   story_brief_best_nexus&lt;br /&gt;
        )) {&lt;br /&gt;
                for my $id (&lt;br /&gt;
                        grep /^\d+$/,&lt;br /&gt;
                        split /,/,&lt;br /&gt;
                        ($user_edit-&amp;gt;{$field} || &amp;quot;&amp;quot;)&lt;br /&gt;
                ) {&lt;br /&gt;
                        $prefs{$field}{$id} = 1;&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
#print STDERR scalar(localtime) . &amp;quot; prefs: &amp;quot; . Dumper(\%prefs);&lt;br /&gt;
&lt;br /&gt;
        # Set up $author_hr, @aid_order, and $story023_default{author}.&lt;br /&gt;
&lt;br /&gt;
        my $author_hr = $reader-&amp;gt;getDescriptions('authors');&lt;br /&gt;
        my @aid_order = sort { lc $author_hr-&amp;gt;{$a} cmp lc $author_hr-&amp;gt;{$b} } keys %$author_hr;&lt;br /&gt;
        for my $aid (@aid_order) {&lt;br /&gt;
                     if ($prefs{story_never_author}{$aid}) {&lt;br /&gt;
                        $story023_default{author}{$aid} = 0;&lt;br /&gt;
                } elsif ($prefs{story_always_author}{$aid}) {&lt;br /&gt;
                        $story023_default{author}{$aid} = 3;&lt;br /&gt;
                } else {&lt;br /&gt;
                        $story023_default{author}{$aid} = 2;&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Set up $topic_hr, @topictid_order, and $story023_default{topic}.&lt;br /&gt;
&lt;br /&gt;
        my $topic_hr = $reader-&amp;gt;getDescriptions('non_nexus_topics-storypickable');&lt;br /&gt;
        my @topictid_order = sort { lc $topic_hr-&amp;gt;{$a} cmp lc $topic_hr-&amp;gt;{$b} } keys %$topic_hr;&lt;br /&gt;
        for my $tid (@topictid_order) {&lt;br /&gt;
                     if ($prefs{story_never_topic}{$tid}) {&lt;br /&gt;
                        $story023_default{topic}{$tid} = 0;&lt;br /&gt;
                } elsif ($prefs{story_always_topic}{$tid}) {&lt;br /&gt;
                        $story023_default{topic}{$tid} = 3;&lt;br /&gt;
                } else {&lt;br /&gt;
                        $story023_default{topic}{$tid} = 2;&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Set up $nexus_hr, @nexustid_order, and $story023_default{nexus}.&lt;br /&gt;
        my $topic_tree = $reader-&amp;gt;getTopicTree();&lt;br /&gt;
        my $nexus_tids_ar = $reader-&amp;gt;getStorypickableNexusChildren($constants-&amp;gt;{mainpage_nexus_tid}, 1);&lt;br /&gt;
        my $nexus_hr = { };&lt;br /&gt;
&lt;br /&gt;
        for my $tid (@$nexus_tids_ar) {&lt;br /&gt;
                $nexus_hr-&amp;gt;{$tid} = $topic_tree-&amp;gt;{$tid}{textname};&lt;br /&gt;
        }&lt;br /&gt;
        my @nexustid_order = sort {($b == $constants-&amp;gt;{mainpage_nexus_tid}) &amp;lt;=&amp;gt; ($a == $constants-&amp;gt;{mainpage_nexus_tid}) || &lt;br /&gt;
                                    lc $nexus_hr-&amp;gt;{$a} cmp lc $nexus_hr-&amp;gt;{$b} } keys %$nexus_hr;&lt;br /&gt;
&lt;br /&gt;
        my $mp_disp_nexuses = $reader-&amp;gt;getMainpageDisplayableNexuses();&lt;br /&gt;
        my %mp_disp_nexus = ( map { ($_, 1) } @$mp_disp_nexuses );&lt;br /&gt;
        for my $tid (@nexustid_order) {&lt;br /&gt;
                     if ($prefs{story_never_nexus}{$tid}) {&lt;br /&gt;
                        $story023_default{nexus}{$tid} = 0;&lt;br /&gt;
                } elsif ($prefs{story_always_nexus}{$tid}) {&lt;br /&gt;
                        $story023_default{nexus}{$tid} = 5;&lt;br /&gt;
                } elsif ($prefs{story_full_brief_nexus}{$tid}) {&lt;br /&gt;
                        $story023_default{nexus}{$tid} = 4;&lt;br /&gt;
                } elsif ($prefs{story_brief_always_nexus}{$tid}) {&lt;br /&gt;
                        $story023_default{nexus}{$tid} = 3;&lt;br /&gt;
                } elsif ($prefs{story_full_best_nexus}{$tid}) {&lt;br /&gt;
                        $story023_default{nexus}{$tid} = 2;&lt;br /&gt;
                } elsif ($prefs{story_brief_best_nexus}{$tid}) {&lt;br /&gt;
                        $story023_default{nexus}{$tid} = 1;&lt;br /&gt;
                } else {&lt;br /&gt;
                        # If brief_sectional_mainpage is set, then all&lt;br /&gt;
                        # nexuses in getMainpageDisplayableNexuses are,&lt;br /&gt;
                        # by default, shown as brief on the mainpage.&lt;br /&gt;
                        if ($constants-&amp;gt;{brief_sectional_mainpage}&lt;br /&gt;
                                &amp;amp;&amp;amp; $mp_disp_nexus{$tid}&lt;br /&gt;
                        ) {&lt;br /&gt;
                                $story023_default{nexus}{$tid} = 4;&lt;br /&gt;
                        } else {&lt;br /&gt;
                                $story023_default{nexus}{$tid} = 2;&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Set up $section_descref and $box_order, used to decide which&lt;br /&gt;
        # slashboxes appear.  Really this doesn't seem to have anything&lt;br /&gt;
        # to do with sections, so I'm not sure why it's called&lt;br /&gt;
        # &amp;quot;section&amp;quot;_descref.&lt;br /&gt;
&lt;br /&gt;
        my $section_descref = { };&lt;br /&gt;
        my $box_order;&lt;br /&gt;
        my $sections_description = $reader-&amp;gt;getSectionBlocks();&lt;br /&gt;
&lt;br /&gt;
        # the names of all the boxes in @{$skinBoxes-&amp;gt;{$constants-&amp;gt;{mainpage_skid}}}&lt;br /&gt;
        # should be unioned into sections_description.  whether the&lt;br /&gt;
        # values are 0 or 1 is calculated correctly, but we're&lt;br /&gt;
        # missing some 0's that should appear, I think, under&lt;br /&gt;
        # some circumstances.  ah heck, the whole concept of&lt;br /&gt;
        # sectional slashboxes should be redone (why the heck&lt;br /&gt;
        # do we have skinname_more instead of just a block&lt;br /&gt;
        # called olderstories?)&lt;br /&gt;
&lt;br /&gt;
        my $slashboxes_hr = { };&lt;br /&gt;
        my $slashboxes_textlist = $user_edit-&amp;gt;{slashboxes};&lt;br /&gt;
        if (!$slashboxes_textlist) {&lt;br /&gt;
                # Use the default.&lt;br /&gt;
                my($boxes, $skinBoxes) = $reader-&amp;gt;getPortalsCommon();&lt;br /&gt;
                $slashboxes_textlist = join &amp;quot;,&amp;quot;, @{$skinBoxes-&amp;gt;{$constants-&amp;gt;{mainpage_skid}}};&lt;br /&gt;
        }&lt;br /&gt;
        for my $bid (&lt;br /&gt;
                map { /^'?([^']+)'?$/; $1 }&lt;br /&gt;
                split /,/,&lt;br /&gt;
                $slashboxes_textlist&lt;br /&gt;
        ) {&lt;br /&gt;
                $slashboxes_hr-&amp;gt;{$bid} = 1;&lt;br /&gt;
        }&lt;br /&gt;
        for my $ary (sort { lc $a-&amp;gt;[1] cmp lc $b-&amp;gt;[1]} @$sections_description) {&lt;br /&gt;
                my($bid, $title, $boldflag) = @$ary;&lt;br /&gt;
                push @$box_order, $bid;&lt;br /&gt;
                $section_descref-&amp;gt;{$bid}{checked} =&lt;br /&gt;
                        $slashboxes_hr-&amp;gt;{$bid}&lt;br /&gt;
                                ? $constants-&amp;gt;{markup_checked_attribute}&lt;br /&gt;
                                : '';&lt;br /&gt;
                $title =~ s/&amp;lt;(.*?)&amp;gt;//g;&lt;br /&gt;
                $section_descref-&amp;gt;{$bid}{title} = $title;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $dynamic_blocks = getObject(&amp;quot;Slash::DynamicBlocks&amp;quot;);&lt;br /&gt;
        my $extra_blocks = [];&lt;br /&gt;
        if ($dynamic_blocks) {&lt;br /&gt;
                my $userblocks = $dynamic_blocks-&amp;gt;getUserBlocks(&amp;quot;name&amp;quot;, $user_edit-&amp;gt;{uid}) || {};&lt;br /&gt;
                my $friendblocks = $dynamic_blocks-&amp;gt;getFriendBlocks(&amp;quot;name&amp;quot;, $user_edit-&amp;gt;{uid}) || {};&lt;br /&gt;
                push(@$extra_blocks, grep { $slashboxes_textlist =~ $_; } (keys(%$userblocks), keys(%$friendblocks)));&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Userspace.&lt;br /&gt;
        my $userspace = $user_edit-&amp;gt;{mylinks} || &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        # Titles of stuff.&lt;br /&gt;
        my $tildeEd_title = getTitle('tildeEd_title');&lt;br /&gt;
        my $criteria_msg = getMessage('tilded_criteria_msg');&lt;br /&gt;
        my $customize_title = getTitle('tildeEd_customize_title');&lt;br /&gt;
        my $tilded_customize_msg = getMessage('tilded_customize_msg',&lt;br /&gt;
                { userspace =&amp;gt; $userspace });&lt;br /&gt;
        my $tilded_box_msg = getMessage('tilded_box_msg');&lt;br /&gt;
&lt;br /&gt;
        my $tilde_ed = slashDisplay('tildeEd', {&lt;br /&gt;
                user_edit               =&amp;gt; $user_edit,&lt;br /&gt;
                title                   =&amp;gt; $tildeEd_title,&lt;br /&gt;
                criteria_msg            =&amp;gt; $criteria_msg,&lt;br /&gt;
                customize_title         =&amp;gt; $customize_title,&lt;br /&gt;
                tilded_customize_msg    =&amp;gt; $tilded_customize_msg,&lt;br /&gt;
                tilded_box_msg          =&amp;gt; $tilded_box_msg,&lt;br /&gt;
&lt;br /&gt;
                story023_default        =&amp;gt; \%story023_default,&lt;br /&gt;
                authorref               =&amp;gt; $author_hr,&lt;br /&gt;
                aid_order               =&amp;gt; \@aid_order,&lt;br /&gt;
                topicref                =&amp;gt; $topic_hr,&lt;br /&gt;
                topictid_order          =&amp;gt; \@topictid_order,&lt;br /&gt;
                nexusref                =&amp;gt; $nexus_hr,&lt;br /&gt;
                nexustid_order          =&amp;gt; \@nexustid_order,&lt;br /&gt;
&lt;br /&gt;
                section_descref         =&amp;gt; $section_descref,&lt;br /&gt;
                box_order               =&amp;gt; $box_order,&lt;br /&gt;
&lt;br /&gt;
                userspace               =&amp;gt; $userspace,&lt;br /&gt;
                extra_blocks            =&amp;gt; $extra_blocks,&lt;br /&gt;
        }, 1);&lt;br /&gt;
&lt;br /&gt;
        return $tilde_ed;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub changePasswd {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        my $user_edit = {};&lt;br /&gt;
        my $title;&lt;br /&gt;
        my $suadmin_flag = ($user-&amp;gt;{seclev} &amp;gt;= 10000) ? 1 : 0;&lt;br /&gt;
&lt;br /&gt;
        my $admin_flag = ($user-&amp;gt;{is_admin}) ? 1 : 0;&lt;br /&gt;
        my $admin_block = '';&lt;br /&gt;
&lt;br /&gt;
        my $id = '';&lt;br /&gt;
        if ($admin_flag) {&lt;br /&gt;
                if ($form-&amp;gt;{userfield}) {&lt;br /&gt;
                        $id ||= $form-&amp;gt;{userfield};&lt;br /&gt;
                        if ($id =~ /^\d+$/) {&lt;br /&gt;
                                $user_edit = $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                        } else {&lt;br /&gt;
                                $user_edit = $slashdb-&amp;gt;getUser($slashdb-&amp;gt;getUserUID($id));&lt;br /&gt;
                        }&lt;br /&gt;
                } else {&lt;br /&gt;
                        $user_edit = $id eq '' ? $user : $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                        $id = $user_edit-&amp;gt;{uid};&lt;br /&gt;
                }&lt;br /&gt;
        } else {&lt;br /&gt;
                $id = $user-&amp;gt;{uid};&lt;br /&gt;
                $user_edit = $user;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        $admin_block = getUserAdmin($id, 'uid', 1) if $admin_flag;&lt;br /&gt;
&lt;br /&gt;
        # print getMessage('note', { note =&amp;gt; $form-&amp;gt;{note}}) if $form-&amp;gt;{note};&lt;br /&gt;
&lt;br /&gt;
        $title = getTitle('changePasswd_title', { user_edit =&amp;gt; $user_edit });&lt;br /&gt;
&lt;br /&gt;
        my $session = $slashdb-&amp;gt;getDescriptions('session_login');&lt;br /&gt;
        my $session_select = createSelect('session_login', $session, $user_edit-&amp;gt;{session_login}, 1);&lt;br /&gt;
&lt;br /&gt;
        my $clocation = $slashdb-&amp;gt;getDescriptions('cookie_location');&lt;br /&gt;
        my @clocation_order = grep { exists $clocation-&amp;gt;{$_} } qw(none classbid subnetid ipid);&lt;br /&gt;
        my $clocation_select = createSelect('cookie_location', $clocation,&lt;br /&gt;
                $user_edit-&amp;gt;{cookie_location}, 1, 0, \@clocation_order&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        my $got_oldpass = 0;&lt;br /&gt;
        if ($form-&amp;gt;{oldpass}) {&lt;br /&gt;
                my $return_uid = $slashdb-&amp;gt;getUserAuthenticate($id, $form-&amp;gt;{oldpass}, 1);&lt;br /&gt;
                $got_oldpass = 1 if $return_uid &amp;amp;&amp;amp; $id == $return_uid;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('changePasswd', {&lt;br /&gt;
                useredit                =&amp;gt; $user_edit,&lt;br /&gt;
                admin_flag              =&amp;gt; $suadmin_flag,&lt;br /&gt;
                title                   =&amp;gt; $title,&lt;br /&gt;
                session                 =&amp;gt; $session_select,&lt;br /&gt;
                clocation               =&amp;gt; $clocation_select,&lt;br /&gt;
                admin_block             =&amp;gt; $admin_block,&lt;br /&gt;
                got_oldpass             =&amp;gt; $got_oldpass&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub editUser {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $id = $hr-&amp;gt;{uid} || '';&lt;br /&gt;
        my $note = $hr-&amp;gt;{note} || '';&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $plugins = $slashdb-&amp;gt;getDescriptions('plugins');&lt;br /&gt;
&lt;br /&gt;
        my $user_edit = {};&lt;br /&gt;
        my($admin_block, $title);&lt;br /&gt;
        my $admin_flag = ($user-&amp;gt;{is_admin}) ? 1 : 0;&lt;br /&gt;
        my $fieldkey;&lt;br /&gt;
&lt;br /&gt;
        if ($admin_flag &amp;amp;&amp;amp; $form-&amp;gt;{userfield}) {&lt;br /&gt;
                $id ||= $form-&amp;gt;{userfield};&lt;br /&gt;
                if ($form-&amp;gt;{userfield} =~ /^\d+$/) {&lt;br /&gt;
                        $user_edit = $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                        $fieldkey = 'uid';&lt;br /&gt;
                } else {&lt;br /&gt;
                        $user_edit = $slashdb-&amp;gt;getUser($slashdb-&amp;gt;getUserUID($id));&lt;br /&gt;
                        $fieldkey = 'nickname';&lt;br /&gt;
                }&lt;br /&gt;
        } else {&lt;br /&gt;
                $user_edit = $id eq '' ? $user : $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                $fieldkey = 'uid';&lt;br /&gt;
                $id = $user_edit-&amp;gt;{uid};&lt;br /&gt;
        }&lt;br /&gt;
        return if isAnon($user_edit-&amp;gt;{uid}) &amp;amp;&amp;amp; ! $admin_flag;&lt;br /&gt;
&lt;br /&gt;
        $admin_block = getUserAdmin($id, $fieldkey, 1) if $admin_flag;&lt;br /&gt;
        $user_edit-&amp;gt;{homepage} ||= &amp;quot;http://&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        # Remove domain tags, they'll be added back in, in saveUser.&lt;br /&gt;
        for my $dat (@{$user_edit}{qw(sig bio)}) {&lt;br /&gt;
                $dat = parseDomainTags($dat, 0, 1);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        $title = getTitle('editUser_title', { user_edit =&amp;gt; $user_edit});&lt;br /&gt;
&lt;br /&gt;
        my $editkey = &amp;quot;&amp;quot;;&lt;br /&gt;
        $editkey = editKey($user_edit-&amp;gt;{uid}) if $fieldkey eq 'uid' &amp;amp;&amp;amp; $plugins-&amp;gt;{PubKey};&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('editUser', {&lt;br /&gt;
                useredit                =&amp;gt; $user_edit,&lt;br /&gt;
                admin_flag              =&amp;gt; $admin_flag,&lt;br /&gt;
                title                   =&amp;gt; $title,&lt;br /&gt;
                editkey                 =&amp;gt; $editkey,&lt;br /&gt;
                admin_block             =&amp;gt; $admin_block,&lt;br /&gt;
                note                    =&amp;gt; $note,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub editHome {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $id = $hr-&amp;gt;{uid} || '';&lt;br /&gt;
        my $note = $hr-&amp;gt;{note} || '';&lt;br /&gt;
&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        my($formats, $title, $tzformat_select);&lt;br /&gt;
        my $user_edit = {};&lt;br /&gt;
        my $fieldkey;&lt;br /&gt;
&lt;br /&gt;
        my $admin_flag = ($user-&amp;gt;{is_admin}) ? 1 : 0;&lt;br /&gt;
        my $admin_block = '';&lt;br /&gt;
&lt;br /&gt;
        if ($admin_flag &amp;amp;&amp;amp; $form-&amp;gt;{userfield}) {&lt;br /&gt;
                $id ||= $form-&amp;gt;{userfield};&lt;br /&gt;
                if ($form-&amp;gt;{userfield} =~ /^\d+$/) {&lt;br /&gt;
                        $user_edit = $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                        $fieldkey = 'uid';&lt;br /&gt;
                } else {&lt;br /&gt;
                        $user_edit = $slashdb-&amp;gt;getUser($slashdb-&amp;gt;getUserUID($id));&lt;br /&gt;
                        $fieldkey = 'nickname';&lt;br /&gt;
                }&lt;br /&gt;
        } else {&lt;br /&gt;
                $user_edit = $id eq '' ? $user : $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                $fieldkey = 'uid';&lt;br /&gt;
        }&lt;br /&gt;
#use Data::Dumper; $Data::Dumper::Sortkeys = 1; print STDERR scalar(localtime) . &amp;quot; user_edit: &amp;quot; . Dumper($user_edit);&lt;br /&gt;
&lt;br /&gt;
        return if isAnon($user_edit-&amp;gt;{uid}) &amp;amp;&amp;amp; ! $admin_flag;&lt;br /&gt;
        $admin_block = getUserAdmin($id, $fieldkey, 1) if $admin_flag;&lt;br /&gt;
&lt;br /&gt;
        $title = getTitle('editHome_title');&lt;br /&gt;
&lt;br /&gt;
        return if $user-&amp;gt;{seclev} &amp;lt; 100 &amp;amp;&amp;amp; isAnon($user_edit-&amp;gt;{uid});&lt;br /&gt;
&lt;br /&gt;
        $formats = $slashdb-&amp;gt;getDescriptions('dateformats');&lt;br /&gt;
        $tzformat_select = createSelect('tzformat', $formats, $user_edit-&amp;gt;{dfid}, 1);&lt;br /&gt;
&lt;br /&gt;
        my $lb_check = $user_edit-&amp;gt;{lowbandwidth} ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $sd_check = $user_edit-&amp;gt;{simpledesign} ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $i_check = $user_edit-&amp;gt;{noicons}     ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $w_check = $user_edit-&amp;gt;{willing}     ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $classic_check = $user_edit-&amp;gt;{index_classic} ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
&lt;br /&gt;
        my $tilde_ed = tildeEd($user_edit);&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('editHome', {&lt;br /&gt;
                title                   =&amp;gt; $title,&lt;br /&gt;
                admin_block             =&amp;gt; $admin_block,&lt;br /&gt;
                user_edit               =&amp;gt; $user_edit,&lt;br /&gt;
                tzformat_select         =&amp;gt; $tzformat_select,&lt;br /&gt;
                i_check                 =&amp;gt; $i_check,&lt;br /&gt;
                w_check                 =&amp;gt; $w_check,&lt;br /&gt;
                lb_check                =&amp;gt; $lb_check,&lt;br /&gt;
                sd_check                =&amp;gt; $sd_check,&lt;br /&gt;
                classic_check           =&amp;gt; $classic_check,&lt;br /&gt;
                tilde_ed                =&amp;gt; $tilde_ed,&lt;br /&gt;
                note                    =&amp;gt; $note,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub editComm {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $id = $hr-&amp;gt;{uid} || '';&lt;br /&gt;
        my $note = $hr-&amp;gt;{note} || '';&lt;br /&gt;
&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user_edit = {};&lt;br /&gt;
        my($formats, $commentmodes_select, $commentsort_select, $title,&lt;br /&gt;
                $uthreshold_select, $highlightthresh_select, $posttype_select,&lt;br /&gt;
                $bytelimit_select);&lt;br /&gt;
&lt;br /&gt;
        my $admin_block = '';&lt;br /&gt;
        my $fieldkey;&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        my $admin_flag = $user-&amp;gt;{is_admin} ? 1 : 0;&lt;br /&gt;
&lt;br /&gt;
        if ($admin_flag &amp;amp;&amp;amp; $form-&amp;gt;{userfield}) {&lt;br /&gt;
                $id ||= $form-&amp;gt;{userfield};&lt;br /&gt;
                if ($form-&amp;gt;{userfield} =~ /^\d+$/) {&lt;br /&gt;
                        $user_edit = $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                        $fieldkey = 'uid';&lt;br /&gt;
                } else {&lt;br /&gt;
                        $user_edit = $slashdb-&amp;gt;getUser($slashdb-&amp;gt;getUserUID($id));&lt;br /&gt;
                        $fieldkey = 'nickname';&lt;br /&gt;
                }&lt;br /&gt;
        } else {&lt;br /&gt;
                $user_edit = $id eq '' ? $user : $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                $fieldkey = 'uid';&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $hi = $constants-&amp;gt;{comment_maxscore} - $constants-&amp;gt;{comment_minscore};&lt;br /&gt;
        my $lo = -$hi;&lt;br /&gt;
        my @range = map { $_ &amp;gt; 0 ? &amp;quot;+$_&amp;quot; : $_ } ($lo .. $hi);&lt;br /&gt;
&lt;br /&gt;
        my @reasons = ( );&lt;br /&gt;
        my %reason_select = ( );&lt;br /&gt;
        if ($constants-&amp;gt;{m1}) {&lt;br /&gt;
                my $mod_reader = getObject(&amp;quot;Slash::$constants-&amp;gt;{m1_pluginname}&amp;quot;, { db_type =&amp;gt; 'reader' });&lt;br /&gt;
                my $reasons = $mod_reader-&amp;gt;getReasons();&lt;br /&gt;
                for my $id (sort { $a &amp;lt;=&amp;gt; $b } keys %$reasons) {&lt;br /&gt;
                        push @reasons, $reasons-&amp;gt;{$id}{name};&lt;br /&gt;
                }&lt;br /&gt;
                # Reason modifiers&lt;br /&gt;
                for my $reason_name (@reasons) {&lt;br /&gt;
                        my $key = &amp;quot;reason_alter_$reason_name&amp;quot;;&lt;br /&gt;
                        $reason_select{$reason_name} = createSelect(&lt;br /&gt;
                                $key, \@range, &lt;br /&gt;
                                $user_edit-&amp;gt;{$key} || 0, 1, 1&lt;br /&gt;
                        );&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Zoo relation modifiers&lt;br /&gt;
        my %people_select;&lt;br /&gt;
        my @people =  qw(friend foe anonymous fof eof freak fan);&lt;br /&gt;
        for (@people) {&lt;br /&gt;
                my $key = &amp;quot;people_bonus_$_&amp;quot;;&lt;br /&gt;
                $people_select{$_} = createSelect($key, \@range, &lt;br /&gt;
                        $user_edit-&amp;gt;{$key} || 0, 1, 1&lt;br /&gt;
                );&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # New-user modifier&lt;br /&gt;
        my $new_user_bonus_select = createSelect('new_user_bonus', \@range, &lt;br /&gt;
                        $user_edit-&amp;gt;{new_user_bonus} || 0, 1, 1);&lt;br /&gt;
        my $new_user_percent_select = createSelect('new_user_percent',&lt;br /&gt;
                        [( 1..15, 20, 25, 30, 35, 40, 45, 50, 55,&lt;br /&gt;
                          60, 65, 70, 75, 80, 85, 90, 95 )], &lt;br /&gt;
                        $user_edit-&amp;gt;{new_user_percent} || 100, 1, 1);&lt;br /&gt;
        # Karma modifier&lt;br /&gt;
        my $karma_bonus = createSelect('karma_bonus', \@range, &lt;br /&gt;
                        $user_edit-&amp;gt;{karma_bonus} || 0, 1, 1);&lt;br /&gt;
        # Subscriber modifier&lt;br /&gt;
        my $subscriber_bonus = createSelect('subscriber_bonus', \@range, &lt;br /&gt;
                        $user_edit-&amp;gt;{subscriber_bonus} || 0, 1, 1);&lt;br /&gt;
&lt;br /&gt;
        # Length modifier&lt;br /&gt;
        my $small_length_bonus_select = createSelect('clsmall_bonus', \@range, &lt;br /&gt;
                        $user_edit-&amp;gt;{clsmall_bonus} || 0, 1, 1);&lt;br /&gt;
        my $long_length_bonus_select = createSelect('clbig_bonus', \@range, &lt;br /&gt;
                        $user_edit-&amp;gt;{clbig_bonus} || 0, 1, 1);&lt;br /&gt;
&lt;br /&gt;
        return if isAnon($user_edit-&amp;gt;{uid}) &amp;amp;&amp;amp; ! $admin_flag;&lt;br /&gt;
        $admin_block = getUserAdmin($id, $fieldkey, 1) if $admin_flag;&lt;br /&gt;
&lt;br /&gt;
        $title = getTitle('editComm_title');&lt;br /&gt;
&lt;br /&gt;
        $formats = $slashdb-&amp;gt;getDescriptions('commentmodes');&lt;br /&gt;
        $commentmodes_select=createSelect('umode', $formats, $user_edit-&amp;gt;{mode}, 1);&lt;br /&gt;
&lt;br /&gt;
        $formats = $slashdb-&amp;gt;getDescriptions('sortcodes');&lt;br /&gt;
        $commentsort_select = createSelect(&lt;br /&gt;
                'commentsort', $formats, $user_edit-&amp;gt;{commentsort}, 1&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        $formats = $slashdb-&amp;gt;getDescriptions('threshcodes');&lt;br /&gt;
        $uthreshold_select = createSelect(&lt;br /&gt;
                'uthreshold', $formats, $user_edit-&amp;gt;{threshold}, 1&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        $formats = $slashdb-&amp;gt;getDescriptions('threshcodes');&lt;br /&gt;
        $highlightthresh_select = createSelect(&lt;br /&gt;
                'highlightthresh', $formats, $user_edit-&amp;gt;{highlightthresh}, 1&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        $user_edit-&amp;gt;{bytelimit} = $constants-&amp;gt;{defaultbytelimit}&lt;br /&gt;
                if $user_edit-&amp;gt;{bytelimit} &amp;lt; 0 || $user_edit-&amp;gt;{bytelimit} &amp;gt; 7;&lt;br /&gt;
        my $bytelimit_desc = $user_edit-&amp;gt;{is_subscriber} ? 'bytelimit' : 'bytelimit_sub';&lt;br /&gt;
        $formats = $slashdb-&amp;gt;getDescriptions($bytelimit_desc);&lt;br /&gt;
        $bytelimit_select = createSelect(&lt;br /&gt;
                'bytelimit', $formats, $user_edit-&amp;gt;{bytelimit}, 1&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        my $h_check  = $user_edit-&amp;gt;{hardthresh}          ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $r_check  = $user_edit-&amp;gt;{reparent}            ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $n_check  = $user_edit-&amp;gt;{noscores}            ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $s_check  = $user_edit-&amp;gt;{nosigs}              ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $b_check  = $user_edit-&amp;gt;{nobonus}             ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $sb_check = $user_edit-&amp;gt;{nosubscriberbonus}   ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $p_check  = $user_edit-&amp;gt;{postanon}            ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $nospell_check = $user_edit-&amp;gt;{no_spell}       ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $s_mod_check = $user_edit-&amp;gt;{mod_with_comm}    ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $s_m2_check = $user_edit-&amp;gt;{m2_with_mod}       ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $s_m2c_check = $user_edit-&amp;gt;{m2_with_comm_mod} ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
&lt;br /&gt;
        $formats = $slashdb-&amp;gt;getDescriptions('postmodes');&lt;br /&gt;
        $posttype_select = createSelect(&lt;br /&gt;
                'posttype', $formats, $user_edit-&amp;gt;{posttype}, 1&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('editComm', {&lt;br /&gt;
                title                   =&amp;gt; $title,&lt;br /&gt;
                admin_block             =&amp;gt; $admin_block,&lt;br /&gt;
                user_edit               =&amp;gt; $user_edit,&lt;br /&gt;
                h_check                 =&amp;gt; $h_check,&lt;br /&gt;
                r_check                 =&amp;gt; $r_check,&lt;br /&gt;
                n_check                 =&amp;gt; $n_check,&lt;br /&gt;
                s_check                 =&amp;gt; $s_check,&lt;br /&gt;
                b_check                 =&amp;gt; $b_check,&lt;br /&gt;
                sb_check                =&amp;gt; $sb_check,&lt;br /&gt;
                p_check                 =&amp;gt; $p_check,&lt;br /&gt;
                s_mod_check             =&amp;gt; $s_mod_check,&lt;br /&gt;
                s_m2_check              =&amp;gt; $s_m2_check,&lt;br /&gt;
                s_m2c_check             =&amp;gt; $s_m2c_check,&lt;br /&gt;
                nospell_check           =&amp;gt; $nospell_check,&lt;br /&gt;
                commentmodes_select     =&amp;gt; $commentmodes_select,&lt;br /&gt;
                commentsort_select      =&amp;gt; $commentsort_select,&lt;br /&gt;
                highlightthresh_select  =&amp;gt; $highlightthresh_select,&lt;br /&gt;
                uthreshold_select       =&amp;gt; $uthreshold_select,&lt;br /&gt;
                posttype_select         =&amp;gt; $posttype_select,&lt;br /&gt;
                reasons                 =&amp;gt; \@reasons,&lt;br /&gt;
                reason_select           =&amp;gt; \%reason_select,&lt;br /&gt;
                people                  =&amp;gt; \@people,&lt;br /&gt;
                people_select           =&amp;gt; \%people_select,&lt;br /&gt;
                new_user_percent_select =&amp;gt; $new_user_percent_select,&lt;br /&gt;
                new_user_bonus_select   =&amp;gt; $new_user_bonus_select,&lt;br /&gt;
                note                    =&amp;gt; $note,&lt;br /&gt;
                karma_bonus             =&amp;gt; $karma_bonus,&lt;br /&gt;
                subscriber_bonus        =&amp;gt; $subscriber_bonus,&lt;br /&gt;
                small_length_bonus_select =&amp;gt; $small_length_bonus_select,&lt;br /&gt;
                long_length_bonus_select =&amp;gt; $long_length_bonus_select,&lt;br /&gt;
                bytelimit_select        =&amp;gt; $bytelimit_select,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub saveUserAdmin {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        my($user_edits_table, $user_edit) = ({}, {});&lt;br /&gt;
        my $author_flag;&lt;br /&gt;
        my $note = '';&lt;br /&gt;
        my $srcid;&lt;br /&gt;
        my $id;&lt;br /&gt;
        my $user_editfield_flag;&lt;br /&gt;
        my $banned = 0;&lt;br /&gt;
        my $banref;&lt;br /&gt;
        if ($form-&amp;gt;{uid}) {&lt;br /&gt;
                $user_editfield_flag = 'uid';&lt;br /&gt;
                $id = $form-&amp;gt;{uid};&lt;br /&gt;
                $user_edit = $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                $srcid = $id;&lt;br /&gt;
&lt;br /&gt;
        } elsif ($form-&amp;gt;{subnetid}) {&lt;br /&gt;
                $user_editfield_flag = 'subnetid';&lt;br /&gt;
                ($id, $user_edit-&amp;gt;{subnetid})  = ($form-&amp;gt;{subnetid}, $form-&amp;gt;{subnetid});&lt;br /&gt;
                $user_edit-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                $srcid = convert_srcid(subnetid =&amp;gt; $id);&lt;br /&gt;
&lt;br /&gt;
        } elsif ($form-&amp;gt;{ipid}) {&lt;br /&gt;
                $user_editfield_flag = 'ipid';&lt;br /&gt;
                ($id, $user_edit-&amp;gt;{ipid})  = ($form-&amp;gt;{ipid}, $form-&amp;gt;{ipid});&lt;br /&gt;
                $user_edit-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                $srcid = convert_srcid(ipid =&amp;gt; $id);&lt;br /&gt;
&lt;br /&gt;
        } elsif ($form-&amp;gt;{md5id}) {&lt;br /&gt;
                $user_editfield_flag = 'md5id';&lt;br /&gt;
                my $fieldname = $form-&amp;gt;{fieldname} || 'md5id';&lt;br /&gt;
                ($id, $user_edit-&amp;gt;{$fieldname})&lt;br /&gt;
                        = ($form-&amp;gt;{md5id}, $form-&amp;gt;{md5id});&lt;br /&gt;
                warn &amp;quot;form field md5id specified, no srcid saving possible&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        } elsif ($form-&amp;gt;{srcid}) {&lt;br /&gt;
                $user_editfield_flag = 'srcid';&lt;br /&gt;
                my $fieldname = $form-&amp;gt;{fieldname} || 'srcid';&lt;br /&gt;
                ($id, $user_edit-&amp;gt;{$fieldname})&lt;br /&gt;
                        = ($form-&amp;gt;{srcid}, $form-&amp;gt;{srcid});&lt;br /&gt;
                $srcid = $id;&lt;br /&gt;
&lt;br /&gt;
        } else {&lt;br /&gt;
                # If we were not fed valid data, don't do anything.&lt;br /&gt;
                return ;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $all_al2types = $reader-&amp;gt;getAL2Types;&lt;br /&gt;
        my $al2_change = { };&lt;br /&gt;
&lt;br /&gt;
        # First, get a hash of what aclams (AL2's and ACLs) this user&lt;br /&gt;
        # had when the previous admin page was loaded.&lt;br /&gt;
        # XXXSRCID Right now acl_old is just calculated for debugging&lt;br /&gt;
        # printing purposes, not actually used.&lt;br /&gt;
        my @al2_old = ( );&lt;br /&gt;
        @al2_old =&lt;br /&gt;
                @{ $form-&amp;gt;{al2_old_multiple}   } if $form-&amp;gt;{al2_old_multiple};&lt;br /&gt;
        my %al2_old = ( map { ($_, 1) } @al2_old );&lt;br /&gt;
        my @acl_old = ( );&lt;br /&gt;
        @acl_old =&lt;br /&gt;
                @{ $form-&amp;gt;{acl_old_multiple}   } if $form-&amp;gt;{acl_old_multiple};&lt;br /&gt;
        my %acl_old = ( map { ($_, 1) } @acl_old );&lt;br /&gt;
&lt;br /&gt;
        # Next, get the list of the new data submitted.  Separate&lt;br /&gt;
        # it out into AL2's which are legitimate.  Anything left&lt;br /&gt;
        # over is an ACL.&lt;br /&gt;
        my @al2_new_formfields = ( );&lt;br /&gt;
        @al2_new_formfields = @{ $form-&amp;gt;{aclams_new_multiple} } if $form-&amp;gt;{aclams_new_multiple};&lt;br /&gt;
        my @al2_new_submitted = map { s/^aclam_//; $_ } @al2_new_formfields;&lt;br /&gt;
        my @al2_new = grep { exists $all_al2types-&amp;gt;{$_} } @al2_new_submitted;&lt;br /&gt;
        my %al2_new = ( map { ($_, 1) } @al2_new );&lt;br /&gt;
        my @acl_new = grep { !$al2_new{$_} } @al2_new_submitted;&lt;br /&gt;
        my %acl_new = ( map { ($_, 1) } @acl_new );&lt;br /&gt;
&lt;br /&gt;
        # Find out what changed for AL2's.&lt;br /&gt;
        for my $al2 (@al2_old, @al2_new) {&lt;br /&gt;
                next if defined($al2_old{$al2}) &amp;amp;&amp;amp; defined($al2_new{$al2})&lt;br /&gt;
                        &amp;amp;&amp;amp; $al2_old{$al2} == $al2_new{$al2};&lt;br /&gt;
                $al2_change-&amp;gt;{$al2} = $al2_new{$al2} ? 1 : 0;&lt;br /&gt;
        }&lt;br /&gt;
#print STDERR &amp;quot;al2_change for '$srcid': &amp;quot; . Dumper($al2_change);&lt;br /&gt;
        # If there's a comment, throw that in.&lt;br /&gt;
        if ($form-&amp;gt;{al2_new_comment}) {&lt;br /&gt;
                $al2_change-&amp;gt;{comment} = $form-&amp;gt;{al2_new_comment};&lt;br /&gt;
        }&lt;br /&gt;
        $al2_change = undef if !keys %$al2_change;&lt;br /&gt;
&lt;br /&gt;
        # Find out what changed for ACL's.&lt;br /&gt;
        my $acl_change = { };&lt;br /&gt;
        for my $acl (@acl_old, @acl_new) {&lt;br /&gt;
                next if $acl_old{$acl} == $acl_new{$acl};&lt;br /&gt;
                $acl_change-&amp;gt;{$acl} = $acl_new{$acl} ? 1 : 0;&lt;br /&gt;
        }&lt;br /&gt;
        $acl_change = undef if !keys %$acl_change;&lt;br /&gt;
&lt;br /&gt;
        if ($user-&amp;gt;{is_admin} &amp;amp;&amp;amp; $srcid) {&lt;br /&gt;
                $slashdb-&amp;gt;setAL2($srcid, $al2_change);&lt;br /&gt;
        }&lt;br /&gt;
        if ($user-&amp;gt;{is_admin} &amp;amp;&amp;amp; ($user_editfield_flag eq 'uid' ||&lt;br /&gt;
                $user_editfield_flag eq 'nickname')) {&lt;br /&gt;
&lt;br /&gt;
                # This admin user cannot assign a seclev higher than he/she&lt;br /&gt;
                # already has.&lt;br /&gt;
                my $seclev = $form-&amp;gt;{seclev};&lt;br /&gt;
                $seclev = $user-&amp;gt;{seclev} if $seclev &amp;gt; $user-&amp;gt;{seclev};&lt;br /&gt;
                $user_edits_table-&amp;gt;{seclev} = $seclev;&lt;br /&gt;
&lt;br /&gt;
                $user_edits_table-&amp;gt;{section} = $form-&amp;gt;{section};&lt;br /&gt;
                $user_edits_table-&amp;gt;{author} = $form-&amp;gt;{author} ? 1 : 0 ;&lt;br /&gt;
                $user_edits_table-&amp;gt;{defaultpoints} = $form-&amp;gt;{defaultpoints};&lt;br /&gt;
                $user_edits_table-&amp;gt;{tokens} = $form-&amp;gt;{tokens};&lt;br /&gt;
                $user_edits_table-&amp;gt;{tag_clout} = $form-&amp;gt;{tag_clout};&lt;br /&gt;
                $user_edits_table-&amp;gt;{m2info} = $form-&amp;gt;{m2info};&lt;br /&gt;
                $user_edits_table-&amp;gt;{acl} = $acl_change if $acl_change;&lt;br /&gt;
                $user_edits_table-&amp;gt;{shill_static_marquee} = $form-&amp;gt;{shill_static_marquee} ? 1 : undef;&lt;br /&gt;
                $user_edits_table-&amp;gt;{u2_friends_bios} = $form-&amp;gt;{u2_friends_bios} ? 1 : undef;&lt;br /&gt;
                $user_edits_table-&amp;gt;{shill_rss_url} = $form-&amp;gt;{shill_rss_url} ? $form-&amp;gt;{shill_rss_url} : undef;&lt;br /&gt;
&lt;br /&gt;
                my $author = $slashdb-&amp;gt;getAuthor($id);&lt;br /&gt;
                my $was_author = ($author &amp;amp;&amp;amp; $author-&amp;gt;{author}) ? 1 : 0;&lt;br /&gt;
&lt;br /&gt;
                $slashdb-&amp;gt;setUser($id, $user_edits_table);&lt;br /&gt;
&lt;br /&gt;
                $note .= getMessage('saveuseradmin_saveduser', { field =&amp;gt; $user_editfield_flag, id =&amp;gt; $id });&lt;br /&gt;
&lt;br /&gt;
                if ($was_author xor $user_edits_table-&amp;gt;{author}) {&lt;br /&gt;
                        # A frequently-asked question for new Slash admins is&lt;br /&gt;
                        # why their authors aren't showing up immediately.&lt;br /&gt;
                        # Give them some help here with an informative message.&lt;br /&gt;
                        $note .= getMessage('saveuseradmin_authorchg', {&lt;br /&gt;
                                basedir =&amp;gt;      $slashdb-&amp;gt;getDescriptions(&amp;quot;site_info&amp;quot;)&lt;br /&gt;
                                        -&amp;gt;{base_install_directory},&lt;br /&gt;
                                virtuser =&amp;gt;     $slashdb-&amp;gt;{virtual_user},&lt;br /&gt;
                        });&lt;br /&gt;
&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if (!$user_edit-&amp;gt;{nonuid}) {&lt;br /&gt;
                if ($form-&amp;gt;{expired} &amp;amp;&amp;amp; $form-&amp;gt;{expired} eq 'on') {&lt;br /&gt;
#                       $slashdb-&amp;gt;setExpired($user_edit-&amp;gt;{uid});&lt;br /&gt;
&lt;br /&gt;
                } else {&lt;br /&gt;
#                       $slashdb-&amp;gt;setUnexpired($user_edit-&amp;gt;{uid});&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $data = { uid =&amp;gt; $id };&lt;br /&gt;
        $data-&amp;gt;{note} = $note if defined $note;&lt;br /&gt;
        showInfo($data);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub savePasswd {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $note = $hr-&amp;gt;{noteref} || undef;&lt;br /&gt;
&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        my $error_flag = 0;&lt;br /&gt;
        my $user_edit = {};&lt;br /&gt;
        my $uid;&lt;br /&gt;
&lt;br /&gt;
        my $user_edits_table = {};&lt;br /&gt;
&lt;br /&gt;
        if ($user-&amp;gt;{is_admin}) {&lt;br /&gt;
                $uid = $form-&amp;gt;{uid} || $user-&amp;gt;{uid};&lt;br /&gt;
        } else {&lt;br /&gt;
                $uid = ($user-&amp;gt;{uid} == $form-&amp;gt;{uid}) ? $form-&amp;gt;{uid} : $user-&amp;gt;{uid};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        $user_edit = $slashdb-&amp;gt;getUser($uid);&lt;br /&gt;
&lt;br /&gt;
        if (!$user_edit-&amp;gt;{nickname}) {&lt;br /&gt;
                $$note .= getError('cookie_err', { titlebar =&amp;gt; 0 }, 0, 1)&lt;br /&gt;
                        if $note;&lt;br /&gt;
                $error_flag++;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($form-&amp;gt;{pass1} ne $form-&amp;gt;{pass2}) {&lt;br /&gt;
                $$note .= getError('saveuser_passnomatch_err', { titlebar =&amp;gt; 0 }, 0, 1)&lt;br /&gt;
                        if $note;&lt;br /&gt;
                $error_flag++;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if (!$form-&amp;gt;{pass1} || length $form-&amp;gt;{pass1} &amp;lt; 6) {&lt;br /&gt;
                $$note .= getError('saveuser_passtooshort_err', { titlebar =&amp;gt; 0 }, 0, 1)&lt;br /&gt;
                        if $note;&lt;br /&gt;
                $error_flag++;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if (!$user-&amp;gt;{is_admin}){&lt;br /&gt;
                # not an admin -- check old password before changing passwd&lt;br /&gt;
                my $return_uid = $slashdb-&amp;gt;getUserAuthenticate($uid, $form-&amp;gt;{oldpass}, 1);&lt;br /&gt;
                if (!$return_uid || $return_uid != $uid) {&lt;br /&gt;
                        $$note .= getError('saveuser_badoldpass_err', { titlebar =&amp;gt; 0 }, 0, 1) &lt;br /&gt;
                                if $note;&lt;br /&gt;
                        $error_flag++;&lt;br /&gt;
&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if (! $error_flag) {&lt;br /&gt;
                $user_edits_table-&amp;gt;{passwd} = $form-&amp;gt;{pass1} if $form-&amp;gt;{pass1};&lt;br /&gt;
                $user_edits_table-&amp;gt;{session_login} = $form-&amp;gt;{session_login};&lt;br /&gt;
                $user_edits_table-&amp;gt;{cookie_location} = $form-&amp;gt;{cookie_location};&lt;br /&gt;
&lt;br /&gt;
                # changed pass, so delete all logtokens&lt;br /&gt;
                $slashdb-&amp;gt;deleteLogToken($form-&amp;gt;{uid}, 1);&lt;br /&gt;
&lt;br /&gt;
                if ($user-&amp;gt;{admin_clearpass}&lt;br /&gt;
                        &amp;amp;&amp;amp; !$user-&amp;gt;{state}{admin_clearpass_thisclick}) {&lt;br /&gt;
                        # User is an admin who sent their password in the clear&lt;br /&gt;
                        # some time ago; now that it's been changed, we'll forget&lt;br /&gt;
                        # about that incident, unless this click was sent in the&lt;br /&gt;
                        # clear as well.&lt;br /&gt;
                        $user_edits_table-&amp;gt;{admin_clearpass} = '';&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                getOtherUserParams($user_edits_table);&lt;br /&gt;
                $slashdb-&amp;gt;setUser($uid, $user_edits_table) ;&lt;br /&gt;
                $$note .= getMessage('saveuser_passchanged_msg',&lt;br /&gt;
                        { nick =&amp;gt; $user_edit-&amp;gt;{nickname}, uid =&amp;gt; $user_edit-&amp;gt;{uid} },&lt;br /&gt;
                0, 1) if $note;&lt;br /&gt;
&lt;br /&gt;
                # only set cookie if user is current user&lt;br /&gt;
                if ($form-&amp;gt;{uid} eq $user-&amp;gt;{uid}) {&lt;br /&gt;
                        $user-&amp;gt;{logtoken} = bakeUserCookie($uid, $slashdb-&amp;gt;getLogToken($form-&amp;gt;{uid}, 1));&lt;br /&gt;
                        setCookie('user', $user-&amp;gt;{logtoken}, $user_edits_table-&amp;gt;{session_login});&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        return $error_flag;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub saveUser {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $gSkin = getCurrentSkin();&lt;br /&gt;
        my $plugins = $slashdb-&amp;gt;getDescriptions('plugins');&lt;br /&gt;
        my $uid;&lt;br /&gt;
        my $user_editfield_flag;&lt;br /&gt;
&lt;br /&gt;
        $uid = $user-&amp;gt;{is_admin} &amp;amp;&amp;amp; $form-&amp;gt;{uid} ? $form-&amp;gt;{uid} : $user-&amp;gt;{uid};&lt;br /&gt;
        my $user_edit = $slashdb-&amp;gt;getUser($uid);&lt;br /&gt;
&lt;br /&gt;
        my($note, $formname);&lt;br /&gt;
&lt;br /&gt;
        $note .= getMessage('savenickname_msg', {&lt;br /&gt;
                nickname =&amp;gt; $user_edit-&amp;gt;{nickname},&lt;br /&gt;
        }, 1);&lt;br /&gt;
&lt;br /&gt;
        if (!$user_edit-&amp;gt;{nickname}) {&lt;br /&gt;
                $note .= getError('cookie_err', 0, 1);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Check to ensure that if a user is changing his email address, that&lt;br /&gt;
        # it doesn't already exist in the userbase.&lt;br /&gt;
        if ($user_edit-&amp;gt;{realemail} ne $form-&amp;gt;{realemail}) {&lt;br /&gt;
                if ($slashdb-&amp;gt;existsEmail($form-&amp;gt;{realemail})) {&lt;br /&gt;
                        $note .= getError('emailexists_err', 0, 1);&lt;br /&gt;
                        $form-&amp;gt;{realemail} = $user_edit-&amp;gt;{realemail}; # can't change!&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my(%extr, $err_message, %limit);&lt;br /&gt;
        $limit{sig} = 120;  # schema is 200, give an extra buffer for domain tags&lt;br /&gt;
        $limit{bio} = $constants-&amp;gt;{users_bio_length} || 1024; # can be up to 2^16&lt;br /&gt;
&lt;br /&gt;
        for my $key (keys %limit) {&lt;br /&gt;
                my $dat = chopEntity($form-&amp;gt;{$key}, $limit{$key});&lt;br /&gt;
                $dat = strip_html($dat);&lt;br /&gt;
                $dat = balanceTags($dat, { deep_nesting =&amp;gt; 2, length =&amp;gt; $limit{$key} });&lt;br /&gt;
                $dat = addDomainTags($dat) if $dat;&lt;br /&gt;
&lt;br /&gt;
                # If the sig becomes too long to fit (domain tagging causes&lt;br /&gt;
                # string expansion and tag balancing can too), warn the user to&lt;br /&gt;
                # use shorter domain names and don't save their change.&lt;br /&gt;
                if ($key eq 'sig' &amp;amp;&amp;amp; defined($dat) &amp;amp;&amp;amp; length($dat) &amp;gt; 200) {&lt;br /&gt;
                        print getError('sig_too_long_err');&lt;br /&gt;
                        $extr{sig} = undef;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                # really, comment filters should ignore short length IMO ... oh well.&lt;br /&gt;
                if (length($dat) &amp;gt; 1 &amp;amp;&amp;amp; ! filterOk('comments', 'postersubj', $dat, \$err_message)) {&lt;br /&gt;
                        print getError('filter message', {&lt;br /&gt;
                                err_message     =&amp;gt; $err_message,&lt;br /&gt;
                                item            =&amp;gt; $key,&lt;br /&gt;
                        });&lt;br /&gt;
                        $extr{$key} = undef;&lt;br /&gt;
                } elsif (! compressOk('comments', 'postersubj', $dat)) {&lt;br /&gt;
                        print getError('compress filter', {&lt;br /&gt;
                                ratio           =&amp;gt; 'postersubj',&lt;br /&gt;
                                item            =&amp;gt; $key,&lt;br /&gt;
                        });&lt;br /&gt;
                        $extr{$key} = undef;&lt;br /&gt;
                } else {&lt;br /&gt;
                        $extr{$key} = $dat;&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # We should do some conformance checking on a user's pubkey,&lt;br /&gt;
        # make sure it looks like one of the known types of public&lt;br /&gt;
        # key.  Until then, just make sure it doesn't have HTML.&lt;br /&gt;
        $form-&amp;gt;{pubkey} = $plugins-&amp;gt;{'PubKey'} ? strip_nohtml($form-&amp;gt;{pubkey}, 1) : '';&lt;br /&gt;
&lt;br /&gt;
        my $homepage = $form-&amp;gt;{homepage};&lt;br /&gt;
        $homepage = '' if $homepage eq 'http://';&lt;br /&gt;
        $homepage = fudgeurl($homepage);&lt;br /&gt;
        $homepage = URI-&amp;gt;new_abs($homepage, $gSkin-&amp;gt;{absolutedir})&lt;br /&gt;
                        -&amp;gt;canonical&lt;br /&gt;
                        -&amp;gt;as_string if $homepage ne '';&lt;br /&gt;
        $homepage = substr($homepage, 0, 100) if $homepage ne '';&lt;br /&gt;
&lt;br /&gt;
        my $calendar_url = $form-&amp;gt;{calendar_url};&lt;br /&gt;
        if (length $calendar_url) {&lt;br /&gt;
                # fudgeurl() doesn't like webcal; will remove later anyway&lt;br /&gt;
                $calendar_url =~ s/^webcal/http/i;&lt;br /&gt;
                $calendar_url = fudgeurl($calendar_url);&lt;br /&gt;
                $calendar_url = URI-&amp;gt;new_abs($calendar_url, $gSkin-&amp;gt;{absolutedir})&lt;br /&gt;
                        -&amp;gt;canonical&lt;br /&gt;
                        -&amp;gt;as_string if $calendar_url ne '';&lt;br /&gt;
&lt;br /&gt;
                $calendar_url =~ s|^http://||i;&lt;br /&gt;
                $calendar_url = substr($calendar_url, 0, 200) if $calendar_url ne '';&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # for the users table&lt;br /&gt;
        my $user_edits_table = {&lt;br /&gt;
                homepage        =&amp;gt; $homepage,&lt;br /&gt;
                realname        =&amp;gt; $form-&amp;gt;{realname},&lt;br /&gt;
                pubkey          =&amp;gt; $form-&amp;gt;{pubkey},&lt;br /&gt;
                copy            =&amp;gt; $form-&amp;gt;{copy},&lt;br /&gt;
                quote           =&amp;gt; $form-&amp;gt;{quote},&lt;br /&gt;
                calendar_url    =&amp;gt; $calendar_url,&lt;br /&gt;
                yahoo           =&amp;gt; $form-&amp;gt;{yahoo},&lt;br /&gt;
                jabber          =&amp;gt; $form-&amp;gt;{jabber},&lt;br /&gt;
                aim             =&amp;gt; $form-&amp;gt;{aim},&lt;br /&gt;
                aimdisplay      =&amp;gt; $form-&amp;gt;{aimdisplay},&lt;br /&gt;
                icq             =&amp;gt; $form-&amp;gt;{icq},&lt;br /&gt;
                playing         =&amp;gt; $form-&amp;gt;{playing},&lt;br /&gt;
                mobile_text_address =&amp;gt; $form-&amp;gt;{mobile_text_address},&lt;br /&gt;
        };&lt;br /&gt;
&lt;br /&gt;
        if ($constants-&amp;gt;{wow}) {&lt;br /&gt;
                my $wowdb = getObject(&amp;quot;Slash::WoW&amp;quot;);&lt;br /&gt;
                if ($wowdb) {&lt;br /&gt;
                        $user_edits_table-&amp;gt;{wow_main_name} = &amp;quot;\L\u$form-&amp;gt;{wow_main_name}&amp;quot;;&lt;br /&gt;
                        $user_edits_table-&amp;gt;{wow_main_realm} = $form-&amp;gt;{wow_main_realm};&lt;br /&gt;
                        my $charid = $wowdb-&amp;gt;getCharidCreate($user_edits_table-&amp;gt;{wow_main_realm},&lt;br /&gt;
                                $user_edits_table-&amp;gt;{wow_main_name});&lt;br /&gt;
                        $wowdb-&amp;gt;setChar($charid, { uid =&amp;gt; $uid }, { if_unclaimed =&amp;gt; 1 }) if $charid;&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        for (keys %extr) {&lt;br /&gt;
                $user_edits_table-&amp;gt;{$_} = $extr{$_} if defined $extr{$_};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # don't want undef, want to be empty string so they&lt;br /&gt;
        # will overwrite the existing record&lt;br /&gt;
        for (keys %$user_edits_table) {&lt;br /&gt;
                $user_edits_table-&amp;gt;{$_} = '' unless defined $user_edits_table-&amp;gt;{$_};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($user_edit-&amp;gt;{realemail} ne $form-&amp;gt;{realemail}) {&lt;br /&gt;
                $user_edits_table-&amp;gt;{realemail} =&lt;br /&gt;
                        chopEntity($form-&amp;gt;{realemail}, 50);&lt;br /&gt;
                my $new_fakeemail = ''; # at emaildisplay 0, don't show any email address&lt;br /&gt;
                if ($user-&amp;gt;{emaildisplay}) {&lt;br /&gt;
                        $new_fakeemail = getArmoredEmail($uid, $user_edits_table-&amp;gt;{realemail})&lt;br /&gt;
                                if $user-&amp;gt;{emaildisplay} == 1;&lt;br /&gt;
                        $new_fakeemail = $user_edits_table-&amp;gt;{realemail}&lt;br /&gt;
                                if $user-&amp;gt;{emaildisplay} == 2;&lt;br /&gt;
                }&lt;br /&gt;
                $user_edits_table-&amp;gt;{fakeemail} = $new_fakeemail;&lt;br /&gt;
&lt;br /&gt;
                $note .= getMessage('changeemail_msg', {&lt;br /&gt;
                        realemail =&amp;gt; $user_edit-&amp;gt;{realemail}&lt;br /&gt;
                }, 1);&lt;br /&gt;
&lt;br /&gt;
                my $saveuser_emailtitle = getTitle('saveUser_email_title', {&lt;br /&gt;
                        nickname  =&amp;gt; $user_edit-&amp;gt;{nickname},&lt;br /&gt;
                        realemail =&amp;gt; $form-&amp;gt;{realemail}&lt;br /&gt;
                }, 1);&lt;br /&gt;
                my $saveuser_email_msg = getMessage('saveuser_email_msg', {&lt;br /&gt;
                        nickname  =&amp;gt; $user_edit-&amp;gt;{nickname},&lt;br /&gt;
                        realemail =&amp;gt; $form-&amp;gt;{realemail}&lt;br /&gt;
                }, 1);&lt;br /&gt;
&lt;br /&gt;
                sendEmail($form-&amp;gt;{realemail}, $saveuser_emailtitle, $saveuser_email_msg);&lt;br /&gt;
                doEmail($uid, $saveuser_emailtitle, $saveuser_email_msg);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        getOtherUserParams($user_edits_table);&lt;br /&gt;
        $slashdb-&amp;gt;setUser($uid, $user_edits_table);&lt;br /&gt;
&lt;br /&gt;
        editUser({ uid =&amp;gt; $uid, note =&amp;gt; $note });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub saveComm {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my($uid, $user_fakeemail);&lt;br /&gt;
&lt;br /&gt;
        if ($user-&amp;gt;{is_admin}) {&lt;br /&gt;
                $uid = $form-&amp;gt;{uid} || $user-&amp;gt;{uid};&lt;br /&gt;
        } else {&lt;br /&gt;
                $uid = ($user-&amp;gt;{uid} == $form-&amp;gt;{uid}) ?&lt;br /&gt;
                        $form-&amp;gt;{uid} : $user-&amp;gt;{uid};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Do the right thing with respect to the chosen email display mode&lt;br /&gt;
        # and the options that can be displayed.&lt;br /&gt;
        my $user_edit = $slashdb-&amp;gt;getUser($uid);&lt;br /&gt;
        my $new_fakeemail = '';         # at emaildisplay 0, don't show any email address&lt;br /&gt;
        if ($form-&amp;gt;{emaildisplay}) {&lt;br /&gt;
                $new_fakeemail = getArmoredEmail($uid)          if $form-&amp;gt;{emaildisplay} == 1;&lt;br /&gt;
                $new_fakeemail = $user_edit-&amp;gt;{realemail}        if $form-&amp;gt;{emaildisplay} == 2;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $name = $user-&amp;gt;{seclev} &amp;amp;&amp;amp; $form-&amp;gt;{name} ?&lt;br /&gt;
                $form-&amp;gt;{name} : $user-&amp;gt;{nickname};&lt;br /&gt;
&lt;br /&gt;
        my $note = getMessage('savenickname_msg',&lt;br /&gt;
                { nickname =&amp;gt; $name });&lt;br /&gt;
&lt;br /&gt;
        print getError('cookie_err') if isAnon($uid) || !$name;&lt;br /&gt;
&lt;br /&gt;
        # Take care of the lists&lt;br /&gt;
        # Enforce Ranges for variables that need it&lt;br /&gt;
        $form-&amp;gt;{commentlimit} = 0 if $form-&amp;gt;{commentlimit} &amp;lt; 1;&lt;br /&gt;
        my $cl_max = $constants-&amp;gt;{comment_commentlimit} || 0;&lt;br /&gt;
        $form-&amp;gt;{commentlimit} = $cl_max if $cl_max &amp;gt; 0 &amp;amp;&amp;amp; $form-&amp;gt;{commentlimit} &amp;gt; $cl_max;&lt;br /&gt;
        $form-&amp;gt;{commentspill} = 0 if $form-&amp;gt;{commentspill} &amp;lt; 1;&lt;br /&gt;
&lt;br /&gt;
        # For some of these values, namely the ones that we happen to&lt;br /&gt;
        # know get stored in users_param, we change them to 'undef'&lt;br /&gt;
        # if they are the default value.  This deletes them from the&lt;br /&gt;
        # users_param table, which has the same effect as storing the&lt;br /&gt;
        # default except it's faster all around.  If we ever change&lt;br /&gt;
        # the schema to promote these fields from params into a&lt;br /&gt;
        # proper users_* table, then this will no longer be correct.&lt;br /&gt;
        # See prepareUser().&lt;br /&gt;
        my $max = $constants-&amp;gt;{comment_maxscore} - $constants-&amp;gt;{comment_minscore};&lt;br /&gt;
        my $min = -$max;&lt;br /&gt;
        my $karma_bonus = ($form-&amp;gt;{karma_bonus} !~ /^[\-+]?\d+$/) ? &amp;quot;+1&amp;quot; : $form-&amp;gt;{karma_bonus};&lt;br /&gt;
        my $subscriber_bonus = ($form-&amp;gt;{subscriber_bonus} !~ /^[\-+]?\d+$/) ? &amp;quot;+1&amp;quot; : $form-&amp;gt;{subscriber_bonus};&lt;br /&gt;
        my $new_user_bonus = ($form-&amp;gt;{new_user_bonus} !~ /^[\-+]?\d+$/) ? 0 : $form-&amp;gt;{new_user_bonus};&lt;br /&gt;
        my $new_user_percent = (($form-&amp;gt;{new_user_percent} &amp;lt;= 100 &amp;amp;&amp;amp; $form-&amp;gt;{new_user_percent} &amp;gt;= 0) &lt;br /&gt;
                        ? $form-&amp;gt;{new_user_percent}&lt;br /&gt;
                        : 100); &lt;br /&gt;
        my $clsmall_bonus = ($form-&amp;gt;{clsmall_bonus} !~ /^[\-+]?\d+$/) ? 0 : $form-&amp;gt;{clsmall_bonus};&lt;br /&gt;
        my $clbig_bonus = ($form-&amp;gt;{clbig_bonus} !~ /^[\-+]?\d+$/) ? 0 : $form-&amp;gt;{clbig_bonus};&lt;br /&gt;
&lt;br /&gt;
        # plum&lt;br /&gt;
        $form-&amp;gt;{d2_comment_q} = (isSubscriber($user_edit) || $user_edit-&amp;gt;{seclev} &amp;gt;= 100)&lt;br /&gt;
                ? $form-&amp;gt;{d2_comment_q}&lt;br /&gt;
                : ($form-&amp;gt;{d2_comment_q} eq '0')&lt;br /&gt;
                        ? 1&lt;br /&gt;
                        : $form-&amp;gt;{d2_comment_q};&lt;br /&gt;
&lt;br /&gt;
        my $user_edits_table = {&lt;br /&gt;
                # MC: More D2 neutring&lt;br /&gt;
                #discussion2            =&amp;gt; $form-&amp;gt;{discussion2} || undef,&lt;br /&gt;
                #d2_comment_q           =&amp;gt; $form-&amp;gt;{d2_comment_q} || undef,&lt;br /&gt;
                #d2_comment_order       =&amp;gt; $form-&amp;gt;{d2_comment_order} || undef,&lt;br /&gt;
                clsmall                 =&amp;gt; $form-&amp;gt;{clsmall},&lt;br /&gt;
                clsmall_bonus           =&amp;gt; ($clsmall_bonus || undef),&lt;br /&gt;
                clbig                   =&amp;gt; $form-&amp;gt;{clbig},&lt;br /&gt;
                clbig_bonus             =&amp;gt; ($clbig_bonus || undef),&lt;br /&gt;
                commentlimit            =&amp;gt; $form-&amp;gt;{commentlimit},&lt;br /&gt;
                bytelimit               =&amp;gt; $form-&amp;gt;{bytelimit},&lt;br /&gt;
                commentsort             =&amp;gt; $form-&amp;gt;{commentsort},&lt;br /&gt;
                commentspill            =&amp;gt; $form-&amp;gt;{commentspill},&lt;br /&gt;
                domaintags              =&amp;gt; ($form-&amp;gt;{domaintags} != 2 ? $form-&amp;gt;{domaintags} : undef),&lt;br /&gt;
                emaildisplay            =&amp;gt; $form-&amp;gt;{emaildisplay} || undef,&lt;br /&gt;
                fakeemail               =&amp;gt; $new_fakeemail,&lt;br /&gt;
                highlightthresh         =&amp;gt; $form-&amp;gt;{highlightthresh},&lt;br /&gt;
                mode                    =&amp;gt; $form-&amp;gt;{umode},&lt;br /&gt;
                posttype                =&amp;gt; $form-&amp;gt;{posttype},&lt;br /&gt;
                threshold               =&amp;gt; $form-&amp;gt;{uthreshold},&lt;br /&gt;
                nosigs                  =&amp;gt; ($form-&amp;gt;{nosigs}     ? 1 : 0),&lt;br /&gt;
                reparent                =&amp;gt; ($form-&amp;gt;{reparent}   ? 1 : 0),&lt;br /&gt;
                noscores                =&amp;gt; ($form-&amp;gt;{noscores}   ? 1 : 0),&lt;br /&gt;
                hardthresh              =&amp;gt; ($form-&amp;gt;{hardthresh} ? 1 : 0),&lt;br /&gt;
                no_spell                =&amp;gt; ($form-&amp;gt;{no_spell}   ? 1 : undef),&lt;br /&gt;
                nobonus                 =&amp;gt; ($form-&amp;gt;{nobonus} ? 1 : undef),&lt;br /&gt;
                nosubscriberbonus       =&amp;gt; ($form-&amp;gt;{nosubscriberbonus} ? 1 : undef),&lt;br /&gt;
                postanon                =&amp;gt; ($form-&amp;gt;{postanon} ? 1 : undef),&lt;br /&gt;
                new_user_percent        =&amp;gt; ($new_user_percent &amp;amp;&amp;amp; $new_user_percent != 100&lt;br /&gt;
                                                ? $new_user_percent : undef),&lt;br /&gt;
                new_user_bonus          =&amp;gt; ($new_user_bonus || undef),&lt;br /&gt;
                karma_bonus             =&amp;gt; ($karma_bonus ne '+1' ? $karma_bonus : undef),&lt;br /&gt;
                subscriber_bonus        =&amp;gt; ($subscriber_bonus || undef),&lt;br /&gt;
                textarea_rows           =&amp;gt; ($form-&amp;gt;{textarea_rows} != $constants-&amp;gt;{textarea_rows}&lt;br /&gt;
                                                ? $form-&amp;gt;{textarea_rows} : undef),&lt;br /&gt;
                textarea_cols           =&amp;gt; ($form-&amp;gt;{textarea_cols} != $constants-&amp;gt;{textarea_cols}&lt;br /&gt;
                                                ? $form-&amp;gt;{textarea_cols} : undef),&lt;br /&gt;
                user_comment_sort_type  =&amp;gt; ($form-&amp;gt;{user_comment_sort_type} != 2&lt;br /&gt;
                                                ? $form-&amp;gt;{user_comment_sort_type} : undef ),&lt;br /&gt;
                mod_with_comm           =&amp;gt; ($form-&amp;gt;{mod_with_comm} ? 1 : undef),&lt;br /&gt;
                m2_with_mod             =&amp;gt; ($form-&amp;gt;{m2_with_mod} ? 1 : undef),&lt;br /&gt;
                m2_with_comm_mod                =&amp;gt; ($form-&amp;gt;{m2_with_mod_on_comm} ? 1 : undef),&lt;br /&gt;
&lt;br /&gt;
        };&lt;br /&gt;
&lt;br /&gt;
        # set our default values for the items where an empty-string won't do &lt;br /&gt;
        my $defaults = {&lt;br /&gt;
                posttype        =&amp;gt; 2,&lt;br /&gt;
                highlightthresh =&amp;gt; 4,&lt;br /&gt;
                reparent        =&amp;gt; 1,&lt;br /&gt;
                commentlimit    =&amp;gt; 100,&lt;br /&gt;
                commentspill    =&amp;gt; 50,&lt;br /&gt;
                mode            =&amp;gt; 'thread'&lt;br /&gt;
        };&lt;br /&gt;
&lt;br /&gt;
        my $mod_reader = getObject(&amp;quot;Slash::$constants-&amp;gt;{m1_pluginname}&amp;quot;, { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my @reasons = ( );&lt;br /&gt;
        my $reasons = $mod_reader-&amp;gt;getReasons();&lt;br /&gt;
        for my $id (sort { $a &amp;lt;=&amp;gt; $b } keys %$reasons) {&lt;br /&gt;
                push @reasons, $reasons-&amp;gt;{$id}{name};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        for my $reason_name (@reasons) {&lt;br /&gt;
                my $key = &amp;quot;reason_alter_$reason_name&amp;quot;;&lt;br /&gt;
                my $answer = $form-&amp;gt;{$key} || 0;&lt;br /&gt;
                $answer = 0 if !$answer || $answer !~ /^[\-+]?\d+$/;&lt;br /&gt;
                $user_edits_table-&amp;gt;{$key} = ($answer == 0) ? '' : $answer;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        for (qw| friend foe anonymous fof eof freak fan |) {&lt;br /&gt;
                my $answer = $form-&amp;gt;{&amp;quot;people_bonus_$_&amp;quot;};&lt;br /&gt;
                $answer = 0 if $answer !~ /^[\-+]?\d+$/;&lt;br /&gt;
                $user_edits_table-&amp;gt;{&amp;quot;people_bonus_$_&amp;quot;} = ($answer == 0) ? '' : $answer;&lt;br /&gt;
        }&lt;br /&gt;
        getOtherUserParams($user_edits_table);&lt;br /&gt;
        setToDefaults($user_edits_table, {}, $defaults) if $form-&amp;gt;{restore_defaults};&lt;br /&gt;
        $slashdb-&amp;gt;setUser($uid, $user_edits_table);&lt;br /&gt;
&lt;br /&gt;
        editComm({ uid =&amp;gt; $uid, note =&amp;gt; $note });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub saveHome {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my($uid, $error);&lt;br /&gt;
&lt;br /&gt;
        if ($user-&amp;gt;{is_admin}) {&lt;br /&gt;
                $uid = $form-&amp;gt;{uid} || $user-&amp;gt;{uid} ;&lt;br /&gt;
        } else {&lt;br /&gt;
                $uid = ($user-&amp;gt;{uid} == $form-&amp;gt;{uid}) ?&lt;br /&gt;
                        $form-&amp;gt;{uid} : $user-&amp;gt;{uid};&lt;br /&gt;
        }&lt;br /&gt;
        my $edit_user = $slashdb-&amp;gt;getUser($uid);&lt;br /&gt;
&lt;br /&gt;
        my $name = $user-&amp;gt;{seclev} &amp;amp;&amp;amp; $form-&amp;gt;{name} ?&lt;br /&gt;
                $form-&amp;gt;{name} : $user-&amp;gt;{nickname};&lt;br /&gt;
        $name = substr($name, 0, 20);&lt;br /&gt;
&lt;br /&gt;
        my $note = getMessage('savenickname_msg',&lt;br /&gt;
                { nickname =&amp;gt; $name });&lt;br /&gt;
&lt;br /&gt;
        if (isAnon($uid) || !$name) {&lt;br /&gt;
                my $cookiemsg = getError('cookie_err');&lt;br /&gt;
                print $cookiemsg;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Using the existing list of slashboxes and the set of&lt;br /&gt;
        # what's checked and not, build up the new list.&lt;br /&gt;
        # (New arrivals go at the end.)&lt;br /&gt;
        my $slashboxes = $edit_user-&amp;gt;{slashboxes};&lt;br /&gt;
        # Only go through all this if the user clicked save,&lt;br /&gt;
        # not &amp;quot;Restore Slashbox Defaults&amp;quot;!&lt;br /&gt;
        my($boxes, $skinBoxes) = $slashdb-&amp;gt;getPortalsCommon();&lt;br /&gt;
        my $default_slashboxes_textlist = join &amp;quot;,&amp;quot;,&lt;br /&gt;
                @{$skinBoxes-&amp;gt;{$constants-&amp;gt;{mainpage_skid}}};&lt;br /&gt;
        if (!$form-&amp;gt;{restore_slashbox_defaults}) {&lt;br /&gt;
                $slashboxes = $default_slashboxes_textlist if !$slashboxes;&lt;br /&gt;
                my @slashboxes = split /,/, $slashboxes;&lt;br /&gt;
                my %slashboxes = ( );&lt;br /&gt;
                for my $i (0..$#slashboxes) {&lt;br /&gt;
                        $slashboxes{$slashboxes[$i]} = $i;&lt;br /&gt;
                }&lt;br /&gt;
                # Add new boxes in.&lt;br /&gt;
                for my $key (sort grep /^showbox_/, keys %$form) {&lt;br /&gt;
                        my($bid) = $key =~ /^showbox_(\w+)$/;&lt;br /&gt;
                        next if length($bid) &amp;lt; 1 || length($bid) &amp;gt; 30 || $bid !~ /^\w+$/;&lt;br /&gt;
                        if (! exists $slashboxes{$bid}) {&lt;br /&gt;
                                $slashboxes{$bid} = 999; # put it at the end&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
                # Remove any boxes that weren't checked.&lt;br /&gt;
                for my $bid (@slashboxes) {&lt;br /&gt;
                        delete $slashboxes{$bid} unless $form-&amp;gt;{&amp;quot;showbox_$bid&amp;quot;};&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                for my $key (sort grep /^dynamic_/, keys %$form) {&lt;br /&gt;
                        my($bid) = $key =~ /^dynamic_(.+)$/;&lt;br /&gt;
                        next if length($bid) &amp;lt; 1;&lt;br /&gt;
                        if (! exists $slashboxes{$bid}) {&lt;br /&gt;
                                $slashboxes{$bid} = 999;&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                @slashboxes = sort {&lt;br /&gt;
                        $slashboxes{$a} &amp;lt;=&amp;gt; $slashboxes{$b}&lt;br /&gt;
                        ||&lt;br /&gt;
                        $a cmp $b&lt;br /&gt;
                } keys %slashboxes;&lt;br /&gt;
                # This probably should be a var (and appear in tilded_customize_msg)&lt;br /&gt;
                $#slashboxes = 19 if $#slashboxes &amp;gt; 19;&lt;br /&gt;
                $slashboxes = join &amp;quot;,&amp;quot;, @slashboxes;&lt;br /&gt;
        }&lt;br /&gt;
        # If we're right back to the default, that means the&lt;br /&gt;
        # empty string.&lt;br /&gt;
        if ($slashboxes eq $default_slashboxes_textlist) {&lt;br /&gt;
                $slashboxes = &amp;quot;&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Set the story_never and story_always fields.&lt;br /&gt;
        my $author_hr = $slashdb-&amp;gt;getDescriptions('authors');&lt;br /&gt;
        my $tree = $slashdb-&amp;gt;getTopicTree();&lt;br /&gt;
        my(@story_never_topic,  @story_never_author,  @story_never_nexus);&lt;br /&gt;
        my(@story_always_topic, @story_always_author);&lt;br /&gt;
        my(@story_always_nexus, @story_full_brief_nexus, @story_brief_always_nexus, @story_full_best_nexus, @story_brief_best_nexus);&lt;br /&gt;
        my($story_topic_all, $story_author_all, $story_nexus_all) = (0, 0, 0);&lt;br /&gt;
&lt;br /&gt;
        # Topics are either present (value=2) or absent (value=0).  If absent,&lt;br /&gt;
        # push them onto the never list.  Otherwise, do nothing.  (There's no&lt;br /&gt;
        # way to have an &amp;quot;always&amp;quot; topic, at the moment.)  If the hidden&lt;br /&gt;
        # field topictids_present is false, then there are no topic tids,&lt;br /&gt;
        # skip this.&lt;br /&gt;
        if ($form-&amp;gt;{topictids_present}) {&lt;br /&gt;
                for my $tid (&lt;br /&gt;
                        sort { $a &amp;lt;=&amp;gt; $b }&lt;br /&gt;
                        grep { !$tree-&amp;gt;{$_}{nexus} }&lt;br /&gt;
                        keys %$tree&lt;br /&gt;
                ) {&lt;br /&gt;
                        my $key = &amp;quot;topictid$tid&amp;quot;;&lt;br /&gt;
                        $story_topic_all++;&lt;br /&gt;
                        if (!$form-&amp;gt;{$key}) {           push @story_never_topic, $tid   }&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
        # Authors are either present (value=2) or absent (value=0).  If&lt;br /&gt;
        # absent, push them onto the never list.  Otherwise, do nothing.&lt;br /&gt;
        # (There's no way to have an &amp;quot;always&amp;quot; author, at the moment.)&lt;br /&gt;
        for my $aid (sort { $a &amp;lt;=&amp;gt; $b } keys %$author_hr) {&lt;br /&gt;
                my $key = &amp;quot;aid$aid&amp;quot;;&lt;br /&gt;
                $story_author_all++;&lt;br /&gt;
                if (!$form-&amp;gt;{$key}) {                   push @story_never_author, $aid  }&lt;br /&gt;
        }&lt;br /&gt;
        # Nexuses can have value 0, 1, 2, 3, 4, 5.  &lt;br /&gt;
        # 0 means the never list,&lt;br /&gt;
        # 1 means brief view of mainpage articles only&lt;br /&gt;
        # 2 means full view of mainpage articles only&lt;br /&gt;
        # 3 means brief view of all content&lt;br /&gt;
        # 4 means full view of mainpage content, brief view of sectional&lt;br /&gt;
        # 5 means full view of all content&lt;br /&gt;
        for my $tid (&lt;br /&gt;
                sort { $a &amp;lt;=&amp;gt; $b }&lt;br /&gt;
                map { /^nexustid(\d+)$/; $1 }&lt;br /&gt;
                grep { /^nexustid\d+$/ }&lt;br /&gt;
                keys %$form&lt;br /&gt;
        ) {&lt;br /&gt;
                my $key = &amp;quot;nexustid$tid&amp;quot;;&lt;br /&gt;
                next unless $tid &amp;amp;&amp;amp; $tree-&amp;gt;{$tid} &amp;amp;&amp;amp; $tree-&amp;gt;{$tid}{nexus};&lt;br /&gt;
                $story_nexus_all++;&lt;br /&gt;
                   if (!$form-&amp;gt;{$key}) {                push @story_never_nexus, $tid   }&lt;br /&gt;
                elsif ($form-&amp;gt;{$key} == 5 ) {           push @story_always_nexus, $tid  }&lt;br /&gt;
                elsif ($form-&amp;gt;{$key} == 4 ) {           push @story_full_brief_nexus, $tid }&lt;br /&gt;
                elsif ($form-&amp;gt;{$key} == 3 ) {           push @story_brief_always_nexus, $tid }&lt;br /&gt;
                elsif ($form-&amp;gt;{$key} == 2 ) {           push @story_full_best_nexus, $tid }&lt;br /&gt;
                elsif ($form-&amp;gt;{$key} == 1 ) {           push @story_brief_best_nexus, $tid }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
#use Data::Dumper; $Data::Dumper::Sortkeys = 1; print STDERR scalar(localtime) . &amp;quot; s_n_t '@story_never_topic' s_n_a '@story_never_author' s_n_n '@story_never_nexus' s_a_n '@story_always_nexus' form: &amp;quot; . Dumper($form);&lt;br /&gt;
        # Sanity check.&lt;br /&gt;
        $#story_never_topic             = 299 if $#story_never_topic   &amp;gt; 299;&lt;br /&gt;
        $#story_never_author            = 299 if $#story_never_author  &amp;gt; 299;&lt;br /&gt;
        $#story_never_nexus             = 299 if $#story_never_nexus   &amp;gt; 299;&lt;br /&gt;
        $#story_always_topic            = 299 if $#story_always_topic  &amp;gt; 299;&lt;br /&gt;
        $#story_always_author           = 299 if $#story_always_author &amp;gt; 299;&lt;br /&gt;
        $#story_always_nexus            = 299 if $#story_always_nexus  &amp;gt; 299;&lt;br /&gt;
        $#story_full_brief_nexus        = 299 if $#story_full_brief_nexus &amp;gt; 299;&lt;br /&gt;
        $#story_brief_always_nexus      = 299 if $#story_brief_always_nexus &amp;gt; 299;&lt;br /&gt;
        $#story_brief_best_nexus        = 299 if $#story_brief_best_nexus &amp;gt; 299;&lt;br /&gt;
        $#story_full_best_nexus         = 299 if $#story_full_best_nexus &amp;gt; 299;&lt;br /&gt;
&lt;br /&gt;
        my $story_never_topic   = join &amp;quot;,&amp;quot;, @story_never_topic;&lt;br /&gt;
        $story_never_topic = ($constants-&amp;gt;{subscribe} &amp;amp;&amp;amp; $user-&amp;gt;{is_subscriber})&lt;br /&gt;
                ? checkList($story_never_topic, 1024)&lt;br /&gt;
                : checkList($story_never_topic);&lt;br /&gt;
        my $story_never_author          = checkList(join &amp;quot;,&amp;quot;, @story_never_author);&lt;br /&gt;
        my $story_never_nexus           = checkList(join &amp;quot;,&amp;quot;, @story_never_nexus);&lt;br /&gt;
        my $story_always_topic          = checkList(join &amp;quot;,&amp;quot;, @story_always_topic);&lt;br /&gt;
        $story_always_topic = ($constants-&amp;gt;{subscribe} &amp;amp;&amp;amp; $user-&amp;gt;{is_subscriber})&lt;br /&gt;
                ? checkList($story_always_topic, 1024)&lt;br /&gt;
                : checkList($story_always_topic);&lt;br /&gt;
        my $story_always_author         = checkList(join &amp;quot;,&amp;quot;, @story_always_author);&lt;br /&gt;
&lt;br /&gt;
        my $story_always_nexus          = checkList(join &amp;quot;,&amp;quot;, @story_always_nexus);&lt;br /&gt;
        my $story_full_brief_nexus      = checkList(join &amp;quot;,&amp;quot;, @story_full_brief_nexus);&lt;br /&gt;
        my $story_brief_always_nexus    = checkList(join &amp;quot;,&amp;quot;, @story_brief_always_nexus);&lt;br /&gt;
        my $story_brief_best_nexus      = checkList(join &amp;quot;,&amp;quot;, @story_brief_best_nexus);&lt;br /&gt;
        my $story_full_best_nexus       = checkList(join &amp;quot;,&amp;quot;, @story_full_best_nexus);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        my $user_edits_table = {&lt;br /&gt;
                story_never_topic               =&amp;gt; $story_never_topic,&lt;br /&gt;
                story_never_author              =&amp;gt; $story_never_author,&lt;br /&gt;
                story_never_nexus               =&amp;gt; $story_never_nexus,&lt;br /&gt;
                story_always_topic              =&amp;gt; $story_always_topic,&lt;br /&gt;
                story_always_author             =&amp;gt; $story_always_author,&lt;br /&gt;
                story_always_nexus              =&amp;gt; $story_always_nexus,&lt;br /&gt;
                story_brief_always_nexus        =&amp;gt; $story_brief_always_nexus,&lt;br /&gt;
                story_full_brief_nexus          =&amp;gt; $story_full_brief_nexus,&lt;br /&gt;
                story_full_best_nexus           =&amp;gt; $story_full_best_nexus,&lt;br /&gt;
                story_brief_best_nexus          =&amp;gt; $story_brief_best_nexus,&lt;br /&gt;
&lt;br /&gt;
                slashboxes      =&amp;gt; checkList($slashboxes, 1024),&lt;br /&gt;
&lt;br /&gt;
                maxstories      =&amp;gt; 30, # XXXSKIN fix this later&lt;br /&gt;
                noboxes         =&amp;gt; ($form-&amp;gt;{useslashboxes} ? 0 : 1),&lt;br /&gt;
                lowbandwidth    =&amp;gt; ($form-&amp;gt;{lowbandwidth} ? 1 : 0),&lt;br /&gt;
                simpledesign    =&amp;gt; ($form-&amp;gt;{simpledesign} ? 1 : 0),&lt;br /&gt;
                noicons         =&amp;gt; ($form-&amp;gt;{noicons} ? 1 : 0),&lt;br /&gt;
                willing         =&amp;gt; ($form-&amp;gt;{willing} ? 1 : 0),&lt;br /&gt;
                index_classic   =&amp;gt; ($form-&amp;gt;{index_classic} ? 1 : undef),&lt;br /&gt;
        };&lt;br /&gt;
&lt;br /&gt;
        if (defined $form-&amp;gt;{tzcode} &amp;amp;&amp;amp; defined $form-&amp;gt;{tzformat}) {&lt;br /&gt;
                $user_edits_table-&amp;gt;{tzcode} = $form-&amp;gt;{tzcode};&lt;br /&gt;
                $user_edits_table-&amp;gt;{dfid}   = $form-&amp;gt;{tzformat};&lt;br /&gt;
                $user_edits_table-&amp;gt;{dst}    = $form-&amp;gt;{dst};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Force the User Space area to contain only known-good HTML tags.&lt;br /&gt;
        # Unfortunately the cookie login model makes it just too risky&lt;br /&gt;
        # to allow scripts in here;  CSS's steal passwords.  There are&lt;br /&gt;
        # no known vulnerabilities at this time, but a combination of the&lt;br /&gt;
        # social engineering taking place (inviting users to put Javascript&lt;br /&gt;
        # from websites in here, and making available script URLs for that&lt;br /&gt;
        # purpose), plus the fact that this could be used to amplify the&lt;br /&gt;
        # seriousness of any future vulnerabilities, means it's way past&lt;br /&gt;
        # time to shut this feature down.  - Jamie 2002/03/06&lt;br /&gt;
&lt;br /&gt;
        # it's a VARCHAR ...&lt;br /&gt;
        my $mylinks_limit = 255;&lt;br /&gt;
        $user_edits_table-&amp;gt;{mylinks} = balanceTags(strip_html(&lt;br /&gt;
                chopEntity($form-&amp;gt;{mylinks} || '', $mylinks_limit)&lt;br /&gt;
        ), { deep_nesting =&amp;gt; 2, length =&amp;gt; $mylinks_limit });&lt;br /&gt;
&lt;br /&gt;
        $user_edits_table-&amp;gt;{mylinks} = '' unless defined $user_edits_table-&amp;gt;{mylinks};&lt;br /&gt;
&lt;br /&gt;
        $error = 1;&lt;br /&gt;
        # must select at least 1/4 of nexuses, topics, authors&lt;br /&gt;
        if      ( scalar(@story_never_author) &amp;gt; ($story_author_all * 3/4) ) {&lt;br /&gt;
                $note = getError('editHome_too_many_disabled');&lt;br /&gt;
        } elsif ( scalar(@story_never_nexus) &amp;gt; ($story_nexus_all * 3/4) ) {&lt;br /&gt;
                $note = getError('editHome_too_many_disabled');&lt;br /&gt;
        } elsif ( scalar(@story_never_topic) &amp;gt; ($story_topic_all * 3/4) ) {&lt;br /&gt;
                $note = getError('editHome_too_many_disabled');&lt;br /&gt;
        } else {&lt;br /&gt;
                $error = 0;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        unless ($error) {&lt;br /&gt;
                # If a user is unwilling to moderate, we should cancel all points, lest&lt;br /&gt;
                # they be preserved when they shouldn't be.&lt;br /&gt;
                if (!isAnon($uid) &amp;amp;&amp;amp; !$form-&amp;gt;{willing}) {&lt;br /&gt;
                        $slashdb-&amp;gt;setUser($uid, { points =&amp;gt; 0 });&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                getOtherUserParams($user_edits_table);&lt;br /&gt;
                if ($form-&amp;gt;{restore_defaults}) {&lt;br /&gt;
                        setToDefaults($user_edits_table, {}, {&lt;br /&gt;
                                maxstories      =&amp;gt; 30,&lt;br /&gt;
                                tzcode          =&amp;gt; &amp;quot;EST&amp;quot;,&lt;br /&gt;
                                # XXX shouldn't this reset ALL the defaults,&lt;br /&gt;
                                # not just these two?&lt;br /&gt;
                        });&lt;br /&gt;
                }&lt;br /&gt;
                if ($form-&amp;gt;{restore_slashbox_defaults}) {&lt;br /&gt;
                        setToDefaults($user_edits_table, {&lt;br /&gt;
                                'story_never_topic' =&amp;gt; 1,&lt;br /&gt;
                                'story_never_author' =&amp;gt; 1,&lt;br /&gt;
                                'story_never_nexus' =&amp;gt; 1,&lt;br /&gt;
                                'story_always_topic' =&amp;gt; 1,&lt;br /&gt;
                                'story_always_author' =&amp;gt; 1,&lt;br /&gt;
                                'story_always_nexus' =&amp;gt; 1,&lt;br /&gt;
                                'story_full_brief_nexus' =&amp;gt; 1,&lt;br /&gt;
                                'story_brief_always_nexus' =&amp;gt; 1,&lt;br /&gt;
                                'story_full_best_nexus' =&amp;gt; 1,&lt;br /&gt;
                                'story_brief_best_nexus' =&amp;gt; 1,&lt;br /&gt;
                                'maxstories' =&amp;gt; 1,&lt;br /&gt;
                                'noboxes' =&amp;gt; 1,&lt;br /&gt;
                                'light' =&amp;gt; 1,&lt;br /&gt;
                                'noicons' =&amp;gt; 1,&lt;br /&gt;
                                'willing' =&amp;gt; 1&lt;br /&gt;
                        }, { slashboxes =&amp;gt; &amp;quot;&amp;quot; });&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
#print scalar(localtime) . &amp;quot; uet: &amp;quot; . Dumper($user_edits_table);&lt;br /&gt;
                $slashdb-&amp;gt;setUser($uid, $user_edits_table);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        editHome({ uid =&amp;gt; $uid, note =&amp;gt; $note });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
# A generic way for a site to allow users to edit data about themselves.&lt;br /&gt;
# Most useful when your plugin or theme wants to let the user change&lt;br /&gt;
# minor settings but you don't want to write a whole new version&lt;br /&gt;
# of users.pl to provide a user interface.  The user can save any&lt;br /&gt;
# param of the format &amp;quot;opt_foo&amp;quot;, as long as &amp;quot;foo&amp;quot; shows up in&lt;br /&gt;
# getMiscUserOpts which lists all the misc opts that this user can edit.&lt;br /&gt;
# This is *not* protected by formkeys (yet), so assume attackers can make&lt;br /&gt;
# users click and accidentally edit their own settings: no really important&lt;br /&gt;
# data should be stored in this way.&lt;br /&gt;
sub editMiscOpts {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $user = getCurrentUser(); &lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $note = $hr-&amp;gt;{note} || &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        return if $user-&amp;gt;{is_anon}; # shouldn't be, but can't hurt to check&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        my $edit_user = $slashdb-&amp;gt;getUser($user-&amp;gt;{uid});&lt;br /&gt;
        my $title = getTitle('editMiscOpts_title');&lt;br /&gt;
&lt;br /&gt;
        my $opts = $slashdb-&amp;gt;getMiscUserOpts();&lt;br /&gt;
        for my $opt (@$opts) {&lt;br /&gt;
                my $opt_name = &amp;quot;opt_&amp;quot; . $opt-&amp;gt;{name};&lt;br /&gt;
                $opt-&amp;gt;{checked} = $edit_user-&amp;gt;{$opt_name} ? 1 : 0;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('editMiscOpts', {&lt;br /&gt;
#               useredit        =&amp;gt; $user_edit,&lt;br /&gt;
                title           =&amp;gt; $title,&lt;br /&gt;
                opts            =&amp;gt; $opts,&lt;br /&gt;
                note            =&amp;gt; $note,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
sub saveMiscOpts {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        return if $user-&amp;gt;{is_anon}; # shouldn't be, but can't hurt to check&lt;br /&gt;
&lt;br /&gt;
        my $edit_user = $slashdb-&amp;gt;getUser($user-&amp;gt;{uid});&lt;br /&gt;
        my %opts_ok_hash = ( );&lt;br /&gt;
        my $opts = $slashdb-&amp;gt;getMiscUserOpts();&lt;br /&gt;
        for my $opt (@$opts) {&lt;br /&gt;
                $opts_ok_hash{&amp;quot;opt_$opt-&amp;gt;{name}&amp;quot;} = 1;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $update = { };&lt;br /&gt;
        for my $opt (grep /^opt_/, keys %$form) {&lt;br /&gt;
                next unless $opts_ok_hash{$opt};&lt;br /&gt;
                $update-&amp;gt;{$opt} = $form-&amp;gt;{$opt} ? 1 : 0;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Make the changes.&lt;br /&gt;
        $slashdb-&amp;gt;setUser($edit_user-&amp;gt;{uid}, $update);&lt;br /&gt;
&lt;br /&gt;
        # Inform the user the change was made.  Since we don't&lt;br /&gt;
        # require formkeys, we always want to print a message to&lt;br /&gt;
        # make sure the user sees what s/he did.  This is done&lt;br /&gt;
        # by passing in a note which ends up passed to the&lt;br /&gt;
        # editMiscOpts template, which displays it.&lt;br /&gt;
        editMiscOpts({ note =&amp;gt; getMessage('savemiscopts_msg') });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub listReadOnly {&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
        my $readonlylist = $reader-&amp;gt;getAL2List('nopost');&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('listReadOnly', {&lt;br /&gt;
                readonlylist =&amp;gt; $readonlylist,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub listBanned {&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
        my $bannedlist = $reader-&amp;gt;getAL2List('ban');&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('listBanned', {&lt;br /&gt;
                bannedlist =&amp;gt; $bannedlist,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub topAbusers {&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
        my $topabusers = $reader-&amp;gt;getTopAbusers();&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('topAbusers', {&lt;br /&gt;
                topabusers =&amp;gt; $topabusers,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub listAbuses {&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        my $abuses = $reader-&amp;gt;getAbuses($form-&amp;gt;{key}, $form-&amp;gt;{abuseid});&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('listAbuses', {&lt;br /&gt;
                abuseid =&amp;gt; $form-&amp;gt;{abuseid},&lt;br /&gt;
                abuses  =&amp;gt; $abuses,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub forceAccountVerify {&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        my $uid = $form-&amp;gt;{uid};&lt;br /&gt;
        my $useredit = $slashdb-&amp;gt;getUser($uid);&lt;br /&gt;
&lt;br /&gt;
        if ($useredit-&amp;gt;{uid}) {&lt;br /&gt;
                my $newpasswd = $slashdb-&amp;gt;resetUserAccount($uid);&lt;br /&gt;
                $slashdb-&amp;gt;deleteLogToken($uid, 1);&lt;br /&gt;
                my $emailtitle = getTitle('reset_acct_email_title', {&lt;br /&gt;
                        nickname        =&amp;gt; $useredit-&amp;gt;{nickname}&lt;br /&gt;
                }, 1);&lt;br /&gt;
&lt;br /&gt;
                my $msg = getMessage('reset_acct_msg', {&lt;br /&gt;
                        newpasswd       =&amp;gt; $newpasswd,&lt;br /&gt;
                        tempnick        =&amp;gt; $useredit-&amp;gt;{nickname},&lt;br /&gt;
                }, 1);&lt;br /&gt;
&lt;br /&gt;
                $slashdb-&amp;gt;setUser($useredit-&amp;gt;{uid}, {&lt;br /&gt;
                        waiting_for_account_verify =&amp;gt; 1,&lt;br /&gt;
                        account_verify_request_time =&amp;gt; $slashdb-&amp;gt;getTime()&lt;br /&gt;
                });&lt;br /&gt;
&lt;br /&gt;
                doEmail($useredit-&amp;gt;{uid}, $emailtitle, $msg) if $useredit-&amp;gt;{uid};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        print getMessage(&amp;quot;reset_acct_complete&amp;quot;, { useredit =&amp;gt; $useredit }, 1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub displayForm {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        my $suadmin_flag = $user-&amp;gt;{seclev} &amp;gt;= 10000 ? 1 : 0;&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        my $op = $hr-&amp;gt;{op} || $form-&amp;gt;{op} || 'displayform';&lt;br /&gt;
&lt;br /&gt;
        my $ops = {&lt;br /&gt;
                displayform     =&amp;gt; 'loginForm',&lt;br /&gt;
                edithome        =&amp;gt; 'loginForm',&lt;br /&gt;
                editcomm        =&amp;gt; 'loginForm',&lt;br /&gt;
                edituser        =&amp;gt; 'loginForm',&lt;br /&gt;
#               mailpasswdform  =&amp;gt; 'sendPasswdForm',&lt;br /&gt;
#               newuserform     =&amp;gt; 'newUserForm',&lt;br /&gt;
                userclose       =&amp;gt; 'loginForm',&lt;br /&gt;
                userlogin       =&amp;gt; 'loginForm',&lt;br /&gt;
                editmiscopts    =&amp;gt; 'loginForm',&lt;br /&gt;
                savemiscopts    =&amp;gt; 'loginForm',&lt;br /&gt;
                default         =&amp;gt; 'loginForm'&lt;br /&gt;
        };&lt;br /&gt;
&lt;br /&gt;
        $op = 'default' if !defined($ops-&amp;gt;{$op});&lt;br /&gt;
&lt;br /&gt;
        my($title, $title2, $msg1, $msg2) = ('', '', '', '');&lt;br /&gt;
&lt;br /&gt;
        if ($op eq 'userclose') {&lt;br /&gt;
                $title = getMessage('userclose');&lt;br /&gt;
&lt;br /&gt;
        } elsif ($op eq 'displayForm') {&lt;br /&gt;
                $title = $form-&amp;gt;{unickname}&lt;br /&gt;
                        ? getTitle('displayForm_err_title')&lt;br /&gt;
                        : getTitle('displayForm_title');&lt;br /&gt;
        } elsif ($op eq 'mailpasswdform') {&lt;br /&gt;
                $title = getTitle('mailPasswdForm_title');&lt;br /&gt;
        } elsif ($op eq 'newuserform') {&lt;br /&gt;
                $title = getTitle('newUserForm_title');&lt;br /&gt;
        } else {&lt;br /&gt;
                $title = getTitle('displayForm_title');&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        $form-&amp;gt;{unickname} ||= $form-&amp;gt;{newusernick};&lt;br /&gt;
&lt;br /&gt;
        if ($form-&amp;gt;{newusernick}) {&lt;br /&gt;
                $title2 = getTitle('displayForm_dup_title');&lt;br /&gt;
        } else {&lt;br /&gt;
                $title2 = getTitle('displayForm_new_title');&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        $msg1 = getMessage('dispform_new_msg_1');&lt;br /&gt;
        if (! $form-&amp;gt;{newusernick} &amp;amp;&amp;amp; $op eq 'newuserform') {&lt;br /&gt;
                $msg2 = getMessage('dispform_new_msg_2');&lt;br /&gt;
        } elsif ($op eq 'displayform' || $op eq 'userlogin') {&lt;br /&gt;
                $msg2 = getMessage('newuserform_msg');&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        slashDisplay($ops-&amp;gt;{$op}, {&lt;br /&gt;
                newnick         =&amp;gt; nickFix($form-&amp;gt;{newusernick}),&lt;br /&gt;
                suadmin_flag    =&amp;gt; $suadmin_flag,&lt;br /&gt;
                title           =&amp;gt; $title,&lt;br /&gt;
                title2          =&amp;gt; $title2,&lt;br /&gt;
                logged_in       =&amp;gt; $user-&amp;gt;{is_anon} ? 0 : 1,&lt;br /&gt;
                msg1            =&amp;gt; $msg1,&lt;br /&gt;
                msg2            =&amp;gt; $msg2&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
# this groups all the messages together in&lt;br /&gt;
# one template, called &amp;quot;messages;users;default&amp;quot;&lt;br /&gt;
sub getMessage {&lt;br /&gt;
        my($value, $hashref, $nocomm) = @_;&lt;br /&gt;
        $hashref ||= {};&lt;br /&gt;
        $hashref-&amp;gt;{value} = $value;&lt;br /&gt;
        return slashDisplay('messages', $hashref,&lt;br /&gt;
                { Return =&amp;gt; 1, Nocomm =&amp;gt; $nocomm });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
# this groups all the errors together in&lt;br /&gt;
# one template, called &amp;quot;errors;users;default&amp;quot;&lt;br /&gt;
sub getError {&lt;br /&gt;
        my($value, $hashref, $nocomm) = @_;&lt;br /&gt;
        $hashref ||= {};&lt;br /&gt;
        $hashref-&amp;gt;{value} = $value;&lt;br /&gt;
        return slashDisplay('errors', $hashref,&lt;br /&gt;
                { Return =&amp;gt; 1, Nocomm =&amp;gt; $nocomm });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
# this groups all the titles together in&lt;br /&gt;
# one template, called &amp;quot;users-titles&amp;quot;&lt;br /&gt;
sub getTitle {&lt;br /&gt;
        my($value, $hashref, $nocomm) = @_;&lt;br /&gt;
        $hashref ||= {};&lt;br /&gt;
        $hashref-&amp;gt;{value} = $value;&lt;br /&gt;
        return slashDisplay('titles', $hashref,&lt;br /&gt;
                { Return =&amp;gt; 1, Nocomm =&amp;gt; $nocomm });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
# getUserAdmin - returns a block of HTML text that provides&lt;br /&gt;
# information and editing capabilities for admin users.&lt;br /&gt;
# Most of this data is already in the getUserAdmin template,&lt;br /&gt;
# but really, we should try to get more of this logic into&lt;br /&gt;
# that template.&lt;br /&gt;
sub getUserAdmin {&lt;br /&gt;
        my($id, $field, $seclev_field) = @_;&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $logdb = getObject('Slash::DB', { db_type =&amp;gt; 'log_slave' });&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        my $user        = getCurrentUser();&lt;br /&gt;
        my $form        = getCurrentForm();&lt;br /&gt;
        my $constants   = getCurrentStatic();&lt;br /&gt;
        my $slashdb     = getCurrentDB();&lt;br /&gt;
        $id ||= $user-&amp;gt;{uid};&lt;br /&gt;
&lt;br /&gt;
        my($expired, $uidstruct, $readonly);&lt;br /&gt;
        my($user_edit, $user_editfield, $ipstruct, $ipstruct_order, $authors, $author_flag, $topabusers, $thresh_select,$section_select);&lt;br /&gt;
        my $srcid;&lt;br /&gt;
        my $proxy_check = {};&lt;br /&gt;
        my @accesshits;&lt;br /&gt;
        my $user_editinfo_flag = (!$form-&amp;gt;{op} || $form-&amp;gt;{op} eq 'userinfo'&lt;br /&gt;
                || $form-&amp;gt;{userinfo} || $form-&amp;gt;{saveuseradmin}&lt;br /&gt;
                ) ? 1 : 0;&lt;br /&gt;
        my $authoredit_flag = ($user-&amp;gt;{seclev} &amp;gt;= 10000) ? 1 : 0;&lt;br /&gt;
        my $sectionref = $reader-&amp;gt;getDescriptions('skins');&lt;br /&gt;
        $sectionref-&amp;gt;{''} = getData('all_sections');&lt;br /&gt;
&lt;br /&gt;
        $field ||= 'uid';&lt;br /&gt;
        if ($field eq 'uid') {&lt;br /&gt;
                $user_edit = $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                $user_editfield = $user_edit-&amp;gt;{uid};&lt;br /&gt;
                $srcid = convert_srcid( uid =&amp;gt; $id );&lt;br /&gt;
                #$expired = $slashdb-&amp;gt;checkExpired($user_edit-&amp;gt;{uid}) ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
                $ipstruct = $slashdb-&amp;gt;getNetIDStruct($user_edit-&amp;gt;{uid});&lt;br /&gt;
                @accesshits = $logdb-&amp;gt;countAccessLogHitsInLastX($field, $user_edit-&amp;gt;{uid}) if defined($logdb);&lt;br /&gt;
                $section_select = createSelect('section', $sectionref, $user_edit-&amp;gt;{section}, 1);&lt;br /&gt;
&lt;br /&gt;
        } elsif ($field eq 'nickname') {&lt;br /&gt;
                $user_edit = $slashdb-&amp;gt;getUser($slashdb-&amp;gt;getUserUID($id));&lt;br /&gt;
                $user_editfield = $user_edit-&amp;gt;{nickname};&lt;br /&gt;
                #$expired = $slashdb-&amp;gt;checkExpired($user_edit-&amp;gt;{uid}) ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
                $ipstruct = $slashdb-&amp;gt;getNetIDStruct($user_edit-&amp;gt;{uid});&lt;br /&gt;
                @accesshits = $logdb-&amp;gt;countAccessLogHitsInLastX('uid', $user_edit-&amp;gt;{uid}) if defined($logdb);&lt;br /&gt;
                $section_select = createSelect('section', $sectionref, $user_edit-&amp;gt;{section}, 1);&lt;br /&gt;
&lt;br /&gt;
        } elsif ($field eq 'md5id') {&lt;br /&gt;
                $user_edit-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                $user_edit-&amp;gt;{md5id} = $id;&lt;br /&gt;
                if ($form-&amp;gt;{fieldname} &amp;amp;&amp;amp; $form-&amp;gt;{fieldname} =~ /^(ipid|subnetid)$/) {&lt;br /&gt;
                        $uidstruct = $slashdb-&amp;gt;getUIDStruct($form-&amp;gt;{fieldname}, $user_edit-&amp;gt;{md5id});&lt;br /&gt;
                        @accesshits = $logdb-&amp;gt;countAccessLogHitsInLastX($form-&amp;gt;{fieldname}, $user_edit-&amp;gt;{md5id}) if defined($logdb);&lt;br /&gt;
                } else {&lt;br /&gt;
                        $uidstruct = $slashdb-&amp;gt;getUIDStruct('md5id', $user_edit-&amp;gt;{md5id});&lt;br /&gt;
                        @accesshits = $logdb-&amp;gt;countAccessLogHitsInLastX($field, $user_edit-&amp;gt;{md5id}) if defined($logdb);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
        } elsif ($field eq 'ipid') {&lt;br /&gt;
                $user_edit-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                $user_edit-&amp;gt;{ipid} = $id;&lt;br /&gt;
                $srcid = convert_srcid( ipid =&amp;gt; $id );&lt;br /&gt;
                $user_editfield = $id;&lt;br /&gt;
                $uidstruct = $slashdb-&amp;gt;getUIDStruct('ipid', $user_edit-&amp;gt;{ipid});&lt;br /&gt;
                @accesshits = $logdb-&amp;gt;countAccessLogHitsInLastX('host_addr', $user_edit-&amp;gt;{ipid}) if defined($logdb);&lt;br /&gt;
&lt;br /&gt;
                if ($form-&amp;gt;{userfield} =~/^\d+\.\d+\.\d+\.(\d+)$/) {&lt;br /&gt;
                        if ($1 ne &amp;quot;0&amp;quot;){&lt;br /&gt;
                                $proxy_check-&amp;gt;{available} = 1;&lt;br /&gt;
                                $proxy_check-&amp;gt;{results} = $slashdb-&amp;gt;checkForOpenProxy($form-&amp;gt;{userfield}) if $form-&amp;gt;{check_proxy};&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
        } elsif ($field eq 'subnetid') {&lt;br /&gt;
                $user_edit-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                $srcid = convert_srcid( ipid =&amp;gt; $id );&lt;br /&gt;
                if ($id =~ /^(\d+\.\d+\.\d+)(?:\.\d)?/) {&lt;br /&gt;
                        $id = $1 . &amp;quot;.0&amp;quot;;&lt;br /&gt;
                        $user_edit-&amp;gt;{subnetid} = $id;&lt;br /&gt;
                } else {&lt;br /&gt;
                        $user_edit-&amp;gt;{subnetid} = $id;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                $user_editfield = $id;&lt;br /&gt;
                $uidstruct = $slashdb-&amp;gt;getUIDStruct('subnetid', $user_edit-&amp;gt;{subnetid});&lt;br /&gt;
                @accesshits = $logdb-&amp;gt;countAccessLogHitsInLastX($field, $user_edit-&amp;gt;{subnetid}) if defined($logdb);&lt;br /&gt;
&lt;br /&gt;
        } elsif ($field eq &amp;quot;srcid&amp;quot;) {&lt;br /&gt;
                $user_edit-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                $user_edit-&amp;gt;{srcid}  = $id;&lt;br /&gt;
                $srcid = $id;&lt;br /&gt;
&lt;br /&gt;
        } else {&lt;br /&gt;
                $user_edit = $id ? $slashdb-&amp;gt;getUser($id) : $user;&lt;br /&gt;
                $user_editfield = $user_edit-&amp;gt;{uid};&lt;br /&gt;
                $ipstruct = $slashdb-&amp;gt;getNetIDStruct($user_edit-&amp;gt;{uid});&lt;br /&gt;
                @accesshits = $logdb-&amp;gt;countAccessLogHitsInLastX('uid', $user_edit-&amp;gt;{uid}) if defined($logdb);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        ##########&lt;br /&gt;
        # Put together the array and hashref that the template will need&lt;br /&gt;
        # to construct the list for display to the admin.&lt;br /&gt;
        # Note that currently a srcid which is not a uid (i.e. which&lt;br /&gt;
        # represents an IP address or masked IP network) cannot have&lt;br /&gt;
        # any ACLs assigned to it.  This may change in the future.&lt;br /&gt;
        # The term &amp;quot;aclam&amp;quot; is used because it has a field set for both&lt;br /&gt;
        # every ACL and every access modifier (i.e. AL2 bit) that is set&lt;br /&gt;
        # for this user or srcid.&lt;br /&gt;
        # For now, ACLs will be listed for IPs as well.&lt;br /&gt;
        # First get the list of ACLs that can be used.&lt;br /&gt;
        my $all_acls_ar = $reader-&amp;gt;getAllACLNames();&lt;br /&gt;
        my $all_acls_hr = { map { ( $_, 1 ) } @$all_acls_ar };&lt;br /&gt;
        # Add in any ACLs selected for this user (just in case&lt;br /&gt;
        # getAllACLNames is cached and stale).&lt;br /&gt;
        for my $acl (keys %{$user_edit-&amp;gt;{acl}}) {&lt;br /&gt;
                $all_acls_hr-&amp;gt;{$acl} = 1;&lt;br /&gt;
        }&lt;br /&gt;
        # Start creating the $all_aclam_hr data, in which the keys are&lt;br /&gt;
        # the HTML selection names that all begin with aclam_ and the&lt;br /&gt;
        # the values are their names/descriptions shown to the admin.&lt;br /&gt;
        # First put all the ACLs into the hash, if we're editing a user.&lt;br /&gt;
        my $all_aclam_hr = { };&lt;br /&gt;
        if (!$user_edit-&amp;gt;{nonuid}) {&lt;br /&gt;
                $all_aclam_hr = { map { ( &amp;quot;aclam_$_&amp;quot;, &amp;quot;ACL: $_&amp;quot; ) } keys %$all_acls_hr };&lt;br /&gt;
        }&lt;br /&gt;
        # Next put in all the al2 types.&lt;br /&gt;
        my $all_al2types = $reader-&amp;gt;getAL2Types;&lt;br /&gt;
        for my $key (keys %$all_al2types) {&lt;br /&gt;
                next if $key eq 'comment'; # skip the 'comment' type&lt;br /&gt;
                $all_aclam_hr-&amp;gt;{&amp;quot;aclam_$key&amp;quot;} = $all_al2types-&amp;gt;{$key}{title};&lt;br /&gt;
        }&lt;br /&gt;
        # Finally, sort the keys of the hash into the order that we&lt;br /&gt;
        # want them displayed to the admin (ACLs first).&lt;br /&gt;
        my $all_acls_longkeys_hr = { map { ( &amp;quot;aclam_$_&amp;quot;, 1 ) } keys %$all_acls_hr };&lt;br /&gt;
        my $all_aclam_ar = [&lt;br /&gt;
                sort {&lt;br /&gt;
                        (exists($all_acls_longkeys_hr-&amp;gt;{$a}) ? -1 : 1) &amp;lt;=&amp;gt; (exists($all_acls_longkeys_hr-&amp;gt;{$b}) ? -1 : 1)&lt;br /&gt;
                        ||&lt;br /&gt;
                        $all_aclam_hr-&amp;gt;{$a} cmp $all_aclam_hr-&amp;gt;{$b}&lt;br /&gt;
                } keys %$all_aclam_hr&lt;br /&gt;
        ];&lt;br /&gt;
        # Now put together the hashref that identifies which of those&lt;br /&gt;
        # items are selected for this user.&lt;br /&gt;
        my $user_aclam_hr = { };&lt;br /&gt;
        for my $acl (keys %{ $user_edit-&amp;gt;{acl} }) {&lt;br /&gt;
                $user_aclam_hr-&amp;gt;{&amp;quot;aclam_$acl&amp;quot;} = 1;&lt;br /&gt;
        }&lt;br /&gt;
        my $al2_tid_comment = $all_al2types-&amp;gt;{comment}{al2tid} || 0;&lt;br /&gt;
        my $al2_log_ar = [ ];&lt;br /&gt;
        my $al2_hr = { };&lt;br /&gt;
        # XXXSRCID Once we get rid of the silly 'md5id' field and all the&lt;br /&gt;
        # other bizarre backward-compatibility code paths early in this&lt;br /&gt;
        # function, this won't be necessary, but until then we need this&lt;br /&gt;
        # sanity check...&lt;br /&gt;
        if ($srcid) {&lt;br /&gt;
                # getAL2 works with either a srcids hashref or a single srcid&lt;br /&gt;
                $al2_hr = $slashdb-&amp;gt;getAL2($srcid);&lt;br /&gt;
                for my $al2 (keys %{ $al2_hr }) {&lt;br /&gt;
                        $user_aclam_hr-&amp;gt;{&amp;quot;aclam_$al2&amp;quot;} = 1;&lt;br /&gt;
                }&lt;br /&gt;
                $al2_log_ar = $slashdb-&amp;gt;getAL2Log($srcid);&lt;br /&gt;
        }&lt;br /&gt;
        # Generate al2_nick_hr, which will be populated with keys of all&lt;br /&gt;
        # the (presumably) admin uids who have logged rows for this al2,&lt;br /&gt;
        # and values of their nicks.&lt;br /&gt;
        my $al2_nick_hr = { };&lt;br /&gt;
        for my $al2_log (@$al2_log_ar) {&lt;br /&gt;
                my $uid = $al2_log-&amp;gt;{adminuid};&lt;br /&gt;
                next if !$uid; # odd error, might want to flag this&lt;br /&gt;
                $al2_nick_hr-&amp;gt;{$uid} ||= $slashdb-&amp;gt;getUser($uid, 'nickname');&lt;br /&gt;
        }&lt;br /&gt;
        ##########&lt;br /&gt;
&lt;br /&gt;
        $user_edit-&amp;gt;{author} = ($user_edit-&amp;gt;{author} &amp;amp;&amp;amp; $user_edit-&amp;gt;{author} == 1)&lt;br /&gt;
                ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        if (! $user-&amp;gt;{nonuid}) {&lt;br /&gt;
                my $threshcodes = $reader-&amp;gt;getDescriptions('threshcode_values','',1);&lt;br /&gt;
                $thresh_select = createSelect('defaultpoints', $threshcodes, $user_edit-&amp;gt;{defaultpoints}, 1);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if (!ref $ipstruct) {&lt;br /&gt;
                undef $ipstruct;&lt;br /&gt;
        } else {&lt;br /&gt;
                @$ipstruct_order = sort { $ipstruct-&amp;gt;{$b}{dmin} cmp $ipstruct-&amp;gt;{$a}{dmin} } keys %$ipstruct;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $m2total = ($user_edit-&amp;gt;{m2fair} || 0) + ($user_edit-&amp;gt;{m2unfair} || 0);&lt;br /&gt;
        if ($m2total) {&lt;br /&gt;
                $user_edit-&amp;gt;{m2unfairpercent} = sprintf(&amp;quot;%.2f&amp;quot;,&lt;br /&gt;
                        $user_edit-&amp;gt;{m2unfair}*100/$m2total);&lt;br /&gt;
        }&lt;br /&gt;
        my $mod_total = ($user_edit-&amp;gt;{totalmods} || 0) + ($user_edit-&amp;gt;{stirred} || 0);&lt;br /&gt;
        if ($mod_total) {&lt;br /&gt;
                $user_edit-&amp;gt;{stirredpercent} = sprintf(&amp;quot;%.2f&amp;quot;,&lt;br /&gt;
                        $user_edit-&amp;gt;{stirred}*100/$mod_total);&lt;br /&gt;
        }&lt;br /&gt;
        if ($constants-&amp;gt;{subscribe} and my $subscribe = getObject('Slash::Subscribe')) {&lt;br /&gt;
                $user_edit-&amp;gt;{subscribe_payments} =&lt;br /&gt;
                        $subscribe-&amp;gt;getSubscriptionsForUser($user_edit-&amp;gt;{uid});&lt;br /&gt;
                $user_edit-&amp;gt;{subscribe_purchases} =&lt;br /&gt;
                        $subscribe-&amp;gt;getSubscriptionsPurchasedByUser($user_edit-&amp;gt;{uid},{ only_types =&amp;gt; [ &amp;quot;grant&amp;quot;, &amp;quot;gift&amp;quot; ] });&lt;br /&gt;
        }&lt;br /&gt;
        my $ipid = $user_edit-&amp;gt;{ipid};&lt;br /&gt;
        my $subnetid = $user_edit-&amp;gt;{subnetid};&lt;br /&gt;
        my $post_restrictions = {};&lt;br /&gt;
        my ($subnet_karma, $ipid_karma);&lt;br /&gt;
&lt;br /&gt;
        if ($ipid &amp;amp;&amp;amp; !$subnetid) {&lt;br /&gt;
                $ipid = md5_hex($ipid) if length($ipid) != 32;&lt;br /&gt;
                $proxy_check-&amp;gt;{ipid} = $ipid;&lt;br /&gt;
                $proxy_check-&amp;gt;{currently} = $slashdb-&amp;gt;getKnownOpenProxy($ipid, &amp;quot;ipid&amp;quot;);&lt;br /&gt;
                # This next call is very slow.&lt;br /&gt;
                $subnetid = $reader-&amp;gt;getSubnetFromIPIDBasedOnComments($ipid);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($subnetid) {&lt;br /&gt;
                $subnetid = md5_hex($subnetid) if length($subnetid) != 32;&lt;br /&gt;
                # These next three calls can be very slow.  In fact, getNetIDKarma&lt;br /&gt;
                # is actually called twice on the same subnetid;  if we can cache&lt;br /&gt;
                # that data somehow that wouldn't be a bad idea.&lt;br /&gt;
                $post_restrictions = $reader-&amp;gt;getNetIDPostingRestrictions(&amp;quot;subnetid&amp;quot;, $subnetid);&lt;br /&gt;
                $subnet_karma = $reader-&amp;gt;getNetIDKarma(&amp;quot;subnetid&amp;quot;, $subnetid);&lt;br /&gt;
                $ipid_karma = $reader-&amp;gt;getNetIDKarma(&amp;quot;ipid&amp;quot;, $ipid) if $ipid;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $clout_types_ar = [ sort grep /\D/, keys %{$slashdb-&amp;gt;getCloutTypes} ];&lt;br /&gt;
&lt;br /&gt;
        return slashDisplay('getUserAdmin', {&lt;br /&gt;
                field                   =&amp;gt; $field,&lt;br /&gt;
                useredit                =&amp;gt; $user_edit,&lt;br /&gt;
                srcid                   =&amp;gt; $srcid,&lt;br /&gt;
                all_aclam_ar            =&amp;gt; $all_aclam_ar,&lt;br /&gt;
                all_aclam_hr            =&amp;gt; $all_aclam_hr,&lt;br /&gt;
                user_aclam_hr           =&amp;gt; $user_aclam_hr,&lt;br /&gt;
                al2_old                 =&amp;gt; $al2_hr,&lt;br /&gt;
                al2_log                 =&amp;gt; $al2_log_ar,&lt;br /&gt;
                al2_tid_comment         =&amp;gt; $al2_tid_comment,&lt;br /&gt;
                al2_nick                =&amp;gt; $al2_nick_hr,&lt;br /&gt;
&lt;br /&gt;
                userinfo_flag           =&amp;gt; $user_editinfo_flag,&lt;br /&gt;
                userfield               =&amp;gt; $user_editfield,&lt;br /&gt;
                ipstruct                =&amp;gt; $ipstruct,&lt;br /&gt;
                ipstruct_order          =&amp;gt; $ipstruct_order,&lt;br /&gt;
                uidstruct               =&amp;gt; $uidstruct,&lt;br /&gt;
                accesshits              =&amp;gt; \@accesshits,&lt;br /&gt;
                seclev_field            =&amp;gt; $seclev_field,&lt;br /&gt;
                expired                 =&amp;gt; $expired,&lt;br /&gt;
                topabusers              =&amp;gt; $topabusers,&lt;br /&gt;
                readonly                =&amp;gt; $readonly,&lt;br /&gt;
                thresh_select           =&amp;gt; $thresh_select,&lt;br /&gt;
                authoredit_flag         =&amp;gt; $authoredit_flag,&lt;br /&gt;
                section_select          =&amp;gt; $section_select,&lt;br /&gt;
                all_acls                =&amp;gt; $all_acls_hr,&lt;br /&gt;
                proxy_check             =&amp;gt; $proxy_check,&lt;br /&gt;
                subnet_karma            =&amp;gt; $subnet_karma,&lt;br /&gt;
                ipid_karma              =&amp;gt; $ipid_karma,&lt;br /&gt;
                post_restrictions       =&amp;gt; $post_restrictions,&lt;br /&gt;
&lt;br /&gt;
                clout_types_ar          =&amp;gt; $clout_types_ar,&lt;br /&gt;
        }, 1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
# this is to allow alternate parameters to be specified.  pass in&lt;br /&gt;
# your hash reference to be passed to setUser(), and this will&lt;br /&gt;
# add in those extra parameters.  add the parameters to string_param,&lt;br /&gt;
# type = otherusersparam, code = name of the param.  they will&lt;br /&gt;
# be checked for the main user prefs editing screens, and on&lt;br /&gt;
# user creation -- pudge&lt;br /&gt;
sub getOtherUserParams {&lt;br /&gt;
        my($data) = @_;&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
        my $user    = getCurrentUser();&lt;br /&gt;
        my $form    = getCurrentForm();&lt;br /&gt;
        my $params  = $reader-&amp;gt;getDescriptions('otherusersparam');&lt;br /&gt;
&lt;br /&gt;
        for my $param (keys %$params) {&lt;br /&gt;
                if (exists $form-&amp;gt;{$param}) {&lt;br /&gt;
                        # set user too for output in this request&lt;br /&gt;
                        $data-&amp;gt;{$param} = $user-&amp;gt;{$param} = $form-&amp;gt;{$param} || undef;&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
###############################################################&lt;br /&gt;
# This modifies a hashref to default values -- if nothing&lt;br /&gt;
# else we assume the empty string which clears items in the&lt;br /&gt;
# user_param table &lt;br /&gt;
#&lt;br /&gt;
# takes 3 hashrefs currently&lt;br /&gt;
# $data     - hashref to change to defaults&lt;br /&gt;
# $skip     - hashref of keys to skip modifying&lt;br /&gt;
# $defaults - hashref of defaults to set to something other &lt;br /&gt;
#             than the empty string&lt;br /&gt;
sub setToDefaults {&lt;br /&gt;
        my($data, $skip, $defaults) = @_;&lt;br /&gt;
        foreach my $key (keys %$data) {&lt;br /&gt;
                next if $skip-&amp;gt;{$key};&lt;br /&gt;
                $data-&amp;gt;{$key} = exists $defaults-&amp;gt;{$key} ? $defaults-&amp;gt;{$key} : &amp;quot;&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub getCommentListing {&lt;br /&gt;
        my ($type, $value,&lt;br /&gt;
                $min_comment, $time_period, $cc_all, $cc_time_period, $cid_for_time_period,&lt;br /&gt;
                $non_admin_limit, $admin_time_limit, $admin_non_time_limit,&lt;br /&gt;
                $options) = @_;&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $store_cutoff = $options-&amp;gt;{use_uid_cid_cutoff} ? $constants-&amp;gt;{store_com_page1_min_cid_for_user_com_cnt} : 0;&lt;br /&gt;
&lt;br /&gt;
        my $s_opt = {};&lt;br /&gt;
        my $num_wanted = 0;&lt;br /&gt;
        if ($min_comment) {&lt;br /&gt;
                if ($user-&amp;gt;{is_admin}) {&lt;br /&gt;
                        $num_wanted = $admin_non_time_limit;&lt;br /&gt;
                } else {&lt;br /&gt;
                        $num_wanted = $non_admin_limit;&lt;br /&gt;
                }&lt;br /&gt;
        } else {&lt;br /&gt;
&lt;br /&gt;
                if ($user-&amp;gt;{is_admin}) {&lt;br /&gt;
                        if ($cc_time_period &amp;gt;= $admin_non_time_limit) {&lt;br /&gt;
                                $s_opt-&amp;gt;{cid_at_or_after} = $cid_for_time_period;&lt;br /&gt;
                                $num_wanted = $admin_time_limit;&lt;br /&gt;
                        } else {&lt;br /&gt;
                                $num_wanted = $admin_non_time_limit;&lt;br /&gt;
                                if($store_cutoff){&lt;br /&gt;
                                        my $min_cid = $reader-&amp;gt;getUser($value,&lt;br /&gt;
                                                &amp;quot;com_num_&amp;quot;.$num_wanted.&amp;quot;_at_or_after_cid&amp;quot;);&lt;br /&gt;
                                        $s_opt-&amp;gt;{cid_at_or_after} = $min_cid&lt;br /&gt;
                                                if $min_cid &amp;amp;&amp;amp; $min_cid =~ /^\d+$/;&lt;br /&gt;
                                }&lt;br /&gt;
                        }&lt;br /&gt;
                } else {&lt;br /&gt;
                        if ($cc_time_period &amp;gt;= $non_admin_limit ) {&lt;br /&gt;
                                $s_opt-&amp;gt;{cid_at_or_after} = $cid_for_time_period;&lt;br /&gt;
                                $num_wanted = $non_admin_limit;&lt;br /&gt;
                        } else {&lt;br /&gt;
                                $num_wanted = $non_admin_limit;&lt;br /&gt;
                                if($store_cutoff){&lt;br /&gt;
                                        my $min_cid = $reader-&amp;gt;getUser($value,&lt;br /&gt;
                                                &amp;quot;com_num_&amp;quot;.$num_wanted.&amp;quot;_at_or_after_cid&amp;quot;);&lt;br /&gt;
                                        $s_opt-&amp;gt;{cid_at_or_after} = $min_cid&lt;br /&gt;
                                                if $min_cid &amp;amp;&amp;amp; $min_cid =~ /^\d+$/;&lt;br /&gt;
                                }&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
        if ($type eq &amp;quot;uid&amp;quot;) {&lt;br /&gt;
&lt;br /&gt;
                my $comments = $reader-&amp;gt;getCommentsByUID($value, $num_wanted, $min_comment, $s_opt) if $cc_all;&lt;br /&gt;
                if ($store_cutoff&lt;br /&gt;
                        &amp;amp;&amp;amp; $comments &amp;amp;&amp;amp; $cc_all &amp;gt;= $store_cutoff &amp;amp;&amp;amp; $min_comment == 0 &lt;br /&gt;
                        &amp;amp;&amp;amp; scalar(@$comments) == $num_wanted) {&lt;br /&gt;
                        my $min_cid = 0;&lt;br /&gt;
                        for my $comment (@$comments) {&lt;br /&gt;
                                $min_cid = $comment-&amp;gt;{cid}&lt;br /&gt;
                                        if !$min_cid || ($comment-&amp;gt;{cid} &amp;lt; $min_cid); &lt;br /&gt;
                        }&lt;br /&gt;
                        if ($min_cid &amp;amp;&amp;amp; $min_cid =~/^\d+$/) {&lt;br /&gt;
                                $slashdb-&amp;gt;setUser($value, {&lt;br /&gt;
                                        &amp;quot;com_num_&amp;quot;.$num_wanted.&amp;quot;_at_or_after_cid&amp;quot; =&amp;gt; $min_cid&lt;br /&gt;
                                });&lt;br /&gt;
                        }&lt;br /&gt;
&lt;br /&gt;
                }&lt;br /&gt;
                return $comments;&lt;br /&gt;
        } elsif ($type eq &amp;quot;ipid&amp;quot;){&lt;br /&gt;
                return $reader-&amp;gt;getCommentsByIPID($value, $num_wanted, $min_comment, $s_opt) if $cc_all;&lt;br /&gt;
        } elsif ($type eq &amp;quot;subnetid&amp;quot;){&lt;br /&gt;
                return $reader-&amp;gt;getCommentsBySubnetID($value, $num_wanted, $min_comment, $s_opt) if $cc_all;&lt;br /&gt;
        } else {&lt;br /&gt;
                return $reader-&amp;gt;getCommentsByIPIDOrSubnetID($value, $num_wanted, $min_comment, $s_opt) if $cc_all;&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
createEnvironment();&lt;br /&gt;
main();&lt;br /&gt;
&lt;br /&gt;
1;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=PerlModuleUsers&amp;diff=5372</id>
		<title>PerlModuleUsers</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=PerlModuleUsers&amp;diff=5372"/>
		<updated>2014-03-01T19:15:14Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[CssWork]] parent&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Man page for users&amp;lt;/h2&amp;gt;&lt;br /&gt;
Don't waste your time...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# man Slash::Users&lt;br /&gt;
No manual entry for Slash::Users&lt;br /&gt;
[root@slashcode htdocs]# man Slash::Users2&lt;br /&gt;
Users2(3)             User Contributed Perl Documentation            Users2(3)&lt;br /&gt;
&lt;br /&gt;
NAME&lt;br /&gt;
       Slash::Users2&lt;br /&gt;
&lt;br /&gt;
SYNOPSIS&lt;br /&gt;
               use Slash::Users2;&lt;br /&gt;
&lt;br /&gt;
DESCRIPTION&lt;br /&gt;
       Provides homepages for users.&lt;br /&gt;
&lt;br /&gt;
AUTHOR&lt;br /&gt;
       Christopher Brown, cbrown@corp.sourcefore.com&lt;br /&gt;
&lt;br /&gt;
SEE ALSO&lt;br /&gt;
       perl(1).&lt;br /&gt;
&lt;br /&gt;
perl v5.10.1                      2014-02-20                         Users2(3)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Source of users.pl&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/bin/perl -w&lt;br /&gt;
# This code is a part of Slash, and is released under the GPL.&lt;br /&gt;
# Copyright 1997-2005 by Open Source Technology Group. See README&lt;br /&gt;
# and COPYING for more information, or see http://slashcode.com/.&lt;br /&gt;
# $Id$&lt;br /&gt;
&lt;br /&gt;
use strict;&lt;br /&gt;
use Digest::MD5 'md5_hex';&lt;br /&gt;
use Slash;&lt;br /&gt;
use Slash::Display;&lt;br /&gt;
use Slash::Utility;&lt;br /&gt;
use Slash::Constants qw(:messages);&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub main {&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $gSkin = getCurrentSkin();&lt;br /&gt;
        my $formname = $0;&lt;br /&gt;
        $formname =~ s/.*\/(\w+)\.pl/$1/;&lt;br /&gt;
&lt;br /&gt;
        my $error_flag = 0;&lt;br /&gt;
        my $formkey = $form-&amp;gt;{formkey};&lt;br /&gt;
&lt;br /&gt;
        my $suadmin_flag = $user-&amp;gt;{seclev} &amp;gt;= 10000 ? 1 : 0 ;&lt;br /&gt;
        my $postflag = $user-&amp;gt;{state}{post};&lt;br /&gt;
        my $op = lc($form-&amp;gt;{op});&lt;br /&gt;
&lt;br /&gt;
        # savepasswd is a special case, because once it's called, you&lt;br /&gt;
        # have to reload the form, and you don't want to do any checks if&lt;br /&gt;
        # you've just saved.&lt;br /&gt;
        my $savepass_flag = $op eq 'savepasswd' ? 1 : 0 ;&lt;br /&gt;
&lt;br /&gt;
        my $ops = {&lt;br /&gt;
                admin           =&amp;gt;  {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;adminDispatch,&lt;br /&gt;
                        seclev          =&amp;gt; 10000,       # if this should be lower,&lt;br /&gt;
                                                        # then something else is&lt;br /&gt;
                                                        # broken, because it allows&lt;br /&gt;
                                                        # anyone with this seclev&lt;br /&gt;
                                                        # to change their own seclev&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        # just in case we need it for something else, we have it ...&lt;br /&gt;
                        checks          =&amp;gt; [ qw (generate_formkey) ],&lt;br /&gt;
                },&lt;br /&gt;
#               userlogin       =&amp;gt;  {&lt;br /&gt;
#                       function        =&amp;gt; \&amp;amp;showInfo,&lt;br /&gt;
#                       seclev          =&amp;gt; 1,&lt;br /&gt;
#                       formname        =&amp;gt; $formname,&lt;br /&gt;
#                       checks          =&amp;gt; [],&lt;br /&gt;
#                       tab_selected_1  =&amp;gt; 'me',&lt;br /&gt;
#               },&lt;br /&gt;
                no_user =&amp;gt;  {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;noUser,&lt;br /&gt;
                        seclev          =&amp;gt; 0,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                },&lt;br /&gt;
                userinfo        =&amp;gt;  {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;showInfo,&lt;br /&gt;
                        #I made this change, not all sites are going to care. -Brian&lt;br /&gt;
                        seclev          =&amp;gt; $constants-&amp;gt;{users_show_info_seclev},&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'me',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'info',&lt;br /&gt;
                },&lt;br /&gt;
                userfirehose    =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;showFireHose,&lt;br /&gt;
                        seclev          =&amp;gt; 0,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'me',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'firehose'&lt;br /&gt;
                },&lt;br /&gt;
                usersubmissions =&amp;gt;  {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;showSubmissions,&lt;br /&gt;
                        #I made this change, not all sites are going to care. -Brian&lt;br /&gt;
                        seclev          =&amp;gt; $constants-&amp;gt;{users_show_info_seclev},&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'me',&lt;br /&gt;
                },&lt;br /&gt;
                usercomments    =&amp;gt;  {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;showComments,&lt;br /&gt;
                        #I made this change, not all sites are going to care. -Brian&lt;br /&gt;
                        seclev          =&amp;gt; $constants-&amp;gt;{users_show_info_seclev},&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'me',&lt;br /&gt;
                },&lt;br /&gt;
                display =&amp;gt;  {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;showInfo,&lt;br /&gt;
                        #I made this change, not all sites are going to care. -Brian&lt;br /&gt;
                        seclev          =&amp;gt; $constants-&amp;gt;{users_show_info_seclev},&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'me',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'info',&lt;br /&gt;
                },&lt;br /&gt;
#               savepasswd      =&amp;gt; {&lt;br /&gt;
#                       function        =&amp;gt; \&amp;amp;savePasswd,&lt;br /&gt;
#                       seclev          =&amp;gt; 1,&lt;br /&gt;
#                       post            =&amp;gt; 1,&lt;br /&gt;
#                       formname        =&amp;gt; $formname,&lt;br /&gt;
#                       checks          =&amp;gt; [ qw (max_post_check valid_check&lt;br /&gt;
#                                               formkey_check regen_formkey) ],&lt;br /&gt;
#                       tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
#                       tab_selected_2  =&amp;gt; 'password',&lt;br /&gt;
#               },&lt;br /&gt;
                saveuseradmin   =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;saveUserAdmin,&lt;br /&gt;
                        seclev          =&amp;gt; 10000,&lt;br /&gt;
                        post            =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                },&lt;br /&gt;
                savehome        =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;saveHome,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        post            =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [ qw (valid_check&lt;br /&gt;
                                                formkey_check regen_formkey) ],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'home',&lt;br /&gt;
                },&lt;br /&gt;
                savecomm        =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;saveComm,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        post            =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [ qw (valid_check&lt;br /&gt;
                                                formkey_check regen_formkey) ],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'comments',&lt;br /&gt;
                },&lt;br /&gt;
                saveuser        =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;saveUser,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        post            =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [ qw (valid_check&lt;br /&gt;
                                                formkey_check regen_formkey) ],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'user',&lt;br /&gt;
                },&lt;br /&gt;
#               changepasswd    =&amp;gt; {&lt;br /&gt;
#                       function        =&amp;gt; \&amp;amp;changePasswd,&lt;br /&gt;
#                       seclev          =&amp;gt; 1,&lt;br /&gt;
#                       formname        =&amp;gt; $formname,&lt;br /&gt;
#                       checks          =&amp;gt; $savepass_flag ? [] :&lt;br /&gt;
#                                               [ qw (generate_formkey) ],&lt;br /&gt;
#                       tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
#                       tab_selected_2  =&amp;gt; 'password',&lt;br /&gt;
#               },&lt;br /&gt;
                editmiscopts    =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;editMiscOpts,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [ ],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'misc',&lt;br /&gt;
                },&lt;br /&gt;
                savemiscopts    =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;saveMiscOpts,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [ ],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'misc',&lt;br /&gt;
                },&lt;br /&gt;
                edituser        =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;editUser,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [ qw (generate_formkey) ],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'user',&lt;br /&gt;
                },&lt;br /&gt;
                authoredit      =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;editUser,&lt;br /&gt;
                        seclev          =&amp;gt; 10000,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                },&lt;br /&gt;
                edithome        =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;editHome,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [ qw (generate_formkey) ],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'home',&lt;br /&gt;
                },&lt;br /&gt;
                editcomm        =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;editComm,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [ qw (generate_formkey) ],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'comments',&lt;br /&gt;
                },&lt;br /&gt;
#               newuser         =&amp;gt; {&lt;br /&gt;
#                       function        =&amp;gt; \&amp;amp;newUser,&lt;br /&gt;
#                       seclev          =&amp;gt; 0,&lt;br /&gt;
#                       formname        =&amp;gt; &amp;quot;${formname}/nu&amp;quot;,&lt;br /&gt;
#                       checks          =&amp;gt; [ qw (max_post_check valid_check&lt;br /&gt;
#                                               formkey_check regen_formkey) ],&lt;br /&gt;
#               },&lt;br /&gt;
                newuseradmin    =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;newUserForm,&lt;br /&gt;
                        seclev          =&amp;gt; 10000,&lt;br /&gt;
                        formname        =&amp;gt; &amp;quot;${formname}/nu&amp;quot;,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                },&lt;br /&gt;
                previewbox      =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;previewSlashbox,&lt;br /&gt;
                        seclev          =&amp;gt; 0,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                },&lt;br /&gt;
#               mailpasswd      =&amp;gt; {&lt;br /&gt;
#                       function        =&amp;gt; \&amp;amp;mailPasswd,&lt;br /&gt;
#                       seclev          =&amp;gt; 0,&lt;br /&gt;
#                       formname        =&amp;gt; &amp;quot;${formname}/mp&amp;quot;,&lt;br /&gt;
#                       checks          =&amp;gt; [ qw (max_post_check valid_check&lt;br /&gt;
#                                               interval_check formkey_check ) ],&lt;br /&gt;
#                       tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
#                       tab_selected_2  =&amp;gt; 'password',&lt;br /&gt;
#               },&lt;br /&gt;
                validateuser    =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;validateUser,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; ['regen_formkey'],&lt;br /&gt;
                },&lt;br /&gt;
                showtags =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;showTags,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        tab_selected    =&amp;gt; 'tags',&lt;br /&gt;
                },&lt;br /&gt;
                showbookmarks =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;showBookmarks,&lt;br /&gt;
                        seclev          =&amp;gt; 0,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        tab_selected    =&amp;gt; 'bookmarks',&lt;br /&gt;
                },&lt;br /&gt;
                edittags =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;editTags,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        tab_selected    =&amp;gt; 'tags',&lt;br /&gt;
                },&lt;br /&gt;
                savetags =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;saveTags,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        tab_selected    =&amp;gt; 'tags',&lt;br /&gt;
                },&lt;br /&gt;
#               userclose       =&amp;gt;  {&lt;br /&gt;
#                       function        =&amp;gt; \&amp;amp;displayForm,&lt;br /&gt;
#                       seclev          =&amp;gt; 0,&lt;br /&gt;
#                       formname        =&amp;gt; $formname,&lt;br /&gt;
#                       checks          =&amp;gt; [],&lt;br /&gt;
#               },&lt;br /&gt;
#               newuserform     =&amp;gt; {&lt;br /&gt;
#                       function        =&amp;gt; \&amp;amp;displayForm,&lt;br /&gt;
#                       seclev          =&amp;gt; 0,&lt;br /&gt;
#                       formname        =&amp;gt; &amp;quot;${formname}/nu&amp;quot;,&lt;br /&gt;
#                       checks          =&amp;gt; [ qw (max_post_check&lt;br /&gt;
#                                               generate_formkey) ],&lt;br /&gt;
#               },&lt;br /&gt;
#               mailpasswdform  =&amp;gt; {&lt;br /&gt;
#                       function        =&amp;gt; \&amp;amp;displayForm,&lt;br /&gt;
#                       seclev          =&amp;gt; 0,&lt;br /&gt;
#                       formname        =&amp;gt; &amp;quot;${formname}/mp&amp;quot;,&lt;br /&gt;
#                       checks          =&amp;gt; [ qw (max_post_check&lt;br /&gt;
#                                               generate_formkey) ],&lt;br /&gt;
#                       tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
#                       tab_selected_2  =&amp;gt; 'password',&lt;br /&gt;
#               },&lt;br /&gt;
                displayform     =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;displayForm,&lt;br /&gt;
                        seclev          =&amp;gt; 0,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [ qw (generate_formkey) ],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'me',&lt;br /&gt;
                },&lt;br /&gt;
                listreadonly =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;listReadOnly,&lt;br /&gt;
                        seclev          =&amp;gt; 100,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        adminmenu       =&amp;gt; 'security',&lt;br /&gt;
                        tab_selected    =&amp;gt; 'readonly',&lt;br /&gt;
                },&lt;br /&gt;
                listbanned =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;listBanned,&lt;br /&gt;
                        seclev          =&amp;gt; 100,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        adminmenu       =&amp;gt; 'security',&lt;br /&gt;
                        tab_selected    =&amp;gt; 'banned',&lt;br /&gt;
                },&lt;br /&gt;
                topabusers      =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;topAbusers,&lt;br /&gt;
                        seclev          =&amp;gt; 100,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        adminmenu       =&amp;gt; 'security',&lt;br /&gt;
                        tab_selected    =&amp;gt; 'abusers',&lt;br /&gt;
                },&lt;br /&gt;
                listabuses      =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;listAbuses,&lt;br /&gt;
                        seclev          =&amp;gt; 100,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                },&lt;br /&gt;
                force_acct_verify =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;forceAccountVerify,&lt;br /&gt;
                        seclev          =&amp;gt; 100,&lt;br /&gt;
                        post            =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; []&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
        } ;&lt;br /&gt;
&lt;br /&gt;
        # Note this is NOT the default op.  &amp;quot;userlogin&amp;quot; or &amp;quot;userinfo&amp;quot; is&lt;br /&gt;
        # the default op, and it's set either 5 lines down or about 100&lt;br /&gt;
        # lines down, depending.  Yes, that's dumb.  Yes, we should&lt;br /&gt;
        # change it.  It would require tracing through a fair bit of logic&lt;br /&gt;
        # though and I don't have the time right now. - Jamie&lt;br /&gt;
        $ops-&amp;gt;{default} = $ops-&amp;gt;{displayform};&lt;br /&gt;
        for (qw(newuser newuserform mailpasswd mailpasswdform changepasswd savepasswd userlogin userclose)) {&lt;br /&gt;
                $ops-&amp;gt;{$_} = $ops-&amp;gt;{default};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $errornote = &amp;quot;&amp;quot;;&lt;br /&gt;
        if ($form-&amp;gt;{op} &amp;amp;&amp;amp; ! defined $ops-&amp;gt;{$op}) {&lt;br /&gt;
                $errornote .= getError('bad_op', { op =&amp;gt; $form-&amp;gt;{op}}, 0, 1);&lt;br /&gt;
                $op = $user-&amp;gt;{is_anon} ? 'userlogin' : 'userinfo'; &lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($op eq 'userlogin' &amp;amp;&amp;amp; ! $user-&amp;gt;{is_anon}) {&lt;br /&gt;
                redirect(cleanRedirectUrl($form-&amp;gt;{returnto} || ''));&lt;br /&gt;
                return;&lt;br /&gt;
&lt;br /&gt;
        # this will only redirect if it is a section-based rootdir with&lt;br /&gt;
        # its rootdir different from real_rootdir&lt;br /&gt;
        } elsif ($op eq 'userclose' &amp;amp;&amp;amp; $gSkin-&amp;gt;{rootdir} ne $constants-&amp;gt;{real_rootdir}) {&lt;br /&gt;
                redirect($constants-&amp;gt;{real_rootdir} . '/login.pl?op=userclose');&lt;br /&gt;
                return;&lt;br /&gt;
&lt;br /&gt;
        } elsif ($op =~ /^(?:newuser|newuserform|mailpasswd|mailpasswdform|changepasswd|savepasswd|userlogin|userclose|displayform)$/) {&lt;br /&gt;
                my $op = $form-&amp;gt;{op};&lt;br /&gt;
                $op = 'changeprefs' if $op eq 'changepasswd';&lt;br /&gt;
                $op = 'saveprefs'   if $op eq 'savepasswd';&lt;br /&gt;
                redirect($constants-&amp;gt;{real_rootdir} . '/login.pl?op=' . $op);&lt;br /&gt;
                return;&lt;br /&gt;
&lt;br /&gt;
        # never get here now&lt;br /&gt;
        } elsif ($op eq 'savepasswd') {&lt;br /&gt;
                my $error_flag = 0;&lt;br /&gt;
                if ($user-&amp;gt;{seclev} &amp;lt; 100) {&lt;br /&gt;
                        for my $check (@{$ops-&amp;gt;{savepasswd}{checks}}) {&lt;br /&gt;
                                # the only way to save the error message is to pass by ref&lt;br /&gt;
                                # $errornote and add the message to note (you can't print&lt;br /&gt;
                                # it out before header is called)&lt;br /&gt;
                                $error_flag = formkeyHandler($check, $formname, $formkey, \$errornote);&lt;br /&gt;
                                last if $error_flag;&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                if (! $error_flag) {&lt;br /&gt;
                        $error_flag = savePasswd({ noteref =&amp;gt; \$errornote }) ;&lt;br /&gt;
                }&lt;br /&gt;
                # change op to edituser and let fall through;&lt;br /&gt;
                # we need to have savePasswd set the cookie before&lt;br /&gt;
                # header() is called -- pudge&lt;br /&gt;
                if ($user-&amp;gt;{seclev} &amp;lt; 100 &amp;amp;&amp;amp; ! $error_flag) {&lt;br /&gt;
                        $slashdb-&amp;gt;updateFormkey($formkey, length($ENV{QUERY_STRING}));&lt;br /&gt;
                }&lt;br /&gt;
                $op = $error_flag ? 'changepasswd' : 'userinfo';&lt;br /&gt;
                $form-&amp;gt;{userfield} = $user-&amp;gt;{uid};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Figure out what the op really is.&lt;br /&gt;
        $op = 'userinfo' if (! $form-&amp;gt;{op} &amp;amp;&amp;amp; ($form-&amp;gt;{uid} || $form-&amp;gt;{nick}));&lt;br /&gt;
        $op ||= $user-&amp;gt;{is_anon} ? 'userlogin' : 'userinfo';&lt;br /&gt;
        if ($user-&amp;gt;{is_anon} &amp;amp;&amp;amp; ( ($ops-&amp;gt;{$op}{seclev} &amp;gt; 0) || ($op =~ /^newuserform|mailpasswdform|displayform$/) )) {&lt;br /&gt;
                redirect($constants-&amp;gt;{real_rootdir} . '/login.pl');&lt;br /&gt;
                return;&lt;br /&gt;
        } elsif ($user-&amp;gt;{seclev} &amp;lt; $ops-&amp;gt;{$op}{seclev}) {&lt;br /&gt;
                $op = 'userinfo';&lt;br /&gt;
        }&lt;br /&gt;
        if ($ops-&amp;gt;{$op}{post} &amp;amp;&amp;amp; !$postflag) {&lt;br /&gt;
                $op = $user-&amp;gt;{is_anon} ? 'default' : 'userinfo';&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Print the header and very top stuff on the page.  We have&lt;br /&gt;
        # three ops that (may) end up routing into showInfo(), which&lt;br /&gt;
        # needs to do some stuff before it calls header(), so for&lt;br /&gt;
        # those three, don't bother.&lt;br /&gt;
        my $header;&lt;br /&gt;
        if ($op !~ /^(userinfo|display|saveuseradmin|admin|userfirehose$)/) {&lt;br /&gt;
                my $data = {&lt;br /&gt;
                        adminmenu =&amp;gt; $ops-&amp;gt;{$op}{adminmenu} || 'admin',&lt;br /&gt;
                        tab_selected =&amp;gt; $ops-&amp;gt;{$op}{tab_selected},&lt;br /&gt;
                };&lt;br /&gt;
                header(getMessage('user_header'), '', $data) or return;&lt;br /&gt;
                # This is a hardcoded position, bad idea and should be fixed -Brian&lt;br /&gt;
                # Yeah, we should pull this into a template somewhere...&lt;br /&gt;
                print getMessage('note', { note =&amp;gt; $errornote }) if defined $errornote;&lt;br /&gt;
                $header = 1;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($constants-&amp;gt;{admin_formkeys} || $user-&amp;gt;{seclev} &amp;lt; 100) {&lt;br /&gt;
&lt;br /&gt;
                my $done = 0;&lt;br /&gt;
                $done = 1 if $op eq 'savepasswd'; # special case&lt;br /&gt;
                $formname = $ops-&amp;gt;{$op}{formname};&lt;br /&gt;
&lt;br /&gt;
                # No need for HumanConf if the constant for it is not&lt;br /&gt;
                # switched on, or if the user's karma is high enough&lt;br /&gt;
                # to get out of it.  (But for &amp;quot;newuserform,&amp;quot; the current&lt;br /&gt;
                # user's karma doesn't get them out of having to prove&lt;br /&gt;
                # they're a human for creating a *new* user.)&lt;br /&gt;
                my $options = {};&lt;br /&gt;
                if (       !$constants-&amp;gt;{plugin}{HumanConf}&lt;br /&gt;
                        || !$constants-&amp;gt;{hc}&lt;br /&gt;
                        || !$constants-&amp;gt;{hc_sw_newuser}&lt;br /&gt;
                                &amp;amp;&amp;amp; ($formname eq 'users/nu' || $op eq 'newuserform')&lt;br /&gt;
                        || !$constants-&amp;gt;{hc_sw_mailpasswd}&lt;br /&gt;
                                &amp;amp;&amp;amp; ($formname eq 'users/mp' || $op eq 'mailpasswdform')&lt;br /&gt;
                        || $user-&amp;gt;{karma} &amp;gt; $constants-&amp;gt;{hc_maxkarma}&lt;br /&gt;
                                &amp;amp;&amp;amp; !$user-&amp;gt;{is_anon}&lt;br /&gt;
                                &amp;amp;&amp;amp; !($op eq 'newuser' || $op eq 'newuserform')&lt;br /&gt;
                ) {&lt;br /&gt;
                        $options-&amp;gt;{no_hc} = 1;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                DO_CHECKS: while (!$done) {&lt;br /&gt;
                        for my $check (@{$ops-&amp;gt;{$op}{checks}}) {&lt;br /&gt;
                                $ops-&amp;gt;{$op}{update_formkey} = 1 if $check eq 'formkey_check';&lt;br /&gt;
                                $error_flag = formkeyHandler($check, $formname, $formkey,&lt;br /&gt;
                                        undef, $options);&lt;br /&gt;
                                if ($error_flag == -1) {&lt;br /&gt;
                                        # Special error:  HumanConf failed.  Go&lt;br /&gt;
                                        # back to the previous op, start over.&lt;br /&gt;
                                        if ($op =~ /^(newuser|mailpasswd)$/) {&lt;br /&gt;
                                                $op .= &amp;quot;form&amp;quot;;&lt;br /&gt;
                                                $error_flag = 0;&lt;br /&gt;
                                                next DO_CHECKS;&lt;br /&gt;
                                        }&lt;br /&gt;
                                } elsif ($error_flag) {&lt;br /&gt;
                                        $done = 1;&lt;br /&gt;
                                        last;&lt;br /&gt;
                                }&lt;br /&gt;
                        }&lt;br /&gt;
                        $done = 1;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                if (!$error_flag &amp;amp;&amp;amp; !$options-&amp;gt;{no_hc}) {&lt;br /&gt;
                        my $hc = getObject(&amp;quot;Slash::HumanConf&amp;quot;);&lt;br /&gt;
                        $hc-&amp;gt;reloadFormkeyHC($formname) if $hc;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        errorLog(&amp;quot;users.pl error_flag '$error_flag'&amp;quot;) if $error_flag;&lt;br /&gt;
&lt;br /&gt;
        # call the method&lt;br /&gt;
        my $retval;&lt;br /&gt;
        $retval = $ops-&amp;gt;{$op}{function}-&amp;gt;({&lt;br /&gt;
                op              =&amp;gt; $op,&lt;br /&gt;
                tab_selected_1  =&amp;gt; $ops-&amp;gt;{$op}{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
                note            =&amp;gt; $errornote,&lt;br /&gt;
        }) if !$error_flag;&lt;br /&gt;
&lt;br /&gt;
        return if !$retval;&lt;br /&gt;
&lt;br /&gt;
        if ($op eq 'mailpasswd' &amp;amp;&amp;amp; $retval) {&lt;br /&gt;
                $ops-&amp;gt;{$op}{update_formkey} = 0;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($ops-&amp;gt;{$op}{update_formkey} &amp;amp;&amp;amp; $user-&amp;gt;{seclev} &amp;lt; 100 &amp;amp;&amp;amp; ! $error_flag) {&lt;br /&gt;
                # successful save action, no formkey errors, update existing formkey&lt;br /&gt;
                # why assign to an unused variable? -- pudge&lt;br /&gt;
                my $updated = $slashdb-&amp;gt;updateFormkey($formkey, length($ENV{QUERY_STRING}));&lt;br /&gt;
        }&lt;br /&gt;
        # if there were legit error levels returned from the save methods&lt;br /&gt;
        # I would have it clear the formkey in case of an error, but that&lt;br /&gt;
        # needs to be sorted out later&lt;br /&gt;
        # else { resetFormkey($formkey); }&lt;br /&gt;
&lt;br /&gt;
        writeLog($user-&amp;gt;{nickname});&lt;br /&gt;
        footer();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub checkList {&lt;br /&gt;
        my($string, $len) = @_;&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        $string =~ s/[^\w,-]//g;&lt;br /&gt;
        my @items = grep { $_ } split /,/, $string;&lt;br /&gt;
        $string = join &amp;quot;,&amp;quot;, @items;&lt;br /&gt;
&lt;br /&gt;
        $len ||= $constants-&amp;gt;{checklist_length} || 255;&lt;br /&gt;
        if (length($string) &amp;gt; $len) {&lt;br /&gt;
                print getError('checklist_err');&lt;br /&gt;
                $string = substr($string, 0, $len);&lt;br /&gt;
                $string =~ s/,?\w*$//g;&lt;br /&gt;
        } elsif (length($string) &amp;lt; 1) {&lt;br /&gt;
                $string = '';&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        return $string;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub previewSlashbox {&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
&lt;br /&gt;
        my $block = $reader-&amp;gt;getBlock($form-&amp;gt;{bid}, ['title', 'block', 'url']);&lt;br /&gt;
        my $is_editable = $user-&amp;gt;{seclev} &amp;gt;= 1000;&lt;br /&gt;
&lt;br /&gt;
        my $title = getTitle('previewslashbox_title', { blocktitle =&amp;gt; $block-&amp;gt;{title} });&lt;br /&gt;
        slashDisplay('previewSlashbox', {&lt;br /&gt;
                width           =&amp;gt; '100%',&lt;br /&gt;
                title           =&amp;gt; $title,&lt;br /&gt;
                block           =&amp;gt; $block,&lt;br /&gt;
                is_editable     =&amp;gt; $is_editable,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        print portalbox($constants-&amp;gt;{fancyboxwidth}, $block-&amp;gt;{title},&lt;br /&gt;
                $block-&amp;gt;{block}, '', $block-&amp;gt;{url});&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub newUserForm {&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $suadmin_flag = $user-&amp;gt;{seclev} &amp;gt;= 10000;&lt;br /&gt;
        my $title = getTitle('newUserForm_title');&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('newUserForm', {&lt;br /&gt;
                title           =&amp;gt; $title, &lt;br /&gt;
                suadmin_flag    =&amp;gt; $suadmin_flag,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub newUser {&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        my $plugins = $slashdb-&amp;gt;getDescriptions('plugins');&lt;br /&gt;
        my $title;&lt;br /&gt;
        my $suadmin_flag = $user-&amp;gt;{seclev} &amp;gt;= 10000 ? 1 : 0;&lt;br /&gt;
&lt;br /&gt;
        # Check if User Exists&lt;br /&gt;
        $form-&amp;gt;{newusernick} = nickFix($form-&amp;gt;{newusernick});&lt;br /&gt;
        my $matchname = nick2matchname($form-&amp;gt;{newusernick});&lt;br /&gt;
&lt;br /&gt;
        if (!$form-&amp;gt;{email} || $form-&amp;gt;{email} !~ /\@/) {&lt;br /&gt;
                print getError('email_invalid', 0, 1);&lt;br /&gt;
                return;&lt;br /&gt;
        } elsif ($form-&amp;gt;{email} ne $form-&amp;gt;{email2}) {&lt;br /&gt;
                print getError('email_do_not_match', 0, 1);&lt;br /&gt;
                return;&lt;br /&gt;
        } elsif ($slashdb-&amp;gt;existsEmail($form-&amp;gt;{email})) {&lt;br /&gt;
                print getError('emailexists_err', 0, 1);&lt;br /&gt;
                return;&lt;br /&gt;
        } elsif ($matchname ne '' &amp;amp;&amp;amp; $form-&amp;gt;{newusernick} ne '') {&lt;br /&gt;
                if ($constants-&amp;gt;{newuser_portscan}) {&lt;br /&gt;
                        my $is_trusted = $slashdb-&amp;gt;checkAL2($user-&amp;gt;{srcids}, 'trusted');&lt;br /&gt;
                        if (!$is_trusted) {&lt;br /&gt;
                                my $is_proxy = $slashdb-&amp;gt;checkForOpenProxy($user-&amp;gt;{hostip});&lt;br /&gt;
                                if ($is_proxy) {&lt;br /&gt;
                                        print getError('new user open proxy', {&lt;br /&gt;
                                                unencoded_ip    =&amp;gt; $ENV{REMOTE_ADDR},&lt;br /&gt;
                                                port            =&amp;gt; $is_proxy,&lt;br /&gt;
                                        });&lt;br /&gt;
                                        return;&lt;br /&gt;
                                }&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
                my $uid;&lt;br /&gt;
                my $rootdir = getCurrentSkin('rootdir');&lt;br /&gt;
&lt;br /&gt;
                $uid = $slashdb-&amp;gt;createUser(&lt;br /&gt;
                        $matchname, $form-&amp;gt;{email}, $form-&amp;gt;{newusernick}&lt;br /&gt;
                );&lt;br /&gt;
                if ($uid) {&lt;br /&gt;
                        my $data = {};&lt;br /&gt;
                        getOtherUserParams($data);&lt;br /&gt;
&lt;br /&gt;
                        for (qw(tzcode)) {&lt;br /&gt;
                                $data-&amp;gt;{$_} = $form-&amp;gt;{$_} if defined $form-&amp;gt;{$_};&lt;br /&gt;
                        }&lt;br /&gt;
                        $data-&amp;gt;{creation_ipid} = $user-&amp;gt;{ipid};&lt;br /&gt;
&lt;br /&gt;
                        $slashdb-&amp;gt;setUser($uid, $data) if keys %$data;&lt;br /&gt;
                        $title = getTitle('newUser_title');&lt;br /&gt;
&lt;br /&gt;
                        $form-&amp;gt;{pubkey} = $plugins-&amp;gt;{'Pubkey'} ?&lt;br /&gt;
                                strip_nohtml($form-&amp;gt;{pubkey}, 1) : '';&lt;br /&gt;
                        print getMessage('newuser_msg', { &lt;br /&gt;
                                suadmin_flag    =&amp;gt; $suadmin_flag, &lt;br /&gt;
                                title           =&amp;gt; $title, &lt;br /&gt;
                                uid             =&amp;gt; $uid&lt;br /&gt;
                        });&lt;br /&gt;
&lt;br /&gt;
                        if ($form-&amp;gt;{newsletter} || $form-&amp;gt;{comment_reply} || $form-&amp;gt;{headlines}) {&lt;br /&gt;
                                my $messages  = getObject('Slash::Messages');&lt;br /&gt;
                                my %params;&lt;br /&gt;
                                $params{MSG_CODE_COMMENT_REPLY()} = MSG_MODE_EMAIL()&lt;br /&gt;
                                        if $form-&amp;gt;{comment_reply};&lt;br /&gt;
                                $params{MSG_CODE_NEWSLETTER()}  = MSG_MODE_EMAIL()&lt;br /&gt;
                                        if $form-&amp;gt;{newsletter};&lt;br /&gt;
                                $params{MSG_CODE_HEADLINES()}   = MSG_MODE_EMAIL()&lt;br /&gt;
                                        if $form-&amp;gt;{headlines};&lt;br /&gt;
                                $messages-&amp;gt;setPrefs($uid, \%params);&lt;br /&gt;
                        }&lt;br /&gt;
&lt;br /&gt;
                        mailPasswd({ uid =&amp;gt; $uid });&lt;br /&gt;
&lt;br /&gt;
                        return;&lt;br /&gt;
                } else {&lt;br /&gt;
                        $slashdb-&amp;gt;resetFormkey($form-&amp;gt;{formkey});&lt;br /&gt;
                        print getError('duplicate_user', { &lt;br /&gt;
                                nick =&amp;gt; $form-&amp;gt;{newusernick},&lt;br /&gt;
                        });&lt;br /&gt;
                        return;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
        } else {&lt;br /&gt;
                print getError('duplicate_user', { &lt;br /&gt;
                        nick =&amp;gt; $form-&amp;gt;{newusernick},&lt;br /&gt;
                });&lt;br /&gt;
                return;&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub mailPasswd {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        my $uid = $hr-&amp;gt;{uid} || 0;&lt;br /&gt;
&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        if (! $uid) {&lt;br /&gt;
                if ($form-&amp;gt;{unickname} =~ /\@/) {&lt;br /&gt;
                        $uid = $slashdb-&amp;gt;getUserEmail($form-&amp;gt;{unickname});&lt;br /&gt;
&lt;br /&gt;
                } elsif ($form-&amp;gt;{unickname} =~ /^\d+$/) {&lt;br /&gt;
                        my $tmpuser = $slashdb-&amp;gt;getUser($form-&amp;gt;{unickname}, ['uid']);&lt;br /&gt;
                        $uid = $tmpuser-&amp;gt;{uid};&lt;br /&gt;
&lt;br /&gt;
                } else {&lt;br /&gt;
                        $uid = $slashdb-&amp;gt;getUserUID($form-&amp;gt;{unickname});&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $user_edit;&lt;br /&gt;
        my $err_name = '';&lt;br /&gt;
        my $err_opts = {};&lt;br /&gt;
        if (!$uid || isAnon($uid)) {&lt;br /&gt;
                $err_name = 'mailpasswd_notmailed_err';&lt;br /&gt;
        }&lt;br /&gt;
        if (!$err_name) {&lt;br /&gt;
                # Check permissions of _this_ user, not the target&lt;br /&gt;
                # user, to determine whether this IP is OK'd to&lt;br /&gt;
                # send the mail to the target user.&lt;br /&gt;
                # XXXSRCID This should check a separate field like&lt;br /&gt;
                # 'openproxy' instead of piggybacking off of the&lt;br /&gt;
                # existing nopost and spammer&lt;br /&gt;
                my $srcids_to_check = $user-&amp;gt;{srcids};&lt;br /&gt;
                $err_name = 'mailpasswd_readonly_err'&lt;br /&gt;
                        if $reader-&amp;gt;checkAL2($srcids_to_check, 'nopost');&lt;br /&gt;
        }&lt;br /&gt;
        if (!$err_name) {&lt;br /&gt;
                $err_name = 'mailpasswd_toooften_err'&lt;br /&gt;
                        if $slashdb-&amp;gt;checkMaxMailPasswords($user_edit);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if (!$err_name) {&lt;br /&gt;
                if ($constants-&amp;gt;{mailpasswd_portscan}) {&lt;br /&gt;
                        my $is_trusted = $slashdb-&amp;gt;checkAL2($user-&amp;gt;{srcids}, 'trusted');&lt;br /&gt;
                        if (!$is_trusted) {&lt;br /&gt;
                                my $is_proxy = $slashdb-&amp;gt;checkForOpenProxy($user-&amp;gt;{hostip});&lt;br /&gt;
                                if ($is_proxy) {&lt;br /&gt;
                                        $err_name = 'mailpasswd open proxy';&lt;br /&gt;
                                        $err_opts = { unencoded_ip =&amp;gt; $ENV{REMOTE_ADDR}, port =&amp;gt; $is_proxy }; &lt;br /&gt;
                                }&lt;br /&gt;
                        }&lt;br /&gt;
&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($err_name) {&lt;br /&gt;
                print getError($err_name, $err_opts);&lt;br /&gt;
                $slashdb-&amp;gt;resetFormkey($form-&amp;gt;{formkey});&lt;br /&gt;
                $form-&amp;gt;{op} = 'mailpasswdform';&lt;br /&gt;
                displayForm();&lt;br /&gt;
                return(1);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $newpasswd = $slashdb-&amp;gt;getNewPasswd($uid);&lt;br /&gt;
        my $tempnick = $user_edit-&amp;gt;{nickname};&lt;br /&gt;
&lt;br /&gt;
        my $emailtitle = getTitle('mailPassword_email_title', {&lt;br /&gt;
                nickname        =&amp;gt; $user_edit-&amp;gt;{nickname}&lt;br /&gt;
        }, 1);&lt;br /&gt;
&lt;br /&gt;
        # Pull out some data passed in with the request.  Only the IP&lt;br /&gt;
        # number is actually trustworthy, the others could be forged.&lt;br /&gt;
        # Note that we strip the forgeable ones to make sure there&lt;br /&gt;
        # aren't any &amp;quot;&amp;lt;&amp;gt;&amp;quot; chars which could fool a stupid mail client&lt;br /&gt;
        # into parsing a plaintext email as HTML.&lt;br /&gt;
        my $r = Apache-&amp;gt;request;&lt;br /&gt;
        my $remote_ip = $r-&amp;gt;connection-&amp;gt;remote_ip;&lt;br /&gt;
        my $xff = $r-&amp;gt;header_in('X-Forwarded-For') || '';&lt;br /&gt;
        $xff =~ s/\s+/ /g;&lt;br /&gt;
        $xff = substr(strip_notags($xff), 0, 20);&lt;br /&gt;
        my $ua = $r-&amp;gt;header_in('User-Agent') || '';&lt;br /&gt;
        $ua =~ s/\s+/ /g;&lt;br /&gt;
        $ua = substr(strip_attribute($ua), 0, 60);&lt;br /&gt;
&lt;br /&gt;
        my $msg = getMessage('mailpasswd_msg', {&lt;br /&gt;
                newpasswd       =&amp;gt; $newpasswd,&lt;br /&gt;
                tempnick        =&amp;gt; $tempnick,&lt;br /&gt;
                remote_ip       =&amp;gt; $remote_ip,&lt;br /&gt;
                x_forwarded_for =&amp;gt; $xff,&lt;br /&gt;
                user_agent      =&amp;gt; $ua,&lt;br /&gt;
        }, 1);&lt;br /&gt;
&lt;br /&gt;
        doEmail($uid, $emailtitle, $msg) if $user_edit-&amp;gt;{nickname};&lt;br /&gt;
        print getMessage('mailpasswd_mailed_msg', { name =&amp;gt; $user_edit-&amp;gt;{nickname} });&lt;br /&gt;
        $slashdb-&amp;gt;setUserMailPasswd($user_edit);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub showSubmissions {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my($uid, $nickname);&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        if ($form-&amp;gt;{uid} or $form-&amp;gt;{nick}) {&lt;br /&gt;
                $uid            = $form-&amp;gt;{uid} || $reader-&amp;gt;getUserUID($form-&amp;gt;{nick});&lt;br /&gt;
                $nickname       = $reader-&amp;gt;getUser($uid, 'nickname');&lt;br /&gt;
        } else {&lt;br /&gt;
                $nickname       = $user-&amp;gt;{nickname};&lt;br /&gt;
                $uid            = $user-&amp;gt;{uid};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $storycount = $reader-&amp;gt;countStoriesBySubmitter($uid);&lt;br /&gt;
        my $stories = $reader-&amp;gt;getStoriesBySubmitter(&lt;br /&gt;
                $uid,&lt;br /&gt;
                $constants-&amp;gt;{user_submitter_display_default}&lt;br /&gt;
        ) unless !$storycount;&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('userSub', {&lt;br /&gt;
                nick                    =&amp;gt; $nickname,&lt;br /&gt;
                uid                     =&amp;gt; $uid,&lt;br /&gt;
                nickmatch_flag          =&amp;gt; ($user-&amp;gt;{uid} == $uid ? 1 : 0),&lt;br /&gt;
                stories                 =&amp;gt; $stories,&lt;br /&gt;
                storycount              =&amp;gt; $storycount,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub showComments {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $commentstruct = [];&lt;br /&gt;
        my($uid, $nickname);&lt;br /&gt;
&lt;br /&gt;
        my $user_edit;&lt;br /&gt;
        if ($form-&amp;gt;{uid} || $form-&amp;gt;{nick}) {&lt;br /&gt;
                $uid = $form-&amp;gt;{uid} || $reader-&amp;gt;getUserUID($form-&amp;gt;{nick});&lt;br /&gt;
                $user_edit = $reader-&amp;gt;getUser($uid);&lt;br /&gt;
        } else {&lt;br /&gt;
                $uid = $user-&amp;gt;{uid};&lt;br /&gt;
                $user_edit = $user;&lt;br /&gt;
        }&lt;br /&gt;
        $nickname = $user_edit-&amp;gt;{nickname};&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $user_edit-&amp;gt;{uid} == $user-&amp;gt;{uid} ? 'me' : 'otheruser',&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        my $min_comment = $form-&amp;gt;{min_comment} || 0;&lt;br /&gt;
        $min_comment = 0 unless $user-&amp;gt;{seclev} &amp;gt; $constants-&amp;gt;{comments_more_seclev}&lt;br /&gt;
                || $constants-&amp;gt;{comments_more_seclev} == 2 &amp;amp;&amp;amp; $user-&amp;gt;{is_subscriber};&lt;br /&gt;
        my $comments_wanted = $user-&amp;gt;{show_comments_num}&lt;br /&gt;
                || $constants-&amp;gt;{user_comment_display_default};&lt;br /&gt;
        my $commentcount = $reader-&amp;gt;countCommentsByUID($uid);&lt;br /&gt;
        my $comments = $reader-&amp;gt;getCommentsByUID(&lt;br /&gt;
                $uid, $comments_wanted, $min_comment&lt;br /&gt;
        ) if $commentcount;&lt;br /&gt;
&lt;br /&gt;
        if (ref($comments) eq 'ARRAY') {&lt;br /&gt;
                my $kinds = $reader-&amp;gt;getDescriptions('discussion_kinds');&lt;br /&gt;
                for my $comment (@$comments) {&lt;br /&gt;
                        # This works since $sid is numeric.&lt;br /&gt;
                        $comment-&amp;gt;{replies} = $reader-&amp;gt;countCommentsBySidPid($comment-&amp;gt;{sid}, $comment-&amp;gt;{cid});&lt;br /&gt;
&lt;br /&gt;
                        # This is ok, since with all luck we will not be hitting the DB&lt;br /&gt;
                        # ...however, the &amp;quot;sid&amp;quot; parameter here must be the string&lt;br /&gt;
                        # based SID from either the &amp;quot;stories&amp;quot; table or from&lt;br /&gt;
                        # pollquestions.&lt;br /&gt;
                        my $discussion = $reader-&amp;gt;getDiscussion($comment-&amp;gt;{sid});&lt;br /&gt;
&lt;br /&gt;
                        if ($kinds-&amp;gt;{ $discussion-&amp;gt;{dkid} } =~ /^journal(?:-story)?$/) {&lt;br /&gt;
                                $comment-&amp;gt;{type} = 'journal';&lt;br /&gt;
                        } elsif ($kinds-&amp;gt;{ $discussion-&amp;gt;{dkid} } eq 'poll') {&lt;br /&gt;
                                $comment-&amp;gt;{type} = 'poll';&lt;br /&gt;
                        } else {&lt;br /&gt;
                                $comment-&amp;gt;{type} = 'story';&lt;br /&gt;
                        }&lt;br /&gt;
                        $comment-&amp;gt;{disc_title}  = $discussion-&amp;gt;{title};&lt;br /&gt;
                        $comment-&amp;gt;{url} = $discussion-&amp;gt;{url};&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $mod_reader = getObject(&amp;quot;Slash::$constants-&amp;gt;{m1_pluginname}&amp;quot;, { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        slashDisplay('userCom', {&lt;br /&gt;
                nick                    =&amp;gt; $nickname,&lt;br /&gt;
                useredit                =&amp;gt; $user_edit,&lt;br /&gt;
                nickmatch_flag          =&amp;gt; ($user-&amp;gt;{uid} == $uid ? 1 : 0),&lt;br /&gt;
                commentstruct           =&amp;gt; $comments,&lt;br /&gt;
                commentcount            =&amp;gt; $commentcount,&lt;br /&gt;
                min_comment             =&amp;gt; $min_comment,&lt;br /&gt;
                reasons                 =&amp;gt; $mod_reader-&amp;gt;getReasons(),&lt;br /&gt;
                karma_flag              =&amp;gt; 0,&lt;br /&gt;
                admin_flag              =&amp;gt; $user-&amp;gt;{is_admin},&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub noUser {&lt;br /&gt;
        print getData(&amp;quot;no_user&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub showFireHose {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
        my $uid = $form-&amp;gt;{uid} || $user-&amp;gt;{uid};&lt;br /&gt;
        my $user_edit = $reader-&amp;gt;getUser($uid);&lt;br /&gt;
&lt;br /&gt;
        $user-&amp;gt;{state}{firehose_page} = &amp;quot;user&amp;quot;;&lt;br /&gt;
        $user-&amp;gt;{state}{firehose_user_uid} = $uid;&lt;br /&gt;
&lt;br /&gt;
        my $firehose = getObject(&amp;quot;Slash::FireHose&amp;quot;);&lt;br /&gt;
        header(getMessage('userfirehose_header', { useredit =&amp;gt; $user_edit })) or return;&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $user_edit-&amp;gt;{uid} == $user-&amp;gt;{uid} ? 'me' : 'otheruser',&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        $form-&amp;gt;{mode} = &amp;quot;full&amp;quot;;&lt;br /&gt;
        $form-&amp;gt;{color} = &amp;quot;black&amp;quot;;&lt;br /&gt;
        $form-&amp;gt;{orderby} = &amp;quot;createtime&amp;quot;;&lt;br /&gt;
        $form-&amp;gt;{orderdir} = &amp;quot;DESC&amp;quot;;&lt;br /&gt;
        $form-&amp;gt;{skipmenu} = 1;&lt;br /&gt;
        $form-&amp;gt;{duration} = -1;&lt;br /&gt;
        $form-&amp;gt;{fhfilter} = &amp;quot;\&amp;quot;user:$user_edit-&amp;gt;{nickname}\&amp;quot;&amp;quot;;&lt;br /&gt;
        $form-&amp;gt;{pause} = 1;&lt;br /&gt;
        $form-&amp;gt;{listonly} = 1;&lt;br /&gt;
        $form-&amp;gt;{legacy} = 1;&lt;br /&gt;
&lt;br /&gt;
        my $fhbox = $firehose-&amp;gt;listView({ fh_page =&amp;gt; 'users.pl', tab =&amp;gt; 'userfirehose', user_view =&amp;gt; $user_edit });&lt;br /&gt;
        slashDisplay(&amp;quot;userFireHose&amp;quot;, { firehosebox =&amp;gt; $fhbox, uid =&amp;gt; $uid, useredit =&amp;gt; $user_edit });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
# arhgghgh. I love torture. I love pain. This subroutine satisfies&lt;br /&gt;
# these needs of mine&lt;br /&gt;
sub showInfo {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $id = $hr-&amp;gt;{uid} || 0;&lt;br /&gt;
&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        my $admin_flag = ($user-&amp;gt;{is_admin}) ? 1 : 0;&lt;br /&gt;
        my $suadmin_flag = $user-&amp;gt;{seclev} &amp;gt;= 10000 ? 1 : 0;&lt;br /&gt;
        my($title, $admin_block, $fieldkey) = ('', '', '');&lt;br /&gt;
        my $comments = undef;&lt;br /&gt;
        my $commentcount = 0;&lt;br /&gt;
        my $commentcount_time = 0;&lt;br /&gt;
        my $commentstruct = [];&lt;br /&gt;
        my $requested_user = {};&lt;br /&gt;
        my $time_period = $constants-&amp;gt;{admin_comment_display_days} || 30;&lt;br /&gt;
        my $cid_for_time_period = $reader-&amp;gt;getVar(&amp;quot;min_cid_last_$time_period\_days&amp;quot;,'value', 1) || 0;&lt;br /&gt;
        my $admin_time_period_limit = $constants-&amp;gt;{admin_daysback_commentlimit} || 100;&lt;br /&gt;
        my $admin_non_time_limit    = $constants-&amp;gt;{admin_comment_subsequent_pagesize} || 24;&lt;br /&gt;
&lt;br /&gt;
        my($points, $nickmatch_flag, $uid, $nick);&lt;br /&gt;
        my($mod_flag, $karma_flag, $n) = (0, 0, 0);&lt;br /&gt;
&lt;br /&gt;
        if ($admin_flag&lt;br /&gt;
                &amp;amp;&amp;amp; (defined($form-&amp;gt;{show_m2s}) || defined($form-&amp;gt;{show_m1s}) || defined($form-&amp;gt;{m2_listing})))&lt;br /&gt;
         {&lt;br /&gt;
                my $update_hr = {};&lt;br /&gt;
                $update_hr-&amp;gt;{mod_with_comm} = $form-&amp;gt;{show_m1s}&lt;br /&gt;
                        if defined $form-&amp;gt;{show_m1s};&lt;br /&gt;
                $update_hr-&amp;gt;{m2_with_mod} =     ($constants-&amp;gt;{m2} ? $form-&amp;gt;{show_m2s} : undef)&lt;br /&gt;
                        if defined $form-&amp;gt;{show_m2s};&lt;br /&gt;
                $update_hr-&amp;gt;{show_m2_listing} = ($constants-&amp;gt;{m2} ? $form-&amp;gt;{m2_listing} : undef)&lt;br /&gt;
                        if defined $form-&amp;gt;{m2_listing};&lt;br /&gt;
                $slashdb-&amp;gt;setUser($user-&amp;gt;{uid}, $update_hr);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if (!$id &amp;amp;&amp;amp; !$form-&amp;gt;{userfield}) {&lt;br /&gt;
                if ($form-&amp;gt;{uid} &amp;amp;&amp;amp; ! $id) {&lt;br /&gt;
                        $fieldkey = 'uid';&lt;br /&gt;
                        ($uid, $id) = ($form-&amp;gt;{uid}, $form-&amp;gt;{uid});&lt;br /&gt;
                        $requested_user = isAnon($uid) ? $user : $reader-&amp;gt;getUser($id);&lt;br /&gt;
                        $nick = $requested_user-&amp;gt;{nickname};&lt;br /&gt;
                        $form-&amp;gt;{userfield} = $nick if $admin_flag;&lt;br /&gt;
&lt;br /&gt;
                } elsif ($form-&amp;gt;{nick} &amp;amp;&amp;amp; ! $id) {&lt;br /&gt;
                        $fieldkey = 'nickname';&lt;br /&gt;
                        ($nick, $id) = ($form-&amp;gt;{nick}, $form-&amp;gt;{nick});&lt;br /&gt;
                        $uid = $reader-&amp;gt;getUserUID($id);&lt;br /&gt;
                        if (isAnon($uid)) {&lt;br /&gt;
                                $requested_user = $user;&lt;br /&gt;
                                ($nick, $uid, $id) = @{$user}{qw(nickname uid nickname)};&lt;br /&gt;
                        } else {&lt;br /&gt;
                                $requested_user = $reader-&amp;gt;getUser($uid);&lt;br /&gt;
                        }&lt;br /&gt;
                        $form-&amp;gt;{userfield} = $uid if $admin_flag;&lt;br /&gt;
&lt;br /&gt;
                } else {&lt;br /&gt;
                        $fieldkey = 'uid';&lt;br /&gt;
                        ($id, $uid) = ($user-&amp;gt;{uid}, $user-&amp;gt;{uid});&lt;br /&gt;
                        $requested_user = $reader-&amp;gt;getUser($uid);&lt;br /&gt;
                        $form-&amp;gt;{userfield} = $uid if $admin_flag;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
        } elsif ($user-&amp;gt;{is_admin}) {&lt;br /&gt;
                $id ||= $form-&amp;gt;{userfield} || $user-&amp;gt;{uid};&lt;br /&gt;
                if ($id =~ /^[0-9a-f]{16}$/) {&lt;br /&gt;
                        $requested_user-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                        $fieldkey = &amp;quot;srcid&amp;quot;;&lt;br /&gt;
                        $requested_user-&amp;gt;{$fieldkey} = $id;&lt;br /&gt;
                } elsif ($id =~ /^\d+$/) {&lt;br /&gt;
                        # If it's longer than a uid could possibly be, it&lt;br /&gt;
                        # must be a srcid.  The uid column right now is a&lt;br /&gt;
                        # MEDIUMINT (max 16M) but at most might someday&lt;br /&gt;
                        # be an INT (max 4G).&lt;br /&gt;
                        if (length($id) &amp;gt; 11) {&lt;br /&gt;
                                $requested_user-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                                $fieldkey = &amp;quot;srcid&amp;quot;;&lt;br /&gt;
                                $requested_user-&amp;gt;{$fieldkey} = $id;&lt;br /&gt;
                        } else {&lt;br /&gt;
                                $fieldkey = 'uid';&lt;br /&gt;
                                $requested_user = $reader-&amp;gt;getUser($id);&lt;br /&gt;
                                $uid = $requested_user-&amp;gt;{uid};&lt;br /&gt;
                                $nick = $requested_user-&amp;gt;{nickname};&lt;br /&gt;
                                if ((my $conflict_id = $reader-&amp;gt;getUserUID($id)) &amp;amp;&amp;amp; $form-&amp;gt;{userinfo}) {&lt;br /&gt;
                                        slashDisplay('showInfoConflict', {&lt;br /&gt;
                                                op              =&amp;gt; 'userinfo',&lt;br /&gt;
                                                id              =&amp;gt; $uid,&lt;br /&gt;
                                                nick            =&amp;gt; $nick,&lt;br /&gt;
                                                conflict_id     =&amp;gt; $conflict_id&lt;br /&gt;
                                        });&lt;br /&gt;
                                        return 1;&lt;br /&gt;
                                }&lt;br /&gt;
                        }&lt;br /&gt;
&lt;br /&gt;
                } elsif (length($id) == 32) {&lt;br /&gt;
                        $requested_user-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                        if ($form-&amp;gt;{fieldname}&lt;br /&gt;
                                &amp;amp;&amp;amp; $form-&amp;gt;{fieldname} =~ /^(ipid|subnetid)$/) {&lt;br /&gt;
                                $fieldkey = $form-&amp;gt;{fieldname};&lt;br /&gt;
                        } else {&lt;br /&gt;
                                $fieldkey = 'md5id';&lt;br /&gt;
                        }&lt;br /&gt;
                        $requested_user-&amp;gt;{$fieldkey} = $id;&lt;br /&gt;
                } elsif ($id =~ /^(\d{1,3}\.\d{1,3}.\d{1,3}\.0)$/ &lt;br /&gt;
                                || $id =~ /^(\d{1,3}\.\d{1,3}\.\d{1,3})\.?$/) {&lt;br /&gt;
                        $fieldkey = 'subnetid';&lt;br /&gt;
                        $requested_user-&amp;gt;{subnetid} = $1; &lt;br /&gt;
                        $requested_user-&amp;gt;{subnetid} .= '.0' if $requested_user-&amp;gt;{subnetid} =~ /^\d{1,3}\.\d{1,3}\.\d{1,3}$/; &lt;br /&gt;
                        $requested_user-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                        $requested_user-&amp;gt;{subnetid} = md5_hex($requested_user-&amp;gt;{subnetid});&lt;br /&gt;
&lt;br /&gt;
                } elsif ($id =~ /^([\d+\.]+)$/) {&lt;br /&gt;
                        $fieldkey = 'ipid';&lt;br /&gt;
                        $requested_user-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                        $id ||= $1;&lt;br /&gt;
                        $requested_user-&amp;gt;{ipid} = md5_hex($1);&lt;br /&gt;
&lt;br /&gt;
                } elsif ($id =~ /^(.*@.*\..*?)$/) {&lt;br /&gt;
                        # check for email addy, but make it by uid&lt;br /&gt;
                        $fieldkey = 'uid';&lt;br /&gt;
                        $id = $uid = $reader-&amp;gt;getUserEmail($id);&lt;br /&gt;
                        $requested_user = $reader-&amp;gt;getUser($uid);&lt;br /&gt;
                        $nick = $requested_user-&amp;gt;{nickname};&lt;br /&gt;
&lt;br /&gt;
                } else {  # go by nickname, but make it by uid&lt;br /&gt;
                        $fieldkey = 'uid';&lt;br /&gt;
                        $id = $uid = $reader-&amp;gt;getUserUID($id);&lt;br /&gt;
                        $requested_user = $reader-&amp;gt;getUser($uid);&lt;br /&gt;
                        $nick = $requested_user-&amp;gt;{nickname};&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
        } else {&lt;br /&gt;
                $fieldkey = 'uid';&lt;br /&gt;
                ($id, $uid) = ($user-&amp;gt;{uid}, $user-&amp;gt;{uid});&lt;br /&gt;
                $requested_user = $reader-&amp;gt;getUser($uid);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Can't get user data for the anonymous user.&lt;br /&gt;
        if ($fieldkey eq 'uid' &amp;amp;&amp;amp; isAnon($uid)) {&lt;br /&gt;
                header(getMessage('user_header')) or return;&lt;br /&gt;
                return displayForm();&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $user_change = { };&lt;br /&gt;
        if ($fieldkey eq 'uid' &amp;amp;&amp;amp; !$user-&amp;gt;{is_anon}&lt;br /&gt;
                &amp;amp;&amp;amp; $uid != $user-&amp;gt;{uid} &amp;amp;&amp;amp; !isAnon($uid)) {&lt;br /&gt;
                # Store the fact that this user last looked at that user.&lt;br /&gt;
                # For maximal convenience in stalking.&lt;br /&gt;
                $user_change-&amp;gt;{lastlookuid} = $uid;&lt;br /&gt;
                $user_change-&amp;gt;{lastlooktime} = time;&lt;br /&gt;
                $user-&amp;gt;{lastlookuid} = $uid;&lt;br /&gt;
                $user-&amp;gt;{lastlooktime} = time;&lt;br /&gt;
                $hr-&amp;gt;{tab_selected_1} = 'otheruser';&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # showInfo's header information is delayed until here, because&lt;br /&gt;
        # the target user's info is not available until here.&lt;br /&gt;
        vislenify($requested_user);&lt;br /&gt;
        header(getMessage('user_header', { useredit =&amp;gt; $requested_user, fieldkey =&amp;gt; $fieldkey })) or return;&lt;br /&gt;
        # This is a hardcoded position, bad idea and should be fixed -Brian&lt;br /&gt;
        # Yeah, we should pull this into a template somewhere...&lt;br /&gt;
        print getMessage('note', { note =&amp;gt; $hr-&amp;gt;{note} }) if defined $hr-&amp;gt;{note};&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        my $comments_wanted = $user-&amp;gt;{show_comments_num}&lt;br /&gt;
                || $constants-&amp;gt;{user_comment_display_default};&lt;br /&gt;
        my $min_comment = $form-&amp;gt;{min_comment} || 0;&lt;br /&gt;
        $min_comment = 0 unless $user-&amp;gt;{seclev} &amp;gt; $constants-&amp;gt;{comments_more_seclev}&lt;br /&gt;
                || $constants-&amp;gt;{comments_more_seclev} == 2 &amp;amp;&amp;amp; $user-&amp;gt;{is_subscriber};&lt;br /&gt;
&lt;br /&gt;
        my($netid, $netid_vis) = ('', '');&lt;br /&gt;
&lt;br /&gt;
        my $comment_time;&lt;br /&gt;
        my $non_admin_limit = $comments_wanted;&lt;br /&gt;
&lt;br /&gt;
        if ($requested_user-&amp;gt;{nonuid}) {&lt;br /&gt;
                $requested_user-&amp;gt;{fg} = $user-&amp;gt;{fg};&lt;br /&gt;
                $requested_user-&amp;gt;{bg} = $user-&amp;gt;{bg};&lt;br /&gt;
&lt;br /&gt;
                if ($requested_user-&amp;gt;{ipid}) {&lt;br /&gt;
                        $netid = $requested_user-&amp;gt;{ipid} ;&lt;br /&gt;
&lt;br /&gt;
                } elsif ($requested_user-&amp;gt;{md5id}) {&lt;br /&gt;
                        $netid = $requested_user-&amp;gt;{md5id} ;&lt;br /&gt;
&lt;br /&gt;
                } elsif ($requested_user-&amp;gt;{srcid}) {&lt;br /&gt;
                        $netid = $requested_user-&amp;gt;{srcid} ;&lt;br /&gt;
                } else {&lt;br /&gt;
                        $netid = $requested_user-&amp;gt;{subnetid} ;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                my $data = {&lt;br /&gt;
                        id =&amp;gt; $id,&lt;br /&gt;
                        md5id =&amp;gt; $netid,&lt;br /&gt;
                };&lt;br /&gt;
                vislenify($data); # add $data-&amp;gt;{md5id_vis}&lt;br /&gt;
                $netid_vis = $data-&amp;gt;{md5id_vis};&lt;br /&gt;
&lt;br /&gt;
                $title = getTitle('user_netID_user_title', $data);&lt;br /&gt;
&lt;br /&gt;
                $admin_block = getUserAdmin($netid, $fieldkey, 0) if $admin_flag;&lt;br /&gt;
&lt;br /&gt;
                if ($form-&amp;gt;{fieldname}) {&lt;br /&gt;
                        if ($form-&amp;gt;{fieldname} eq 'ipid') {&lt;br /&gt;
                                $commentcount           = $reader-&amp;gt;countCommentsByIPID($netid);&lt;br /&gt;
                                $commentcount_time      = $reader-&amp;gt;countCommentsByIPID($netid, { cid_at_or_after =&amp;gt; $cid_for_time_period });&lt;br /&gt;
                                $comments = getCommentListing(&amp;quot;ipid&amp;quot;, $netid,&lt;br /&gt;
                                        $min_comment, $time_period, $commentcount, $commentcount_time, $cid_for_time_period, &lt;br /&gt;
                                        $non_admin_limit, $admin_time_period_limit, $admin_non_time_limit)&lt;br /&gt;
                                                if $commentcount;&lt;br /&gt;
                        } elsif ($form-&amp;gt;{fieldname} eq 'subnetid') {&lt;br /&gt;
                                $commentcount           = $reader-&amp;gt;countCommentsBySubnetID($netid);&lt;br /&gt;
                                $commentcount_time      = $reader-&amp;gt;countCommentsBySubnetID($netid, { cid_at_or_after =&amp;gt; $cid_for_time_period });&lt;br /&gt;
                                $comments = getCommentListing(&amp;quot;subnetid&amp;quot;, $netid,&lt;br /&gt;
                                        $min_comment, $time_period, $commentcount, $commentcount_time, $cid_for_time_period,&lt;br /&gt;
                                        $non_admin_limit, $admin_time_period_limit, $admin_non_time_limit)&lt;br /&gt;
                                                if $commentcount;&lt;br /&gt;
&lt;br /&gt;
                        } else {&lt;br /&gt;
                                delete $form-&amp;gt;{fieldname};&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
                if (!defined($comments)) {&lt;br /&gt;
                        # Last resort; here for backwards compatibility mostly.&lt;br /&gt;
                        my $type;&lt;br /&gt;
                        ($commentcount,$type) = $reader-&amp;gt;countCommentsByIPIDOrSubnetID($netid);&lt;br /&gt;
                        $commentcount_time = $reader-&amp;gt;countCommentsByIPIDOrSubnetID($netid, { cid_at_or_after =&amp;gt; $cid_for_time_period });&lt;br /&gt;
                        if ($type eq &amp;quot;ipid&amp;quot;) {&lt;br /&gt;
                                $comments = getCommentListing(&amp;quot;ipid&amp;quot;, $netid,&lt;br /&gt;
                                        $min_comment, $time_period, $commentcount, $commentcount_time, $cid_for_time_period,&lt;br /&gt;
                                        $non_admin_limit, $admin_time_period_limit, $admin_non_time_limit)&lt;br /&gt;
                                                if $commentcount;&lt;br /&gt;
                        } elsif ($type eq &amp;quot;subnetid&amp;quot;) {&lt;br /&gt;
                                $comments = getCommentListing(&amp;quot;subnetid&amp;quot;, $netid,&lt;br /&gt;
                                        $min_comment, $time_period, $commentcount, $commentcount_time,  $cid_for_time_period,&lt;br /&gt;
                                        $non_admin_limit, $admin_time_period_limit, $admin_non_time_limit)&lt;br /&gt;
                                                if $commentcount;&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
        } else {&lt;br /&gt;
                $admin_block = getUserAdmin($id, $fieldkey, 1) if $admin_flag;&lt;br /&gt;
&lt;br /&gt;
                $commentcount      = $reader-&amp;gt;countCommentsByUID($requested_user-&amp;gt;{uid});&lt;br /&gt;
                $commentcount_time = $reader-&amp;gt;countCommentsByUID($requested_user-&amp;gt;{uid}, { cid_at_or_after =&amp;gt; $cid_for_time_period });&lt;br /&gt;
                $comments = getCommentListing(&amp;quot;uid&amp;quot;, $requested_user-&amp;gt;{uid},&lt;br /&gt;
                        $min_comment, $time_period, $commentcount, $commentcount_time, $cid_for_time_period,&lt;br /&gt;
                        $non_admin_limit, $admin_time_period_limit, $admin_non_time_limit,&lt;br /&gt;
                        { use_uid_cid_cutoff =&amp;gt; 1 })&lt;br /&gt;
                                if $commentcount;&lt;br /&gt;
                $netid = $requested_user-&amp;gt;{uid};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Grab the nicks of the uids we have, we're going to be adding them&lt;br /&gt;
        # into the struct.&lt;br /&gt;
        my @users_extra_cols_wanted       = qw( nickname );&lt;br /&gt;
        my @discussions_extra_cols_wanted = qw( type );&lt;br /&gt;
        my $uid_hr = { };&lt;br /&gt;
        my $sid_hr = { };&lt;br /&gt;
        if ($comments &amp;amp;&amp;amp; @$comments) {&lt;br /&gt;
                my %uids = ();&lt;br /&gt;
                my %sids = ();&lt;br /&gt;
                for my $c (@$comments) {&lt;br /&gt;
                        $uids{$c-&amp;gt;{uid}}++;&lt;br /&gt;
                        $sids{$c-&amp;gt;{sid}}++;&lt;br /&gt;
                }&lt;br /&gt;
                my $uids = join(&amp;quot;, &amp;quot;, sort { $a &amp;lt;=&amp;gt; $b } keys %uids);&lt;br /&gt;
                my $sids = join(&amp;quot;, &amp;quot;, sort { $a &amp;lt;=&amp;gt; $b } keys %sids);&lt;br /&gt;
                $uid_hr = $reader-&amp;gt;sqlSelectAllHashref(&lt;br /&gt;
                        &amp;quot;uid&amp;quot;,&lt;br /&gt;
                        &amp;quot;uid, &amp;quot; . join(&amp;quot;, &amp;quot;, @users_extra_cols_wanted),&lt;br /&gt;
                        &amp;quot;users&amp;quot;,&lt;br /&gt;
                        &amp;quot;uid IN ($uids)&amp;quot;&lt;br /&gt;
                );&lt;br /&gt;
&lt;br /&gt;
                $sid_hr = $reader-&amp;gt;sqlSelectAllHashref(&lt;br /&gt;
                        &amp;quot;id&amp;quot;,&lt;br /&gt;
                        &amp;quot;id, &amp;quot; . join(&amp;quot;, &amp;quot;, @discussions_extra_cols_wanted),&lt;br /&gt;
                        &amp;quot;discussions&amp;quot;,&lt;br /&gt;
                        &amp;quot;id IN ($sids)&amp;quot;&lt;br /&gt;
                );&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $cids_seen = {};&lt;br /&gt;
        my $kinds = $slashdb-&amp;gt;getDescriptions('discussion_kinds');&lt;br /&gt;
        for my $comment (@$comments) {&lt;br /&gt;
                $cids_seen-&amp;gt;{$comment-&amp;gt;{cid}}++;&lt;br /&gt;
                my $type;&lt;br /&gt;
                # This works since $sid is numeric.&lt;br /&gt;
                my $replies = $reader-&amp;gt;countCommentsBySidPid($comment-&amp;gt;{sid}, $comment-&amp;gt;{cid});&lt;br /&gt;
&lt;br /&gt;
                # This is cached.&lt;br /&gt;
                my $discussion = $reader-&amp;gt;getDiscussion($comment-&amp;gt;{sid});&lt;br /&gt;
#use Data::Dumper; if ($discussion &amp;amp;&amp;amp; !$discussion-&amp;gt;{dkid}) { print STDERR scalar(gmtime) . &amp;quot; users.pl discussion but no dkid: &amp;quot; . Dumper($discussion) }&lt;br /&gt;
                if (!$discussion || !$discussion-&amp;gt;{dkid}) {&lt;br /&gt;
                        # A comment with no accompanying discussion;&lt;br /&gt;
                        # basically we pretend it doesn't exist.&lt;br /&gt;
                        next;&lt;br /&gt;
                } elsif ($kinds-&amp;gt;{ $discussion-&amp;gt;{dkid} } =~ /^journal(?:-story)?$/) {&lt;br /&gt;
                        $type = 'journal';&lt;br /&gt;
                } elsif ($kinds-&amp;gt;{ $discussion-&amp;gt;{dkid} } eq 'poll') {&lt;br /&gt;
                        $type = 'poll';&lt;br /&gt;
                } else {&lt;br /&gt;
                        $type = 'story';&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                $comment-&amp;gt;{points} += $user-&amp;gt;{karma_bonus}&lt;br /&gt;
                        if $user-&amp;gt;{karma_bonus} &amp;amp;&amp;amp; $comment-&amp;gt;{karma_bonus} eq 'yes';&lt;br /&gt;
                $comment-&amp;gt;{points} += $user-&amp;gt;{subscriber_bonus}&lt;br /&gt;
                        if $user-&amp;gt;{subscriber_bonus} &amp;amp;&amp;amp; $comment-&amp;gt;{subscriber_bonus} eq 'yes';&lt;br /&gt;
&lt;br /&gt;
                # fix points in case they are out of bounds&lt;br /&gt;
                $comment-&amp;gt;{points} = $constants-&amp;gt;{comment_minscore} if $comment-&amp;gt;{points} &amp;lt; $constants-&amp;gt;{comment_minscore};&lt;br /&gt;
                $comment-&amp;gt;{points} = $constants-&amp;gt;{comment_maxscore} if $comment-&amp;gt;{points} &amp;gt; $constants-&amp;gt;{comment_maxscore};&lt;br /&gt;
                vislenify($comment);&lt;br /&gt;
                my $data = {&lt;br /&gt;
                        pid             =&amp;gt; $comment-&amp;gt;{pid},&lt;br /&gt;
                        url             =&amp;gt; $discussion-&amp;gt;{url},&lt;br /&gt;
                        disc_type       =&amp;gt; $type,&lt;br /&gt;
                        disc_title      =&amp;gt; $discussion-&amp;gt;{title},&lt;br /&gt;
                        disc_time       =&amp;gt; $discussion-&amp;gt;{ts},&lt;br /&gt;
                        sid             =&amp;gt; $comment-&amp;gt;{sid},&lt;br /&gt;
                        cid             =&amp;gt; $comment-&amp;gt;{cid},&lt;br /&gt;
                        subj            =&amp;gt; $comment-&amp;gt;{subject},&lt;br /&gt;
                        cdate           =&amp;gt; $comment-&amp;gt;{date},&lt;br /&gt;
                        pts             =&amp;gt; $comment-&amp;gt;{points},&lt;br /&gt;
                        reason          =&amp;gt; $comment-&amp;gt;{reason},&lt;br /&gt;
                        uid             =&amp;gt; $comment-&amp;gt;{uid},&lt;br /&gt;
                        replies         =&amp;gt; $replies,&lt;br /&gt;
                        ipid            =&amp;gt; $comment-&amp;gt;{ipid},&lt;br /&gt;
                        ipid_vis        =&amp;gt; $comment-&amp;gt;{ipid_vis},&lt;br /&gt;
                        karma           =&amp;gt; $comment-&amp;gt;{karma},&lt;br /&gt;
                        tweak           =&amp;gt; $comment-&amp;gt;{tweak},&lt;br /&gt;
                        tweak_orig      =&amp;gt; $comment-&amp;gt;{tweak_orig},&lt;br /&gt;
&lt;br /&gt;
                };&lt;br /&gt;
                #Karma bonus time&lt;br /&gt;
&lt;br /&gt;
                for my $col (@users_extra_cols_wanted) {&lt;br /&gt;
                        $data-&amp;gt;{$col} = $uid_hr-&amp;gt;{$comment-&amp;gt;{uid}}{$col} if defined $uid_hr-&amp;gt;{$comment-&amp;gt;{uid}}{$col};&lt;br /&gt;
                }&lt;br /&gt;
                for my $col(@discussions_extra_cols_wanted) {&lt;br /&gt;
                        $data-&amp;gt;{$col} = $sid_hr-&amp;gt;{$comment-&amp;gt;{sid}}{$col} if defined $sid_hr-&amp;gt;{$comment-&amp;gt;{sid}}{$col};&lt;br /&gt;
                }&lt;br /&gt;
                push @$commentstruct, $data;&lt;br /&gt;
        }&lt;br /&gt;
#       if (grep { !defined($_-&amp;gt;{disc_time}) || !defined($_-&amp;gt;{sid}) } @$commentstruct) { use Data::Dumper; print STDERR &amp;quot;showInfo undef in commentstruct for id=$id: &amp;quot; . Dumper($commentstruct) }&lt;br /&gt;
        # Sort so the chosen group of comments is sorted by discussion&lt;br /&gt;
        @$commentstruct = sort {&lt;br /&gt;
                $b-&amp;gt;{disc_time} cmp $a-&amp;gt;{disc_time} || $b-&amp;gt;{sid} &amp;lt;=&amp;gt; $a-&amp;gt;{sid}&lt;br /&gt;
        } @$commentstruct&lt;br /&gt;
                unless $user-&amp;gt;{user_comment_sort_type} &amp;amp;&amp;amp; $user-&amp;gt;{user_comment_sort_type} == 1;&lt;br /&gt;
&lt;br /&gt;
        my $cid_list = [ keys %$cids_seen ];&lt;br /&gt;
        my $cids_to_mods = {};&lt;br /&gt;
        my $mod_reader = getObject(&amp;quot;Slash::$constants-&amp;gt;{m1_pluginname}&amp;quot;, { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        if ($constants-&amp;gt;{m1} &amp;amp;&amp;amp; $admin_flag &amp;amp;&amp;amp; $constants-&amp;gt;{show_mods_with_comments}) {&lt;br /&gt;
                my $comment_mods = $mod_reader-&amp;gt;getModeratorCommentLog(&amp;quot;DESC&amp;quot;,&lt;br /&gt;
                        $constants-&amp;gt;{mod_limit_with_comments}, &amp;quot;cidin&amp;quot;, $cid_list);&lt;br /&gt;
&lt;br /&gt;
                # Loop through mods and group them by the sid they're attached to&lt;br /&gt;
                while (my $mod = shift @$comment_mods) {&lt;br /&gt;
                        push @{$cids_to_mods-&amp;gt;{$mod-&amp;gt;{cid}}}, $mod;&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $sub_limit = ((($admin_flag || $user-&amp;gt;{uid} == $requested_user-&amp;gt;{uid}) ? $constants-&amp;gt;{submissions_all_page_size} : $constants-&amp;gt;{submissions_accepted_only_page_size}) || &amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        my $sub_options = { limit_days =&amp;gt; 365 };&lt;br /&gt;
        $sub_options-&amp;gt;{accepted_only} = 1 if !$admin_flag &amp;amp;&amp;amp; $user-&amp;gt;{uid} != $requested_user-&amp;gt;{uid};&lt;br /&gt;
&lt;br /&gt;
        my $sub_field = $form-&amp;gt;{fieldname};&lt;br /&gt;
&lt;br /&gt;
        my ($subcount, $ret_field) = $reader-&amp;gt;countSubmissionsByNetID($netid, $sub_field)&lt;br /&gt;
                if $requested_user-&amp;gt;{nonuid};&lt;br /&gt;
        my $submissions = $reader-&amp;gt;getSubmissionsByNetID($netid, $ret_field, $sub_limit, $sub_options)&lt;br /&gt;
                if $requested_user-&amp;gt;{nonuid};&lt;br /&gt;
&lt;br /&gt;
        my $ipid_hoursback = $constants-&amp;gt;{istroll_ipid_hours} || 72;&lt;br /&gt;
        my $uid_hoursback = $constants-&amp;gt;{istroll_uid_hours} || 72;&lt;br /&gt;
&lt;br /&gt;
        if ($requested_user-&amp;gt;{nonuid}) {&lt;br /&gt;
                slashDisplay('netIDInfo', {&lt;br /&gt;
                        title                   =&amp;gt; $title,&lt;br /&gt;
                        id                      =&amp;gt; $id,&lt;br /&gt;
                        useredit                =&amp;gt; $requested_user,&lt;br /&gt;
                        commentstruct           =&amp;gt; $commentstruct || [],&lt;br /&gt;
                        commentcount            =&amp;gt; $commentcount,&lt;br /&gt;
                        min_comment             =&amp;gt; $min_comment,&lt;br /&gt;
                        admin_flag              =&amp;gt; $admin_flag,&lt;br /&gt;
                        admin_block             =&amp;gt; $admin_block,&lt;br /&gt;
                        netid                   =&amp;gt; $netid,&lt;br /&gt;
                        netid_vis               =&amp;gt; $netid_vis,&lt;br /&gt;
                        reasons                 =&amp;gt; $mod_reader-&amp;gt;getReasons(),&lt;br /&gt;
                        subcount                =&amp;gt; $subcount,&lt;br /&gt;
                        submissions             =&amp;gt; $submissions,&lt;br /&gt;
                        hr_hours_back           =&amp;gt; $ipid_hoursback,&lt;br /&gt;
                        cids_to_mods            =&amp;gt; $cids_to_mods,&lt;br /&gt;
                        comment_time            =&amp;gt; $comment_time&lt;br /&gt;
                });&lt;br /&gt;
&lt;br /&gt;
        } else {&lt;br /&gt;
                if (! $requested_user-&amp;gt;{uid}) {&lt;br /&gt;
                        print getError('userinfo_idnf_err', { id =&amp;gt; $id, fieldkey =&amp;gt; $fieldkey});&lt;br /&gt;
                        return 1;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                $karma_flag = 1 if $admin_flag;&lt;br /&gt;
                $requested_user-&amp;gt;{nick_plain} = $nick ||= $requested_user-&amp;gt;{nickname};&lt;br /&gt;
                $nick = strip_literal($nick);&lt;br /&gt;
&lt;br /&gt;
                if ($requested_user-&amp;gt;{uid} == $user-&amp;gt;{uid}) {&lt;br /&gt;
                        $karma_flag = 1;&lt;br /&gt;
                        $nickmatch_flag = 1;&lt;br /&gt;
                        $points = $requested_user-&amp;gt;{points};&lt;br /&gt;
&lt;br /&gt;
                        $mod_flag = 1 if $points &amp;gt; 0;&lt;br /&gt;
&lt;br /&gt;
                        $title = getTitle('userInfo_main_title', { nick =&amp;gt; $nick, uid =&amp;gt; $uid });&lt;br /&gt;
&lt;br /&gt;
                } else {&lt;br /&gt;
                        $title = getTitle('userInfo_user_title', { nick =&amp;gt; $nick, uid =&amp;gt; $uid });&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                my $lastjournal = _get_lastjournal($uid);&lt;br /&gt;
&lt;br /&gt;
                my $subcount = $reader-&amp;gt;countSubmissionsByUID($uid);&lt;br /&gt;
&lt;br /&gt;
                my $submissions = $reader-&amp;gt;getSubmissionsByUID($uid, $sub_limit, $sub_options);&lt;br /&gt;
                my $metamods;&lt;br /&gt;
                if ($constants-&amp;gt;{m2} &amp;amp;&amp;amp; $admin_flag) {&lt;br /&gt;
                        my $metamod_reader = getObject('Slash::Metamod', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
                        $metamods = $metamod_reader-&amp;gt;getMetamodlogForUser($uid, 30);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                my $tags_reader = getObject('Slash::Tags', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
                my $tagshist = [];&lt;br /&gt;
                if ($tags_reader &amp;amp;&amp;amp; $user-&amp;gt;{is_admin}) {&lt;br /&gt;
                        $tagshist = $tags_reader-&amp;gt;getAllTagsFromUser($requested_user-&amp;gt;{uid}, { orderby =&amp;gt; 'created_at', orderdir =&amp;gt; 'DESC', limit =&amp;gt; 30, include_private =&amp;gt; 1 });&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                slashDisplay('userInfo', {&lt;br /&gt;
                        title                   =&amp;gt; $title,&lt;br /&gt;
                        uid                     =&amp;gt; $uid,&lt;br /&gt;
                        useredit                =&amp;gt; $requested_user,&lt;br /&gt;
                        points                  =&amp;gt; $points,&lt;br /&gt;
                        commentstruct           =&amp;gt; $commentstruct || [],&lt;br /&gt;
                        commentcount            =&amp;gt; $commentcount,&lt;br /&gt;
                        min_comment             =&amp;gt; $min_comment,&lt;br /&gt;
                        nickmatch_flag          =&amp;gt; $nickmatch_flag,&lt;br /&gt;
                        mod_flag                =&amp;gt; $mod_flag,&lt;br /&gt;
                        karma_flag              =&amp;gt; $karma_flag,&lt;br /&gt;
                        admin_block             =&amp;gt; $admin_block,&lt;br /&gt;
                        admin_flag              =&amp;gt; $admin_flag,&lt;br /&gt;
                        suadmin_flag            =&amp;gt; $suadmin_flag,&lt;br /&gt;
                        reasons                 =&amp;gt; $mod_reader-&amp;gt;getReasons(),&lt;br /&gt;
                        lastjournal             =&amp;gt; $lastjournal,&lt;br /&gt;
                        hr_hours_back           =&amp;gt; $ipid_hoursback,&lt;br /&gt;
                        cids_to_mods            =&amp;gt; $cids_to_mods,&lt;br /&gt;
                        comment_time            =&amp;gt; $comment_time,&lt;br /&gt;
                        submissions             =&amp;gt; $submissions,&lt;br /&gt;
                        subcount                =&amp;gt; $subcount,&lt;br /&gt;
                        metamods                =&amp;gt; $metamods,&lt;br /&gt;
                        tagshist                =&amp;gt; $tagshist&lt;br /&gt;
                });&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($user_change &amp;amp;&amp;amp; %$user_change) {&lt;br /&gt;
                $slashdb-&amp;gt;setUser($user-&amp;gt;{uid}, $user_change);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        return 1;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub _get_lastjournal {&lt;br /&gt;
        my($uid) = @_;&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $lastjournal = undef;&lt;br /&gt;
        if (my $journal = getObject('Slash::Journal', { db_type =&amp;gt; 'reader' })) {&lt;br /&gt;
                my $j = $journal-&amp;gt;getsByUid($uid, 0, 1);&lt;br /&gt;
                if ($j &amp;amp;&amp;amp; @$j) {&lt;br /&gt;
                        # Yep, there are 1 or more journals... get the first.&lt;br /&gt;
                        $j = $j-&amp;gt;[0];&lt;br /&gt;
                }&lt;br /&gt;
                if ($j &amp;amp;&amp;amp; @$j) {&lt;br /&gt;
                        # Yep, that first journal exists and has entries...&lt;br /&gt;
                        # convert from stupid numeric array to a hashref.&lt;br /&gt;
                        my @field = qw( date article description id&lt;br /&gt;
                                        posttype tid discussion         );&lt;br /&gt;
                        $lastjournal = { };&lt;br /&gt;
                        for my $i (0..$#field) {&lt;br /&gt;
                                $lastjournal-&amp;gt;{$field[$i]} = $j-&amp;gt;[$i];&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($lastjournal) {&lt;br /&gt;
&lt;br /&gt;
                # Strip the article field for display.&lt;br /&gt;
                $lastjournal-&amp;gt;{article} = strip_mode($lastjournal-&amp;gt;{article},&lt;br /&gt;
                        $lastjournal-&amp;gt;{posttype});&lt;br /&gt;
&lt;br /&gt;
                # For display, include a reduced-size version, where the&lt;br /&gt;
                # size is based on the user's maxcomment size (which&lt;br /&gt;
                # defaults to 4K) and can't have too many line-breaking&lt;br /&gt;
                # tags.&lt;br /&gt;
                my $art_shrunk = $lastjournal-&amp;gt;{article};&lt;br /&gt;
                my $maxsize = int($constants-&amp;gt;{default_maxcommentsize} / 25);&lt;br /&gt;
                $maxsize =  80 if $maxsize &amp;lt;  80;&lt;br /&gt;
                $maxsize = 600 if $maxsize &amp;gt; 600;&lt;br /&gt;
                $art_shrunk = chopEntity($art_shrunk, $maxsize);&lt;br /&gt;
&lt;br /&gt;
                my $approvedtags_break = $constants-&amp;gt;{approvedtags_break} || [];&lt;br /&gt;
                my $break_tag = join '|', @$approvedtags_break;&lt;br /&gt;
                if (scalar(() = $art_shrunk =~ /&amp;lt;(?:$break_tag)&amp;gt;/gi) &amp;gt; 2) {&lt;br /&gt;
                        $art_shrunk =~ s/\A&lt;br /&gt;
                        (&lt;br /&gt;
                                (?: &amp;lt;(?:$break_tag)&amp;gt; )?&lt;br /&gt;
                                .*?   &amp;lt;(?:$break_tag)&amp;gt;&lt;br /&gt;
                                .*?&lt;br /&gt;
                        )       &amp;lt;(?:$break_tag)&amp;gt;.*&lt;br /&gt;
                        /$1/six;&lt;br /&gt;
                        if (length($art_shrunk) &amp;lt; 15) {&lt;br /&gt;
                                # This journal entry has too much whitespace&lt;br /&gt;
                                # in its first few chars;  scrap it.&lt;br /&gt;
                                undef $art_shrunk;&lt;br /&gt;
                        }&lt;br /&gt;
                        $art_shrunk = chopEntity($art_shrunk) if defined($art_shrunk);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                if (defined $art_shrunk) {&lt;br /&gt;
                        if (length($art_shrunk) &amp;lt; length($lastjournal-&amp;gt;{article})) {&lt;br /&gt;
                                $art_shrunk .= &amp;quot; ...&amp;quot;;&lt;br /&gt;
                        }&lt;br /&gt;
                        $art_shrunk = strip_html($art_shrunk);&lt;br /&gt;
                        $art_shrunk = balanceTags($art_shrunk);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                $lastjournal-&amp;gt;{article_shrunk} = $art_shrunk;&lt;br /&gt;
&lt;br /&gt;
                if ($lastjournal-&amp;gt;{discussion}) {&lt;br /&gt;
                        $lastjournal-&amp;gt;{commentcount} = $reader-&amp;gt;getDiscussion(&lt;br /&gt;
                                $lastjournal-&amp;gt;{discussion}, 'commentcount');&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
        return $lastjournal;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#####################################################################&lt;br /&gt;
sub validateUser {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        # If we aren't expiring accounts in some way, we don't belong here.&lt;br /&gt;
        if (! allowExpiry()) {&lt;br /&gt;
                displayForm();&lt;br /&gt;
                return;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        # Since we are here, if the minimum values for the comment trigger and&lt;br /&gt;
        # the day trigger are -1, then they should be reset to 1.&lt;br /&gt;
        $constants-&amp;gt;{min_expiry_comm} = $constants-&amp;gt;{min_expiry_days} = 1&lt;br /&gt;
                if $constants-&amp;gt;{min_expiry_comm} &amp;lt;= 0 ||&lt;br /&gt;
                   $constants-&amp;gt;{min_expiry_days} &amp;lt;= 0;&lt;br /&gt;
&lt;br /&gt;
        if ($user-&amp;gt;{is_anon} || $user-&amp;gt;{registered}) {&lt;br /&gt;
                if ($user-&amp;gt;{is_anon}) {&lt;br /&gt;
                        print getError('anon_validation_attempt');&lt;br /&gt;
                        displayForm();&lt;br /&gt;
                        return;&lt;br /&gt;
                } else {&lt;br /&gt;
                        print getMessage('no_registration_needed')&lt;br /&gt;
                                if !$user-&amp;gt;{reg_id};&lt;br /&gt;
                        showInfo({ uid =&amp;gt; $user-&amp;gt;{uid} });&lt;br /&gt;
                        return;&lt;br /&gt;
                }&lt;br /&gt;
        # Maybe this should be taken care of in a more centralized location?&lt;br /&gt;
        } elsif ($user-&amp;gt;{reg_id} eq $form-&amp;gt;{id}) {&lt;br /&gt;
                # We have a user and the registration IDs match. We are happy!&lt;br /&gt;
                my($maxComm, $maxDays) = ($constants-&amp;gt;{max_expiry_comm},&lt;br /&gt;
                                          $constants-&amp;gt;{max_expiry_days});&lt;br /&gt;
                my($userComm, $userDays) =&lt;br /&gt;
                        ($user-&amp;gt;{user_expiry_comm}, $user-&amp;gt;{user_expiry_days});&lt;br /&gt;
&lt;br /&gt;
                # Ensure both $userComm and $userDays aren't -1 (expiry has&lt;br /&gt;
                # just been turned on).&lt;br /&gt;
                $userComm = $constants-&amp;gt;{min_expiry_comm}&lt;br /&gt;
                        if $userComm &amp;lt; $constants-&amp;gt;{min_expiry_comm};&lt;br /&gt;
                $userDays = $constants-&amp;gt;{min_expiry_days}&lt;br /&gt;
                        if $userDays &amp;lt; $constants-&amp;gt;{min_expiry_days};&lt;br /&gt;
&lt;br /&gt;
                my $exp = $constants-&amp;gt;{expiry_exponent};&lt;br /&gt;
&lt;br /&gt;
                # Increment only the trigger that was used.&lt;br /&gt;
                my $new_comment_expiry = ($maxComm &amp;gt; 0 &amp;amp;&amp;amp; $userComm &amp;gt; $maxComm)&lt;br /&gt;
                        ? $maxComm&lt;br /&gt;
                        : $userComm * (($user-&amp;gt;{expiry_comm} &amp;lt; 0)&lt;br /&gt;
                                ? $exp&lt;br /&gt;
                                : 1&lt;br /&gt;
                );&lt;br /&gt;
                my $new_days_expiry = ($maxDays &amp;gt; 0 &amp;amp;&amp;amp; $userDays &amp;gt; $maxDays)&lt;br /&gt;
                        ? $maxDays&lt;br /&gt;
                        : $userDays * (($user-&amp;gt;{expiry_days} &amp;lt; 0)&lt;br /&gt;
                                ? $exp&lt;br /&gt;
                                : 1&lt;br /&gt;
                );&lt;br /&gt;
&lt;br /&gt;
                # Reset re-registration triggers for user.&lt;br /&gt;
                $slashdb-&amp;gt;setUser($user-&amp;gt;{uid}, {&lt;br /&gt;
                        'expiry_comm'           =&amp;gt; $new_comment_expiry,&lt;br /&gt;
                        'expiry_days'           =&amp;gt; $new_days_expiry,&lt;br /&gt;
                        'user_expiry_comm'      =&amp;gt; $new_comment_expiry,&lt;br /&gt;
                        'user_expiry_days'      =&amp;gt; $new_days_expiry,&lt;br /&gt;
                });&lt;br /&gt;
&lt;br /&gt;
                # Handles rest of re-registration process.&lt;br /&gt;
                setUserExpired($user-&amp;gt;{uid}, 0);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('regResult');&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#####################################################################&lt;br /&gt;
sub editTags {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $user = getCurrentUser(); &lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $note = $hr-&amp;gt;{note} || &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        return if $user-&amp;gt;{is_anon}; # shouldn't be, but can't hurt to check&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        my $user_edit = $slashdb-&amp;gt;getUser($user-&amp;gt;{uid});&lt;br /&gt;
        my $title = getTitle('editTags_title');&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('editTags', {&lt;br /&gt;
                user_edit       =&amp;gt; $user_edit,&lt;br /&gt;
                title           =&amp;gt; $title,&lt;br /&gt;
                note            =&amp;gt; $note,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub saveTags {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        return if $user-&amp;gt;{is_anon}; # shouldn't be, but can't hurt to check&lt;br /&gt;
&lt;br /&gt;
        $slashdb-&amp;gt;setUser($user-&amp;gt;{uid}, {&lt;br /&gt;
                tags_turnedoff =&amp;gt;       $form-&amp;gt;{showtags} ? '' : 1 });&lt;br /&gt;
        editTags({ note =&amp;gt; getMessage('savetags_msg') });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#####################################################################&lt;br /&gt;
sub showTags {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $tags_reader = getObject('Slash::Tags', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
        # XXX if $user_edit-&amp;gt;{acl}{spammer}, either abort or put ref=nofollow in all links&lt;br /&gt;
&lt;br /&gt;
        my $tagname = $form-&amp;gt;{tagname} || '';&lt;br /&gt;
        $tagname = '' if !$tags_reader-&amp;gt;tagnameSyntaxOK($tagname);&lt;br /&gt;
&lt;br /&gt;
        my($uid, $user_edit);&lt;br /&gt;
        if ($form-&amp;gt;{uid} || $form-&amp;gt;{nick}) {&lt;br /&gt;
                $uid = $form-&amp;gt;{uid} || $tags_reader-&amp;gt;getUserUID($form-&amp;gt;{nick});&lt;br /&gt;
                $user_edit = $tags_reader-&amp;gt;getUser($uid);&lt;br /&gt;
        }&lt;br /&gt;
        if (!$user_edit || $user_edit-&amp;gt;{is_anon}) {&lt;br /&gt;
                $uid = $user-&amp;gt;{uid};&lt;br /&gt;
                $user_edit = $user;&lt;br /&gt;
        }&lt;br /&gt;
        my $nickname = $user_edit-&amp;gt;{nickname};&lt;br /&gt;
&lt;br /&gt;
        if (!$constants-&amp;gt;{plugin}{Tags}) {&lt;br /&gt;
                print getError('bad_op', { op =&amp;gt; $form-&amp;gt;{op}});&lt;br /&gt;
                return;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $tagnameid = $tags_reader-&amp;gt;getTagnameidFromNameIfExists($tagname);&lt;br /&gt;
        if ($tagnameid) {&lt;br /&gt;
                # Show all user's tags for one particular tagname.&lt;br /&gt;
                my $tags_hr = $tags_reader-&amp;gt;getGroupedTagsFromUser($user_edit-&amp;gt;{uid},&lt;br /&gt;
                        { tagnameid =&amp;gt; $tagnameid });&lt;br /&gt;
                my $tags_ar = $tags_hr-&amp;gt;{$tagname} || [ ];&lt;br /&gt;
                slashDisplay('usertagsforname', {&lt;br /&gt;
                        useredit        =&amp;gt; $user_edit,&lt;br /&gt;
                        tagname         =&amp;gt; $tagname,&lt;br /&gt;
                        tags            =&amp;gt; $tags_ar,&lt;br /&gt;
                });&lt;br /&gt;
&lt;br /&gt;
        } else {&lt;br /&gt;
                my $tags_hr = $tags_reader-&amp;gt;getGroupedTagsFromUser($user_edit-&amp;gt;{uid});&lt;br /&gt;
                my $num_tags = 0;&lt;br /&gt;
                for my $tn (keys %$tags_hr) {&lt;br /&gt;
                        $num_tags += scalar @{ $tags_hr-&amp;gt;{$tn} };&lt;br /&gt;
                }&lt;br /&gt;
                my $cutoff = $constants-&amp;gt;{tags_usershow_cutoff} || 200;&lt;br /&gt;
                if ($num_tags &amp;lt;= $cutoff) {&lt;br /&gt;
                        # Show all user's tags, grouped by tagname.&lt;br /&gt;
                        slashDisplay('usertags', {&lt;br /&gt;
                                useredit        =&amp;gt; $user_edit,&lt;br /&gt;
                                tags_grouped    =&amp;gt; $tags_hr,&lt;br /&gt;
                        });&lt;br /&gt;
                } else {&lt;br /&gt;
                        # Show all user's tagnames, with links to show all&lt;br /&gt;
                        # tags for each particular tagname.&lt;br /&gt;
                        my $tagname_ar = [ sort keys %$tags_hr ];&lt;br /&gt;
                        slashDisplay('usertagnames', {&lt;br /&gt;
                                useredit        =&amp;gt; $user_edit,&lt;br /&gt;
                                tagnames        =&amp;gt; $tagname_ar,&lt;br /&gt;
                        });&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub showBookmarks {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $tags_reader = getObject('Slash::Tags', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
        my($uid, $user_edit);&lt;br /&gt;
        if ($form-&amp;gt;{uid} || $form-&amp;gt;{nick}) {&lt;br /&gt;
                $uid = $form-&amp;gt;{uid} || $tags_reader-&amp;gt;getUserUID($form-&amp;gt;{nick});&lt;br /&gt;
                $user_edit = $tags_reader-&amp;gt;getUser($uid);&lt;br /&gt;
        }&lt;br /&gt;
        if (!$user_edit || $user_edit-&amp;gt;{is_anon}) {&lt;br /&gt;
                $uid = $user-&amp;gt;{uid};&lt;br /&gt;
                $user_edit = $user;&lt;br /&gt;
        }&lt;br /&gt;
        my $nickname = $user_edit-&amp;gt;{nickname};&lt;br /&gt;
&lt;br /&gt;
        if (!$constants-&amp;gt;{plugin}{Tags}) {&lt;br /&gt;
                print getError('bad_op', { op =&amp;gt; $form-&amp;gt;{op}});&lt;br /&gt;
                return;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $tags_ar = $tags_reader-&amp;gt;getGroupedTagsFromUser($user_edit-&amp;gt;{uid}, { type =&amp;gt; &amp;quot;urls&amp;quot;, only_bookmarked =&amp;gt; 1 });&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('userbookmarks', {&lt;br /&gt;
                useredit        =&amp;gt; $user_edit,&lt;br /&gt;
                tags_grouped    =&amp;gt; $tags_ar,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub editKey {&lt;br /&gt;
        my($uid) = @_;&lt;br /&gt;
&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
&lt;br /&gt;
        my $pubkey = $slashdb-&amp;gt;getUser($uid, 'pubkey');&lt;br /&gt;
        my $editkey = slashDisplay('editKey', { pubkey =&amp;gt; $pubkey }, 1);&lt;br /&gt;
        return $editkey;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
# We arrive here without header() having been called.  Some of the&lt;br /&gt;
# functions we dispatch to call it, some do not.&lt;br /&gt;
sub adminDispatch {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $op = $hr-&amp;gt;{op} || $form-&amp;gt;{op};&lt;br /&gt;
&lt;br /&gt;
        if ($op eq 'authoredit') {&lt;br /&gt;
                # editUser() does not call header(), so we DO need to.&lt;br /&gt;
                header(getMessage('user_header'), '', {}) or return;&lt;br /&gt;
                editUser($hr);&lt;br /&gt;
&lt;br /&gt;
        } elsif ($form-&amp;gt;{saveuseradmin}) {&lt;br /&gt;
                # saveUserAdmin() tail-calls showInfo(), which calls&lt;br /&gt;
                # header(), so we need to NOT.&lt;br /&gt;
                saveUserAdmin($hr);&lt;br /&gt;
&lt;br /&gt;
        } elsif ($form-&amp;gt;{userinfo}) {&lt;br /&gt;
                # showInfo() calls header(), so we need to NOT.&lt;br /&gt;
                showInfo($hr);&lt;br /&gt;
&lt;br /&gt;
        } elsif ($form-&amp;gt;{userfield}) {&lt;br /&gt;
                # none of these calls header(), so we DO need to.&lt;br /&gt;
                header(getMessage('user_header'), '', {}) or return;&lt;br /&gt;
                if ($form-&amp;gt;{edituser}) {&lt;br /&gt;
                        editUser($hr);&lt;br /&gt;
&lt;br /&gt;
                } elsif ($form-&amp;gt;{edithome}) {&lt;br /&gt;
                        editHome($hr);&lt;br /&gt;
&lt;br /&gt;
                } elsif ($form-&amp;gt;{editcomm}) {&lt;br /&gt;
                        editComm($hr);&lt;br /&gt;
&lt;br /&gt;
                } elsif ($form-&amp;gt;{changepasswd}) {&lt;br /&gt;
                        changePasswd($hr);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
        } else {&lt;br /&gt;
                # showInfo() calls header(), so we need to NOT.&lt;br /&gt;
                showInfo($hr);&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub tildeEd {&lt;br /&gt;
        my($user_edit) = @_;&lt;br /&gt;
&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        my %story023_default = (&lt;br /&gt;
                author  =&amp;gt; { },&lt;br /&gt;
                nexus   =&amp;gt; { },&lt;br /&gt;
                topic   =&amp;gt; { },&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        my %prefs = ( );&lt;br /&gt;
        for my $field (qw(&lt;br /&gt;
                story_never_topic       story_never_author      story_never_nexus&lt;br /&gt;
                story_always_topic      story_always_author     story_always_nexus      story_brief_always_nexus&lt;br /&gt;
                story_full_brief_nexus  story_full_best_nexus   story_brief_best_nexus&lt;br /&gt;
        )) {&lt;br /&gt;
                for my $id (&lt;br /&gt;
                        grep /^\d+$/,&lt;br /&gt;
                        split /,/,&lt;br /&gt;
                        ($user_edit-&amp;gt;{$field} || &amp;quot;&amp;quot;)&lt;br /&gt;
                ) {&lt;br /&gt;
                        $prefs{$field}{$id} = 1;&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
#print STDERR scalar(localtime) . &amp;quot; prefs: &amp;quot; . Dumper(\%prefs);&lt;br /&gt;
&lt;br /&gt;
        # Set up $author_hr, @aid_order, and $story023_default{author}.&lt;br /&gt;
&lt;br /&gt;
        my $author_hr = $reader-&amp;gt;getDescriptions('authors');&lt;br /&gt;
        my @aid_order = sort { lc $author_hr-&amp;gt;{$a} cmp lc $author_hr-&amp;gt;{$b} } keys %$author_hr;&lt;br /&gt;
        for my $aid (@aid_order) {&lt;br /&gt;
                     if ($prefs{story_never_author}{$aid}) {&lt;br /&gt;
                        $story023_default{author}{$aid} = 0;&lt;br /&gt;
                } elsif ($prefs{story_always_author}{$aid}) {&lt;br /&gt;
                        $story023_default{author}{$aid} = 3;&lt;br /&gt;
                } else {&lt;br /&gt;
                        $story023_default{author}{$aid} = 2;&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Set up $topic_hr, @topictid_order, and $story023_default{topic}.&lt;br /&gt;
&lt;br /&gt;
        my $topic_hr = $reader-&amp;gt;getDescriptions('non_nexus_topics-storypickable');&lt;br /&gt;
        my @topictid_order = sort { lc $topic_hr-&amp;gt;{$a} cmp lc $topic_hr-&amp;gt;{$b} } keys %$topic_hr;&lt;br /&gt;
        for my $tid (@topictid_order) {&lt;br /&gt;
                     if ($prefs{story_never_topic}{$tid}) {&lt;br /&gt;
                        $story023_default{topic}{$tid} = 0;&lt;br /&gt;
                } elsif ($prefs{story_always_topic}{$tid}) {&lt;br /&gt;
                        $story023_default{topic}{$tid} = 3;&lt;br /&gt;
                } else {&lt;br /&gt;
                        $story023_default{topic}{$tid} = 2;&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Set up $nexus_hr, @nexustid_order, and $story023_default{nexus}.&lt;br /&gt;
        my $topic_tree = $reader-&amp;gt;getTopicTree();&lt;br /&gt;
        my $nexus_tids_ar = $reader-&amp;gt;getStorypickableNexusChildren($constants-&amp;gt;{mainpage_nexus_tid}, 1);&lt;br /&gt;
        my $nexus_hr = { };&lt;br /&gt;
&lt;br /&gt;
        for my $tid (@$nexus_tids_ar) {&lt;br /&gt;
                $nexus_hr-&amp;gt;{$tid} = $topic_tree-&amp;gt;{$tid}{textname};&lt;br /&gt;
        }&lt;br /&gt;
        my @nexustid_order = sort {($b == $constants-&amp;gt;{mainpage_nexus_tid}) &amp;lt;=&amp;gt; ($a == $constants-&amp;gt;{mainpage_nexus_tid}) || &lt;br /&gt;
                                    lc $nexus_hr-&amp;gt;{$a} cmp lc $nexus_hr-&amp;gt;{$b} } keys %$nexus_hr;&lt;br /&gt;
&lt;br /&gt;
        my $mp_disp_nexuses = $reader-&amp;gt;getMainpageDisplayableNexuses();&lt;br /&gt;
        my %mp_disp_nexus = ( map { ($_, 1) } @$mp_disp_nexuses );&lt;br /&gt;
        for my $tid (@nexustid_order) {&lt;br /&gt;
                     if ($prefs{story_never_nexus}{$tid}) {&lt;br /&gt;
                        $story023_default{nexus}{$tid} = 0;&lt;br /&gt;
                } elsif ($prefs{story_always_nexus}{$tid}) {&lt;br /&gt;
                        $story023_default{nexus}{$tid} = 5;&lt;br /&gt;
                } elsif ($prefs{story_full_brief_nexus}{$tid}) {&lt;br /&gt;
                        $story023_default{nexus}{$tid} = 4;&lt;br /&gt;
                } elsif ($prefs{story_brief_always_nexus}{$tid}) {&lt;br /&gt;
                        $story023_default{nexus}{$tid} = 3;&lt;br /&gt;
                } elsif ($prefs{story_full_best_nexus}{$tid}) {&lt;br /&gt;
                        $story023_default{nexus}{$tid} = 2;&lt;br /&gt;
                } elsif ($prefs{story_brief_best_nexus}{$tid}) {&lt;br /&gt;
                        $story023_default{nexus}{$tid} = 1;&lt;br /&gt;
                } else {&lt;br /&gt;
                        # If brief_sectional_mainpage is set, then all&lt;br /&gt;
                        # nexuses in getMainpageDisplayableNexuses are,&lt;br /&gt;
                        # by default, shown as brief on the mainpage.&lt;br /&gt;
                        if ($constants-&amp;gt;{brief_sectional_mainpage}&lt;br /&gt;
                                &amp;amp;&amp;amp; $mp_disp_nexus{$tid}&lt;br /&gt;
                        ) {&lt;br /&gt;
                                $story023_default{nexus}{$tid} = 4;&lt;br /&gt;
                        } else {&lt;br /&gt;
                                $story023_default{nexus}{$tid} = 2;&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Set up $section_descref and $box_order, used to decide which&lt;br /&gt;
        # slashboxes appear.  Really this doesn't seem to have anything&lt;br /&gt;
        # to do with sections, so I'm not sure why it's called&lt;br /&gt;
        # &amp;quot;section&amp;quot;_descref.&lt;br /&gt;
&lt;br /&gt;
        my $section_descref = { };&lt;br /&gt;
        my $box_order;&lt;br /&gt;
        my $sections_description = $reader-&amp;gt;getSectionBlocks();&lt;br /&gt;
&lt;br /&gt;
        # the names of all the boxes in @{$skinBoxes-&amp;gt;{$constants-&amp;gt;{mainpage_skid}}}&lt;br /&gt;
        # should be unioned into sections_description.  whether the&lt;br /&gt;
        # values are 0 or 1 is calculated correctly, but we're&lt;br /&gt;
        # missing some 0's that should appear, I think, under&lt;br /&gt;
        # some circumstances.  ah heck, the whole concept of&lt;br /&gt;
        # sectional slashboxes should be redone (why the heck&lt;br /&gt;
        # do we have skinname_more instead of just a block&lt;br /&gt;
        # called olderstories?)&lt;br /&gt;
&lt;br /&gt;
        my $slashboxes_hr = { };&lt;br /&gt;
        my $slashboxes_textlist = $user_edit-&amp;gt;{slashboxes};&lt;br /&gt;
        if (!$slashboxes_textlist) {&lt;br /&gt;
                # Use the default.&lt;br /&gt;
                my($boxes, $skinBoxes) = $reader-&amp;gt;getPortalsCommon();&lt;br /&gt;
                $slashboxes_textlist = join &amp;quot;,&amp;quot;, @{$skinBoxes-&amp;gt;{$constants-&amp;gt;{mainpage_skid}}};&lt;br /&gt;
        }&lt;br /&gt;
        for my $bid (&lt;br /&gt;
                map { /^'?([^']+)'?$/; $1 }&lt;br /&gt;
                split /,/,&lt;br /&gt;
                $slashboxes_textlist&lt;br /&gt;
        ) {&lt;br /&gt;
                $slashboxes_hr-&amp;gt;{$bid} = 1;&lt;br /&gt;
        }&lt;br /&gt;
        for my $ary (sort { lc $a-&amp;gt;[1] cmp lc $b-&amp;gt;[1]} @$sections_description) {&lt;br /&gt;
                my($bid, $title, $boldflag) = @$ary;&lt;br /&gt;
                push @$box_order, $bid;&lt;br /&gt;
                $section_descref-&amp;gt;{$bid}{checked} =&lt;br /&gt;
                        $slashboxes_hr-&amp;gt;{$bid}&lt;br /&gt;
                                ? $constants-&amp;gt;{markup_checked_attribute}&lt;br /&gt;
                                : '';&lt;br /&gt;
                $title =~ s/&amp;lt;(.*?)&amp;gt;//g;&lt;br /&gt;
                $section_descref-&amp;gt;{$bid}{title} = $title;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $dynamic_blocks = getObject(&amp;quot;Slash::DynamicBlocks&amp;quot;);&lt;br /&gt;
        my $extra_blocks = [];&lt;br /&gt;
        if ($dynamic_blocks) {&lt;br /&gt;
                my $userblocks = $dynamic_blocks-&amp;gt;getUserBlocks(&amp;quot;name&amp;quot;, $user_edit-&amp;gt;{uid}) || {};&lt;br /&gt;
                my $friendblocks = $dynamic_blocks-&amp;gt;getFriendBlocks(&amp;quot;name&amp;quot;, $user_edit-&amp;gt;{uid}) || {};&lt;br /&gt;
                push(@$extra_blocks, grep { $slashboxes_textlist =~ $_; } (keys(%$userblocks), keys(%$friendblocks)));&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Userspace.&lt;br /&gt;
        my $userspace = $user_edit-&amp;gt;{mylinks} || &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        # Titles of stuff.&lt;br /&gt;
        my $tildeEd_title = getTitle('tildeEd_title');&lt;br /&gt;
        my $criteria_msg = getMessage('tilded_criteria_msg');&lt;br /&gt;
        my $customize_title = getTitle('tildeEd_customize_title');&lt;br /&gt;
        my $tilded_customize_msg = getMessage('tilded_customize_msg',&lt;br /&gt;
                { userspace =&amp;gt; $userspace });&lt;br /&gt;
        my $tilded_box_msg = getMessage('tilded_box_msg');&lt;br /&gt;
&lt;br /&gt;
        my $tilde_ed = slashDisplay('tildeEd', {&lt;br /&gt;
                user_edit               =&amp;gt; $user_edit,&lt;br /&gt;
                title                   =&amp;gt; $tildeEd_title,&lt;br /&gt;
                criteria_msg            =&amp;gt; $criteria_msg,&lt;br /&gt;
                customize_title         =&amp;gt; $customize_title,&lt;br /&gt;
                tilded_customize_msg    =&amp;gt; $tilded_customize_msg,&lt;br /&gt;
                tilded_box_msg          =&amp;gt; $tilded_box_msg,&lt;br /&gt;
&lt;br /&gt;
                story023_default        =&amp;gt; \%story023_default,&lt;br /&gt;
                authorref               =&amp;gt; $author_hr,&lt;br /&gt;
                aid_order               =&amp;gt; \@aid_order,&lt;br /&gt;
                topicref                =&amp;gt; $topic_hr,&lt;br /&gt;
                topictid_order          =&amp;gt; \@topictid_order,&lt;br /&gt;
                nexusref                =&amp;gt; $nexus_hr,&lt;br /&gt;
                nexustid_order          =&amp;gt; \@nexustid_order,&lt;br /&gt;
&lt;br /&gt;
                section_descref         =&amp;gt; $section_descref,&lt;br /&gt;
                box_order               =&amp;gt; $box_order,&lt;br /&gt;
&lt;br /&gt;
                userspace               =&amp;gt; $userspace,&lt;br /&gt;
                extra_blocks            =&amp;gt; $extra_blocks,&lt;br /&gt;
        }, 1);&lt;br /&gt;
&lt;br /&gt;
        return $tilde_ed;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub changePasswd {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        my $user_edit = {};&lt;br /&gt;
        my $title;&lt;br /&gt;
        my $suadmin_flag = ($user-&amp;gt;{seclev} &amp;gt;= 10000) ? 1 : 0;&lt;br /&gt;
&lt;br /&gt;
        my $admin_flag = ($user-&amp;gt;{is_admin}) ? 1 : 0;&lt;br /&gt;
        my $admin_block = '';&lt;br /&gt;
&lt;br /&gt;
        my $id = '';&lt;br /&gt;
        if ($admin_flag) {&lt;br /&gt;
                if ($form-&amp;gt;{userfield}) {&lt;br /&gt;
                        $id ||= $form-&amp;gt;{userfield};&lt;br /&gt;
                        if ($id =~ /^\d+$/) {&lt;br /&gt;
                                $user_edit = $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                        } else {&lt;br /&gt;
                                $user_edit = $slashdb-&amp;gt;getUser($slashdb-&amp;gt;getUserUID($id));&lt;br /&gt;
                        }&lt;br /&gt;
                } else {&lt;br /&gt;
                        $user_edit = $id eq '' ? $user : $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                        $id = $user_edit-&amp;gt;{uid};&lt;br /&gt;
                }&lt;br /&gt;
        } else {&lt;br /&gt;
                $id = $user-&amp;gt;{uid};&lt;br /&gt;
                $user_edit = $user;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        $admin_block = getUserAdmin($id, 'uid', 1) if $admin_flag;&lt;br /&gt;
&lt;br /&gt;
        # print getMessage('note', { note =&amp;gt; $form-&amp;gt;{note}}) if $form-&amp;gt;{note};&lt;br /&gt;
&lt;br /&gt;
        $title = getTitle('changePasswd_title', { user_edit =&amp;gt; $user_edit });&lt;br /&gt;
&lt;br /&gt;
        my $session = $slashdb-&amp;gt;getDescriptions('session_login');&lt;br /&gt;
        my $session_select = createSelect('session_login', $session, $user_edit-&amp;gt;{session_login}, 1);&lt;br /&gt;
&lt;br /&gt;
        my $clocation = $slashdb-&amp;gt;getDescriptions('cookie_location');&lt;br /&gt;
        my @clocation_order = grep { exists $clocation-&amp;gt;{$_} } qw(none classbid subnetid ipid);&lt;br /&gt;
        my $clocation_select = createSelect('cookie_location', $clocation,&lt;br /&gt;
                $user_edit-&amp;gt;{cookie_location}, 1, 0, \@clocation_order&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        my $got_oldpass = 0;&lt;br /&gt;
        if ($form-&amp;gt;{oldpass}) {&lt;br /&gt;
                my $return_uid = $slashdb-&amp;gt;getUserAuthenticate($id, $form-&amp;gt;{oldpass}, 1);&lt;br /&gt;
                $got_oldpass = 1 if $return_uid &amp;amp;&amp;amp; $id == $return_uid;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('changePasswd', {&lt;br /&gt;
                useredit                =&amp;gt; $user_edit,&lt;br /&gt;
                admin_flag              =&amp;gt; $suadmin_flag,&lt;br /&gt;
                title                   =&amp;gt; $title,&lt;br /&gt;
                session                 =&amp;gt; $session_select,&lt;br /&gt;
                clocation               =&amp;gt; $clocation_select,&lt;br /&gt;
                admin_block             =&amp;gt; $admin_block,&lt;br /&gt;
                got_oldpass             =&amp;gt; $got_oldpass&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub editUser {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $id = $hr-&amp;gt;{uid} || '';&lt;br /&gt;
        my $note = $hr-&amp;gt;{note} || '';&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $plugins = $slashdb-&amp;gt;getDescriptions('plugins');&lt;br /&gt;
&lt;br /&gt;
        my $user_edit = {};&lt;br /&gt;
        my($admin_block, $title);&lt;br /&gt;
        my $admin_flag = ($user-&amp;gt;{is_admin}) ? 1 : 0;&lt;br /&gt;
        my $fieldkey;&lt;br /&gt;
&lt;br /&gt;
        if ($admin_flag &amp;amp;&amp;amp; $form-&amp;gt;{userfield}) {&lt;br /&gt;
                $id ||= $form-&amp;gt;{userfield};&lt;br /&gt;
                if ($form-&amp;gt;{userfield} =~ /^\d+$/) {&lt;br /&gt;
                        $user_edit = $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                        $fieldkey = 'uid';&lt;br /&gt;
                } else {&lt;br /&gt;
                        $user_edit = $slashdb-&amp;gt;getUser($slashdb-&amp;gt;getUserUID($id));&lt;br /&gt;
                        $fieldkey = 'nickname';&lt;br /&gt;
                }&lt;br /&gt;
        } else {&lt;br /&gt;
                $user_edit = $id eq '' ? $user : $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                $fieldkey = 'uid';&lt;br /&gt;
                $id = $user_edit-&amp;gt;{uid};&lt;br /&gt;
        }&lt;br /&gt;
        return if isAnon($user_edit-&amp;gt;{uid}) &amp;amp;&amp;amp; ! $admin_flag;&lt;br /&gt;
&lt;br /&gt;
        $admin_block = getUserAdmin($id, $fieldkey, 1) if $admin_flag;&lt;br /&gt;
        $user_edit-&amp;gt;{homepage} ||= &amp;quot;http://&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        # Remove domain tags, they'll be added back in, in saveUser.&lt;br /&gt;
        for my $dat (@{$user_edit}{qw(sig bio)}) {&lt;br /&gt;
                $dat = parseDomainTags($dat, 0, 1);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        $title = getTitle('editUser_title', { user_edit =&amp;gt; $user_edit});&lt;br /&gt;
&lt;br /&gt;
        my $editkey = &amp;quot;&amp;quot;;&lt;br /&gt;
        $editkey = editKey($user_edit-&amp;gt;{uid}) if $fieldkey eq 'uid' &amp;amp;&amp;amp; $plugins-&amp;gt;{PubKey};&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('editUser', {&lt;br /&gt;
                useredit                =&amp;gt; $user_edit,&lt;br /&gt;
                admin_flag              =&amp;gt; $admin_flag,&lt;br /&gt;
                title                   =&amp;gt; $title,&lt;br /&gt;
                editkey                 =&amp;gt; $editkey,&lt;br /&gt;
                admin_block             =&amp;gt; $admin_block,&lt;br /&gt;
                note                    =&amp;gt; $note,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub editHome {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $id = $hr-&amp;gt;{uid} || '';&lt;br /&gt;
        my $note = $hr-&amp;gt;{note} || '';&lt;br /&gt;
&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        my($formats, $title, $tzformat_select);&lt;br /&gt;
        my $user_edit = {};&lt;br /&gt;
        my $fieldkey;&lt;br /&gt;
&lt;br /&gt;
        my $admin_flag = ($user-&amp;gt;{is_admin}) ? 1 : 0;&lt;br /&gt;
        my $admin_block = '';&lt;br /&gt;
&lt;br /&gt;
        if ($admin_flag &amp;amp;&amp;amp; $form-&amp;gt;{userfield}) {&lt;br /&gt;
                $id ||= $form-&amp;gt;{userfield};&lt;br /&gt;
                if ($form-&amp;gt;{userfield} =~ /^\d+$/) {&lt;br /&gt;
                        $user_edit = $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                        $fieldkey = 'uid';&lt;br /&gt;
                } else {&lt;br /&gt;
                        $user_edit = $slashdb-&amp;gt;getUser($slashdb-&amp;gt;getUserUID($id));&lt;br /&gt;
                        $fieldkey = 'nickname';&lt;br /&gt;
                }&lt;br /&gt;
        } else {&lt;br /&gt;
                $user_edit = $id eq '' ? $user : $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                $fieldkey = 'uid';&lt;br /&gt;
        }&lt;br /&gt;
#use Data::Dumper; $Data::Dumper::Sortkeys = 1; print STDERR scalar(localtime) . &amp;quot; user_edit: &amp;quot; . Dumper($user_edit);&lt;br /&gt;
&lt;br /&gt;
        return if isAnon($user_edit-&amp;gt;{uid}) &amp;amp;&amp;amp; ! $admin_flag;&lt;br /&gt;
        $admin_block = getUserAdmin($id, $fieldkey, 1) if $admin_flag;&lt;br /&gt;
&lt;br /&gt;
        $title = getTitle('editHome_title');&lt;br /&gt;
&lt;br /&gt;
        return if $user-&amp;gt;{seclev} &amp;lt; 100 &amp;amp;&amp;amp; isAnon($user_edit-&amp;gt;{uid});&lt;br /&gt;
&lt;br /&gt;
        $formats = $slashdb-&amp;gt;getDescriptions('dateformats');&lt;br /&gt;
        $tzformat_select = createSelect('tzformat', $formats, $user_edit-&amp;gt;{dfid}, 1);&lt;br /&gt;
&lt;br /&gt;
        my $lb_check = $user_edit-&amp;gt;{lowbandwidth} ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $sd_check = $user_edit-&amp;gt;{simpledesign} ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $i_check = $user_edit-&amp;gt;{noicons}     ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $w_check = $user_edit-&amp;gt;{willing}     ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $classic_check = $user_edit-&amp;gt;{index_classic} ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
&lt;br /&gt;
        my $tilde_ed = tildeEd($user_edit);&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('editHome', {&lt;br /&gt;
                title                   =&amp;gt; $title,&lt;br /&gt;
                admin_block             =&amp;gt; $admin_block,&lt;br /&gt;
                user_edit               =&amp;gt; $user_edit,&lt;br /&gt;
                tzformat_select         =&amp;gt; $tzformat_select,&lt;br /&gt;
                i_check                 =&amp;gt; $i_check,&lt;br /&gt;
                w_check                 =&amp;gt; $w_check,&lt;br /&gt;
                lb_check                =&amp;gt; $lb_check,&lt;br /&gt;
                sd_check                =&amp;gt; $sd_check,&lt;br /&gt;
                classic_check           =&amp;gt; $classic_check,&lt;br /&gt;
                tilde_ed                =&amp;gt; $tilde_ed,&lt;br /&gt;
                note                    =&amp;gt; $note,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub editComm {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $id = $hr-&amp;gt;{uid} || '';&lt;br /&gt;
        my $note = $hr-&amp;gt;{note} || '';&lt;br /&gt;
&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user_edit = {};&lt;br /&gt;
        my($formats, $commentmodes_select, $commentsort_select, $title,&lt;br /&gt;
                $uthreshold_select, $highlightthresh_select, $posttype_select,&lt;br /&gt;
                $bytelimit_select);&lt;br /&gt;
&lt;br /&gt;
        my $admin_block = '';&lt;br /&gt;
        my $fieldkey;&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        my $admin_flag = $user-&amp;gt;{is_admin} ? 1 : 0;&lt;br /&gt;
&lt;br /&gt;
        if ($admin_flag &amp;amp;&amp;amp; $form-&amp;gt;{userfield}) {&lt;br /&gt;
                $id ||= $form-&amp;gt;{userfield};&lt;br /&gt;
                if ($form-&amp;gt;{userfield} =~ /^\d+$/) {&lt;br /&gt;
                        $user_edit = $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                        $fieldkey = 'uid';&lt;br /&gt;
                } else {&lt;br /&gt;
                        $user_edit = $slashdb-&amp;gt;getUser($slashdb-&amp;gt;getUserUID($id));&lt;br /&gt;
                        $fieldkey = 'nickname';&lt;br /&gt;
                }&lt;br /&gt;
        } else {&lt;br /&gt;
                $user_edit = $id eq '' ? $user : $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                $fieldkey = 'uid';&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $hi = $constants-&amp;gt;{comment_maxscore} - $constants-&amp;gt;{comment_minscore};&lt;br /&gt;
        my $lo = -$hi;&lt;br /&gt;
        my @range = map { $_ &amp;gt; 0 ? &amp;quot;+$_&amp;quot; : $_ } ($lo .. $hi);&lt;br /&gt;
&lt;br /&gt;
        my @reasons = ( );&lt;br /&gt;
        my %reason_select = ( );&lt;br /&gt;
        if ($constants-&amp;gt;{m1}) {&lt;br /&gt;
                my $mod_reader = getObject(&amp;quot;Slash::$constants-&amp;gt;{m1_pluginname}&amp;quot;, { db_type =&amp;gt; 'reader' });&lt;br /&gt;
                my $reasons = $mod_reader-&amp;gt;getReasons();&lt;br /&gt;
                for my $id (sort { $a &amp;lt;=&amp;gt; $b } keys %$reasons) {&lt;br /&gt;
                        push @reasons, $reasons-&amp;gt;{$id}{name};&lt;br /&gt;
                }&lt;br /&gt;
                # Reason modifiers&lt;br /&gt;
                for my $reason_name (@reasons) {&lt;br /&gt;
                        my $key = &amp;quot;reason_alter_$reason_name&amp;quot;;&lt;br /&gt;
                        $reason_select{$reason_name} = createSelect(&lt;br /&gt;
                                $key, \@range, &lt;br /&gt;
                                $user_edit-&amp;gt;{$key} || 0, 1, 1&lt;br /&gt;
                        );&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Zoo relation modifiers&lt;br /&gt;
        my %people_select;&lt;br /&gt;
        my @people =  qw(friend foe anonymous fof eof freak fan);&lt;br /&gt;
        for (@people) {&lt;br /&gt;
                my $key = &amp;quot;people_bonus_$_&amp;quot;;&lt;br /&gt;
                $people_select{$_} = createSelect($key, \@range, &lt;br /&gt;
                        $user_edit-&amp;gt;{$key} || 0, 1, 1&lt;br /&gt;
                );&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # New-user modifier&lt;br /&gt;
        my $new_user_bonus_select = createSelect('new_user_bonus', \@range, &lt;br /&gt;
                        $user_edit-&amp;gt;{new_user_bonus} || 0, 1, 1);&lt;br /&gt;
        my $new_user_percent_select = createSelect('new_user_percent',&lt;br /&gt;
                        [( 1..15, 20, 25, 30, 35, 40, 45, 50, 55,&lt;br /&gt;
                          60, 65, 70, 75, 80, 85, 90, 95 )], &lt;br /&gt;
                        $user_edit-&amp;gt;{new_user_percent} || 100, 1, 1);&lt;br /&gt;
        # Karma modifier&lt;br /&gt;
        my $karma_bonus = createSelect('karma_bonus', \@range, &lt;br /&gt;
                        $user_edit-&amp;gt;{karma_bonus} || 0, 1, 1);&lt;br /&gt;
        # Subscriber modifier&lt;br /&gt;
        my $subscriber_bonus = createSelect('subscriber_bonus', \@range, &lt;br /&gt;
                        $user_edit-&amp;gt;{subscriber_bonus} || 0, 1, 1);&lt;br /&gt;
&lt;br /&gt;
        # Length modifier&lt;br /&gt;
        my $small_length_bonus_select = createSelect('clsmall_bonus', \@range, &lt;br /&gt;
                        $user_edit-&amp;gt;{clsmall_bonus} || 0, 1, 1);&lt;br /&gt;
        my $long_length_bonus_select = createSelect('clbig_bonus', \@range, &lt;br /&gt;
                        $user_edit-&amp;gt;{clbig_bonus} || 0, 1, 1);&lt;br /&gt;
&lt;br /&gt;
        return if isAnon($user_edit-&amp;gt;{uid}) &amp;amp;&amp;amp; ! $admin_flag;&lt;br /&gt;
        $admin_block = getUserAdmin($id, $fieldkey, 1) if $admin_flag;&lt;br /&gt;
&lt;br /&gt;
        $title = getTitle('editComm_title');&lt;br /&gt;
&lt;br /&gt;
        $formats = $slashdb-&amp;gt;getDescriptions('commentmodes');&lt;br /&gt;
        $commentmodes_select=createSelect('umode', $formats, $user_edit-&amp;gt;{mode}, 1);&lt;br /&gt;
&lt;br /&gt;
        $formats = $slashdb-&amp;gt;getDescriptions('sortcodes');&lt;br /&gt;
        $commentsort_select = createSelect(&lt;br /&gt;
                'commentsort', $formats, $user_edit-&amp;gt;{commentsort}, 1&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        $formats = $slashdb-&amp;gt;getDescriptions('threshcodes');&lt;br /&gt;
        $uthreshold_select = createSelect(&lt;br /&gt;
                'uthreshold', $formats, $user_edit-&amp;gt;{threshold}, 1&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        $formats = $slashdb-&amp;gt;getDescriptions('threshcodes');&lt;br /&gt;
        $highlightthresh_select = createSelect(&lt;br /&gt;
                'highlightthresh', $formats, $user_edit-&amp;gt;{highlightthresh}, 1&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        $user_edit-&amp;gt;{bytelimit} = $constants-&amp;gt;{defaultbytelimit}&lt;br /&gt;
                if $user_edit-&amp;gt;{bytelimit} &amp;lt; 0 || $user_edit-&amp;gt;{bytelimit} &amp;gt; 7;&lt;br /&gt;
        my $bytelimit_desc = $user_edit-&amp;gt;{is_subscriber} ? 'bytelimit' : 'bytelimit_sub';&lt;br /&gt;
        $formats = $slashdb-&amp;gt;getDescriptions($bytelimit_desc);&lt;br /&gt;
        $bytelimit_select = createSelect(&lt;br /&gt;
                'bytelimit', $formats, $user_edit-&amp;gt;{bytelimit}, 1&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        my $h_check  = $user_edit-&amp;gt;{hardthresh}          ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $r_check  = $user_edit-&amp;gt;{reparent}            ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $n_check  = $user_edit-&amp;gt;{noscores}            ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $s_check  = $user_edit-&amp;gt;{nosigs}              ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $b_check  = $user_edit-&amp;gt;{nobonus}             ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $sb_check = $user_edit-&amp;gt;{nosubscriberbonus}   ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $p_check  = $user_edit-&amp;gt;{postanon}            ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $nospell_check = $user_edit-&amp;gt;{no_spell}       ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $s_mod_check = $user_edit-&amp;gt;{mod_with_comm}    ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $s_m2_check = $user_edit-&amp;gt;{m2_with_mod}       ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $s_m2c_check = $user_edit-&amp;gt;{m2_with_comm_mod} ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
&lt;br /&gt;
        $formats = $slashdb-&amp;gt;getDescriptions('postmodes');&lt;br /&gt;
        $posttype_select = createSelect(&lt;br /&gt;
                'posttype', $formats, $user_edit-&amp;gt;{posttype}, 1&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('editComm', {&lt;br /&gt;
                title                   =&amp;gt; $title,&lt;br /&gt;
                admin_block             =&amp;gt; $admin_block,&lt;br /&gt;
                user_edit               =&amp;gt; $user_edit,&lt;br /&gt;
                h_check                 =&amp;gt; $h_check,&lt;br /&gt;
                r_check                 =&amp;gt; $r_check,&lt;br /&gt;
                n_check                 =&amp;gt; $n_check,&lt;br /&gt;
                s_check                 =&amp;gt; $s_check,&lt;br /&gt;
                b_check                 =&amp;gt; $b_check,&lt;br /&gt;
                sb_check                =&amp;gt; $sb_check,&lt;br /&gt;
                p_check                 =&amp;gt; $p_check,&lt;br /&gt;
                s_mod_check             =&amp;gt; $s_mod_check,&lt;br /&gt;
                s_m2_check              =&amp;gt; $s_m2_check,&lt;br /&gt;
                s_m2c_check             =&amp;gt; $s_m2c_check,&lt;br /&gt;
                nospell_check           =&amp;gt; $nospell_check,&lt;br /&gt;
                commentmodes_select     =&amp;gt; $commentmodes_select,&lt;br /&gt;
                commentsort_select      =&amp;gt; $commentsort_select,&lt;br /&gt;
                highlightthresh_select  =&amp;gt; $highlightthresh_select,&lt;br /&gt;
                uthreshold_select       =&amp;gt; $uthreshold_select,&lt;br /&gt;
                posttype_select         =&amp;gt; $posttype_select,&lt;br /&gt;
                reasons                 =&amp;gt; \@reasons,&lt;br /&gt;
                reason_select           =&amp;gt; \%reason_select,&lt;br /&gt;
                people                  =&amp;gt; \@people,&lt;br /&gt;
                people_select           =&amp;gt; \%people_select,&lt;br /&gt;
                new_user_percent_select =&amp;gt; $new_user_percent_select,&lt;br /&gt;
                new_user_bonus_select   =&amp;gt; $new_user_bonus_select,&lt;br /&gt;
                note                    =&amp;gt; $note,&lt;br /&gt;
                karma_bonus             =&amp;gt; $karma_bonus,&lt;br /&gt;
                subscriber_bonus        =&amp;gt; $subscriber_bonus,&lt;br /&gt;
                small_length_bonus_select =&amp;gt; $small_length_bonus_select,&lt;br /&gt;
                long_length_bonus_select =&amp;gt; $long_length_bonus_select,&lt;br /&gt;
                bytelimit_select        =&amp;gt; $bytelimit_select,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub saveUserAdmin {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        my($user_edits_table, $user_edit) = ({}, {});&lt;br /&gt;
        my $author_flag;&lt;br /&gt;
        my $note = '';&lt;br /&gt;
        my $srcid;&lt;br /&gt;
        my $id;&lt;br /&gt;
        my $user_editfield_flag;&lt;br /&gt;
        my $banned = 0;&lt;br /&gt;
        my $banref;&lt;br /&gt;
        if ($form-&amp;gt;{uid}) {&lt;br /&gt;
                $user_editfield_flag = 'uid';&lt;br /&gt;
                $id = $form-&amp;gt;{uid};&lt;br /&gt;
                $user_edit = $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                $srcid = $id;&lt;br /&gt;
&lt;br /&gt;
        } elsif ($form-&amp;gt;{subnetid}) {&lt;br /&gt;
                $user_editfield_flag = 'subnetid';&lt;br /&gt;
                ($id, $user_edit-&amp;gt;{subnetid})  = ($form-&amp;gt;{subnetid}, $form-&amp;gt;{subnetid});&lt;br /&gt;
                $user_edit-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                $srcid = convert_srcid(subnetid =&amp;gt; $id);&lt;br /&gt;
&lt;br /&gt;
        } elsif ($form-&amp;gt;{ipid}) {&lt;br /&gt;
                $user_editfield_flag = 'ipid';&lt;br /&gt;
                ($id, $user_edit-&amp;gt;{ipid})  = ($form-&amp;gt;{ipid}, $form-&amp;gt;{ipid});&lt;br /&gt;
                $user_edit-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                $srcid = convert_srcid(ipid =&amp;gt; $id);&lt;br /&gt;
&lt;br /&gt;
        } elsif ($form-&amp;gt;{md5id}) {&lt;br /&gt;
                $user_editfield_flag = 'md5id';&lt;br /&gt;
                my $fieldname = $form-&amp;gt;{fieldname} || 'md5id';&lt;br /&gt;
                ($id, $user_edit-&amp;gt;{$fieldname})&lt;br /&gt;
                        = ($form-&amp;gt;{md5id}, $form-&amp;gt;{md5id});&lt;br /&gt;
                warn &amp;quot;form field md5id specified, no srcid saving possible&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        } elsif ($form-&amp;gt;{srcid}) {&lt;br /&gt;
                $user_editfield_flag = 'srcid';&lt;br /&gt;
                my $fieldname = $form-&amp;gt;{fieldname} || 'srcid';&lt;br /&gt;
                ($id, $user_edit-&amp;gt;{$fieldname})&lt;br /&gt;
                        = ($form-&amp;gt;{srcid}, $form-&amp;gt;{srcid});&lt;br /&gt;
                $srcid = $id;&lt;br /&gt;
&lt;br /&gt;
        } else {&lt;br /&gt;
                # If we were not fed valid data, don't do anything.&lt;br /&gt;
                return ;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $all_al2types = $reader-&amp;gt;getAL2Types;&lt;br /&gt;
        my $al2_change = { };&lt;br /&gt;
&lt;br /&gt;
        # First, get a hash of what aclams (AL2's and ACLs) this user&lt;br /&gt;
        # had when the previous admin page was loaded.&lt;br /&gt;
        # XXXSRCID Right now acl_old is just calculated for debugging&lt;br /&gt;
        # printing purposes, not actually used.&lt;br /&gt;
        my @al2_old = ( );&lt;br /&gt;
        @al2_old =&lt;br /&gt;
                @{ $form-&amp;gt;{al2_old_multiple}   } if $form-&amp;gt;{al2_old_multiple};&lt;br /&gt;
        my %al2_old = ( map { ($_, 1) } @al2_old );&lt;br /&gt;
        my @acl_old = ( );&lt;br /&gt;
        @acl_old =&lt;br /&gt;
                @{ $form-&amp;gt;{acl_old_multiple}   } if $form-&amp;gt;{acl_old_multiple};&lt;br /&gt;
        my %acl_old = ( map { ($_, 1) } @acl_old );&lt;br /&gt;
&lt;br /&gt;
        # Next, get the list of the new data submitted.  Separate&lt;br /&gt;
        # it out into AL2's which are legitimate.  Anything left&lt;br /&gt;
        # over is an ACL.&lt;br /&gt;
        my @al2_new_formfields = ( );&lt;br /&gt;
        @al2_new_formfields = @{ $form-&amp;gt;{aclams_new_multiple} } if $form-&amp;gt;{aclams_new_multiple};&lt;br /&gt;
        my @al2_new_submitted = map { s/^aclam_//; $_ } @al2_new_formfields;&lt;br /&gt;
        my @al2_new = grep { exists $all_al2types-&amp;gt;{$_} } @al2_new_submitted;&lt;br /&gt;
        my %al2_new = ( map { ($_, 1) } @al2_new );&lt;br /&gt;
        my @acl_new = grep { !$al2_new{$_} } @al2_new_submitted;&lt;br /&gt;
        my %acl_new = ( map { ($_, 1) } @acl_new );&lt;br /&gt;
&lt;br /&gt;
        # Find out what changed for AL2's.&lt;br /&gt;
        for my $al2 (@al2_old, @al2_new) {&lt;br /&gt;
                next if defined($al2_old{$al2}) &amp;amp;&amp;amp; defined($al2_new{$al2})&lt;br /&gt;
                        &amp;amp;&amp;amp; $al2_old{$al2} == $al2_new{$al2};&lt;br /&gt;
                $al2_change-&amp;gt;{$al2} = $al2_new{$al2} ? 1 : 0;&lt;br /&gt;
        }&lt;br /&gt;
#print STDERR &amp;quot;al2_change for '$srcid': &amp;quot; . Dumper($al2_change);&lt;br /&gt;
        # If there's a comment, throw that in.&lt;br /&gt;
        if ($form-&amp;gt;{al2_new_comment}) {&lt;br /&gt;
                $al2_change-&amp;gt;{comment} = $form-&amp;gt;{al2_new_comment};&lt;br /&gt;
        }&lt;br /&gt;
        $al2_change = undef if !keys %$al2_change;&lt;br /&gt;
&lt;br /&gt;
        # Find out what changed for ACL's.&lt;br /&gt;
        my $acl_change = { };&lt;br /&gt;
        for my $acl (@acl_old, @acl_new) {&lt;br /&gt;
                next if $acl_old{$acl} == $acl_new{$acl};&lt;br /&gt;
                $acl_change-&amp;gt;{$acl} = $acl_new{$acl} ? 1 : 0;&lt;br /&gt;
        }&lt;br /&gt;
        $acl_change = undef if !keys %$acl_change;&lt;br /&gt;
&lt;br /&gt;
        if ($user-&amp;gt;{is_admin} &amp;amp;&amp;amp; $srcid) {&lt;br /&gt;
                $slashdb-&amp;gt;setAL2($srcid, $al2_change);&lt;br /&gt;
        }&lt;br /&gt;
        if ($user-&amp;gt;{is_admin} &amp;amp;&amp;amp; ($user_editfield_flag eq 'uid' ||&lt;br /&gt;
                $user_editfield_flag eq 'nickname')) {&lt;br /&gt;
&lt;br /&gt;
                # This admin user cannot assign a seclev higher than he/she&lt;br /&gt;
                # already has.&lt;br /&gt;
                my $seclev = $form-&amp;gt;{seclev};&lt;br /&gt;
                $seclev = $user-&amp;gt;{seclev} if $seclev &amp;gt; $user-&amp;gt;{seclev};&lt;br /&gt;
                $user_edits_table-&amp;gt;{seclev} = $seclev;&lt;br /&gt;
&lt;br /&gt;
                $user_edits_table-&amp;gt;{section} = $form-&amp;gt;{section};&lt;br /&gt;
                $user_edits_table-&amp;gt;{author} = $form-&amp;gt;{author} ? 1 : 0 ;&lt;br /&gt;
                $user_edits_table-&amp;gt;{defaultpoints} = $form-&amp;gt;{defaultpoints};&lt;br /&gt;
                $user_edits_table-&amp;gt;{tokens} = $form-&amp;gt;{tokens};&lt;br /&gt;
                $user_edits_table-&amp;gt;{tag_clout} = $form-&amp;gt;{tag_clout};&lt;br /&gt;
                $user_edits_table-&amp;gt;{m2info} = $form-&amp;gt;{m2info};&lt;br /&gt;
                $user_edits_table-&amp;gt;{acl} = $acl_change if $acl_change;&lt;br /&gt;
                $user_edits_table-&amp;gt;{shill_static_marquee} = $form-&amp;gt;{shill_static_marquee} ? 1 : undef;&lt;br /&gt;
                $user_edits_table-&amp;gt;{u2_friends_bios} = $form-&amp;gt;{u2_friends_bios} ? 1 : undef;&lt;br /&gt;
                $user_edits_table-&amp;gt;{shill_rss_url} = $form-&amp;gt;{shill_rss_url} ? $form-&amp;gt;{shill_rss_url} : undef;&lt;br /&gt;
&lt;br /&gt;
                my $author = $slashdb-&amp;gt;getAuthor($id);&lt;br /&gt;
                my $was_author = ($author &amp;amp;&amp;amp; $author-&amp;gt;{author}) ? 1 : 0;&lt;br /&gt;
&lt;br /&gt;
                $slashdb-&amp;gt;setUser($id, $user_edits_table);&lt;br /&gt;
&lt;br /&gt;
                $note .= getMessage('saveuseradmin_saveduser', { field =&amp;gt; $user_editfield_flag, id =&amp;gt; $id });&lt;br /&gt;
&lt;br /&gt;
                if ($was_author xor $user_edits_table-&amp;gt;{author}) {&lt;br /&gt;
                        # A frequently-asked question for new Slash admins is&lt;br /&gt;
                        # why their authors aren't showing up immediately.&lt;br /&gt;
                        # Give them some help here with an informative message.&lt;br /&gt;
                        $note .= getMessage('saveuseradmin_authorchg', {&lt;br /&gt;
                                basedir =&amp;gt;      $slashdb-&amp;gt;getDescriptions(&amp;quot;site_info&amp;quot;)&lt;br /&gt;
                                        -&amp;gt;{base_install_directory},&lt;br /&gt;
                                virtuser =&amp;gt;     $slashdb-&amp;gt;{virtual_user},&lt;br /&gt;
                        });&lt;br /&gt;
&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if (!$user_edit-&amp;gt;{nonuid}) {&lt;br /&gt;
                if ($form-&amp;gt;{expired} &amp;amp;&amp;amp; $form-&amp;gt;{expired} eq 'on') {&lt;br /&gt;
#                       $slashdb-&amp;gt;setExpired($user_edit-&amp;gt;{uid});&lt;br /&gt;
&lt;br /&gt;
                } else {&lt;br /&gt;
#                       $slashdb-&amp;gt;setUnexpired($user_edit-&amp;gt;{uid});&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $data = { uid =&amp;gt; $id };&lt;br /&gt;
        $data-&amp;gt;{note} = $note if defined $note;&lt;br /&gt;
        showInfo($data);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub savePasswd {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $note = $hr-&amp;gt;{noteref} || undef;&lt;br /&gt;
&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        my $error_flag = 0;&lt;br /&gt;
        my $user_edit = {};&lt;br /&gt;
        my $uid;&lt;br /&gt;
&lt;br /&gt;
        my $user_edits_table = {};&lt;br /&gt;
&lt;br /&gt;
        if ($user-&amp;gt;{is_admin}) {&lt;br /&gt;
                $uid = $form-&amp;gt;{uid} || $user-&amp;gt;{uid};&lt;br /&gt;
        } else {&lt;br /&gt;
                $uid = ($user-&amp;gt;{uid} == $form-&amp;gt;{uid}) ? $form-&amp;gt;{uid} : $user-&amp;gt;{uid};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        $user_edit = $slashdb-&amp;gt;getUser($uid);&lt;br /&gt;
&lt;br /&gt;
        if (!$user_edit-&amp;gt;{nickname}) {&lt;br /&gt;
                $$note .= getError('cookie_err', { titlebar =&amp;gt; 0 }, 0, 1)&lt;br /&gt;
                        if $note;&lt;br /&gt;
                $error_flag++;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($form-&amp;gt;{pass1} ne $form-&amp;gt;{pass2}) {&lt;br /&gt;
                $$note .= getError('saveuser_passnomatch_err', { titlebar =&amp;gt; 0 }, 0, 1)&lt;br /&gt;
                        if $note;&lt;br /&gt;
                $error_flag++;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if (!$form-&amp;gt;{pass1} || length $form-&amp;gt;{pass1} &amp;lt; 6) {&lt;br /&gt;
                $$note .= getError('saveuser_passtooshort_err', { titlebar =&amp;gt; 0 }, 0, 1)&lt;br /&gt;
                        if $note;&lt;br /&gt;
                $error_flag++;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if (!$user-&amp;gt;{is_admin}){&lt;br /&gt;
                # not an admin -- check old password before changing passwd&lt;br /&gt;
                my $return_uid = $slashdb-&amp;gt;getUserAuthenticate($uid, $form-&amp;gt;{oldpass}, 1);&lt;br /&gt;
                if (!$return_uid || $return_uid != $uid) {&lt;br /&gt;
                        $$note .= getError('saveuser_badoldpass_err', { titlebar =&amp;gt; 0 }, 0, 1) &lt;br /&gt;
                                if $note;&lt;br /&gt;
                        $error_flag++;&lt;br /&gt;
&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if (! $error_flag) {&lt;br /&gt;
                $user_edits_table-&amp;gt;{passwd} = $form-&amp;gt;{pass1} if $form-&amp;gt;{pass1};&lt;br /&gt;
                $user_edits_table-&amp;gt;{session_login} = $form-&amp;gt;{session_login};&lt;br /&gt;
                $user_edits_table-&amp;gt;{cookie_location} = $form-&amp;gt;{cookie_location};&lt;br /&gt;
&lt;br /&gt;
                # changed pass, so delete all logtokens&lt;br /&gt;
                $slashdb-&amp;gt;deleteLogToken($form-&amp;gt;{uid}, 1);&lt;br /&gt;
&lt;br /&gt;
                if ($user-&amp;gt;{admin_clearpass}&lt;br /&gt;
                        &amp;amp;&amp;amp; !$user-&amp;gt;{state}{admin_clearpass_thisclick}) {&lt;br /&gt;
                        # User is an admin who sent their password in the clear&lt;br /&gt;
                        # some time ago; now that it's been changed, we'll forget&lt;br /&gt;
                        # about that incident, unless this click was sent in the&lt;br /&gt;
                        # clear as well.&lt;br /&gt;
                        $user_edits_table-&amp;gt;{admin_clearpass} = '';&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                getOtherUserParams($user_edits_table);&lt;br /&gt;
                $slashdb-&amp;gt;setUser($uid, $user_edits_table) ;&lt;br /&gt;
                $$note .= getMessage('saveuser_passchanged_msg',&lt;br /&gt;
                        { nick =&amp;gt; $user_edit-&amp;gt;{nickname}, uid =&amp;gt; $user_edit-&amp;gt;{uid} },&lt;br /&gt;
                0, 1) if $note;&lt;br /&gt;
&lt;br /&gt;
                # only set cookie if user is current user&lt;br /&gt;
                if ($form-&amp;gt;{uid} eq $user-&amp;gt;{uid}) {&lt;br /&gt;
                        $user-&amp;gt;{logtoken} = bakeUserCookie($uid, $slashdb-&amp;gt;getLogToken($form-&amp;gt;{uid}, 1));&lt;br /&gt;
                        setCookie('user', $user-&amp;gt;{logtoken}, $user_edits_table-&amp;gt;{session_login});&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        return $error_flag;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub saveUser {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $gSkin = getCurrentSkin();&lt;br /&gt;
        my $plugins = $slashdb-&amp;gt;getDescriptions('plugins');&lt;br /&gt;
        my $uid;&lt;br /&gt;
        my $user_editfield_flag;&lt;br /&gt;
&lt;br /&gt;
        $uid = $user-&amp;gt;{is_admin} &amp;amp;&amp;amp; $form-&amp;gt;{uid} ? $form-&amp;gt;{uid} : $user-&amp;gt;{uid};&lt;br /&gt;
        my $user_edit = $slashdb-&amp;gt;getUser($uid);&lt;br /&gt;
&lt;br /&gt;
        my($note, $formname);&lt;br /&gt;
&lt;br /&gt;
        $note .= getMessage('savenickname_msg', {&lt;br /&gt;
                nickname =&amp;gt; $user_edit-&amp;gt;{nickname},&lt;br /&gt;
        }, 1);&lt;br /&gt;
&lt;br /&gt;
        if (!$user_edit-&amp;gt;{nickname}) {&lt;br /&gt;
                $note .= getError('cookie_err', 0, 1);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Check to ensure that if a user is changing his email address, that&lt;br /&gt;
        # it doesn't already exist in the userbase.&lt;br /&gt;
        if ($user_edit-&amp;gt;{realemail} ne $form-&amp;gt;{realemail}) {&lt;br /&gt;
                if ($slashdb-&amp;gt;existsEmail($form-&amp;gt;{realemail})) {&lt;br /&gt;
                        $note .= getError('emailexists_err', 0, 1);&lt;br /&gt;
                        $form-&amp;gt;{realemail} = $user_edit-&amp;gt;{realemail}; # can't change!&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my(%extr, $err_message, %limit);&lt;br /&gt;
        $limit{sig} = 120;  # schema is 200, give an extra buffer for domain tags&lt;br /&gt;
        $limit{bio} = $constants-&amp;gt;{users_bio_length} || 1024; # can be up to 2^16&lt;br /&gt;
&lt;br /&gt;
        for my $key (keys %limit) {&lt;br /&gt;
                my $dat = chopEntity($form-&amp;gt;{$key}, $limit{$key});&lt;br /&gt;
                $dat = strip_html($dat);&lt;br /&gt;
                $dat = balanceTags($dat, { deep_nesting =&amp;gt; 2, length =&amp;gt; $limit{$key} });&lt;br /&gt;
                $dat = addDomainTags($dat) if $dat;&lt;br /&gt;
&lt;br /&gt;
                # If the sig becomes too long to fit (domain tagging causes&lt;br /&gt;
                # string expansion and tag balancing can too), warn the user to&lt;br /&gt;
                # use shorter domain names and don't save their change.&lt;br /&gt;
                if ($key eq 'sig' &amp;amp;&amp;amp; defined($dat) &amp;amp;&amp;amp; length($dat) &amp;gt; 200) {&lt;br /&gt;
                        print getError('sig_too_long_err');&lt;br /&gt;
                        $extr{sig} = undef;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                # really, comment filters should ignore short length IMO ... oh well.&lt;br /&gt;
                if (length($dat) &amp;gt; 1 &amp;amp;&amp;amp; ! filterOk('comments', 'postersubj', $dat, \$err_message)) {&lt;br /&gt;
                        print getError('filter message', {&lt;br /&gt;
                                err_message     =&amp;gt; $err_message,&lt;br /&gt;
                                item            =&amp;gt; $key,&lt;br /&gt;
                        });&lt;br /&gt;
                        $extr{$key} = undef;&lt;br /&gt;
                } elsif (! compressOk('comments', 'postersubj', $dat)) {&lt;br /&gt;
                        print getError('compress filter', {&lt;br /&gt;
                                ratio           =&amp;gt; 'postersubj',&lt;br /&gt;
                                item            =&amp;gt; $key,&lt;br /&gt;
                        });&lt;br /&gt;
                        $extr{$key} = undef;&lt;br /&gt;
                } else {&lt;br /&gt;
                        $extr{$key} = $dat;&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # We should do some conformance checking on a user's pubkey,&lt;br /&gt;
        # make sure it looks like one of the known types of public&lt;br /&gt;
        # key.  Until then, just make sure it doesn't have HTML.&lt;br /&gt;
        $form-&amp;gt;{pubkey} = $plugins-&amp;gt;{'PubKey'} ? strip_nohtml($form-&amp;gt;{pubkey}, 1) : '';&lt;br /&gt;
&lt;br /&gt;
        my $homepage = $form-&amp;gt;{homepage};&lt;br /&gt;
        $homepage = '' if $homepage eq 'http://';&lt;br /&gt;
        $homepage = fudgeurl($homepage);&lt;br /&gt;
        $homepage = URI-&amp;gt;new_abs($homepage, $gSkin-&amp;gt;{absolutedir})&lt;br /&gt;
                        -&amp;gt;canonical&lt;br /&gt;
                        -&amp;gt;as_string if $homepage ne '';&lt;br /&gt;
        $homepage = substr($homepage, 0, 100) if $homepage ne '';&lt;br /&gt;
&lt;br /&gt;
        my $calendar_url = $form-&amp;gt;{calendar_url};&lt;br /&gt;
        if (length $calendar_url) {&lt;br /&gt;
                # fudgeurl() doesn't like webcal; will remove later anyway&lt;br /&gt;
                $calendar_url =~ s/^webcal/http/i;&lt;br /&gt;
                $calendar_url = fudgeurl($calendar_url);&lt;br /&gt;
                $calendar_url = URI-&amp;gt;new_abs($calendar_url, $gSkin-&amp;gt;{absolutedir})&lt;br /&gt;
                        -&amp;gt;canonical&lt;br /&gt;
                        -&amp;gt;as_string if $calendar_url ne '';&lt;br /&gt;
&lt;br /&gt;
                $calendar_url =~ s|^http://||i;&lt;br /&gt;
                $calendar_url = substr($calendar_url, 0, 200) if $calendar_url ne '';&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # for the users table&lt;br /&gt;
        my $user_edits_table = {&lt;br /&gt;
                homepage        =&amp;gt; $homepage,&lt;br /&gt;
                realname        =&amp;gt; $form-&amp;gt;{realname},&lt;br /&gt;
                pubkey          =&amp;gt; $form-&amp;gt;{pubkey},&lt;br /&gt;
                copy            =&amp;gt; $form-&amp;gt;{copy},&lt;br /&gt;
                quote           =&amp;gt; $form-&amp;gt;{quote},&lt;br /&gt;
                calendar_url    =&amp;gt; $calendar_url,&lt;br /&gt;
                yahoo           =&amp;gt; $form-&amp;gt;{yahoo},&lt;br /&gt;
                jabber          =&amp;gt; $form-&amp;gt;{jabber},&lt;br /&gt;
                aim             =&amp;gt; $form-&amp;gt;{aim},&lt;br /&gt;
                aimdisplay      =&amp;gt; $form-&amp;gt;{aimdisplay},&lt;br /&gt;
                icq             =&amp;gt; $form-&amp;gt;{icq},&lt;br /&gt;
                playing         =&amp;gt; $form-&amp;gt;{playing},&lt;br /&gt;
                mobile_text_address =&amp;gt; $form-&amp;gt;{mobile_text_address},&lt;br /&gt;
        };&lt;br /&gt;
&lt;br /&gt;
        if ($constants-&amp;gt;{wow}) {&lt;br /&gt;
                my $wowdb = getObject(&amp;quot;Slash::WoW&amp;quot;);&lt;br /&gt;
                if ($wowdb) {&lt;br /&gt;
                        $user_edits_table-&amp;gt;{wow_main_name} = &amp;quot;\L\u$form-&amp;gt;{wow_main_name}&amp;quot;;&lt;br /&gt;
                        $user_edits_table-&amp;gt;{wow_main_realm} = $form-&amp;gt;{wow_main_realm};&lt;br /&gt;
                        my $charid = $wowdb-&amp;gt;getCharidCreate($user_edits_table-&amp;gt;{wow_main_realm},&lt;br /&gt;
                                $user_edits_table-&amp;gt;{wow_main_name});&lt;br /&gt;
                        $wowdb-&amp;gt;setChar($charid, { uid =&amp;gt; $uid }, { if_unclaimed =&amp;gt; 1 }) if $charid;&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        for (keys %extr) {&lt;br /&gt;
                $user_edits_table-&amp;gt;{$_} = $extr{$_} if defined $extr{$_};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # don't want undef, want to be empty string so they&lt;br /&gt;
        # will overwrite the existing record&lt;br /&gt;
        for (keys %$user_edits_table) {&lt;br /&gt;
                $user_edits_table-&amp;gt;{$_} = '' unless defined $user_edits_table-&amp;gt;{$_};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($user_edit-&amp;gt;{realemail} ne $form-&amp;gt;{realemail}) {&lt;br /&gt;
                $user_edits_table-&amp;gt;{realemail} =&lt;br /&gt;
                        chopEntity($form-&amp;gt;{realemail}, 50);&lt;br /&gt;
                my $new_fakeemail = ''; # at emaildisplay 0, don't show any email address&lt;br /&gt;
                if ($user-&amp;gt;{emaildisplay}) {&lt;br /&gt;
                        $new_fakeemail = getArmoredEmail($uid, $user_edits_table-&amp;gt;{realemail})&lt;br /&gt;
                                if $user-&amp;gt;{emaildisplay} == 1;&lt;br /&gt;
                        $new_fakeemail = $user_edits_table-&amp;gt;{realemail}&lt;br /&gt;
                                if $user-&amp;gt;{emaildisplay} == 2;&lt;br /&gt;
                }&lt;br /&gt;
                $user_edits_table-&amp;gt;{fakeemail} = $new_fakeemail;&lt;br /&gt;
&lt;br /&gt;
                $note .= getMessage('changeemail_msg', {&lt;br /&gt;
                        realemail =&amp;gt; $user_edit-&amp;gt;{realemail}&lt;br /&gt;
                }, 1);&lt;br /&gt;
&lt;br /&gt;
                my $saveuser_emailtitle = getTitle('saveUser_email_title', {&lt;br /&gt;
                        nickname  =&amp;gt; $user_edit-&amp;gt;{nickname},&lt;br /&gt;
                        realemail =&amp;gt; $form-&amp;gt;{realemail}&lt;br /&gt;
                }, 1);&lt;br /&gt;
                my $saveuser_email_msg = getMessage('saveuser_email_msg', {&lt;br /&gt;
                        nickname  =&amp;gt; $user_edit-&amp;gt;{nickname},&lt;br /&gt;
                        realemail =&amp;gt; $form-&amp;gt;{realemail}&lt;br /&gt;
                }, 1);&lt;br /&gt;
&lt;br /&gt;
                sendEmail($form-&amp;gt;{realemail}, $saveuser_emailtitle, $saveuser_email_msg);&lt;br /&gt;
                doEmail($uid, $saveuser_emailtitle, $saveuser_email_msg);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        getOtherUserParams($user_edits_table);&lt;br /&gt;
        $slashdb-&amp;gt;setUser($uid, $user_edits_table);&lt;br /&gt;
&lt;br /&gt;
        editUser({ uid =&amp;gt; $uid, note =&amp;gt; $note });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub saveComm {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my($uid, $user_fakeemail);&lt;br /&gt;
&lt;br /&gt;
        if ($user-&amp;gt;{is_admin}) {&lt;br /&gt;
                $uid = $form-&amp;gt;{uid} || $user-&amp;gt;{uid};&lt;br /&gt;
        } else {&lt;br /&gt;
                $uid = ($user-&amp;gt;{uid} == $form-&amp;gt;{uid}) ?&lt;br /&gt;
                        $form-&amp;gt;{uid} : $user-&amp;gt;{uid};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Do the right thing with respect to the chosen email display mode&lt;br /&gt;
        # and the options that can be displayed.&lt;br /&gt;
        my $user_edit = $slashdb-&amp;gt;getUser($uid);&lt;br /&gt;
        my $new_fakeemail = '';         # at emaildisplay 0, don't show any email address&lt;br /&gt;
        if ($form-&amp;gt;{emaildisplay}) {&lt;br /&gt;
                $new_fakeemail = getArmoredEmail($uid)          if $form-&amp;gt;{emaildisplay} == 1;&lt;br /&gt;
                $new_fakeemail = $user_edit-&amp;gt;{realemail}        if $form-&amp;gt;{emaildisplay} == 2;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $name = $user-&amp;gt;{seclev} &amp;amp;&amp;amp; $form-&amp;gt;{name} ?&lt;br /&gt;
                $form-&amp;gt;{name} : $user-&amp;gt;{nickname};&lt;br /&gt;
&lt;br /&gt;
        my $note = getMessage('savenickname_msg',&lt;br /&gt;
                { nickname =&amp;gt; $name });&lt;br /&gt;
&lt;br /&gt;
        print getError('cookie_err') if isAnon($uid) || !$name;&lt;br /&gt;
&lt;br /&gt;
        # Take care of the lists&lt;br /&gt;
        # Enforce Ranges for variables that need it&lt;br /&gt;
        $form-&amp;gt;{commentlimit} = 0 if $form-&amp;gt;{commentlimit} &amp;lt; 1;&lt;br /&gt;
        my $cl_max = $constants-&amp;gt;{comment_commentlimit} || 0;&lt;br /&gt;
        $form-&amp;gt;{commentlimit} = $cl_max if $cl_max &amp;gt; 0 &amp;amp;&amp;amp; $form-&amp;gt;{commentlimit} &amp;gt; $cl_max;&lt;br /&gt;
        $form-&amp;gt;{commentspill} = 0 if $form-&amp;gt;{commentspill} &amp;lt; 1;&lt;br /&gt;
&lt;br /&gt;
        # For some of these values, namely the ones that we happen to&lt;br /&gt;
        # know get stored in users_param, we change them to 'undef'&lt;br /&gt;
        # if they are the default value.  This deletes them from the&lt;br /&gt;
        # users_param table, which has the same effect as storing the&lt;br /&gt;
        # default except it's faster all around.  If we ever change&lt;br /&gt;
        # the schema to promote these fields from params into a&lt;br /&gt;
        # proper users_* table, then this will no longer be correct.&lt;br /&gt;
        # See prepareUser().&lt;br /&gt;
        my $max = $constants-&amp;gt;{comment_maxscore} - $constants-&amp;gt;{comment_minscore};&lt;br /&gt;
        my $min = -$max;&lt;br /&gt;
        my $karma_bonus = ($form-&amp;gt;{karma_bonus} !~ /^[\-+]?\d+$/) ? &amp;quot;+1&amp;quot; : $form-&amp;gt;{karma_bonus};&lt;br /&gt;
        my $subscriber_bonus = ($form-&amp;gt;{subscriber_bonus} !~ /^[\-+]?\d+$/) ? &amp;quot;+1&amp;quot; : $form-&amp;gt;{subscriber_bonus};&lt;br /&gt;
        my $new_user_bonus = ($form-&amp;gt;{new_user_bonus} !~ /^[\-+]?\d+$/) ? 0 : $form-&amp;gt;{new_user_bonus};&lt;br /&gt;
        my $new_user_percent = (($form-&amp;gt;{new_user_percent} &amp;lt;= 100 &amp;amp;&amp;amp; $form-&amp;gt;{new_user_percent} &amp;gt;= 0) &lt;br /&gt;
                        ? $form-&amp;gt;{new_user_percent}&lt;br /&gt;
                        : 100); &lt;br /&gt;
        my $clsmall_bonus = ($form-&amp;gt;{clsmall_bonus} !~ /^[\-+]?\d+$/) ? 0 : $form-&amp;gt;{clsmall_bonus};&lt;br /&gt;
        my $clbig_bonus = ($form-&amp;gt;{clbig_bonus} !~ /^[\-+]?\d+$/) ? 0 : $form-&amp;gt;{clbig_bonus};&lt;br /&gt;
&lt;br /&gt;
        # plum&lt;br /&gt;
        $form-&amp;gt;{d2_comment_q} = (isSubscriber($user_edit) || $user_edit-&amp;gt;{seclev} &amp;gt;= 100)&lt;br /&gt;
                ? $form-&amp;gt;{d2_comment_q}&lt;br /&gt;
                : ($form-&amp;gt;{d2_comment_q} eq '0')&lt;br /&gt;
                        ? 1&lt;br /&gt;
                        : $form-&amp;gt;{d2_comment_q};&lt;br /&gt;
&lt;br /&gt;
        my $user_edits_table = {&lt;br /&gt;
                # MC: More D2 neutring&lt;br /&gt;
                #discussion2            =&amp;gt; $form-&amp;gt;{discussion2} || undef,&lt;br /&gt;
                #d2_comment_q           =&amp;gt; $form-&amp;gt;{d2_comment_q} || undef,&lt;br /&gt;
                #d2_comment_order       =&amp;gt; $form-&amp;gt;{d2_comment_order} || undef,&lt;br /&gt;
                clsmall                 =&amp;gt; $form-&amp;gt;{clsmall},&lt;br /&gt;
                clsmall_bonus           =&amp;gt; ($clsmall_bonus || undef),&lt;br /&gt;
                clbig                   =&amp;gt; $form-&amp;gt;{clbig},&lt;br /&gt;
                clbig_bonus             =&amp;gt; ($clbig_bonus || undef),&lt;br /&gt;
                commentlimit            =&amp;gt; $form-&amp;gt;{commentlimit},&lt;br /&gt;
                bytelimit               =&amp;gt; $form-&amp;gt;{bytelimit},&lt;br /&gt;
                commentsort             =&amp;gt; $form-&amp;gt;{commentsort},&lt;br /&gt;
                commentspill            =&amp;gt; $form-&amp;gt;{commentspill},&lt;br /&gt;
                domaintags              =&amp;gt; ($form-&amp;gt;{domaintags} != 2 ? $form-&amp;gt;{domaintags} : undef),&lt;br /&gt;
                emaildisplay            =&amp;gt; $form-&amp;gt;{emaildisplay} || undef,&lt;br /&gt;
                fakeemail               =&amp;gt; $new_fakeemail,&lt;br /&gt;
                highlightthresh         =&amp;gt; $form-&amp;gt;{highlightthresh},&lt;br /&gt;
                mode                    =&amp;gt; $form-&amp;gt;{umode},&lt;br /&gt;
                posttype                =&amp;gt; $form-&amp;gt;{posttype},&lt;br /&gt;
                threshold               =&amp;gt; $form-&amp;gt;{uthreshold},&lt;br /&gt;
                nosigs                  =&amp;gt; ($form-&amp;gt;{nosigs}     ? 1 : 0),&lt;br /&gt;
                reparent                =&amp;gt; ($form-&amp;gt;{reparent}   ? 1 : 0),&lt;br /&gt;
                noscores                =&amp;gt; ($form-&amp;gt;{noscores}   ? 1 : 0),&lt;br /&gt;
                hardthresh              =&amp;gt; ($form-&amp;gt;{hardthresh} ? 1 : 0),&lt;br /&gt;
                no_spell                =&amp;gt; ($form-&amp;gt;{no_spell}   ? 1 : undef),&lt;br /&gt;
                nobonus                 =&amp;gt; ($form-&amp;gt;{nobonus} ? 1 : undef),&lt;br /&gt;
                nosubscriberbonus       =&amp;gt; ($form-&amp;gt;{nosubscriberbonus} ? 1 : undef),&lt;br /&gt;
                postanon                =&amp;gt; ($form-&amp;gt;{postanon} ? 1 : undef),&lt;br /&gt;
                new_user_percent        =&amp;gt; ($new_user_percent &amp;amp;&amp;amp; $new_user_percent != 100&lt;br /&gt;
                                                ? $new_user_percent : undef),&lt;br /&gt;
                new_user_bonus          =&amp;gt; ($new_user_bonus || undef),&lt;br /&gt;
                karma_bonus             =&amp;gt; ($karma_bonus ne '+1' ? $karma_bonus : undef),&lt;br /&gt;
                subscriber_bonus        =&amp;gt; ($subscriber_bonus || undef),&lt;br /&gt;
                textarea_rows           =&amp;gt; ($form-&amp;gt;{textarea_rows} != $constants-&amp;gt;{textarea_rows}&lt;br /&gt;
                                                ? $form-&amp;gt;{textarea_rows} : undef),&lt;br /&gt;
                textarea_cols           =&amp;gt; ($form-&amp;gt;{textarea_cols} != $constants-&amp;gt;{textarea_cols}&lt;br /&gt;
                                                ? $form-&amp;gt;{textarea_cols} : undef),&lt;br /&gt;
                user_comment_sort_type  =&amp;gt; ($form-&amp;gt;{user_comment_sort_type} != 2&lt;br /&gt;
                                                ? $form-&amp;gt;{user_comment_sort_type} : undef ),&lt;br /&gt;
                mod_with_comm           =&amp;gt; ($form-&amp;gt;{mod_with_comm} ? 1 : undef),&lt;br /&gt;
                m2_with_mod             =&amp;gt; ($form-&amp;gt;{m2_with_mod} ? 1 : undef),&lt;br /&gt;
                m2_with_comm_mod                =&amp;gt; ($form-&amp;gt;{m2_with_mod_on_comm} ? 1 : undef),&lt;br /&gt;
&lt;br /&gt;
        };&lt;br /&gt;
&lt;br /&gt;
        # set our default values for the items where an empty-string won't do &lt;br /&gt;
        my $defaults = {&lt;br /&gt;
                posttype        =&amp;gt; 2,&lt;br /&gt;
                highlightthresh =&amp;gt; 4,&lt;br /&gt;
                reparent        =&amp;gt; 1,&lt;br /&gt;
                commentlimit    =&amp;gt; 100,&lt;br /&gt;
                commentspill    =&amp;gt; 50,&lt;br /&gt;
                mode            =&amp;gt; 'thread'&lt;br /&gt;
        };&lt;br /&gt;
&lt;br /&gt;
        my $mod_reader = getObject(&amp;quot;Slash::$constants-&amp;gt;{m1_pluginname}&amp;quot;, { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my @reasons = ( );&lt;br /&gt;
        my $reasons = $mod_reader-&amp;gt;getReasons();&lt;br /&gt;
        for my $id (sort { $a &amp;lt;=&amp;gt; $b } keys %$reasons) {&lt;br /&gt;
                push @reasons, $reasons-&amp;gt;{$id}{name};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        for my $reason_name (@reasons) {&lt;br /&gt;
                my $key = &amp;quot;reason_alter_$reason_name&amp;quot;;&lt;br /&gt;
                my $answer = $form-&amp;gt;{$key} || 0;&lt;br /&gt;
                $answer = 0 if !$answer || $answer !~ /^[\-+]?\d+$/;&lt;br /&gt;
                $user_edits_table-&amp;gt;{$key} = ($answer == 0) ? '' : $answer;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        for (qw| friend foe anonymous fof eof freak fan |) {&lt;br /&gt;
                my $answer = $form-&amp;gt;{&amp;quot;people_bonus_$_&amp;quot;};&lt;br /&gt;
                $answer = 0 if $answer !~ /^[\-+]?\d+$/;&lt;br /&gt;
                $user_edits_table-&amp;gt;{&amp;quot;people_bonus_$_&amp;quot;} = ($answer == 0) ? '' : $answer;&lt;br /&gt;
        }&lt;br /&gt;
        getOtherUserParams($user_edits_table);&lt;br /&gt;
        setToDefaults($user_edits_table, {}, $defaults) if $form-&amp;gt;{restore_defaults};&lt;br /&gt;
        $slashdb-&amp;gt;setUser($uid, $user_edits_table);&lt;br /&gt;
&lt;br /&gt;
        editComm({ uid =&amp;gt; $uid, note =&amp;gt; $note });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub saveHome {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my($uid, $error);&lt;br /&gt;
&lt;br /&gt;
        if ($user-&amp;gt;{is_admin}) {&lt;br /&gt;
                $uid = $form-&amp;gt;{uid} || $user-&amp;gt;{uid} ;&lt;br /&gt;
        } else {&lt;br /&gt;
                $uid = ($user-&amp;gt;{uid} == $form-&amp;gt;{uid}) ?&lt;br /&gt;
                        $form-&amp;gt;{uid} : $user-&amp;gt;{uid};&lt;br /&gt;
        }&lt;br /&gt;
        my $edit_user = $slashdb-&amp;gt;getUser($uid);&lt;br /&gt;
&lt;br /&gt;
        my $name = $user-&amp;gt;{seclev} &amp;amp;&amp;amp; $form-&amp;gt;{name} ?&lt;br /&gt;
                $form-&amp;gt;{name} : $user-&amp;gt;{nickname};&lt;br /&gt;
        $name = substr($name, 0, 20);&lt;br /&gt;
&lt;br /&gt;
        my $note = getMessage('savenickname_msg',&lt;br /&gt;
                { nickname =&amp;gt; $name });&lt;br /&gt;
&lt;br /&gt;
        if (isAnon($uid) || !$name) {&lt;br /&gt;
                my $cookiemsg = getError('cookie_err');&lt;br /&gt;
                print $cookiemsg;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Using the existing list of slashboxes and the set of&lt;br /&gt;
        # what's checked and not, build up the new list.&lt;br /&gt;
        # (New arrivals go at the end.)&lt;br /&gt;
        my $slashboxes = $edit_user-&amp;gt;{slashboxes};&lt;br /&gt;
        # Only go through all this if the user clicked save,&lt;br /&gt;
        # not &amp;quot;Restore Slashbox Defaults&amp;quot;!&lt;br /&gt;
        my($boxes, $skinBoxes) = $slashdb-&amp;gt;getPortalsCommon();&lt;br /&gt;
        my $default_slashboxes_textlist = join &amp;quot;,&amp;quot;,&lt;br /&gt;
                @{$skinBoxes-&amp;gt;{$constants-&amp;gt;{mainpage_skid}}};&lt;br /&gt;
        if (!$form-&amp;gt;{restore_slashbox_defaults}) {&lt;br /&gt;
                $slashboxes = $default_slashboxes_textlist if !$slashboxes;&lt;br /&gt;
                my @slashboxes = split /,/, $slashboxes;&lt;br /&gt;
                my %slashboxes = ( );&lt;br /&gt;
                for my $i (0..$#slashboxes) {&lt;br /&gt;
                        $slashboxes{$slashboxes[$i]} = $i;&lt;br /&gt;
                }&lt;br /&gt;
                # Add new boxes in.&lt;br /&gt;
                for my $key (sort grep /^showbox_/, keys %$form) {&lt;br /&gt;
                        my($bid) = $key =~ /^showbox_(\w+)$/;&lt;br /&gt;
                        next if length($bid) &amp;lt; 1 || length($bid) &amp;gt; 30 || $bid !~ /^\w+$/;&lt;br /&gt;
                        if (! exists $slashboxes{$bid}) {&lt;br /&gt;
                                $slashboxes{$bid} = 999; # put it at the end&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
                # Remove any boxes that weren't checked.&lt;br /&gt;
                for my $bid (@slashboxes) {&lt;br /&gt;
                        delete $slashboxes{$bid} unless $form-&amp;gt;{&amp;quot;showbox_$bid&amp;quot;};&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                for my $key (sort grep /^dynamic_/, keys %$form) {&lt;br /&gt;
                        my($bid) = $key =~ /^dynamic_(.+)$/;&lt;br /&gt;
                        next if length($bid) &amp;lt; 1;&lt;br /&gt;
                        if (! exists $slashboxes{$bid}) {&lt;br /&gt;
                                $slashboxes{$bid} = 999;&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                @slashboxes = sort {&lt;br /&gt;
                        $slashboxes{$a} &amp;lt;=&amp;gt; $slashboxes{$b}&lt;br /&gt;
                        ||&lt;br /&gt;
                        $a cmp $b&lt;br /&gt;
                } keys %slashboxes;&lt;br /&gt;
                # This probably should be a var (and appear in tilded_customize_msg)&lt;br /&gt;
                $#slashboxes = 19 if $#slashboxes &amp;gt; 19;&lt;br /&gt;
                $slashboxes = join &amp;quot;,&amp;quot;, @slashboxes;&lt;br /&gt;
        }&lt;br /&gt;
        # If we're right back to the default, that means the&lt;br /&gt;
        # empty string.&lt;br /&gt;
        if ($slashboxes eq $default_slashboxes_textlist) {&lt;br /&gt;
                $slashboxes = &amp;quot;&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Set the story_never and story_always fields.&lt;br /&gt;
        my $author_hr = $slashdb-&amp;gt;getDescriptions('authors');&lt;br /&gt;
        my $tree = $slashdb-&amp;gt;getTopicTree();&lt;br /&gt;
        my(@story_never_topic,  @story_never_author,  @story_never_nexus);&lt;br /&gt;
        my(@story_always_topic, @story_always_author);&lt;br /&gt;
        my(@story_always_nexus, @story_full_brief_nexus, @story_brief_always_nexus, @story_full_best_nexus, @story_brief_best_nexus);&lt;br /&gt;
        my($story_topic_all, $story_author_all, $story_nexus_all) = (0, 0, 0);&lt;br /&gt;
&lt;br /&gt;
        # Topics are either present (value=2) or absent (value=0).  If absent,&lt;br /&gt;
        # push them onto the never list.  Otherwise, do nothing.  (There's no&lt;br /&gt;
        # way to have an &amp;quot;always&amp;quot; topic, at the moment.)  If the hidden&lt;br /&gt;
        # field topictids_present is false, then there are no topic tids,&lt;br /&gt;
        # skip this.&lt;br /&gt;
        if ($form-&amp;gt;{topictids_present}) {&lt;br /&gt;
                for my $tid (&lt;br /&gt;
                        sort { $a &amp;lt;=&amp;gt; $b }&lt;br /&gt;
                        grep { !$tree-&amp;gt;{$_}{nexus} }&lt;br /&gt;
                        keys %$tree&lt;br /&gt;
                ) {&lt;br /&gt;
                        my $key = &amp;quot;topictid$tid&amp;quot;;&lt;br /&gt;
                        $story_topic_all++;&lt;br /&gt;
                        if (!$form-&amp;gt;{$key}) {           push @story_never_topic, $tid   }&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
        # Authors are either present (value=2) or absent (value=0).  If&lt;br /&gt;
        # absent, push them onto the never list.  Otherwise, do nothing.&lt;br /&gt;
        # (There's no way to have an &amp;quot;always&amp;quot; author, at the moment.)&lt;br /&gt;
        for my $aid (sort { $a &amp;lt;=&amp;gt; $b } keys %$author_hr) {&lt;br /&gt;
                my $key = &amp;quot;aid$aid&amp;quot;;&lt;br /&gt;
                $story_author_all++;&lt;br /&gt;
                if (!$form-&amp;gt;{$key}) {                   push @story_never_author, $aid  }&lt;br /&gt;
        }&lt;br /&gt;
        # Nexuses can have value 0, 1, 2, 3, 4, 5.  &lt;br /&gt;
        # 0 means the never list,&lt;br /&gt;
        # 1 means brief view of mainpage articles only&lt;br /&gt;
        # 2 means full view of mainpage articles only&lt;br /&gt;
        # 3 means brief view of all content&lt;br /&gt;
        # 4 means full view of mainpage content, brief view of sectional&lt;br /&gt;
        # 5 means full view of all content&lt;br /&gt;
        for my $tid (&lt;br /&gt;
                sort { $a &amp;lt;=&amp;gt; $b }&lt;br /&gt;
                map { /^nexustid(\d+)$/; $1 }&lt;br /&gt;
                grep { /^nexustid\d+$/ }&lt;br /&gt;
                keys %$form&lt;br /&gt;
        ) {&lt;br /&gt;
                my $key = &amp;quot;nexustid$tid&amp;quot;;&lt;br /&gt;
                next unless $tid &amp;amp;&amp;amp; $tree-&amp;gt;{$tid} &amp;amp;&amp;amp; $tree-&amp;gt;{$tid}{nexus};&lt;br /&gt;
                $story_nexus_all++;&lt;br /&gt;
                   if (!$form-&amp;gt;{$key}) {                push @story_never_nexus, $tid   }&lt;br /&gt;
                elsif ($form-&amp;gt;{$key} == 5 ) {           push @story_always_nexus, $tid  }&lt;br /&gt;
                elsif ($form-&amp;gt;{$key} == 4 ) {           push @story_full_brief_nexus, $tid }&lt;br /&gt;
                elsif ($form-&amp;gt;{$key} == 3 ) {           push @story_brief_always_nexus, $tid }&lt;br /&gt;
                elsif ($form-&amp;gt;{$key} == 2 ) {           push @story_full_best_nexus, $tid }&lt;br /&gt;
                elsif ($form-&amp;gt;{$key} == 1 ) {           push @story_brief_best_nexus, $tid }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
#use Data::Dumper; $Data::Dumper::Sortkeys = 1; print STDERR scalar(localtime) . &amp;quot; s_n_t '@story_never_topic' s_n_a '@story_never_author' s_n_n '@story_never_nexus' s_a_n '@story_always_nexus' form: &amp;quot; . Dumper($form);&lt;br /&gt;
        # Sanity check.&lt;br /&gt;
        $#story_never_topic             = 299 if $#story_never_topic   &amp;gt; 299;&lt;br /&gt;
        $#story_never_author            = 299 if $#story_never_author  &amp;gt; 299;&lt;br /&gt;
        $#story_never_nexus             = 299 if $#story_never_nexus   &amp;gt; 299;&lt;br /&gt;
        $#story_always_topic            = 299 if $#story_always_topic  &amp;gt; 299;&lt;br /&gt;
        $#story_always_author           = 299 if $#story_always_author &amp;gt; 299;&lt;br /&gt;
        $#story_always_nexus            = 299 if $#story_always_nexus  &amp;gt; 299;&lt;br /&gt;
        $#story_full_brief_nexus        = 299 if $#story_full_brief_nexus &amp;gt; 299;&lt;br /&gt;
        $#story_brief_always_nexus      = 299 if $#story_brief_always_nexus &amp;gt; 299;&lt;br /&gt;
        $#story_brief_best_nexus        = 299 if $#story_brief_best_nexus &amp;gt; 299;&lt;br /&gt;
        $#story_full_best_nexus         = 299 if $#story_full_best_nexus &amp;gt; 299;&lt;br /&gt;
&lt;br /&gt;
        my $story_never_topic   = join &amp;quot;,&amp;quot;, @story_never_topic;&lt;br /&gt;
        $story_never_topic = ($constants-&amp;gt;{subscribe} &amp;amp;&amp;amp; $user-&amp;gt;{is_subscriber})&lt;br /&gt;
                ? checkList($story_never_topic, 1024)&lt;br /&gt;
                : checkList($story_never_topic);&lt;br /&gt;
        my $story_never_author          = checkList(join &amp;quot;,&amp;quot;, @story_never_author);&lt;br /&gt;
        my $story_never_nexus           = checkList(join &amp;quot;,&amp;quot;, @story_never_nexus);&lt;br /&gt;
        my $story_always_topic          = checkList(join &amp;quot;,&amp;quot;, @story_always_topic);&lt;br /&gt;
        $story_always_topic = ($constants-&amp;gt;{subscribe} &amp;amp;&amp;amp; $user-&amp;gt;{is_subscriber})&lt;br /&gt;
                ? checkList($story_always_topic, 1024)&lt;br /&gt;
                : checkList($story_always_topic);&lt;br /&gt;
        my $story_always_author         = checkList(join &amp;quot;,&amp;quot;, @story_always_author);&lt;br /&gt;
&lt;br /&gt;
        my $story_always_nexus          = checkList(join &amp;quot;,&amp;quot;, @story_always_nexus);&lt;br /&gt;
        my $story_full_brief_nexus      = checkList(join &amp;quot;,&amp;quot;, @story_full_brief_nexus);&lt;br /&gt;
        my $story_brief_always_nexus    = checkList(join &amp;quot;,&amp;quot;, @story_brief_always_nexus);&lt;br /&gt;
        my $story_brief_best_nexus      = checkList(join &amp;quot;,&amp;quot;, @story_brief_best_nexus);&lt;br /&gt;
        my $story_full_best_nexus       = checkList(join &amp;quot;,&amp;quot;, @story_full_best_nexus);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        my $user_edits_table = {&lt;br /&gt;
                story_never_topic               =&amp;gt; $story_never_topic,&lt;br /&gt;
                story_never_author              =&amp;gt; $story_never_author,&lt;br /&gt;
                story_never_nexus               =&amp;gt; $story_never_nexus,&lt;br /&gt;
                story_always_topic              =&amp;gt; $story_always_topic,&lt;br /&gt;
                story_always_author             =&amp;gt; $story_always_author,&lt;br /&gt;
                story_always_nexus              =&amp;gt; $story_always_nexus,&lt;br /&gt;
                story_brief_always_nexus        =&amp;gt; $story_brief_always_nexus,&lt;br /&gt;
                story_full_brief_nexus          =&amp;gt; $story_full_brief_nexus,&lt;br /&gt;
                story_full_best_nexus           =&amp;gt; $story_full_best_nexus,&lt;br /&gt;
                story_brief_best_nexus          =&amp;gt; $story_brief_best_nexus,&lt;br /&gt;
&lt;br /&gt;
                slashboxes      =&amp;gt; checkList($slashboxes, 1024),&lt;br /&gt;
&lt;br /&gt;
                maxstories      =&amp;gt; 30, # XXXSKIN fix this later&lt;br /&gt;
                noboxes         =&amp;gt; ($form-&amp;gt;{useslashboxes} ? 0 : 1),&lt;br /&gt;
                lowbandwidth    =&amp;gt; ($form-&amp;gt;{lowbandwidth} ? 1 : 0),&lt;br /&gt;
                simpledesign    =&amp;gt; ($form-&amp;gt;{simpledesign} ? 1 : 0),&lt;br /&gt;
                noicons         =&amp;gt; ($form-&amp;gt;{noicons} ? 1 : 0),&lt;br /&gt;
                willing         =&amp;gt; ($form-&amp;gt;{willing} ? 1 : 0),&lt;br /&gt;
                index_classic   =&amp;gt; ($form-&amp;gt;{index_classic} ? 1 : undef),&lt;br /&gt;
        };&lt;br /&gt;
&lt;br /&gt;
        if (defined $form-&amp;gt;{tzcode} &amp;amp;&amp;amp; defined $form-&amp;gt;{tzformat}) {&lt;br /&gt;
                $user_edits_table-&amp;gt;{tzcode} = $form-&amp;gt;{tzcode};&lt;br /&gt;
                $user_edits_table-&amp;gt;{dfid}   = $form-&amp;gt;{tzformat};&lt;br /&gt;
                $user_edits_table-&amp;gt;{dst}    = $form-&amp;gt;{dst};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Force the User Space area to contain only known-good HTML tags.&lt;br /&gt;
        # Unfortunately the cookie login model makes it just too risky&lt;br /&gt;
        # to allow scripts in here;  CSS's steal passwords.  There are&lt;br /&gt;
        # no known vulnerabilities at this time, but a combination of the&lt;br /&gt;
        # social engineering taking place (inviting users to put Javascript&lt;br /&gt;
        # from websites in here, and making available script URLs for that&lt;br /&gt;
        # purpose), plus the fact that this could be used to amplify the&lt;br /&gt;
        # seriousness of any future vulnerabilities, means it's way past&lt;br /&gt;
        # time to shut this feature down.  - Jamie 2002/03/06&lt;br /&gt;
&lt;br /&gt;
        # it's a VARCHAR ...&lt;br /&gt;
        my $mylinks_limit = 255;&lt;br /&gt;
        $user_edits_table-&amp;gt;{mylinks} = balanceTags(strip_html(&lt;br /&gt;
                chopEntity($form-&amp;gt;{mylinks} || '', $mylinks_limit)&lt;br /&gt;
        ), { deep_nesting =&amp;gt; 2, length =&amp;gt; $mylinks_limit });&lt;br /&gt;
&lt;br /&gt;
        $user_edits_table-&amp;gt;{mylinks} = '' unless defined $user_edits_table-&amp;gt;{mylinks};&lt;br /&gt;
&lt;br /&gt;
        $error = 1;&lt;br /&gt;
        # must select at least 1/4 of nexuses, topics, authors&lt;br /&gt;
        if      ( scalar(@story_never_author) &amp;gt; ($story_author_all * 3/4) ) {&lt;br /&gt;
                $note = getError('editHome_too_many_disabled');&lt;br /&gt;
        } elsif ( scalar(@story_never_nexus) &amp;gt; ($story_nexus_all * 3/4) ) {&lt;br /&gt;
                $note = getError('editHome_too_many_disabled');&lt;br /&gt;
        } elsif ( scalar(@story_never_topic) &amp;gt; ($story_topic_all * 3/4) ) {&lt;br /&gt;
                $note = getError('editHome_too_many_disabled');&lt;br /&gt;
        } else {&lt;br /&gt;
                $error = 0;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        unless ($error) {&lt;br /&gt;
                # If a user is unwilling to moderate, we should cancel all points, lest&lt;br /&gt;
                # they be preserved when they shouldn't be.&lt;br /&gt;
                if (!isAnon($uid) &amp;amp;&amp;amp; !$form-&amp;gt;{willing}) {&lt;br /&gt;
                        $slashdb-&amp;gt;setUser($uid, { points =&amp;gt; 0 });&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                getOtherUserParams($user_edits_table);&lt;br /&gt;
                if ($form-&amp;gt;{restore_defaults}) {&lt;br /&gt;
                        setToDefaults($user_edits_table, {}, {&lt;br /&gt;
                                maxstories      =&amp;gt; 30,&lt;br /&gt;
                                tzcode          =&amp;gt; &amp;quot;EST&amp;quot;,&lt;br /&gt;
                                # XXX shouldn't this reset ALL the defaults,&lt;br /&gt;
                                # not just these two?&lt;br /&gt;
                        });&lt;br /&gt;
                }&lt;br /&gt;
                if ($form-&amp;gt;{restore_slashbox_defaults}) {&lt;br /&gt;
                        setToDefaults($user_edits_table, {&lt;br /&gt;
                                'story_never_topic' =&amp;gt; 1,&lt;br /&gt;
                                'story_never_author' =&amp;gt; 1,&lt;br /&gt;
                                'story_never_nexus' =&amp;gt; 1,&lt;br /&gt;
                                'story_always_topic' =&amp;gt; 1,&lt;br /&gt;
                                'story_always_author' =&amp;gt; 1,&lt;br /&gt;
                                'story_always_nexus' =&amp;gt; 1,&lt;br /&gt;
                                'story_full_brief_nexus' =&amp;gt; 1,&lt;br /&gt;
                                'story_brief_always_nexus' =&amp;gt; 1,&lt;br /&gt;
                                'story_full_best_nexus' =&amp;gt; 1,&lt;br /&gt;
                                'story_brief_best_nexus' =&amp;gt; 1,&lt;br /&gt;
                                'maxstories' =&amp;gt; 1,&lt;br /&gt;
                                'noboxes' =&amp;gt; 1,&lt;br /&gt;
                                'light' =&amp;gt; 1,&lt;br /&gt;
                                'noicons' =&amp;gt; 1,&lt;br /&gt;
                                'willing' =&amp;gt; 1&lt;br /&gt;
                        }, { slashboxes =&amp;gt; &amp;quot;&amp;quot; });&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
#print scalar(localtime) . &amp;quot; uet: &amp;quot; . Dumper($user_edits_table);&lt;br /&gt;
                $slashdb-&amp;gt;setUser($uid, $user_edits_table);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        editHome({ uid =&amp;gt; $uid, note =&amp;gt; $note });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
# A generic way for a site to allow users to edit data about themselves.&lt;br /&gt;
# Most useful when your plugin or theme wants to let the user change&lt;br /&gt;
# minor settings but you don't want to write a whole new version&lt;br /&gt;
# of users.pl to provide a user interface.  The user can save any&lt;br /&gt;
# param of the format &amp;quot;opt_foo&amp;quot;, as long as &amp;quot;foo&amp;quot; shows up in&lt;br /&gt;
# getMiscUserOpts which lists all the misc opts that this user can edit.&lt;br /&gt;
# This is *not* protected by formkeys (yet), so assume attackers can make&lt;br /&gt;
# users click and accidentally edit their own settings: no really important&lt;br /&gt;
# data should be stored in this way.&lt;br /&gt;
sub editMiscOpts {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $user = getCurrentUser(); &lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $note = $hr-&amp;gt;{note} || &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        return if $user-&amp;gt;{is_anon}; # shouldn't be, but can't hurt to check&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        my $edit_user = $slashdb-&amp;gt;getUser($user-&amp;gt;{uid});&lt;br /&gt;
        my $title = getTitle('editMiscOpts_title');&lt;br /&gt;
&lt;br /&gt;
        my $opts = $slashdb-&amp;gt;getMiscUserOpts();&lt;br /&gt;
        for my $opt (@$opts) {&lt;br /&gt;
                my $opt_name = &amp;quot;opt_&amp;quot; . $opt-&amp;gt;{name};&lt;br /&gt;
                $opt-&amp;gt;{checked} = $edit_user-&amp;gt;{$opt_name} ? 1 : 0;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('editMiscOpts', {&lt;br /&gt;
#               useredit        =&amp;gt; $user_edit,&lt;br /&gt;
                title           =&amp;gt; $title,&lt;br /&gt;
                opts            =&amp;gt; $opts,&lt;br /&gt;
                note            =&amp;gt; $note,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
sub saveMiscOpts {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        return if $user-&amp;gt;{is_anon}; # shouldn't be, but can't hurt to check&lt;br /&gt;
&lt;br /&gt;
        my $edit_user = $slashdb-&amp;gt;getUser($user-&amp;gt;{uid});&lt;br /&gt;
        my %opts_ok_hash = ( );&lt;br /&gt;
        my $opts = $slashdb-&amp;gt;getMiscUserOpts();&lt;br /&gt;
        for my $opt (@$opts) {&lt;br /&gt;
                $opts_ok_hash{&amp;quot;opt_$opt-&amp;gt;{name}&amp;quot;} = 1;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $update = { };&lt;br /&gt;
        for my $opt (grep /^opt_/, keys %$form) {&lt;br /&gt;
                next unless $opts_ok_hash{$opt};&lt;br /&gt;
                $update-&amp;gt;{$opt} = $form-&amp;gt;{$opt} ? 1 : 0;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Make the changes.&lt;br /&gt;
        $slashdb-&amp;gt;setUser($edit_user-&amp;gt;{uid}, $update);&lt;br /&gt;
&lt;br /&gt;
        # Inform the user the change was made.  Since we don't&lt;br /&gt;
        # require formkeys, we always want to print a message to&lt;br /&gt;
        # make sure the user sees what s/he did.  This is done&lt;br /&gt;
        # by passing in a note which ends up passed to the&lt;br /&gt;
        # editMiscOpts template, which displays it.&lt;br /&gt;
        editMiscOpts({ note =&amp;gt; getMessage('savemiscopts_msg') });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub listReadOnly {&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
        my $readonlylist = $reader-&amp;gt;getAL2List('nopost');&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('listReadOnly', {&lt;br /&gt;
                readonlylist =&amp;gt; $readonlylist,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub listBanned {&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
        my $bannedlist = $reader-&amp;gt;getAL2List('ban');&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('listBanned', {&lt;br /&gt;
                bannedlist =&amp;gt; $bannedlist,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub topAbusers {&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
        my $topabusers = $reader-&amp;gt;getTopAbusers();&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('topAbusers', {&lt;br /&gt;
                topabusers =&amp;gt; $topabusers,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub listAbuses {&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        my $abuses = $reader-&amp;gt;getAbuses($form-&amp;gt;{key}, $form-&amp;gt;{abuseid});&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('listAbuses', {&lt;br /&gt;
                abuseid =&amp;gt; $form-&amp;gt;{abuseid},&lt;br /&gt;
                abuses  =&amp;gt; $abuses,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub forceAccountVerify {&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        my $uid = $form-&amp;gt;{uid};&lt;br /&gt;
        my $useredit = $slashdb-&amp;gt;getUser($uid);&lt;br /&gt;
&lt;br /&gt;
        if ($useredit-&amp;gt;{uid}) {&lt;br /&gt;
                my $newpasswd = $slashdb-&amp;gt;resetUserAccount($uid);&lt;br /&gt;
                $slashdb-&amp;gt;deleteLogToken($uid, 1);&lt;br /&gt;
                my $emailtitle = getTitle('reset_acct_email_title', {&lt;br /&gt;
                        nickname        =&amp;gt; $useredit-&amp;gt;{nickname}&lt;br /&gt;
                }, 1);&lt;br /&gt;
&lt;br /&gt;
                my $msg = getMessage('reset_acct_msg', {&lt;br /&gt;
                        newpasswd       =&amp;gt; $newpasswd,&lt;br /&gt;
                        tempnick        =&amp;gt; $useredit-&amp;gt;{nickname},&lt;br /&gt;
                }, 1);&lt;br /&gt;
&lt;br /&gt;
                $slashdb-&amp;gt;setUser($useredit-&amp;gt;{uid}, {&lt;br /&gt;
                        waiting_for_account_verify =&amp;gt; 1,&lt;br /&gt;
                        account_verify_request_time =&amp;gt; $slashdb-&amp;gt;getTime()&lt;br /&gt;
                });&lt;br /&gt;
&lt;br /&gt;
                doEmail($useredit-&amp;gt;{uid}, $emailtitle, $msg) if $useredit-&amp;gt;{uid};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        print getMessage(&amp;quot;reset_acct_complete&amp;quot;, { useredit =&amp;gt; $useredit }, 1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub displayForm {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        my $suadmin_flag = $user-&amp;gt;{seclev} &amp;gt;= 10000 ? 1 : 0;&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        my $op = $hr-&amp;gt;{op} || $form-&amp;gt;{op} || 'displayform';&lt;br /&gt;
&lt;br /&gt;
        my $ops = {&lt;br /&gt;
                displayform     =&amp;gt; 'loginForm',&lt;br /&gt;
                edithome        =&amp;gt; 'loginForm',&lt;br /&gt;
                editcomm        =&amp;gt; 'loginForm',&lt;br /&gt;
                edituser        =&amp;gt; 'loginForm',&lt;br /&gt;
#               mailpasswdform  =&amp;gt; 'sendPasswdForm',&lt;br /&gt;
#               newuserform     =&amp;gt; 'newUserForm',&lt;br /&gt;
                userclose       =&amp;gt; 'loginForm',&lt;br /&gt;
                userlogin       =&amp;gt; 'loginForm',&lt;br /&gt;
                editmiscopts    =&amp;gt; 'loginForm',&lt;br /&gt;
                savemiscopts    =&amp;gt; 'loginForm',&lt;br /&gt;
                default         =&amp;gt; 'loginForm'&lt;br /&gt;
        };&lt;br /&gt;
&lt;br /&gt;
        $op = 'default' if !defined($ops-&amp;gt;{$op});&lt;br /&gt;
&lt;br /&gt;
        my($title, $title2, $msg1, $msg2) = ('', '', '', '');&lt;br /&gt;
&lt;br /&gt;
        if ($op eq 'userclose') {&lt;br /&gt;
                $title = getMessage('userclose');&lt;br /&gt;
&lt;br /&gt;
        } elsif ($op eq 'displayForm') {&lt;br /&gt;
                $title = $form-&amp;gt;{unickname}&lt;br /&gt;
                        ? getTitle('displayForm_err_title')&lt;br /&gt;
                        : getTitle('displayForm_title');&lt;br /&gt;
        } elsif ($op eq 'mailpasswdform') {&lt;br /&gt;
                $title = getTitle('mailPasswdForm_title');&lt;br /&gt;
        } elsif ($op eq 'newuserform') {&lt;br /&gt;
                $title = getTitle('newUserForm_title');&lt;br /&gt;
        } else {&lt;br /&gt;
                $title = getTitle('displayForm_title');&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        $form-&amp;gt;{unickname} ||= $form-&amp;gt;{newusernick};&lt;br /&gt;
&lt;br /&gt;
        if ($form-&amp;gt;{newusernick}) {&lt;br /&gt;
                $title2 = getTitle('displayForm_dup_title');&lt;br /&gt;
        } else {&lt;br /&gt;
                $title2 = getTitle('displayForm_new_title');&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        $msg1 = getMessage('dispform_new_msg_1');&lt;br /&gt;
        if (! $form-&amp;gt;{newusernick} &amp;amp;&amp;amp; $op eq 'newuserform') {&lt;br /&gt;
                $msg2 = getMessage('dispform_new_msg_2');&lt;br /&gt;
        } elsif ($op eq 'displayform' || $op eq 'userlogin') {&lt;br /&gt;
                $msg2 = getMessage('newuserform_msg');&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        slashDisplay($ops-&amp;gt;{$op}, {&lt;br /&gt;
                newnick         =&amp;gt; nickFix($form-&amp;gt;{newusernick}),&lt;br /&gt;
                suadmin_flag    =&amp;gt; $suadmin_flag,&lt;br /&gt;
                title           =&amp;gt; $title,&lt;br /&gt;
                title2          =&amp;gt; $title2,&lt;br /&gt;
                logged_in       =&amp;gt; $user-&amp;gt;{is_anon} ? 0 : 1,&lt;br /&gt;
                msg1            =&amp;gt; $msg1,&lt;br /&gt;
                msg2            =&amp;gt; $msg2&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
# this groups all the messages together in&lt;br /&gt;
# one template, called &amp;quot;messages;users;default&amp;quot;&lt;br /&gt;
sub getMessage {&lt;br /&gt;
        my($value, $hashref, $nocomm) = @_;&lt;br /&gt;
        $hashref ||= {};&lt;br /&gt;
        $hashref-&amp;gt;{value} = $value;&lt;br /&gt;
        return slashDisplay('messages', $hashref,&lt;br /&gt;
                { Return =&amp;gt; 1, Nocomm =&amp;gt; $nocomm });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
# this groups all the errors together in&lt;br /&gt;
# one template, called &amp;quot;errors;users;default&amp;quot;&lt;br /&gt;
sub getError {&lt;br /&gt;
        my($value, $hashref, $nocomm) = @_;&lt;br /&gt;
        $hashref ||= {};&lt;br /&gt;
        $hashref-&amp;gt;{value} = $value;&lt;br /&gt;
        return slashDisplay('errors', $hashref,&lt;br /&gt;
                { Return =&amp;gt; 1, Nocomm =&amp;gt; $nocomm });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
# this groups all the titles together in&lt;br /&gt;
# one template, called &amp;quot;users-titles&amp;quot;&lt;br /&gt;
sub getTitle {&lt;br /&gt;
        my($value, $hashref, $nocomm) = @_;&lt;br /&gt;
        $hashref ||= {};&lt;br /&gt;
        $hashref-&amp;gt;{value} = $value;&lt;br /&gt;
        return slashDisplay('titles', $hashref,&lt;br /&gt;
                { Return =&amp;gt; 1, Nocomm =&amp;gt; $nocomm });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
# getUserAdmin - returns a block of HTML text that provides&lt;br /&gt;
# information and editing capabilities for admin users.&lt;br /&gt;
# Most of this data is already in the getUserAdmin template,&lt;br /&gt;
# but really, we should try to get more of this logic into&lt;br /&gt;
# that template.&lt;br /&gt;
sub getUserAdmin {&lt;br /&gt;
        my($id, $field, $seclev_field) = @_;&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $logdb = getObject('Slash::DB', { db_type =&amp;gt; 'log_slave' });&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        my $user        = getCurrentUser();&lt;br /&gt;
        my $form        = getCurrentForm();&lt;br /&gt;
        my $constants   = getCurrentStatic();&lt;br /&gt;
        my $slashdb     = getCurrentDB();&lt;br /&gt;
        $id ||= $user-&amp;gt;{uid};&lt;br /&gt;
&lt;br /&gt;
        my($expired, $uidstruct, $readonly);&lt;br /&gt;
        my($user_edit, $user_editfield, $ipstruct, $ipstruct_order, $authors, $author_flag, $topabusers, $thresh_select,$section_select);&lt;br /&gt;
        my $srcid;&lt;br /&gt;
        my $proxy_check = {};&lt;br /&gt;
        my @accesshits;&lt;br /&gt;
        my $user_editinfo_flag = (!$form-&amp;gt;{op} || $form-&amp;gt;{op} eq 'userinfo'&lt;br /&gt;
                || $form-&amp;gt;{userinfo} || $form-&amp;gt;{saveuseradmin}&lt;br /&gt;
                ) ? 1 : 0;&lt;br /&gt;
        my $authoredit_flag = ($user-&amp;gt;{seclev} &amp;gt;= 10000) ? 1 : 0;&lt;br /&gt;
        my $sectionref = $reader-&amp;gt;getDescriptions('skins');&lt;br /&gt;
        $sectionref-&amp;gt;{''} = getData('all_sections');&lt;br /&gt;
&lt;br /&gt;
        $field ||= 'uid';&lt;br /&gt;
        if ($field eq 'uid') {&lt;br /&gt;
                $user_edit = $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                $user_editfield = $user_edit-&amp;gt;{uid};&lt;br /&gt;
                $srcid = convert_srcid( uid =&amp;gt; $id );&lt;br /&gt;
                #$expired = $slashdb-&amp;gt;checkExpired($user_edit-&amp;gt;{uid}) ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
                $ipstruct = $slashdb-&amp;gt;getNetIDStruct($user_edit-&amp;gt;{uid});&lt;br /&gt;
                @accesshits = $logdb-&amp;gt;countAccessLogHitsInLastX($field, $user_edit-&amp;gt;{uid}) if defined($logdb);&lt;br /&gt;
                $section_select = createSelect('section', $sectionref, $user_edit-&amp;gt;{section}, 1);&lt;br /&gt;
&lt;br /&gt;
        } elsif ($field eq 'nickname') {&lt;br /&gt;
                $user_edit = $slashdb-&amp;gt;getUser($slashdb-&amp;gt;getUserUID($id));&lt;br /&gt;
                $user_editfield = $user_edit-&amp;gt;{nickname};&lt;br /&gt;
                #$expired = $slashdb-&amp;gt;checkExpired($user_edit-&amp;gt;{uid}) ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
                $ipstruct = $slashdb-&amp;gt;getNetIDStruct($user_edit-&amp;gt;{uid});&lt;br /&gt;
                @accesshits = $logdb-&amp;gt;countAccessLogHitsInLastX('uid', $user_edit-&amp;gt;{uid}) if defined($logdb);&lt;br /&gt;
                $section_select = createSelect('section', $sectionref, $user_edit-&amp;gt;{section}, 1);&lt;br /&gt;
&lt;br /&gt;
        } elsif ($field eq 'md5id') {&lt;br /&gt;
                $user_edit-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                $user_edit-&amp;gt;{md5id} = $id;&lt;br /&gt;
                if ($form-&amp;gt;{fieldname} &amp;amp;&amp;amp; $form-&amp;gt;{fieldname} =~ /^(ipid|subnetid)$/) {&lt;br /&gt;
                        $uidstruct = $slashdb-&amp;gt;getUIDStruct($form-&amp;gt;{fieldname}, $user_edit-&amp;gt;{md5id});&lt;br /&gt;
                        @accesshits = $logdb-&amp;gt;countAccessLogHitsInLastX($form-&amp;gt;{fieldname}, $user_edit-&amp;gt;{md5id}) if defined($logdb);&lt;br /&gt;
                } else {&lt;br /&gt;
                        $uidstruct = $slashdb-&amp;gt;getUIDStruct('md5id', $user_edit-&amp;gt;{md5id});&lt;br /&gt;
                        @accesshits = $logdb-&amp;gt;countAccessLogHitsInLastX($field, $user_edit-&amp;gt;{md5id}) if defined($logdb);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
        } elsif ($field eq 'ipid') {&lt;br /&gt;
                $user_edit-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                $user_edit-&amp;gt;{ipid} = $id;&lt;br /&gt;
                $srcid = convert_srcid( ipid =&amp;gt; $id );&lt;br /&gt;
                $user_editfield = $id;&lt;br /&gt;
                $uidstruct = $slashdb-&amp;gt;getUIDStruct('ipid', $user_edit-&amp;gt;{ipid});&lt;br /&gt;
                @accesshits = $logdb-&amp;gt;countAccessLogHitsInLastX('host_addr', $user_edit-&amp;gt;{ipid}) if defined($logdb);&lt;br /&gt;
&lt;br /&gt;
                if ($form-&amp;gt;{userfield} =~/^\d+\.\d+\.\d+\.(\d+)$/) {&lt;br /&gt;
                        if ($1 ne &amp;quot;0&amp;quot;){&lt;br /&gt;
                                $proxy_check-&amp;gt;{available} = 1;&lt;br /&gt;
                                $proxy_check-&amp;gt;{results} = $slashdb-&amp;gt;checkForOpenProxy($form-&amp;gt;{userfield}) if $form-&amp;gt;{check_proxy};&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
        } elsif ($field eq 'subnetid') {&lt;br /&gt;
                $user_edit-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                $srcid = convert_srcid( ipid =&amp;gt; $id );&lt;br /&gt;
                if ($id =~ /^(\d+\.\d+\.\d+)(?:\.\d)?/) {&lt;br /&gt;
                        $id = $1 . &amp;quot;.0&amp;quot;;&lt;br /&gt;
                        $user_edit-&amp;gt;{subnetid} = $id;&lt;br /&gt;
                } else {&lt;br /&gt;
                        $user_edit-&amp;gt;{subnetid} = $id;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                $user_editfield = $id;&lt;br /&gt;
                $uidstruct = $slashdb-&amp;gt;getUIDStruct('subnetid', $user_edit-&amp;gt;{subnetid});&lt;br /&gt;
                @accesshits = $logdb-&amp;gt;countAccessLogHitsInLastX($field, $user_edit-&amp;gt;{subnetid}) if defined($logdb);&lt;br /&gt;
&lt;br /&gt;
        } elsif ($field eq &amp;quot;srcid&amp;quot;) {&lt;br /&gt;
                $user_edit-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                $user_edit-&amp;gt;{srcid}  = $id;&lt;br /&gt;
                $srcid = $id;&lt;br /&gt;
&lt;br /&gt;
        } else {&lt;br /&gt;
                $user_edit = $id ? $slashdb-&amp;gt;getUser($id) : $user;&lt;br /&gt;
                $user_editfield = $user_edit-&amp;gt;{uid};&lt;br /&gt;
                $ipstruct = $slashdb-&amp;gt;getNetIDStruct($user_edit-&amp;gt;{uid});&lt;br /&gt;
                @accesshits = $logdb-&amp;gt;countAccessLogHitsInLastX('uid', $user_edit-&amp;gt;{uid}) if defined($logdb);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        ##########&lt;br /&gt;
        # Put together the array and hashref that the template will need&lt;br /&gt;
        # to construct the list for display to the admin.&lt;br /&gt;
        # Note that currently a srcid which is not a uid (i.e. which&lt;br /&gt;
        # represents an IP address or masked IP network) cannot have&lt;br /&gt;
        # any ACLs assigned to it.  This may change in the future.&lt;br /&gt;
        # The term &amp;quot;aclam&amp;quot; is used because it has a field set for both&lt;br /&gt;
        # every ACL and every access modifier (i.e. AL2 bit) that is set&lt;br /&gt;
        # for this user or srcid.&lt;br /&gt;
        # For now, ACLs will be listed for IPs as well.&lt;br /&gt;
        # First get the list of ACLs that can be used.&lt;br /&gt;
        my $all_acls_ar = $reader-&amp;gt;getAllACLNames();&lt;br /&gt;
        my $all_acls_hr = { map { ( $_, 1 ) } @$all_acls_ar };&lt;br /&gt;
        # Add in any ACLs selected for this user (just in case&lt;br /&gt;
        # getAllACLNames is cached and stale).&lt;br /&gt;
        for my $acl (keys %{$user_edit-&amp;gt;{acl}}) {&lt;br /&gt;
                $all_acls_hr-&amp;gt;{$acl} = 1;&lt;br /&gt;
        }&lt;br /&gt;
        # Start creating the $all_aclam_hr data, in which the keys are&lt;br /&gt;
        # the HTML selection names that all begin with aclam_ and the&lt;br /&gt;
        # the values are their names/descriptions shown to the admin.&lt;br /&gt;
        # First put all the ACLs into the hash, if we're editing a user.&lt;br /&gt;
        my $all_aclam_hr = { };&lt;br /&gt;
        if (!$user_edit-&amp;gt;{nonuid}) {&lt;br /&gt;
                $all_aclam_hr = { map { ( &amp;quot;aclam_$_&amp;quot;, &amp;quot;ACL: $_&amp;quot; ) } keys %$all_acls_hr };&lt;br /&gt;
        }&lt;br /&gt;
        # Next put in all the al2 types.&lt;br /&gt;
        my $all_al2types = $reader-&amp;gt;getAL2Types;&lt;br /&gt;
        for my $key (keys %$all_al2types) {&lt;br /&gt;
                next if $key eq 'comment'; # skip the 'comment' type&lt;br /&gt;
                $all_aclam_hr-&amp;gt;{&amp;quot;aclam_$key&amp;quot;} = $all_al2types-&amp;gt;{$key}{title};&lt;br /&gt;
        }&lt;br /&gt;
        # Finally, sort the keys of the hash into the order that we&lt;br /&gt;
        # want them displayed to the admin (ACLs first).&lt;br /&gt;
        my $all_acls_longkeys_hr = { map { ( &amp;quot;aclam_$_&amp;quot;, 1 ) } keys %$all_acls_hr };&lt;br /&gt;
        my $all_aclam_ar = [&lt;br /&gt;
                sort {&lt;br /&gt;
                        (exists($all_acls_longkeys_hr-&amp;gt;{$a}) ? -1 : 1) &amp;lt;=&amp;gt; (exists($all_acls_longkeys_hr-&amp;gt;{$b}) ? -1 : 1)&lt;br /&gt;
                        ||&lt;br /&gt;
                        $all_aclam_hr-&amp;gt;{$a} cmp $all_aclam_hr-&amp;gt;{$b}&lt;br /&gt;
                } keys %$all_aclam_hr&lt;br /&gt;
        ];&lt;br /&gt;
        # Now put together the hashref that identifies which of those&lt;br /&gt;
        # items are selected for this user.&lt;br /&gt;
        my $user_aclam_hr = { };&lt;br /&gt;
        for my $acl (keys %{ $user_edit-&amp;gt;{acl} }) {&lt;br /&gt;
                $user_aclam_hr-&amp;gt;{&amp;quot;aclam_$acl&amp;quot;} = 1;&lt;br /&gt;
        }&lt;br /&gt;
        my $al2_tid_comment = $all_al2types-&amp;gt;{comment}{al2tid} || 0;&lt;br /&gt;
        my $al2_log_ar = [ ];&lt;br /&gt;
        my $al2_hr = { };&lt;br /&gt;
        # XXXSRCID Once we get rid of the silly 'md5id' field and all the&lt;br /&gt;
        # other bizarre backward-compatibility code paths early in this&lt;br /&gt;
        # function, this won't be necessary, but until then we need this&lt;br /&gt;
        # sanity check...&lt;br /&gt;
        if ($srcid) {&lt;br /&gt;
                # getAL2 works with either a srcids hashref or a single srcid&lt;br /&gt;
                $al2_hr = $slashdb-&amp;gt;getAL2($srcid);&lt;br /&gt;
                for my $al2 (keys %{ $al2_hr }) {&lt;br /&gt;
                        $user_aclam_hr-&amp;gt;{&amp;quot;aclam_$al2&amp;quot;} = 1;&lt;br /&gt;
                }&lt;br /&gt;
                $al2_log_ar = $slashdb-&amp;gt;getAL2Log($srcid);&lt;br /&gt;
        }&lt;br /&gt;
        # Generate al2_nick_hr, which will be populated with keys of all&lt;br /&gt;
        # the (presumably) admin uids who have logged rows for this al2,&lt;br /&gt;
        # and values of their nicks.&lt;br /&gt;
        my $al2_nick_hr = { };&lt;br /&gt;
        for my $al2_log (@$al2_log_ar) {&lt;br /&gt;
                my $uid = $al2_log-&amp;gt;{adminuid};&lt;br /&gt;
                next if !$uid; # odd error, might want to flag this&lt;br /&gt;
                $al2_nick_hr-&amp;gt;{$uid} ||= $slashdb-&amp;gt;getUser($uid, 'nickname');&lt;br /&gt;
        }&lt;br /&gt;
        ##########&lt;br /&gt;
&lt;br /&gt;
        $user_edit-&amp;gt;{author} = ($user_edit-&amp;gt;{author} &amp;amp;&amp;amp; $user_edit-&amp;gt;{author} == 1)&lt;br /&gt;
                ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        if (! $user-&amp;gt;{nonuid}) {&lt;br /&gt;
                my $threshcodes = $reader-&amp;gt;getDescriptions('threshcode_values','',1);&lt;br /&gt;
                $thresh_select = createSelect('defaultpoints', $threshcodes, $user_edit-&amp;gt;{defaultpoints}, 1);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if (!ref $ipstruct) {&lt;br /&gt;
                undef $ipstruct;&lt;br /&gt;
        } else {&lt;br /&gt;
                @$ipstruct_order = sort { $ipstruct-&amp;gt;{$b}{dmin} cmp $ipstruct-&amp;gt;{$a}{dmin} } keys %$ipstruct;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $m2total = ($user_edit-&amp;gt;{m2fair} || 0) + ($user_edit-&amp;gt;{m2unfair} || 0);&lt;br /&gt;
        if ($m2total) {&lt;br /&gt;
                $user_edit-&amp;gt;{m2unfairpercent} = sprintf(&amp;quot;%.2f&amp;quot;,&lt;br /&gt;
                        $user_edit-&amp;gt;{m2unfair}*100/$m2total);&lt;br /&gt;
        }&lt;br /&gt;
        my $mod_total = ($user_edit-&amp;gt;{totalmods} || 0) + ($user_edit-&amp;gt;{stirred} || 0);&lt;br /&gt;
        if ($mod_total) {&lt;br /&gt;
                $user_edit-&amp;gt;{stirredpercent} = sprintf(&amp;quot;%.2f&amp;quot;,&lt;br /&gt;
                        $user_edit-&amp;gt;{stirred}*100/$mod_total);&lt;br /&gt;
        }&lt;br /&gt;
        if ($constants-&amp;gt;{subscribe} and my $subscribe = getObject('Slash::Subscribe')) {&lt;br /&gt;
                $user_edit-&amp;gt;{subscribe_payments} =&lt;br /&gt;
                        $subscribe-&amp;gt;getSubscriptionsForUser($user_edit-&amp;gt;{uid});&lt;br /&gt;
                $user_edit-&amp;gt;{subscribe_purchases} =&lt;br /&gt;
                        $subscribe-&amp;gt;getSubscriptionsPurchasedByUser($user_edit-&amp;gt;{uid},{ only_types =&amp;gt; [ &amp;quot;grant&amp;quot;, &amp;quot;gift&amp;quot; ] });&lt;br /&gt;
        }&lt;br /&gt;
        my $ipid = $user_edit-&amp;gt;{ipid};&lt;br /&gt;
        my $subnetid = $user_edit-&amp;gt;{subnetid};&lt;br /&gt;
        my $post_restrictions = {};&lt;br /&gt;
        my ($subnet_karma, $ipid_karma);&lt;br /&gt;
&lt;br /&gt;
        if ($ipid &amp;amp;&amp;amp; !$subnetid) {&lt;br /&gt;
                $ipid = md5_hex($ipid) if length($ipid) != 32;&lt;br /&gt;
                $proxy_check-&amp;gt;{ipid} = $ipid;&lt;br /&gt;
                $proxy_check-&amp;gt;{currently} = $slashdb-&amp;gt;getKnownOpenProxy($ipid, &amp;quot;ipid&amp;quot;);&lt;br /&gt;
                # This next call is very slow.&lt;br /&gt;
                $subnetid = $reader-&amp;gt;getSubnetFromIPIDBasedOnComments($ipid);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($subnetid) {&lt;br /&gt;
                $subnetid = md5_hex($subnetid) if length($subnetid) != 32;&lt;br /&gt;
                # These next three calls can be very slow.  In fact, getNetIDKarma&lt;br /&gt;
                # is actually called twice on the same subnetid;  if we can cache&lt;br /&gt;
                # that data somehow that wouldn't be a bad idea.&lt;br /&gt;
                $post_restrictions = $reader-&amp;gt;getNetIDPostingRestrictions(&amp;quot;subnetid&amp;quot;, $subnetid);&lt;br /&gt;
                $subnet_karma = $reader-&amp;gt;getNetIDKarma(&amp;quot;subnetid&amp;quot;, $subnetid);&lt;br /&gt;
                $ipid_karma = $reader-&amp;gt;getNetIDKarma(&amp;quot;ipid&amp;quot;, $ipid) if $ipid;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $clout_types_ar = [ sort grep /\D/, keys %{$slashdb-&amp;gt;getCloutTypes} ];&lt;br /&gt;
&lt;br /&gt;
        return slashDisplay('getUserAdmin', {&lt;br /&gt;
                field                   =&amp;gt; $field,&lt;br /&gt;
                useredit                =&amp;gt; $user_edit,&lt;br /&gt;
                srcid                   =&amp;gt; $srcid,&lt;br /&gt;
                all_aclam_ar            =&amp;gt; $all_aclam_ar,&lt;br /&gt;
                all_aclam_hr            =&amp;gt; $all_aclam_hr,&lt;br /&gt;
                user_aclam_hr           =&amp;gt; $user_aclam_hr,&lt;br /&gt;
                al2_old                 =&amp;gt; $al2_hr,&lt;br /&gt;
                al2_log                 =&amp;gt; $al2_log_ar,&lt;br /&gt;
                al2_tid_comment         =&amp;gt; $al2_tid_comment,&lt;br /&gt;
                al2_nick                =&amp;gt; $al2_nick_hr,&lt;br /&gt;
&lt;br /&gt;
                userinfo_flag           =&amp;gt; $user_editinfo_flag,&lt;br /&gt;
                userfield               =&amp;gt; $user_editfield,&lt;br /&gt;
                ipstruct                =&amp;gt; $ipstruct,&lt;br /&gt;
                ipstruct_order          =&amp;gt; $ipstruct_order,&lt;br /&gt;
                uidstruct               =&amp;gt; $uidstruct,&lt;br /&gt;
                accesshits              =&amp;gt; \@accesshits,&lt;br /&gt;
                seclev_field            =&amp;gt; $seclev_field,&lt;br /&gt;
                expired                 =&amp;gt; $expired,&lt;br /&gt;
                topabusers              =&amp;gt; $topabusers,&lt;br /&gt;
                readonly                =&amp;gt; $readonly,&lt;br /&gt;
                thresh_select           =&amp;gt; $thresh_select,&lt;br /&gt;
                authoredit_flag         =&amp;gt; $authoredit_flag,&lt;br /&gt;
                section_select          =&amp;gt; $section_select,&lt;br /&gt;
                all_acls                =&amp;gt; $all_acls_hr,&lt;br /&gt;
                proxy_check             =&amp;gt; $proxy_check,&lt;br /&gt;
                subnet_karma            =&amp;gt; $subnet_karma,&lt;br /&gt;
                ipid_karma              =&amp;gt; $ipid_karma,&lt;br /&gt;
                post_restrictions       =&amp;gt; $post_restrictions,&lt;br /&gt;
&lt;br /&gt;
                clout_types_ar          =&amp;gt; $clout_types_ar,&lt;br /&gt;
        }, 1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
# this is to allow alternate parameters to be specified.  pass in&lt;br /&gt;
# your hash reference to be passed to setUser(), and this will&lt;br /&gt;
# add in those extra parameters.  add the parameters to string_param,&lt;br /&gt;
# type = otherusersparam, code = name of the param.  they will&lt;br /&gt;
# be checked for the main user prefs editing screens, and on&lt;br /&gt;
# user creation -- pudge&lt;br /&gt;
sub getOtherUserParams {&lt;br /&gt;
        my($data) = @_;&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
        my $user    = getCurrentUser();&lt;br /&gt;
        my $form    = getCurrentForm();&lt;br /&gt;
        my $params  = $reader-&amp;gt;getDescriptions('otherusersparam');&lt;br /&gt;
&lt;br /&gt;
        for my $param (keys %$params) {&lt;br /&gt;
                if (exists $form-&amp;gt;{$param}) {&lt;br /&gt;
                        # set user too for output in this request&lt;br /&gt;
                        $data-&amp;gt;{$param} = $user-&amp;gt;{$param} = $form-&amp;gt;{$param} || undef;&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
###############################################################&lt;br /&gt;
# This modifies a hashref to default values -- if nothing&lt;br /&gt;
# else we assume the empty string which clears items in the&lt;br /&gt;
# user_param table &lt;br /&gt;
#&lt;br /&gt;
# takes 3 hashrefs currently&lt;br /&gt;
# $data     - hashref to change to defaults&lt;br /&gt;
# $skip     - hashref of keys to skip modifying&lt;br /&gt;
# $defaults - hashref of defaults to set to something other &lt;br /&gt;
#             than the empty string&lt;br /&gt;
sub setToDefaults {&lt;br /&gt;
        my($data, $skip, $defaults) = @_;&lt;br /&gt;
        foreach my $key (keys %$data) {&lt;br /&gt;
                next if $skip-&amp;gt;{$key};&lt;br /&gt;
                $data-&amp;gt;{$key} = exists $defaults-&amp;gt;{$key} ? $defaults-&amp;gt;{$key} : &amp;quot;&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub getCommentListing {&lt;br /&gt;
        my ($type, $value,&lt;br /&gt;
                $min_comment, $time_period, $cc_all, $cc_time_period, $cid_for_time_period,&lt;br /&gt;
                $non_admin_limit, $admin_time_limit, $admin_non_time_limit,&lt;br /&gt;
                $options) = @_;&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $store_cutoff = $options-&amp;gt;{use_uid_cid_cutoff} ? $constants-&amp;gt;{store_com_page1_min_cid_for_user_com_cnt} : 0;&lt;br /&gt;
&lt;br /&gt;
        my $s_opt = {};&lt;br /&gt;
        my $num_wanted = 0;&lt;br /&gt;
        if ($min_comment) {&lt;br /&gt;
                if ($user-&amp;gt;{is_admin}) {&lt;br /&gt;
                        $num_wanted = $admin_non_time_limit;&lt;br /&gt;
                } else {&lt;br /&gt;
                        $num_wanted = $non_admin_limit;&lt;br /&gt;
                }&lt;br /&gt;
        } else {&lt;br /&gt;
&lt;br /&gt;
                if ($user-&amp;gt;{is_admin}) {&lt;br /&gt;
                        if ($cc_time_period &amp;gt;= $admin_non_time_limit) {&lt;br /&gt;
                                $s_opt-&amp;gt;{cid_at_or_after} = $cid_for_time_period;&lt;br /&gt;
                                $num_wanted = $admin_time_limit;&lt;br /&gt;
                        } else {&lt;br /&gt;
                                $num_wanted = $admin_non_time_limit;&lt;br /&gt;
                                if($store_cutoff){&lt;br /&gt;
                                        my $min_cid = $reader-&amp;gt;getUser($value,&lt;br /&gt;
                                                &amp;quot;com_num_&amp;quot;.$num_wanted.&amp;quot;_at_or_after_cid&amp;quot;);&lt;br /&gt;
                                        $s_opt-&amp;gt;{cid_at_or_after} = $min_cid&lt;br /&gt;
                                                if $min_cid &amp;amp;&amp;amp; $min_cid =~ /^\d+$/;&lt;br /&gt;
                                }&lt;br /&gt;
                        }&lt;br /&gt;
                } else {&lt;br /&gt;
                        if ($cc_time_period &amp;gt;= $non_admin_limit ) {&lt;br /&gt;
                                $s_opt-&amp;gt;{cid_at_or_after} = $cid_for_time_period;&lt;br /&gt;
                                $num_wanted = $non_admin_limit;&lt;br /&gt;
                        } else {&lt;br /&gt;
                                $num_wanted = $non_admin_limit;&lt;br /&gt;
                                if($store_cutoff){&lt;br /&gt;
                                        my $min_cid = $reader-&amp;gt;getUser($value,&lt;br /&gt;
                                                &amp;quot;com_num_&amp;quot;.$num_wanted.&amp;quot;_at_or_after_cid&amp;quot;);&lt;br /&gt;
                                        $s_opt-&amp;gt;{cid_at_or_after} = $min_cid&lt;br /&gt;
                                                if $min_cid &amp;amp;&amp;amp; $min_cid =~ /^\d+$/;&lt;br /&gt;
                                }&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
        if ($type eq &amp;quot;uid&amp;quot;) {&lt;br /&gt;
&lt;br /&gt;
                my $comments = $reader-&amp;gt;getCommentsByUID($value, $num_wanted, $min_comment, $s_opt) if $cc_all;&lt;br /&gt;
                if ($store_cutoff&lt;br /&gt;
                        &amp;amp;&amp;amp; $comments &amp;amp;&amp;amp; $cc_all &amp;gt;= $store_cutoff &amp;amp;&amp;amp; $min_comment == 0 &lt;br /&gt;
                        &amp;amp;&amp;amp; scalar(@$comments) == $num_wanted) {&lt;br /&gt;
                        my $min_cid = 0;&lt;br /&gt;
                        for my $comment (@$comments) {&lt;br /&gt;
                                $min_cid = $comment-&amp;gt;{cid}&lt;br /&gt;
                                        if !$min_cid || ($comment-&amp;gt;{cid} &amp;lt; $min_cid); &lt;br /&gt;
                        }&lt;br /&gt;
                        if ($min_cid &amp;amp;&amp;amp; $min_cid =~/^\d+$/) {&lt;br /&gt;
                                $slashdb-&amp;gt;setUser($value, {&lt;br /&gt;
                                        &amp;quot;com_num_&amp;quot;.$num_wanted.&amp;quot;_at_or_after_cid&amp;quot; =&amp;gt; $min_cid&lt;br /&gt;
                                });&lt;br /&gt;
                        }&lt;br /&gt;
&lt;br /&gt;
                }&lt;br /&gt;
                return $comments;&lt;br /&gt;
        } elsif ($type eq &amp;quot;ipid&amp;quot;){&lt;br /&gt;
                return $reader-&amp;gt;getCommentsByIPID($value, $num_wanted, $min_comment, $s_opt) if $cc_all;&lt;br /&gt;
        } elsif ($type eq &amp;quot;subnetid&amp;quot;){&lt;br /&gt;
                return $reader-&amp;gt;getCommentsBySubnetID($value, $num_wanted, $min_comment, $s_opt) if $cc_all;&lt;br /&gt;
        } else {&lt;br /&gt;
                return $reader-&amp;gt;getCommentsByIPIDOrSubnetID($value, $num_wanted, $min_comment, $s_opt) if $cc_all;&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
createEnvironment();&lt;br /&gt;
main();&lt;br /&gt;
&lt;br /&gt;
1;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=Historic:CssWork&amp;diff=5371</id>
		<title>Historic:CssWork</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=Historic:CssWork&amp;diff=5371"/>
		<updated>2014-03-01T19:00:54Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h2&amp;gt;Related pages  &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Official docs&lt;br /&gt;
** [[InstallDoc]] - original INSTALL document&lt;br /&gt;
** [[SlashGuide]] - this is the guide (from htdocs) you are supposed to read immediately after installing slashcode&lt;br /&gt;
** [[SectionTopics]] - This is the 'new' sections and topics rewrite and is more important to read than it first appears, explains what a skin is. Sort of.&lt;br /&gt;
** [[SlashChart]] Png chart of slashcode organization&lt;br /&gt;
** [[SlashManPages]] Man pages available by typing man PAGENAME&lt;br /&gt;
** [[TemplateManPages]] Man pages for the template library used to deliver the html&lt;br /&gt;
&lt;br /&gt;
* [[SlashHelperProgramsInBin]] - provided admin helpers in slash/bin&lt;br /&gt;
* [[SlashGlossary]] Glossary of terms used in Slash code&lt;br /&gt;
* [[FileLocations]] Locations of important files on disk. Has Main Libraries called by all routines&lt;br /&gt;
* [[FileLocations2]] Locations of files on disk continued. This is the stuff in local/slash.&lt;br /&gt;
* [[FileLocations3]] Locations of files on disk continued. This is the stuff in /usr/local/share/perl5/Slash/&lt;br /&gt;
* [[FileLocationsMisc]] Has Apache, Man pages,... &lt;br /&gt;
* [[SqlSchema]] - tables used in the database&lt;br /&gt;
* [[SqlDefaults]] - defaults for those tables&lt;br /&gt;
* [[PerlModuleDisplay]] - this is what actually sends a single template out to the broswer (through Apache)&lt;br /&gt;
* [[PerlModuleUsers]] - this is what handles the users home page and similar user functions.&lt;br /&gt;
&lt;br /&gt;
* [[AvailableThemes]] and how they are organized &lt;br /&gt;
* [[ThemesAnatomy]] Overview - &amp;quot;A theme is a website design.&amp;quot; (includes HOWTO-THemes doc)&lt;br /&gt;
** [[TemplateAnatomy]] - All html in these. &amp;quot;parsed by Perl Template Toolkit&amp;quot; (HOWTO-Templates)&lt;br /&gt;
***  [[TemplateTutorialWeb]] - man page&lt;br /&gt;
*** [[TemplateManualDirective]] - man page, has all the keywords used by template library&lt;br /&gt;
*** [[ThePartsOfTemplateLibraryActuallyUsedInSlashCode]] - knowing this can save time reading docs&lt;br /&gt;
*** [[TemplateLists]] - lists of the template in our Theme, some descriptions fm src&lt;br /&gt;
**[[TasksAnatomy]] -&lt;br /&gt;
&lt;br /&gt;
* [[TagboxesAnatomy]] - I don't realy know what these are yet. But there are a lot of them ;-)&lt;br /&gt;
* [[PluginsAnatomy]] - (HOWTO-plugins)&lt;br /&gt;
&lt;br /&gt;
* [[ChangelogForCss]] - Put final finished change here &lt;br /&gt;
* [[HowSlashCssWorks]] Overview&lt;br /&gt;
* [[CssFilesUsedEachPage]] Which css files are used on different pages&lt;br /&gt;
&lt;br /&gt;
* [[http://dev.soylentnews.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=soylentnews/soylentnews.git;a=tree;f=themes;hb=refs/heads/master]] git - themes&lt;br /&gt;
&lt;br /&gt;
http://www.mediawiki.org/wiki/Help:Images&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Unanswered Questions&amp;lt;/h2&amp;gt;&lt;br /&gt;
* The templates are individually output by routine slashDisplay(), but how is the order of delivery determined, and how does one insure a new template goes to the right place on the page?&lt;br /&gt;
* The users home page link goes to /my/homepage. I can find no apache redirect for this nor is there a 'my' folder anywhere. I am guessing this is done in the apache perl module, through some redirects that hook into Apache innards. It is hard to be sure what script is actually being called first. I am assuming it is users. Once an edit is made, you are in /users.pl without /my/&lt;br /&gt;
* Two users scripts, users,users2 Am guesssing users2 is for the d2 interface we are not using, since the forms on the page call users.pl&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Got tired of scrolling through pages of perl code just to see what subs were in a module&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So wrote this, now in /usr/local/sbin/listsubs.sh:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[root@slashcode Slash]# listsubs.sh Admin.pm&lt;br /&gt;
Admin.pm:&lt;br /&gt;
    addSpriteForSid, ajax_authorbox, ajax_learnword, ajax_neverdisplay, &lt;br /&gt;
    ajax_perfbox, ajax_signoff, ajax_signoffbox, ajax_slashdbox, &lt;br /&gt;
    ajax_storyadminbox, ajax_sub_memory, DESTROY, extractRelatedStoriesFromForm, &lt;br /&gt;
    findTheTime, getAccesslogAbusersByID, getAccesslogMaxID, get_ispell_comments, &lt;br /&gt;
    getRecentSubs, getRecentWebheads, getRelated, getSignoffData, &lt;br /&gt;
    getStorySignoffs, getStoryThumbLargeLink, grantStoryPostingAchievements, otherLinks, &lt;br /&gt;
    relatedLinks, showAdminTodo, showAuthorActivityBox, showPerformanceBox, &lt;br /&gt;
    showSignoffBox, showSlashdBox, showStoryAdminBox, write_to_temp_file, &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also will work from a list, as in&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ls *.pm &amp;gt; list.tst&lt;br /&gt;
listsubs.sh &amp;lt; list.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Maybe someone else will find it useful as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Order css files are loaded when simple switch on user prefs page is selected viewing main page main page&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* base.css?T_2_5_0_272 The numbers are the slash verion number (from one of the docs).&lt;br /&gt;
* slashcode.css?T_2_5__0_272&lt;br /&gt;
* slashcode_lite.css?T_2_5__0_272&lt;br /&gt;
* slashcode_lite.css?T_2_5__0_272 (appears to be loading this twice,why?)&lt;br /&gt;
* print.cssT_2_5__0_272&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow a page link from the main page to an individual article page &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Link: http://soylentnews.org/article.pl?sid=14/02/18/0336229&lt;br /&gt;
* article.pl is foind in slash/themes/slashcode/htdocs/article.pl So 'slashcode' is treated as a theme.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;article.pl&amp;lt;/h2&amp;gt;&lt;br /&gt;
The stuff of interest to us&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
use Slash;  -------- located in /local/lib64/perl5/slash.pm&lt;br /&gt;
use Slash::Display;     &lt;br /&gt;
use Slash::Utility;&lt;br /&gt;
&lt;br /&gt;
sub main {&lt;br /&gt;
        my $slashdb   = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user      = getCurrentUser();&lt;br /&gt;
        my $form      = getCurrentForm();&lt;br /&gt;
        my $gSkin     = getCurrentSkin();&lt;br /&gt;
         &lt;br /&gt;
        my $story;&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
                # Make sure the reader is viewing this story in the&lt;br /&gt;
                # proper skin.&lt;br /&gt;
                my $cur_skid = determineCurrentSkin();&lt;br /&gt;
                if ($story-&amp;gt;{primaryskid} != $cur_skid) {&lt;br /&gt;
                        my $cur_skin = $reader-&amp;gt;getSkin($cur_skid);&lt;br /&gt;
                        my $story_skin = $reader-&amp;gt;getSkin($story-&amp;gt;{primaryskid});&lt;br /&gt;
                        if ($story_skin &amp;amp;&amp;amp; $story_skin-&amp;gt;{rootdir}&lt;br /&gt;
                                &amp;amp;&amp;amp; $story_skin-&amp;gt;{rootdir} ne $cur_skin-&amp;gt;{rootdir})$&lt;br /&gt;
                                redirect(&amp;quot;$story_skin-&amp;gt;{rootdir}$ENV{REQUEST_URI}&amp;quot;$&lt;br /&gt;
                                return;&lt;br /&gt;
&lt;br /&gt;
               # XXXSECTIONTOPICS this needs to be updated&lt;br /&gt;
                my $SECT = $reader-&amp;gt;getSection($story-&amp;gt;{section});&lt;br /&gt;
                # This should be a getData call for title&lt;br /&gt;
                my $title = &amp;quot;$constants-&amp;gt;{sitename} | $story-&amp;gt;{title}&amp;quot;;&lt;br /&gt;
                if ($gSkin-&amp;gt;{name} &amp;amp;&amp;amp; $gSkin-&amp;gt;{name} eq &amp;quot;idle&amp;quot;) {&lt;br /&gt;
                        $title = &amp;quot;$gSkin-&amp;gt;{hostname} | $story-&amp;gt;{title}&amp;quot;;&lt;br /&gt;
                &lt;br /&gt;
if (my $pollbooth_db = getObject('Slash::PollBooth')) {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
slashDisplay('display', {&lt;br /&gt;
                        poll                    =&amp;gt; $pollbooth,&lt;br /&gt;
                        section                 =&amp;gt; $SECT,&lt;br /&gt;
                        section_block           =&amp;gt; $reader-&amp;gt;getBlock($SECT-&amp;gt;{secti$&lt;br /&gt;
                        show_poll               =&amp;gt; $pollbooth ? 1 : 0,&lt;br /&gt;
                        story                   =&amp;gt; $story,&lt;br /&gt;
                        stories                 =&amp;gt; \%stories,&lt;br /&gt;
                });&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
               my $called_pc = 0;&lt;br /&gt;
                if ($story-&amp;gt;{discussion}) {&lt;br /&gt;
                        # Still not happy with this logic -Brian&lt;br /&gt;
                        my $discussion = $reader-&amp;gt;getDiscussion($story-&amp;gt;{discussio$&lt;br /&gt;
&lt;br /&gt;
                        }&lt;br /&gt;
                        # If no comments ever have existed and commentstatus is di$&lt;br /&gt;
                        # just skip the display of the comment header bar -Brian&lt;br /&gt;
&lt;br /&gt;
                               &amp;amp;&amp;amp;  $discussion-&amp;gt;{commentstatus} eq 'disabled'&lt;br /&gt;
                        )) {&lt;br /&gt;
                                printComments($discussion);&lt;br /&gt;
                                $called_pc = 1;&lt;br /&gt;
                        }&lt;br /&gt;
                 if (!$called_pc &amp;amp;&amp;amp; $form-&amp;gt;{ssi} &amp;amp;&amp;amp; $form-&amp;gt;{ssi} eq 'yes' &amp;amp;&amp;amp; $form-$&lt;br /&gt;
                        # This is a real hack, we're kind of skipping down&lt;br /&gt;
                        # two levels of code.  But the cchp printing is an&lt;br /&gt;
                        # important optimization;  we avoid having to do&lt;br /&gt;
                        # multiple expensive comment selects.  One problem&lt;br /&gt;
                        # is that if there's no discussion with a story,&lt;br /&gt;
                        # printComments() doesn't get called, which means&lt;br /&gt;
                        # selectComments() doesn't get called, which means&lt;br /&gt;
                        # the cchp file won't be written.  If article.pl&lt;br /&gt;
                       # is being called by slashd, and we need to write&lt;br /&gt;
                        # that file, then here's where we print an empty&lt;br /&gt;
                        # file that will satisfy slashd. - Jamie&lt;br /&gt;
&lt;br /&gt;
                        Slash::Utility::Comments::_print_cchp({ stoid =&amp;gt; &amp;quot;dummy&amp;quot; }$&lt;br /&gt;
                }&lt;br /&gt;
        } else {&lt;br /&gt;
                header('Error', $form-&amp;gt;{section}) or return;&lt;br /&gt;
       &lt;br /&gt;
       my $plugins = $slashdb-&amp;gt;getDescriptions('plugins');&lt;br /&gt;
        if (!$user-&amp;gt;{is_anon} &amp;amp;&amp;amp; $plugins-&amp;gt;{Tags} &amp;amp;&amp;amp; $story) {&lt;br /&gt;
                my $tagsdb = getObject('Slash::Tags');&lt;br /&gt;
                $tagsdb-&amp;gt;markViewed($user-&amp;gt;{uid},&lt;br /&gt;
                        $reader-&amp;gt;getGlobjidCreate('stories', $story-&amp;gt;{stoid}));&lt;br /&gt;
        }&lt;br /&gt;
                        &lt;br /&gt;
        footer();&lt;br /&gt;
        if ($story) {&lt;br /&gt;
                writeLog($story-&amp;gt;{sid} || $sid);&lt;br /&gt;
        } else { &lt;br /&gt;
                writeLog($sid);&lt;br /&gt;
&lt;br /&gt;
               &lt;br /&gt;
createEnvironment();&lt;br /&gt;
main();  &lt;br /&gt;
1; &lt;br /&gt;
&lt;br /&gt;
(EOF)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Slash/DB/MySQL/MySQL.pm&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
479 sub getCSS {&lt;br /&gt;
480         my($self, $layout) = @_;&lt;br /&gt;
481         my $user = getCurrentUser();&lt;br /&gt;
482         my $page = $user-&amp;gt;{currentPage};&lt;br /&gt;
483         my $skin = getCurrentSkin('name');&lt;br /&gt;
484         my $admin = $user-&amp;gt;{is_admin};&lt;br /&gt;
485         my $theme = ($user-&amp;gt;{simpledesign} || $user-&amp;gt;{pda}) ? &amp;quot;light&amp;quot; : $user-&amp;gt;{css_theme};&lt;br /&gt;
486         my $secure = apacheConnectionSSL();&lt;br /&gt;
487         $layout ||= '';&lt;br /&gt;
488         my $constants = getCurrentStatic();&lt;br /&gt;
489&lt;br /&gt;
490         my $expire_time = $constants-&amp;gt;{css_expire} || 3600;&lt;br /&gt;
491         $expire_time += int(rand(60)) if $expire_time;&lt;br /&gt;
492         _genericCacheRefresh($self, 'css', $expire_time);&lt;br /&gt;
493         _genericCacheRefresh($self, 'css_pages', $expire_time);&lt;br /&gt;
494         _genericCacheRefresh($self, 'css_skins', $expire_time);&lt;br /&gt;
495         _genericCacheRefresh($self, 'css_themes', $expire_time);&lt;br /&gt;
496&lt;br /&gt;
497         my $css_ref             = $self-&amp;gt;{_css_cache} ||= {};&lt;br /&gt;
498         my $css_pages_ref       = $self-&amp;gt;{_css_pages_cache};&lt;br /&gt;
499         my $css_skins_ref       = $self-&amp;gt;{_css_skins_cache};&lt;br /&gt;
500         my $css_themes_ref      = $self-&amp;gt;{_css_themes_cache};&lt;br /&gt;
501         my $css_layouts_ref     = $self-&amp;gt;{_css_layouts_cache};&lt;br /&gt;
502&lt;br /&gt;
503         $css_pages_ref = $self-&amp;gt;getCSSValuesHashForCol('page') if !$css_pages_ref;&lt;br /&gt;
504         $css_skins_ref = $self-&amp;gt;getCSSValuesHashForCol('skin') if !$css_skins_ref;&lt;br /&gt;
505         $css_themes_ref = $self-&amp;gt;getCSSValuesHashForCol('theme') if !$css_themes_ref;&lt;br /&gt;
506         $css_layouts_ref = $self-&amp;gt;getCSSValuesHashForCol('layout') if !$css_layouts_ref;&lt;br /&gt;
507&lt;br /&gt;
508         my $lowbandwidth = ($user-&amp;gt;{lowbandwidth} || $user-&amp;gt;{pda}) ? &amp;quot;yes&amp;quot; : &amp;quot;no&amp;quot;;&lt;br /&gt;
509&lt;br /&gt;
510         $page   = '' if !$css_pages_ref-&amp;gt;{$page};&lt;br /&gt;
511         $skin   = '' if !$css_skins_ref-&amp;gt;{$skin};&lt;br /&gt;
512         $theme  = '' if !$css_themes_ref-&amp;gt;{$theme};&lt;br /&gt;
513         $layout = '' if !$css_layouts_ref-&amp;gt;{$layout};&lt;br /&gt;
514&lt;br /&gt;
515         return $css_ref-&amp;gt;{$skin}{$page}{$admin}{$theme}{$lowbandwidth}{$layout}{$secure}&lt;br /&gt;
516                 if exists $css_ref-&amp;gt;{$skin}{$page}{$admin}{$theme}{$lowbandwidth}{$layout}{$secure};&lt;br /&gt;
517&lt;br /&gt;
518         my @clauses;&lt;br /&gt;
519&lt;br /&gt;
520         my $page_q = $self-&amp;gt;sqlQuote($page);&lt;br /&gt;
521         my $page_in = $page ? &amp;quot;(page = '' or page = $page_q)&amp;quot; : &amp;quot;page = ''&amp;quot;;&lt;br /&gt;
522         push @clauses, $page_in;&lt;br /&gt;
523&lt;br /&gt;
524         my $skin_in = $skin ? &amp;quot;(skin = '' or skin = '$skin')&amp;quot; : &amp;quot;skin = ''&amp;quot;;&lt;br /&gt;
525         push @clauses, $skin_in;&lt;br /&gt;
526&lt;br /&gt;
527         push @clauses, &amp;quot;admin='no'&amp;quot; if !$admin;&lt;br /&gt;
528&lt;br /&gt;
529         my $theme_q  = $self-&amp;gt;sqlQuote($theme);&lt;br /&gt;
530         my $theme_in = $theme ? &amp;quot;(theme='' or theme=$theme_q)&amp;quot; : &amp;quot;theme=''&amp;quot;;&lt;br /&gt;
531         push @clauses, $theme_in;&lt;br /&gt;
532&lt;br /&gt;
533         push @clauses, &amp;quot;lowbandwidth='$lowbandwidth'&amp;quot; if $lowbandwidth eq &amp;quot;no&amp;quot;;&lt;br /&gt;
534&lt;br /&gt;
535         my $layout_q = $self-&amp;gt;sqlQuote($layout);&lt;br /&gt;
536         push @clauses, &amp;quot;layout=$layout_q&amp;quot;;&lt;br /&gt;
537&lt;br /&gt;
538         my $where = &amp;quot;css.ctid=css_type.ctid AND &amp;quot;;&lt;br /&gt;
539         $where .= join ' AND ', @clauses;&lt;br /&gt;
540&lt;br /&gt;
541         my $css = $self-&amp;gt;sqlSelectAllHashrefArray(&amp;quot;rel,type,media,file,title,ie_cond,skin&amp;quot;,&lt;br /&gt;
542                 &amp;quot;css, css_type&amp;quot;, $where, &amp;quot;ORDER BY css_type.ordernum, css.ordernum&amp;quot;);&lt;br /&gt;
543         if ($secure) {&lt;br /&gt;
544                 for my $hr (@$css) { $hr-&amp;gt;{file} =~ s/\.css/.ssl.css/ }&lt;br /&gt;
545         }&lt;br /&gt;
546         &lt;br /&gt;
547         $css_ref-&amp;gt;{$skin}{$page}{$admin}{$theme}{$lowbandwidth}{$layout}{$secure} = $css;&lt;br /&gt;
548         return $css;&lt;br /&gt;
549 }&lt;br /&gt;
550 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Slash/Apache/User/User.pm&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
548 {&lt;br /&gt;
549 my %ops_my = (&lt;br /&gt;
550         inbox           =&amp;gt; { args =&amp;gt; 'op=list', uri =&amp;gt; 'messages.pl' },&lt;br /&gt;
551         # XXX change messages to be same as /inbox, move this to /my/preferences/messages&lt;br /&gt;
552         messages        =&amp;gt; { args =&amp;gt; 'op=display_prefs', uri =&amp;gt; 'messages.pl' },&lt;br /&gt;
553         comments        =&amp;gt; { args =&amp;gt; 'op=editcomm' },&lt;br /&gt;
554         homepage        =&amp;gt; { args =&amp;gt; 'op=edithome' },&lt;br /&gt;
555         password        =&amp;gt; { args =&amp;gt; 'op=changeprefs', uri =&amp;gt; 'login.pl' },&lt;br /&gt;
556         logout          =&amp;gt; { args =&amp;gt; 'op=userclose', uri =&amp;gt; 'login.pl' },&lt;br /&gt;
557         misc            =&amp;gt; { args =&amp;gt; 'op=editmiscopts' },&lt;br /&gt;
558         amigos          =&amp;gt; { args =&amp;gt; 'op=friendview', uri =&amp;gt; 'journal.pl' },&lt;br /&gt;
559         bookmarks       =&amp;gt; { args =&amp;gt; 'op=showbookmarks' },&lt;br /&gt;
560         firehose        =&amp;gt; { args =&amp;gt; 'op=userfirehose' },&lt;br /&gt;
561         preferences     =&amp;gt; { args =&amp;gt; 'op=displayprefs', uri =&amp;gt; 'preferences.pl' },&lt;br /&gt;
562         tags            =&amp;gt; { args =&amp;gt; 'op=showtags' },&lt;br /&gt;
563         journal         =&amp;gt; { args =&amp;gt; 'op=list', uri =&amp;gt; 'journal.pl' },&lt;br /&gt;
564&lt;br /&gt;
565         friends         =&amp;gt; { args =&amp;gt; 'op=friends', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
566         fans            =&amp;gt; { args =&amp;gt; 'op=fans', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
567         freaks          =&amp;gt; { args =&amp;gt; 'op=freaks', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
568         foes            =&amp;gt; { args =&amp;gt; 'op=foes', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
569         zoo             =&amp;gt; { args =&amp;gt; 'op=all', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
570&lt;br /&gt;
571         default         =&amp;gt; { args =&amp;gt; 'op=edituser' }&lt;br /&gt;
572 );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;sql/mysql/defaults.sql&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 134 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','base.css','','','','no','',1,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
135 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','comments','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
136 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','article','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
137 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','print','print.css','','','','no','',5,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
138 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','admin.css','','','','yes','',1,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
139 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','pollBooth','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
140 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode_lite.css','','','','no','light',4,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
141 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','journal','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
142 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode_lite.css','','','','no','light',4,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
143 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','journal','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
144 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode.css','','','','no','',3,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
145 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','metamod','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
146 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode_low_bw.css','','','','no','',4,99, &amp;quot;&amp;quot;,&amp;quot;yes&amp;quot;);&lt;br /&gt;
147&lt;br /&gt;
148 #&lt;br /&gt;
149 # Dumping data for table 'css_type'&lt;br /&gt;
150 #&lt;br /&gt;
151 INSERT INTO css_type (ctid, name, ordernum) VALUES (1,'base',1);&lt;br /&gt;
152 INSERT INTO css_type (ctid, name, ordernum) VALUES (2,'page',2);&lt;br /&gt;
153 INSERT INTO css_type (ctid, name, ordernum) VALUES (3,'theme',3);&lt;br /&gt;
154 INSERT INTO css_type (ctid, name, ordernum) VALUES (4,'user_theme',5);&lt;br /&gt;
155 INSERT INTO css_type (ctid, name, ordernum) VALUES (5,'print',6);&lt;br /&gt;
156 INSERT INTO css_type (ctid, name, ordernum) VALUES (6,'skin',4);&lt;br /&gt;
157 INSERT INTO css_type (ctid, name, ordernum) VALUES (7,'handheld',7);&lt;br /&gt;
158 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;plugins/FireHose/mysql_dump.sql &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','firehose','no','',2,0, '');&lt;br /&gt;
==&amp;gt; INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','users','no','',2,0, '');&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','calendar.css','','','firehose','no','',2,0, '');&lt;br /&gt;
==&amp;gt; INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','users','no','',2,0, '');&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','firehose','no','',2,0, '');&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','index2','no','',2,0, ''); &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;I believe that we are not using FireHose but it was needed to make the site work.  As can be seen in the db dump above, it adds the firehose.css file to any of the user pages. Need to verify and then see if we can get the db purged of these values.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Good work. The question in my mind is why the heck css for one module has any effect *at all* on any other module. Talk about lack of localization...-AG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;I think there was some firehose slashboxes that showed up in the users pages.  They needed to be wider than the default, so they patched those pages with the firehose.css. Next step is to get a current dump of the two css tables. The important part is I know what files are for what parts of the code.  Slashcode.css is the theme css file slashcode-lite.css is the style file that is called by a user pref.  This means I need to fix comments.css to remove the theme elements I inserted and put them in the theme file.  I still need to make sure that the changes that benefited the Simplified theme stay intact. -EP&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;fonts&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
This is what I usually start with:&lt;br /&gt;
   font-family: Helvetica,Geneva,Arial,Verdana,sans-serif;&lt;br /&gt;
&lt;br /&gt;
Too many can lead to a LOT of testing being required. As can the wrong order. ;-)&lt;br /&gt;
&lt;br /&gt;
Others I have used in the past:&lt;br /&gt;
font-family: Geneva,Arial,Verdana,Helvetica,Chicago,sans-serif;&lt;br /&gt;
font-family: Helvetica,Arial,Geneva,Chicago,Verdana,sans-serif;&lt;br /&gt;
font-family: Helvetica,Geneva,Arial,Verdana,sans-serif;&lt;br /&gt;
-AG&lt;br /&gt;
&lt;br /&gt;
I have used:&lt;br /&gt;
font-family: Verdana, Geneva, &amp;quot;Bitstream Vera Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif;&lt;br /&gt;
&lt;br /&gt;
Note this has Linux fonts as well to help with these users.&lt;br /&gt;
-EP&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;User Menu&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','Logout','logout','/my/logout',1,0,10);&lt;br /&gt;
124 INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','Preferences','preferences','/users.pl?op=edituser',1,0,20);&lt;br /&gt;
125 INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','Password','password','[% constants.real_rootdir %]/my/password',1,0,40);&lt;br /&gt;
126 INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','~[% user.nickname | strip_literal %] ([% user.uid %])','me','/~[% user.nickname | fixparam %]',1,0,50);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; This code sets up the upper menu on http://slashcott.org/users.pl which is linked from your userid on the home page.  The Preferences is wrong, as it needs to be all three links: Info, Homepage, Comments.  This will allow users with low-bandwidth option set to easily get to the setting to unset low-bandwidth. -EP&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Refernces to css in the man pages in /usr/local/share/man/man3&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
grep -i css *&lt;br /&gt;
&lt;br /&gt;
HTML::CalendarMonth.3pm:.IP &amp;quot;enable_css&amp;quot; 4&lt;br /&gt;
HTML::CalendarMonth.3pm:.IX Item &amp;quot;enable_css&amp;quot;&lt;br /&gt;
HTML::CalendarMonth.3pm:Set some handy \s-1CSS\s0 class attributes on elements, enabled by default.&lt;br /&gt;
HTML::CalendarMonth.3pm:.IP &amp;quot;semantic_css&amp;quot; 4&lt;br /&gt;
HTML::CalendarMonth.3pm:.IX Item &amp;quot;semantic_css&amp;quot;&lt;br /&gt;
HTML::CalendarMonth.3pm:Sets some additional \s-1CSS\s0 class attributes on elements, disabled by&lt;br /&gt;
HTML::CalendarMonth.3pm:.IP &amp;quot;\fIdefault_css()\fR&amp;quot; 4&lt;br /&gt;
HTML::CalendarMonth.3pm:.IX Item &amp;quot;default_css()&amp;quot;&lt;br /&gt;
HTML::CalendarMonth.3pm:document in conjunction with the classes assigned to elements when css&lt;br /&gt;
HTML::ElementSuper.3pm:might be when you'd like to assign multiple \s-1CSS\s0 classes to a single&lt;br /&gt;
HTML::PopupTreeSelect.3pm:.IP &amp;quot;include_css (optional)&amp;quot; 4&lt;br /&gt;
HTML::PopupTreeSelect.3pm:.IX Item &amp;quot;include_css (optional)&amp;quot;&lt;br /&gt;
HTML::PopupTreeSelect.3pm:Set this to 0 and the default \s-1CSS\s0 will not be included in the widget&lt;br /&gt;
HTML::PopupTreeSelect.3pm:output.  This allows you to include your own \s-1CSS\s0 which will be used by&lt;br /&gt;
HTML::PopupTreeSelect.3pm:your widget.  Modifying the \s-1CSS\s0 will allow you to control the fonts,&lt;br /&gt;
HTML::PopupTreeSelect.3pm:If you run the widget with include_css set to 1 then you can use that&lt;br /&gt;
HTML::Tree::Scanning.3pm:tagging, such is as useful in \s-1CSS\s0 \*(-- note the&lt;br /&gt;
Module::Build::API.3pm:.IP &amp;quot;\fIhtml_css()\fR&amp;quot; 4&lt;br /&gt;
Module::Build::API.3pm:.IX Item &amp;quot;html_css()&amp;quot;&lt;br /&gt;
TAP::Parser::YAMLish::Reader.3pm:YAML::Tiny, \s-1YAML\s0, YAML::Syck, Config::Tiny, CSS::Tiny,&lt;br /&gt;
TAP::Parser::YAMLish::Writer.3pm:YAML::Tiny, \s-1YAML\s0, YAML::Syck, Config::Tiny, CSS::Tiny,&lt;br /&gt;
Template::Iterator.3pm:You can then style the \f(CW\*(C`tr.odd\*(C'\fR and \f(CW\*(C`tr.even\*(C'\fR elements using \s-1CSS:\s0&lt;br /&gt;
Template::Toolkit.3pm:kind of text documents: \s-1HTML\s0, \s-1XML\s0, \s-1CSS\s0, Javascript, Perl code, plain text,&lt;br /&gt;
Template::Tutorial::Web.3pm:kind of content they contain.  So you can use \s-1TT\s0 to generate \s-1HTML\s0, \s-1XML\s0, \s-1CSS\s0,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;CSS commit for Feb 23&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Changes to most of the css files to set all sizes to em (some were in px and broke flow). Changed the font-family to a more friendly chain for all platforms, and remove all other font-faimily calls from the code. Changed font sizes from % to ems and adjusted size for some of the main elements. Fix a issue with the middle column size caused by firehose.css. Many small fixes to spacing over many places.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moved all of the slashcode theme items into the slashcode.cssraw file. Some were in comments.cssraw due to some previous work I did.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On article body and comment body, made the font size a bit smaller. Also on comments body set the margins to be smaller.&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;-EP&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=PerlModuleUsers&amp;diff=5370</id>
		<title>PerlModuleUsers</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=PerlModuleUsers&amp;diff=5370"/>
		<updated>2014-03-01T18:59:27Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: Created page with &amp;quot;CssWork parent    &amp;lt;h2&amp;gt;Source of users.pl&amp;lt;/h2&amp;gt; &amp;lt;pre&amp;gt; #!/usr/bin/perl -w # This code is a part of Slash, and is released under the GPL. # Copyright 1997-2005 by Open Source ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[CssWork]] parent&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Source of users.pl&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/bin/perl -w&lt;br /&gt;
# This code is a part of Slash, and is released under the GPL.&lt;br /&gt;
# Copyright 1997-2005 by Open Source Technology Group. See README&lt;br /&gt;
# and COPYING for more information, or see http://slashcode.com/.&lt;br /&gt;
# $Id$&lt;br /&gt;
&lt;br /&gt;
use strict;&lt;br /&gt;
use Digest::MD5 'md5_hex';&lt;br /&gt;
use Slash;&lt;br /&gt;
use Slash::Display;&lt;br /&gt;
use Slash::Utility;&lt;br /&gt;
use Slash::Constants qw(:messages);&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub main {&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $gSkin = getCurrentSkin();&lt;br /&gt;
        my $formname = $0;&lt;br /&gt;
        $formname =~ s/.*\/(\w+)\.pl/$1/;&lt;br /&gt;
&lt;br /&gt;
        my $error_flag = 0;&lt;br /&gt;
        my $formkey = $form-&amp;gt;{formkey};&lt;br /&gt;
&lt;br /&gt;
        my $suadmin_flag = $user-&amp;gt;{seclev} &amp;gt;= 10000 ? 1 : 0 ;&lt;br /&gt;
        my $postflag = $user-&amp;gt;{state}{post};&lt;br /&gt;
        my $op = lc($form-&amp;gt;{op});&lt;br /&gt;
&lt;br /&gt;
        # savepasswd is a special case, because once it's called, you&lt;br /&gt;
        # have to reload the form, and you don't want to do any checks if&lt;br /&gt;
        # you've just saved.&lt;br /&gt;
        my $savepass_flag = $op eq 'savepasswd' ? 1 : 0 ;&lt;br /&gt;
&lt;br /&gt;
        my $ops = {&lt;br /&gt;
                admin           =&amp;gt;  {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;adminDispatch,&lt;br /&gt;
                        seclev          =&amp;gt; 10000,       # if this should be lower,&lt;br /&gt;
                                                        # then something else is&lt;br /&gt;
                                                        # broken, because it allows&lt;br /&gt;
                                                        # anyone with this seclev&lt;br /&gt;
                                                        # to change their own seclev&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        # just in case we need it for something else, we have it ...&lt;br /&gt;
                        checks          =&amp;gt; [ qw (generate_formkey) ],&lt;br /&gt;
                },&lt;br /&gt;
#               userlogin       =&amp;gt;  {&lt;br /&gt;
#                       function        =&amp;gt; \&amp;amp;showInfo,&lt;br /&gt;
#                       seclev          =&amp;gt; 1,&lt;br /&gt;
#                       formname        =&amp;gt; $formname,&lt;br /&gt;
#                       checks          =&amp;gt; [],&lt;br /&gt;
#                       tab_selected_1  =&amp;gt; 'me',&lt;br /&gt;
#               },&lt;br /&gt;
                no_user =&amp;gt;  {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;noUser,&lt;br /&gt;
                        seclev          =&amp;gt; 0,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                },&lt;br /&gt;
                userinfo        =&amp;gt;  {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;showInfo,&lt;br /&gt;
                        #I made this change, not all sites are going to care. -Brian&lt;br /&gt;
                        seclev          =&amp;gt; $constants-&amp;gt;{users_show_info_seclev},&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'me',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'info',&lt;br /&gt;
                },&lt;br /&gt;
                userfirehose    =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;showFireHose,&lt;br /&gt;
                        seclev          =&amp;gt; 0,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'me',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'firehose'&lt;br /&gt;
                },&lt;br /&gt;
                usersubmissions =&amp;gt;  {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;showSubmissions,&lt;br /&gt;
                        #I made this change, not all sites are going to care. -Brian&lt;br /&gt;
                        seclev          =&amp;gt; $constants-&amp;gt;{users_show_info_seclev},&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'me',&lt;br /&gt;
                },&lt;br /&gt;
                usercomments    =&amp;gt;  {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;showComments,&lt;br /&gt;
                        #I made this change, not all sites are going to care. -Brian&lt;br /&gt;
                        seclev          =&amp;gt; $constants-&amp;gt;{users_show_info_seclev},&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'me',&lt;br /&gt;
                },&lt;br /&gt;
                display =&amp;gt;  {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;showInfo,&lt;br /&gt;
                        #I made this change, not all sites are going to care. -Brian&lt;br /&gt;
                        seclev          =&amp;gt; $constants-&amp;gt;{users_show_info_seclev},&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'me',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'info',&lt;br /&gt;
                },&lt;br /&gt;
#               savepasswd      =&amp;gt; {&lt;br /&gt;
#                       function        =&amp;gt; \&amp;amp;savePasswd,&lt;br /&gt;
#                       seclev          =&amp;gt; 1,&lt;br /&gt;
#                       post            =&amp;gt; 1,&lt;br /&gt;
#                       formname        =&amp;gt; $formname,&lt;br /&gt;
#                       checks          =&amp;gt; [ qw (max_post_check valid_check&lt;br /&gt;
#                                               formkey_check regen_formkey) ],&lt;br /&gt;
#                       tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
#                       tab_selected_2  =&amp;gt; 'password',&lt;br /&gt;
#               },&lt;br /&gt;
                saveuseradmin   =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;saveUserAdmin,&lt;br /&gt;
                        seclev          =&amp;gt; 10000,&lt;br /&gt;
                        post            =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                },&lt;br /&gt;
                savehome        =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;saveHome,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        post            =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [ qw (valid_check&lt;br /&gt;
                                                formkey_check regen_formkey) ],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'home',&lt;br /&gt;
                },&lt;br /&gt;
                savecomm        =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;saveComm,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        post            =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [ qw (valid_check&lt;br /&gt;
                                                formkey_check regen_formkey) ],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'comments',&lt;br /&gt;
                },&lt;br /&gt;
                saveuser        =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;saveUser,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        post            =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [ qw (valid_check&lt;br /&gt;
                                                formkey_check regen_formkey) ],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'user',&lt;br /&gt;
                },&lt;br /&gt;
#               changepasswd    =&amp;gt; {&lt;br /&gt;
#                       function        =&amp;gt; \&amp;amp;changePasswd,&lt;br /&gt;
#                       seclev          =&amp;gt; 1,&lt;br /&gt;
#                       formname        =&amp;gt; $formname,&lt;br /&gt;
#                       checks          =&amp;gt; $savepass_flag ? [] :&lt;br /&gt;
#                                               [ qw (generate_formkey) ],&lt;br /&gt;
#                       tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
#                       tab_selected_2  =&amp;gt; 'password',&lt;br /&gt;
#               },&lt;br /&gt;
                editmiscopts    =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;editMiscOpts,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [ ],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'misc',&lt;br /&gt;
                },&lt;br /&gt;
                savemiscopts    =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;saveMiscOpts,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [ ],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'misc',&lt;br /&gt;
                },&lt;br /&gt;
                edituser        =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;editUser,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [ qw (generate_formkey) ],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'user',&lt;br /&gt;
                },&lt;br /&gt;
                authoredit      =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;editUser,&lt;br /&gt;
                        seclev          =&amp;gt; 10000,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                },&lt;br /&gt;
                edithome        =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;editHome,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [ qw (generate_formkey) ],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'home',&lt;br /&gt;
                },&lt;br /&gt;
                editcomm        =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;editComm,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [ qw (generate_formkey) ],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
                        tab_selected_2  =&amp;gt; 'comments',&lt;br /&gt;
                },&lt;br /&gt;
#               newuser         =&amp;gt; {&lt;br /&gt;
#                       function        =&amp;gt; \&amp;amp;newUser,&lt;br /&gt;
#                       seclev          =&amp;gt; 0,&lt;br /&gt;
#                       formname        =&amp;gt; &amp;quot;${formname}/nu&amp;quot;,&lt;br /&gt;
#                       checks          =&amp;gt; [ qw (max_post_check valid_check&lt;br /&gt;
#                                               formkey_check regen_formkey) ],&lt;br /&gt;
#               },&lt;br /&gt;
                newuseradmin    =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;newUserForm,&lt;br /&gt;
                        seclev          =&amp;gt; 10000,&lt;br /&gt;
                        formname        =&amp;gt; &amp;quot;${formname}/nu&amp;quot;,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                },&lt;br /&gt;
                previewbox      =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;previewSlashbox,&lt;br /&gt;
                        seclev          =&amp;gt; 0,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                },&lt;br /&gt;
#               mailpasswd      =&amp;gt; {&lt;br /&gt;
#                       function        =&amp;gt; \&amp;amp;mailPasswd,&lt;br /&gt;
#                       seclev          =&amp;gt; 0,&lt;br /&gt;
#                       formname        =&amp;gt; &amp;quot;${formname}/mp&amp;quot;,&lt;br /&gt;
#                       checks          =&amp;gt; [ qw (max_post_check valid_check&lt;br /&gt;
#                                               interval_check formkey_check ) ],&lt;br /&gt;
#                       tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
#                       tab_selected_2  =&amp;gt; 'password',&lt;br /&gt;
#               },&lt;br /&gt;
                validateuser    =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;validateUser,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; ['regen_formkey'],&lt;br /&gt;
                },&lt;br /&gt;
                showtags =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;showTags,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        tab_selected    =&amp;gt; 'tags',&lt;br /&gt;
                },&lt;br /&gt;
                showbookmarks =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;showBookmarks,&lt;br /&gt;
                        seclev          =&amp;gt; 0,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        tab_selected    =&amp;gt; 'bookmarks',&lt;br /&gt;
                },&lt;br /&gt;
                edittags =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;editTags,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        tab_selected    =&amp;gt; 'tags',&lt;br /&gt;
                },&lt;br /&gt;
                savetags =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;saveTags,&lt;br /&gt;
                        seclev          =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        tab_selected    =&amp;gt; 'tags',&lt;br /&gt;
                },&lt;br /&gt;
#               userclose       =&amp;gt;  {&lt;br /&gt;
#                       function        =&amp;gt; \&amp;amp;displayForm,&lt;br /&gt;
#                       seclev          =&amp;gt; 0,&lt;br /&gt;
#                       formname        =&amp;gt; $formname,&lt;br /&gt;
#                       checks          =&amp;gt; [],&lt;br /&gt;
#               },&lt;br /&gt;
#               newuserform     =&amp;gt; {&lt;br /&gt;
#                       function        =&amp;gt; \&amp;amp;displayForm,&lt;br /&gt;
#                       seclev          =&amp;gt; 0,&lt;br /&gt;
#                       formname        =&amp;gt; &amp;quot;${formname}/nu&amp;quot;,&lt;br /&gt;
#                       checks          =&amp;gt; [ qw (max_post_check&lt;br /&gt;
#                                               generate_formkey) ],&lt;br /&gt;
#               },&lt;br /&gt;
#               mailpasswdform  =&amp;gt; {&lt;br /&gt;
#                       function        =&amp;gt; \&amp;amp;displayForm,&lt;br /&gt;
#                       seclev          =&amp;gt; 0,&lt;br /&gt;
#                       formname        =&amp;gt; &amp;quot;${formname}/mp&amp;quot;,&lt;br /&gt;
#                       checks          =&amp;gt; [ qw (max_post_check&lt;br /&gt;
#                                               generate_formkey) ],&lt;br /&gt;
#                       tab_selected_1  =&amp;gt; 'preferences',&lt;br /&gt;
#                       tab_selected_2  =&amp;gt; 'password',&lt;br /&gt;
#               },&lt;br /&gt;
                displayform     =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;displayForm,&lt;br /&gt;
                        seclev          =&amp;gt; 0,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [ qw (generate_formkey) ],&lt;br /&gt;
                        tab_selected_1  =&amp;gt; 'me',&lt;br /&gt;
                },&lt;br /&gt;
                listreadonly =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;listReadOnly,&lt;br /&gt;
                        seclev          =&amp;gt; 100,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        adminmenu       =&amp;gt; 'security',&lt;br /&gt;
                        tab_selected    =&amp;gt; 'readonly',&lt;br /&gt;
                },&lt;br /&gt;
                listbanned =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;listBanned,&lt;br /&gt;
                        seclev          =&amp;gt; 100,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        adminmenu       =&amp;gt; 'security',&lt;br /&gt;
                        tab_selected    =&amp;gt; 'banned',&lt;br /&gt;
                },&lt;br /&gt;
                topabusers      =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;topAbusers,&lt;br /&gt;
                        seclev          =&amp;gt; 100,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                        adminmenu       =&amp;gt; 'security',&lt;br /&gt;
                        tab_selected    =&amp;gt; 'abusers',&lt;br /&gt;
                },&lt;br /&gt;
                listabuses      =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;listAbuses,&lt;br /&gt;
                        seclev          =&amp;gt; 100,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; [],&lt;br /&gt;
                },&lt;br /&gt;
                force_acct_verify =&amp;gt; {&lt;br /&gt;
                        function        =&amp;gt; \&amp;amp;forceAccountVerify,&lt;br /&gt;
                        seclev          =&amp;gt; 100,&lt;br /&gt;
                        post            =&amp;gt; 1,&lt;br /&gt;
                        formname        =&amp;gt; $formname,&lt;br /&gt;
                        checks          =&amp;gt; []&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
        } ;&lt;br /&gt;
&lt;br /&gt;
        # Note this is NOT the default op.  &amp;quot;userlogin&amp;quot; or &amp;quot;userinfo&amp;quot; is&lt;br /&gt;
        # the default op, and it's set either 5 lines down or about 100&lt;br /&gt;
        # lines down, depending.  Yes, that's dumb.  Yes, we should&lt;br /&gt;
        # change it.  It would require tracing through a fair bit of logic&lt;br /&gt;
        # though and I don't have the time right now. - Jamie&lt;br /&gt;
        $ops-&amp;gt;{default} = $ops-&amp;gt;{displayform};&lt;br /&gt;
        for (qw(newuser newuserform mailpasswd mailpasswdform changepasswd savepasswd userlogin userclose)) {&lt;br /&gt;
                $ops-&amp;gt;{$_} = $ops-&amp;gt;{default};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $errornote = &amp;quot;&amp;quot;;&lt;br /&gt;
        if ($form-&amp;gt;{op} &amp;amp;&amp;amp; ! defined $ops-&amp;gt;{$op}) {&lt;br /&gt;
                $errornote .= getError('bad_op', { op =&amp;gt; $form-&amp;gt;{op}}, 0, 1);&lt;br /&gt;
                $op = $user-&amp;gt;{is_anon} ? 'userlogin' : 'userinfo'; &lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($op eq 'userlogin' &amp;amp;&amp;amp; ! $user-&amp;gt;{is_anon}) {&lt;br /&gt;
                redirect(cleanRedirectUrl($form-&amp;gt;{returnto} || ''));&lt;br /&gt;
                return;&lt;br /&gt;
&lt;br /&gt;
        # this will only redirect if it is a section-based rootdir with&lt;br /&gt;
        # its rootdir different from real_rootdir&lt;br /&gt;
        } elsif ($op eq 'userclose' &amp;amp;&amp;amp; $gSkin-&amp;gt;{rootdir} ne $constants-&amp;gt;{real_rootdir}) {&lt;br /&gt;
                redirect($constants-&amp;gt;{real_rootdir} . '/login.pl?op=userclose');&lt;br /&gt;
                return;&lt;br /&gt;
&lt;br /&gt;
        } elsif ($op =~ /^(?:newuser|newuserform|mailpasswd|mailpasswdform|changepasswd|savepasswd|userlogin|userclose|displayform)$/) {&lt;br /&gt;
                my $op = $form-&amp;gt;{op};&lt;br /&gt;
                $op = 'changeprefs' if $op eq 'changepasswd';&lt;br /&gt;
                $op = 'saveprefs'   if $op eq 'savepasswd';&lt;br /&gt;
                redirect($constants-&amp;gt;{real_rootdir} . '/login.pl?op=' . $op);&lt;br /&gt;
                return;&lt;br /&gt;
&lt;br /&gt;
        # never get here now&lt;br /&gt;
        } elsif ($op eq 'savepasswd') {&lt;br /&gt;
                my $error_flag = 0;&lt;br /&gt;
                if ($user-&amp;gt;{seclev} &amp;lt; 100) {&lt;br /&gt;
                        for my $check (@{$ops-&amp;gt;{savepasswd}{checks}}) {&lt;br /&gt;
                                # the only way to save the error message is to pass by ref&lt;br /&gt;
                                # $errornote and add the message to note (you can't print&lt;br /&gt;
                                # it out before header is called)&lt;br /&gt;
                                $error_flag = formkeyHandler($check, $formname, $formkey, \$errornote);&lt;br /&gt;
                                last if $error_flag;&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                if (! $error_flag) {&lt;br /&gt;
                        $error_flag = savePasswd({ noteref =&amp;gt; \$errornote }) ;&lt;br /&gt;
                }&lt;br /&gt;
                # change op to edituser and let fall through;&lt;br /&gt;
                # we need to have savePasswd set the cookie before&lt;br /&gt;
                # header() is called -- pudge&lt;br /&gt;
                if ($user-&amp;gt;{seclev} &amp;lt; 100 &amp;amp;&amp;amp; ! $error_flag) {&lt;br /&gt;
                        $slashdb-&amp;gt;updateFormkey($formkey, length($ENV{QUERY_STRING}));&lt;br /&gt;
                }&lt;br /&gt;
                $op = $error_flag ? 'changepasswd' : 'userinfo';&lt;br /&gt;
                $form-&amp;gt;{userfield} = $user-&amp;gt;{uid};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Figure out what the op really is.&lt;br /&gt;
        $op = 'userinfo' if (! $form-&amp;gt;{op} &amp;amp;&amp;amp; ($form-&amp;gt;{uid} || $form-&amp;gt;{nick}));&lt;br /&gt;
        $op ||= $user-&amp;gt;{is_anon} ? 'userlogin' : 'userinfo';&lt;br /&gt;
        if ($user-&amp;gt;{is_anon} &amp;amp;&amp;amp; ( ($ops-&amp;gt;{$op}{seclev} &amp;gt; 0) || ($op =~ /^newuserform|mailpasswdform|displayform$/) )) {&lt;br /&gt;
                redirect($constants-&amp;gt;{real_rootdir} . '/login.pl');&lt;br /&gt;
                return;&lt;br /&gt;
        } elsif ($user-&amp;gt;{seclev} &amp;lt; $ops-&amp;gt;{$op}{seclev}) {&lt;br /&gt;
                $op = 'userinfo';&lt;br /&gt;
        }&lt;br /&gt;
        if ($ops-&amp;gt;{$op}{post} &amp;amp;&amp;amp; !$postflag) {&lt;br /&gt;
                $op = $user-&amp;gt;{is_anon} ? 'default' : 'userinfo';&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Print the header and very top stuff on the page.  We have&lt;br /&gt;
        # three ops that (may) end up routing into showInfo(), which&lt;br /&gt;
        # needs to do some stuff before it calls header(), so for&lt;br /&gt;
        # those three, don't bother.&lt;br /&gt;
        my $header;&lt;br /&gt;
        if ($op !~ /^(userinfo|display|saveuseradmin|admin|userfirehose$)/) {&lt;br /&gt;
                my $data = {&lt;br /&gt;
                        adminmenu =&amp;gt; $ops-&amp;gt;{$op}{adminmenu} || 'admin',&lt;br /&gt;
                        tab_selected =&amp;gt; $ops-&amp;gt;{$op}{tab_selected},&lt;br /&gt;
                };&lt;br /&gt;
                header(getMessage('user_header'), '', $data) or return;&lt;br /&gt;
                # This is a hardcoded position, bad idea and should be fixed -Brian&lt;br /&gt;
                # Yeah, we should pull this into a template somewhere...&lt;br /&gt;
                print getMessage('note', { note =&amp;gt; $errornote }) if defined $errornote;&lt;br /&gt;
                $header = 1;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($constants-&amp;gt;{admin_formkeys} || $user-&amp;gt;{seclev} &amp;lt; 100) {&lt;br /&gt;
&lt;br /&gt;
                my $done = 0;&lt;br /&gt;
                $done = 1 if $op eq 'savepasswd'; # special case&lt;br /&gt;
                $formname = $ops-&amp;gt;{$op}{formname};&lt;br /&gt;
&lt;br /&gt;
                # No need for HumanConf if the constant for it is not&lt;br /&gt;
                # switched on, or if the user's karma is high enough&lt;br /&gt;
                # to get out of it.  (But for &amp;quot;newuserform,&amp;quot; the current&lt;br /&gt;
                # user's karma doesn't get them out of having to prove&lt;br /&gt;
                # they're a human for creating a *new* user.)&lt;br /&gt;
                my $options = {};&lt;br /&gt;
                if (       !$constants-&amp;gt;{plugin}{HumanConf}&lt;br /&gt;
                        || !$constants-&amp;gt;{hc}&lt;br /&gt;
                        || !$constants-&amp;gt;{hc_sw_newuser}&lt;br /&gt;
                                &amp;amp;&amp;amp; ($formname eq 'users/nu' || $op eq 'newuserform')&lt;br /&gt;
                        || !$constants-&amp;gt;{hc_sw_mailpasswd}&lt;br /&gt;
                                &amp;amp;&amp;amp; ($formname eq 'users/mp' || $op eq 'mailpasswdform')&lt;br /&gt;
                        || $user-&amp;gt;{karma} &amp;gt; $constants-&amp;gt;{hc_maxkarma}&lt;br /&gt;
                                &amp;amp;&amp;amp; !$user-&amp;gt;{is_anon}&lt;br /&gt;
                                &amp;amp;&amp;amp; !($op eq 'newuser' || $op eq 'newuserform')&lt;br /&gt;
                ) {&lt;br /&gt;
                        $options-&amp;gt;{no_hc} = 1;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                DO_CHECKS: while (!$done) {&lt;br /&gt;
                        for my $check (@{$ops-&amp;gt;{$op}{checks}}) {&lt;br /&gt;
                                $ops-&amp;gt;{$op}{update_formkey} = 1 if $check eq 'formkey_check';&lt;br /&gt;
                                $error_flag = formkeyHandler($check, $formname, $formkey,&lt;br /&gt;
                                        undef, $options);&lt;br /&gt;
                                if ($error_flag == -1) {&lt;br /&gt;
                                        # Special error:  HumanConf failed.  Go&lt;br /&gt;
                                        # back to the previous op, start over.&lt;br /&gt;
                                        if ($op =~ /^(newuser|mailpasswd)$/) {&lt;br /&gt;
                                                $op .= &amp;quot;form&amp;quot;;&lt;br /&gt;
                                                $error_flag = 0;&lt;br /&gt;
                                                next DO_CHECKS;&lt;br /&gt;
                                        }&lt;br /&gt;
                                } elsif ($error_flag) {&lt;br /&gt;
                                        $done = 1;&lt;br /&gt;
                                        last;&lt;br /&gt;
                                }&lt;br /&gt;
                        }&lt;br /&gt;
                        $done = 1;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                if (!$error_flag &amp;amp;&amp;amp; !$options-&amp;gt;{no_hc}) {&lt;br /&gt;
                        my $hc = getObject(&amp;quot;Slash::HumanConf&amp;quot;);&lt;br /&gt;
                        $hc-&amp;gt;reloadFormkeyHC($formname) if $hc;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        errorLog(&amp;quot;users.pl error_flag '$error_flag'&amp;quot;) if $error_flag;&lt;br /&gt;
&lt;br /&gt;
        # call the method&lt;br /&gt;
        my $retval;&lt;br /&gt;
        $retval = $ops-&amp;gt;{$op}{function}-&amp;gt;({&lt;br /&gt;
                op              =&amp;gt; $op,&lt;br /&gt;
                tab_selected_1  =&amp;gt; $ops-&amp;gt;{$op}{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
                note            =&amp;gt; $errornote,&lt;br /&gt;
        }) if !$error_flag;&lt;br /&gt;
&lt;br /&gt;
        return if !$retval;&lt;br /&gt;
&lt;br /&gt;
        if ($op eq 'mailpasswd' &amp;amp;&amp;amp; $retval) {&lt;br /&gt;
                $ops-&amp;gt;{$op}{update_formkey} = 0;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($ops-&amp;gt;{$op}{update_formkey} &amp;amp;&amp;amp; $user-&amp;gt;{seclev} &amp;lt; 100 &amp;amp;&amp;amp; ! $error_flag) {&lt;br /&gt;
                # successful save action, no formkey errors, update existing formkey&lt;br /&gt;
                # why assign to an unused variable? -- pudge&lt;br /&gt;
                my $updated = $slashdb-&amp;gt;updateFormkey($formkey, length($ENV{QUERY_STRING}));&lt;br /&gt;
        }&lt;br /&gt;
        # if there were legit error levels returned from the save methods&lt;br /&gt;
        # I would have it clear the formkey in case of an error, but that&lt;br /&gt;
        # needs to be sorted out later&lt;br /&gt;
        # else { resetFormkey($formkey); }&lt;br /&gt;
&lt;br /&gt;
        writeLog($user-&amp;gt;{nickname});&lt;br /&gt;
        footer();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub checkList {&lt;br /&gt;
        my($string, $len) = @_;&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        $string =~ s/[^\w,-]//g;&lt;br /&gt;
        my @items = grep { $_ } split /,/, $string;&lt;br /&gt;
        $string = join &amp;quot;,&amp;quot;, @items;&lt;br /&gt;
&lt;br /&gt;
        $len ||= $constants-&amp;gt;{checklist_length} || 255;&lt;br /&gt;
        if (length($string) &amp;gt; $len) {&lt;br /&gt;
                print getError('checklist_err');&lt;br /&gt;
                $string = substr($string, 0, $len);&lt;br /&gt;
                $string =~ s/,?\w*$//g;&lt;br /&gt;
        } elsif (length($string) &amp;lt; 1) {&lt;br /&gt;
                $string = '';&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        return $string;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub previewSlashbox {&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
&lt;br /&gt;
        my $block = $reader-&amp;gt;getBlock($form-&amp;gt;{bid}, ['title', 'block', 'url']);&lt;br /&gt;
        my $is_editable = $user-&amp;gt;{seclev} &amp;gt;= 1000;&lt;br /&gt;
&lt;br /&gt;
        my $title = getTitle('previewslashbox_title', { blocktitle =&amp;gt; $block-&amp;gt;{title} });&lt;br /&gt;
        slashDisplay('previewSlashbox', {&lt;br /&gt;
                width           =&amp;gt; '100%',&lt;br /&gt;
                title           =&amp;gt; $title,&lt;br /&gt;
                block           =&amp;gt; $block,&lt;br /&gt;
                is_editable     =&amp;gt; $is_editable,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        print portalbox($constants-&amp;gt;{fancyboxwidth}, $block-&amp;gt;{title},&lt;br /&gt;
                $block-&amp;gt;{block}, '', $block-&amp;gt;{url});&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub newUserForm {&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $suadmin_flag = $user-&amp;gt;{seclev} &amp;gt;= 10000;&lt;br /&gt;
        my $title = getTitle('newUserForm_title');&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('newUserForm', {&lt;br /&gt;
                title           =&amp;gt; $title, &lt;br /&gt;
                suadmin_flag    =&amp;gt; $suadmin_flag,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub newUser {&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        my $plugins = $slashdb-&amp;gt;getDescriptions('plugins');&lt;br /&gt;
        my $title;&lt;br /&gt;
        my $suadmin_flag = $user-&amp;gt;{seclev} &amp;gt;= 10000 ? 1 : 0;&lt;br /&gt;
&lt;br /&gt;
        # Check if User Exists&lt;br /&gt;
        $form-&amp;gt;{newusernick} = nickFix($form-&amp;gt;{newusernick});&lt;br /&gt;
        my $matchname = nick2matchname($form-&amp;gt;{newusernick});&lt;br /&gt;
&lt;br /&gt;
        if (!$form-&amp;gt;{email} || $form-&amp;gt;{email} !~ /\@/) {&lt;br /&gt;
                print getError('email_invalid', 0, 1);&lt;br /&gt;
                return;&lt;br /&gt;
        } elsif ($form-&amp;gt;{email} ne $form-&amp;gt;{email2}) {&lt;br /&gt;
                print getError('email_do_not_match', 0, 1);&lt;br /&gt;
                return;&lt;br /&gt;
        } elsif ($slashdb-&amp;gt;existsEmail($form-&amp;gt;{email})) {&lt;br /&gt;
                print getError('emailexists_err', 0, 1);&lt;br /&gt;
                return;&lt;br /&gt;
        } elsif ($matchname ne '' &amp;amp;&amp;amp; $form-&amp;gt;{newusernick} ne '') {&lt;br /&gt;
                if ($constants-&amp;gt;{newuser_portscan}) {&lt;br /&gt;
                        my $is_trusted = $slashdb-&amp;gt;checkAL2($user-&amp;gt;{srcids}, 'trusted');&lt;br /&gt;
                        if (!$is_trusted) {&lt;br /&gt;
                                my $is_proxy = $slashdb-&amp;gt;checkForOpenProxy($user-&amp;gt;{hostip});&lt;br /&gt;
                                if ($is_proxy) {&lt;br /&gt;
                                        print getError('new user open proxy', {&lt;br /&gt;
                                                unencoded_ip    =&amp;gt; $ENV{REMOTE_ADDR},&lt;br /&gt;
                                                port            =&amp;gt; $is_proxy,&lt;br /&gt;
                                        });&lt;br /&gt;
                                        return;&lt;br /&gt;
                                }&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
                my $uid;&lt;br /&gt;
                my $rootdir = getCurrentSkin('rootdir');&lt;br /&gt;
&lt;br /&gt;
                $uid = $slashdb-&amp;gt;createUser(&lt;br /&gt;
                        $matchname, $form-&amp;gt;{email}, $form-&amp;gt;{newusernick}&lt;br /&gt;
                );&lt;br /&gt;
                if ($uid) {&lt;br /&gt;
                        my $data = {};&lt;br /&gt;
                        getOtherUserParams($data);&lt;br /&gt;
&lt;br /&gt;
                        for (qw(tzcode)) {&lt;br /&gt;
                                $data-&amp;gt;{$_} = $form-&amp;gt;{$_} if defined $form-&amp;gt;{$_};&lt;br /&gt;
                        }&lt;br /&gt;
                        $data-&amp;gt;{creation_ipid} = $user-&amp;gt;{ipid};&lt;br /&gt;
&lt;br /&gt;
                        $slashdb-&amp;gt;setUser($uid, $data) if keys %$data;&lt;br /&gt;
                        $title = getTitle('newUser_title');&lt;br /&gt;
&lt;br /&gt;
                        $form-&amp;gt;{pubkey} = $plugins-&amp;gt;{'Pubkey'} ?&lt;br /&gt;
                                strip_nohtml($form-&amp;gt;{pubkey}, 1) : '';&lt;br /&gt;
                        print getMessage('newuser_msg', { &lt;br /&gt;
                                suadmin_flag    =&amp;gt; $suadmin_flag, &lt;br /&gt;
                                title           =&amp;gt; $title, &lt;br /&gt;
                                uid             =&amp;gt; $uid&lt;br /&gt;
                        });&lt;br /&gt;
&lt;br /&gt;
                        if ($form-&amp;gt;{newsletter} || $form-&amp;gt;{comment_reply} || $form-&amp;gt;{headlines}) {&lt;br /&gt;
                                my $messages  = getObject('Slash::Messages');&lt;br /&gt;
                                my %params;&lt;br /&gt;
                                $params{MSG_CODE_COMMENT_REPLY()} = MSG_MODE_EMAIL()&lt;br /&gt;
                                        if $form-&amp;gt;{comment_reply};&lt;br /&gt;
                                $params{MSG_CODE_NEWSLETTER()}  = MSG_MODE_EMAIL()&lt;br /&gt;
                                        if $form-&amp;gt;{newsletter};&lt;br /&gt;
                                $params{MSG_CODE_HEADLINES()}   = MSG_MODE_EMAIL()&lt;br /&gt;
                                        if $form-&amp;gt;{headlines};&lt;br /&gt;
                                $messages-&amp;gt;setPrefs($uid, \%params);&lt;br /&gt;
                        }&lt;br /&gt;
&lt;br /&gt;
                        mailPasswd({ uid =&amp;gt; $uid });&lt;br /&gt;
&lt;br /&gt;
                        return;&lt;br /&gt;
                } else {&lt;br /&gt;
                        $slashdb-&amp;gt;resetFormkey($form-&amp;gt;{formkey});&lt;br /&gt;
                        print getError('duplicate_user', { &lt;br /&gt;
                                nick =&amp;gt; $form-&amp;gt;{newusernick},&lt;br /&gt;
                        });&lt;br /&gt;
                        return;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
        } else {&lt;br /&gt;
                print getError('duplicate_user', { &lt;br /&gt;
                        nick =&amp;gt; $form-&amp;gt;{newusernick},&lt;br /&gt;
                });&lt;br /&gt;
                return;&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub mailPasswd {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        my $uid = $hr-&amp;gt;{uid} || 0;&lt;br /&gt;
&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        if (! $uid) {&lt;br /&gt;
                if ($form-&amp;gt;{unickname} =~ /\@/) {&lt;br /&gt;
                        $uid = $slashdb-&amp;gt;getUserEmail($form-&amp;gt;{unickname});&lt;br /&gt;
&lt;br /&gt;
                } elsif ($form-&amp;gt;{unickname} =~ /^\d+$/) {&lt;br /&gt;
                        my $tmpuser = $slashdb-&amp;gt;getUser($form-&amp;gt;{unickname}, ['uid']);&lt;br /&gt;
                        $uid = $tmpuser-&amp;gt;{uid};&lt;br /&gt;
&lt;br /&gt;
                } else {&lt;br /&gt;
                        $uid = $slashdb-&amp;gt;getUserUID($form-&amp;gt;{unickname});&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $user_edit;&lt;br /&gt;
        my $err_name = '';&lt;br /&gt;
        my $err_opts = {};&lt;br /&gt;
        if (!$uid || isAnon($uid)) {&lt;br /&gt;
                $err_name = 'mailpasswd_notmailed_err';&lt;br /&gt;
        }&lt;br /&gt;
        if (!$err_name) {&lt;br /&gt;
                # Check permissions of _this_ user, not the target&lt;br /&gt;
                # user, to determine whether this IP is OK'd to&lt;br /&gt;
                # send the mail to the target user.&lt;br /&gt;
                # XXXSRCID This should check a separate field like&lt;br /&gt;
                # 'openproxy' instead of piggybacking off of the&lt;br /&gt;
                # existing nopost and spammer&lt;br /&gt;
                my $srcids_to_check = $user-&amp;gt;{srcids};&lt;br /&gt;
                $err_name = 'mailpasswd_readonly_err'&lt;br /&gt;
                        if $reader-&amp;gt;checkAL2($srcids_to_check, 'nopost');&lt;br /&gt;
        }&lt;br /&gt;
        if (!$err_name) {&lt;br /&gt;
                $err_name = 'mailpasswd_toooften_err'&lt;br /&gt;
                        if $slashdb-&amp;gt;checkMaxMailPasswords($user_edit);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if (!$err_name) {&lt;br /&gt;
                if ($constants-&amp;gt;{mailpasswd_portscan}) {&lt;br /&gt;
                        my $is_trusted = $slashdb-&amp;gt;checkAL2($user-&amp;gt;{srcids}, 'trusted');&lt;br /&gt;
                        if (!$is_trusted) {&lt;br /&gt;
                                my $is_proxy = $slashdb-&amp;gt;checkForOpenProxy($user-&amp;gt;{hostip});&lt;br /&gt;
                                if ($is_proxy) {&lt;br /&gt;
                                        $err_name = 'mailpasswd open proxy';&lt;br /&gt;
                                        $err_opts = { unencoded_ip =&amp;gt; $ENV{REMOTE_ADDR}, port =&amp;gt; $is_proxy }; &lt;br /&gt;
                                }&lt;br /&gt;
                        }&lt;br /&gt;
&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($err_name) {&lt;br /&gt;
                print getError($err_name, $err_opts);&lt;br /&gt;
                $slashdb-&amp;gt;resetFormkey($form-&amp;gt;{formkey});&lt;br /&gt;
                $form-&amp;gt;{op} = 'mailpasswdform';&lt;br /&gt;
                displayForm();&lt;br /&gt;
                return(1);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $newpasswd = $slashdb-&amp;gt;getNewPasswd($uid);&lt;br /&gt;
        my $tempnick = $user_edit-&amp;gt;{nickname};&lt;br /&gt;
&lt;br /&gt;
        my $emailtitle = getTitle('mailPassword_email_title', {&lt;br /&gt;
                nickname        =&amp;gt; $user_edit-&amp;gt;{nickname}&lt;br /&gt;
        }, 1);&lt;br /&gt;
&lt;br /&gt;
        # Pull out some data passed in with the request.  Only the IP&lt;br /&gt;
        # number is actually trustworthy, the others could be forged.&lt;br /&gt;
        # Note that we strip the forgeable ones to make sure there&lt;br /&gt;
        # aren't any &amp;quot;&amp;lt;&amp;gt;&amp;quot; chars which could fool a stupid mail client&lt;br /&gt;
        # into parsing a plaintext email as HTML.&lt;br /&gt;
        my $r = Apache-&amp;gt;request;&lt;br /&gt;
        my $remote_ip = $r-&amp;gt;connection-&amp;gt;remote_ip;&lt;br /&gt;
        my $xff = $r-&amp;gt;header_in('X-Forwarded-For') || '';&lt;br /&gt;
        $xff =~ s/\s+/ /g;&lt;br /&gt;
        $xff = substr(strip_notags($xff), 0, 20);&lt;br /&gt;
        my $ua = $r-&amp;gt;header_in('User-Agent') || '';&lt;br /&gt;
        $ua =~ s/\s+/ /g;&lt;br /&gt;
        $ua = substr(strip_attribute($ua), 0, 60);&lt;br /&gt;
&lt;br /&gt;
        my $msg = getMessage('mailpasswd_msg', {&lt;br /&gt;
                newpasswd       =&amp;gt; $newpasswd,&lt;br /&gt;
                tempnick        =&amp;gt; $tempnick,&lt;br /&gt;
                remote_ip       =&amp;gt; $remote_ip,&lt;br /&gt;
                x_forwarded_for =&amp;gt; $xff,&lt;br /&gt;
                user_agent      =&amp;gt; $ua,&lt;br /&gt;
        }, 1);&lt;br /&gt;
&lt;br /&gt;
        doEmail($uid, $emailtitle, $msg) if $user_edit-&amp;gt;{nickname};&lt;br /&gt;
        print getMessage('mailpasswd_mailed_msg', { name =&amp;gt; $user_edit-&amp;gt;{nickname} });&lt;br /&gt;
        $slashdb-&amp;gt;setUserMailPasswd($user_edit);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub showSubmissions {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my($uid, $nickname);&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        if ($form-&amp;gt;{uid} or $form-&amp;gt;{nick}) {&lt;br /&gt;
                $uid            = $form-&amp;gt;{uid} || $reader-&amp;gt;getUserUID($form-&amp;gt;{nick});&lt;br /&gt;
                $nickname       = $reader-&amp;gt;getUser($uid, 'nickname');&lt;br /&gt;
        } else {&lt;br /&gt;
                $nickname       = $user-&amp;gt;{nickname};&lt;br /&gt;
                $uid            = $user-&amp;gt;{uid};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $storycount = $reader-&amp;gt;countStoriesBySubmitter($uid);&lt;br /&gt;
        my $stories = $reader-&amp;gt;getStoriesBySubmitter(&lt;br /&gt;
                $uid,&lt;br /&gt;
                $constants-&amp;gt;{user_submitter_display_default}&lt;br /&gt;
        ) unless !$storycount;&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('userSub', {&lt;br /&gt;
                nick                    =&amp;gt; $nickname,&lt;br /&gt;
                uid                     =&amp;gt; $uid,&lt;br /&gt;
                nickmatch_flag          =&amp;gt; ($user-&amp;gt;{uid} == $uid ? 1 : 0),&lt;br /&gt;
                stories                 =&amp;gt; $stories,&lt;br /&gt;
                storycount              =&amp;gt; $storycount,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub showComments {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $commentstruct = [];&lt;br /&gt;
        my($uid, $nickname);&lt;br /&gt;
&lt;br /&gt;
        my $user_edit;&lt;br /&gt;
        if ($form-&amp;gt;{uid} || $form-&amp;gt;{nick}) {&lt;br /&gt;
                $uid = $form-&amp;gt;{uid} || $reader-&amp;gt;getUserUID($form-&amp;gt;{nick});&lt;br /&gt;
                $user_edit = $reader-&amp;gt;getUser($uid);&lt;br /&gt;
        } else {&lt;br /&gt;
                $uid = $user-&amp;gt;{uid};&lt;br /&gt;
                $user_edit = $user;&lt;br /&gt;
        }&lt;br /&gt;
        $nickname = $user_edit-&amp;gt;{nickname};&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $user_edit-&amp;gt;{uid} == $user-&amp;gt;{uid} ? 'me' : 'otheruser',&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        my $min_comment = $form-&amp;gt;{min_comment} || 0;&lt;br /&gt;
        $min_comment = 0 unless $user-&amp;gt;{seclev} &amp;gt; $constants-&amp;gt;{comments_more_seclev}&lt;br /&gt;
                || $constants-&amp;gt;{comments_more_seclev} == 2 &amp;amp;&amp;amp; $user-&amp;gt;{is_subscriber};&lt;br /&gt;
        my $comments_wanted = $user-&amp;gt;{show_comments_num}&lt;br /&gt;
                || $constants-&amp;gt;{user_comment_display_default};&lt;br /&gt;
        my $commentcount = $reader-&amp;gt;countCommentsByUID($uid);&lt;br /&gt;
        my $comments = $reader-&amp;gt;getCommentsByUID(&lt;br /&gt;
                $uid, $comments_wanted, $min_comment&lt;br /&gt;
        ) if $commentcount;&lt;br /&gt;
&lt;br /&gt;
        if (ref($comments) eq 'ARRAY') {&lt;br /&gt;
                my $kinds = $reader-&amp;gt;getDescriptions('discussion_kinds');&lt;br /&gt;
                for my $comment (@$comments) {&lt;br /&gt;
                        # This works since $sid is numeric.&lt;br /&gt;
                        $comment-&amp;gt;{replies} = $reader-&amp;gt;countCommentsBySidPid($comment-&amp;gt;{sid}, $comment-&amp;gt;{cid});&lt;br /&gt;
&lt;br /&gt;
                        # This is ok, since with all luck we will not be hitting the DB&lt;br /&gt;
                        # ...however, the &amp;quot;sid&amp;quot; parameter here must be the string&lt;br /&gt;
                        # based SID from either the &amp;quot;stories&amp;quot; table or from&lt;br /&gt;
                        # pollquestions.&lt;br /&gt;
                        my $discussion = $reader-&amp;gt;getDiscussion($comment-&amp;gt;{sid});&lt;br /&gt;
&lt;br /&gt;
                        if ($kinds-&amp;gt;{ $discussion-&amp;gt;{dkid} } =~ /^journal(?:-story)?$/) {&lt;br /&gt;
                                $comment-&amp;gt;{type} = 'journal';&lt;br /&gt;
                        } elsif ($kinds-&amp;gt;{ $discussion-&amp;gt;{dkid} } eq 'poll') {&lt;br /&gt;
                                $comment-&amp;gt;{type} = 'poll';&lt;br /&gt;
                        } else {&lt;br /&gt;
                                $comment-&amp;gt;{type} = 'story';&lt;br /&gt;
                        }&lt;br /&gt;
                        $comment-&amp;gt;{disc_title}  = $discussion-&amp;gt;{title};&lt;br /&gt;
                        $comment-&amp;gt;{url} = $discussion-&amp;gt;{url};&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $mod_reader = getObject(&amp;quot;Slash::$constants-&amp;gt;{m1_pluginname}&amp;quot;, { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        slashDisplay('userCom', {&lt;br /&gt;
                nick                    =&amp;gt; $nickname,&lt;br /&gt;
                useredit                =&amp;gt; $user_edit,&lt;br /&gt;
                nickmatch_flag          =&amp;gt; ($user-&amp;gt;{uid} == $uid ? 1 : 0),&lt;br /&gt;
                commentstruct           =&amp;gt; $comments,&lt;br /&gt;
                commentcount            =&amp;gt; $commentcount,&lt;br /&gt;
                min_comment             =&amp;gt; $min_comment,&lt;br /&gt;
                reasons                 =&amp;gt; $mod_reader-&amp;gt;getReasons(),&lt;br /&gt;
                karma_flag              =&amp;gt; 0,&lt;br /&gt;
                admin_flag              =&amp;gt; $user-&amp;gt;{is_admin},&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub noUser {&lt;br /&gt;
        print getData(&amp;quot;no_user&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub showFireHose {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
        my $uid = $form-&amp;gt;{uid} || $user-&amp;gt;{uid};&lt;br /&gt;
        my $user_edit = $reader-&amp;gt;getUser($uid);&lt;br /&gt;
&lt;br /&gt;
        $user-&amp;gt;{state}{firehose_page} = &amp;quot;user&amp;quot;;&lt;br /&gt;
        $user-&amp;gt;{state}{firehose_user_uid} = $uid;&lt;br /&gt;
&lt;br /&gt;
        my $firehose = getObject(&amp;quot;Slash::FireHose&amp;quot;);&lt;br /&gt;
        header(getMessage('userfirehose_header', { useredit =&amp;gt; $user_edit })) or return;&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $user_edit-&amp;gt;{uid} == $user-&amp;gt;{uid} ? 'me' : 'otheruser',&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        $form-&amp;gt;{mode} = &amp;quot;full&amp;quot;;&lt;br /&gt;
        $form-&amp;gt;{color} = &amp;quot;black&amp;quot;;&lt;br /&gt;
        $form-&amp;gt;{orderby} = &amp;quot;createtime&amp;quot;;&lt;br /&gt;
        $form-&amp;gt;{orderdir} = &amp;quot;DESC&amp;quot;;&lt;br /&gt;
        $form-&amp;gt;{skipmenu} = 1;&lt;br /&gt;
        $form-&amp;gt;{duration} = -1;&lt;br /&gt;
        $form-&amp;gt;{fhfilter} = &amp;quot;\&amp;quot;user:$user_edit-&amp;gt;{nickname}\&amp;quot;&amp;quot;;&lt;br /&gt;
        $form-&amp;gt;{pause} = 1;&lt;br /&gt;
        $form-&amp;gt;{listonly} = 1;&lt;br /&gt;
        $form-&amp;gt;{legacy} = 1;&lt;br /&gt;
&lt;br /&gt;
        my $fhbox = $firehose-&amp;gt;listView({ fh_page =&amp;gt; 'users.pl', tab =&amp;gt; 'userfirehose', user_view =&amp;gt; $user_edit });&lt;br /&gt;
        slashDisplay(&amp;quot;userFireHose&amp;quot;, { firehosebox =&amp;gt; $fhbox, uid =&amp;gt; $uid, useredit =&amp;gt; $user_edit });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
# arhgghgh. I love torture. I love pain. This subroutine satisfies&lt;br /&gt;
# these needs of mine&lt;br /&gt;
sub showInfo {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $id = $hr-&amp;gt;{uid} || 0;&lt;br /&gt;
&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        my $admin_flag = ($user-&amp;gt;{is_admin}) ? 1 : 0;&lt;br /&gt;
        my $suadmin_flag = $user-&amp;gt;{seclev} &amp;gt;= 10000 ? 1 : 0;&lt;br /&gt;
        my($title, $admin_block, $fieldkey) = ('', '', '');&lt;br /&gt;
        my $comments = undef;&lt;br /&gt;
        my $commentcount = 0;&lt;br /&gt;
        my $commentcount_time = 0;&lt;br /&gt;
        my $commentstruct = [];&lt;br /&gt;
        my $requested_user = {};&lt;br /&gt;
        my $time_period = $constants-&amp;gt;{admin_comment_display_days} || 30;&lt;br /&gt;
        my $cid_for_time_period = $reader-&amp;gt;getVar(&amp;quot;min_cid_last_$time_period\_days&amp;quot;,'value', 1) || 0;&lt;br /&gt;
        my $admin_time_period_limit = $constants-&amp;gt;{admin_daysback_commentlimit} || 100;&lt;br /&gt;
        my $admin_non_time_limit    = $constants-&amp;gt;{admin_comment_subsequent_pagesize} || 24;&lt;br /&gt;
&lt;br /&gt;
        my($points, $nickmatch_flag, $uid, $nick);&lt;br /&gt;
        my($mod_flag, $karma_flag, $n) = (0, 0, 0);&lt;br /&gt;
&lt;br /&gt;
        if ($admin_flag&lt;br /&gt;
                &amp;amp;&amp;amp; (defined($form-&amp;gt;{show_m2s}) || defined($form-&amp;gt;{show_m1s}) || defined($form-&amp;gt;{m2_listing})))&lt;br /&gt;
         {&lt;br /&gt;
                my $update_hr = {};&lt;br /&gt;
                $update_hr-&amp;gt;{mod_with_comm} = $form-&amp;gt;{show_m1s}&lt;br /&gt;
                        if defined $form-&amp;gt;{show_m1s};&lt;br /&gt;
                $update_hr-&amp;gt;{m2_with_mod} =     ($constants-&amp;gt;{m2} ? $form-&amp;gt;{show_m2s} : undef)&lt;br /&gt;
                        if defined $form-&amp;gt;{show_m2s};&lt;br /&gt;
                $update_hr-&amp;gt;{show_m2_listing} = ($constants-&amp;gt;{m2} ? $form-&amp;gt;{m2_listing} : undef)&lt;br /&gt;
                        if defined $form-&amp;gt;{m2_listing};&lt;br /&gt;
                $slashdb-&amp;gt;setUser($user-&amp;gt;{uid}, $update_hr);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if (!$id &amp;amp;&amp;amp; !$form-&amp;gt;{userfield}) {&lt;br /&gt;
                if ($form-&amp;gt;{uid} &amp;amp;&amp;amp; ! $id) {&lt;br /&gt;
                        $fieldkey = 'uid';&lt;br /&gt;
                        ($uid, $id) = ($form-&amp;gt;{uid}, $form-&amp;gt;{uid});&lt;br /&gt;
                        $requested_user = isAnon($uid) ? $user : $reader-&amp;gt;getUser($id);&lt;br /&gt;
                        $nick = $requested_user-&amp;gt;{nickname};&lt;br /&gt;
                        $form-&amp;gt;{userfield} = $nick if $admin_flag;&lt;br /&gt;
&lt;br /&gt;
                } elsif ($form-&amp;gt;{nick} &amp;amp;&amp;amp; ! $id) {&lt;br /&gt;
                        $fieldkey = 'nickname';&lt;br /&gt;
                        ($nick, $id) = ($form-&amp;gt;{nick}, $form-&amp;gt;{nick});&lt;br /&gt;
                        $uid = $reader-&amp;gt;getUserUID($id);&lt;br /&gt;
                        if (isAnon($uid)) {&lt;br /&gt;
                                $requested_user = $user;&lt;br /&gt;
                                ($nick, $uid, $id) = @{$user}{qw(nickname uid nickname)};&lt;br /&gt;
                        } else {&lt;br /&gt;
                                $requested_user = $reader-&amp;gt;getUser($uid);&lt;br /&gt;
                        }&lt;br /&gt;
                        $form-&amp;gt;{userfield} = $uid if $admin_flag;&lt;br /&gt;
&lt;br /&gt;
                } else {&lt;br /&gt;
                        $fieldkey = 'uid';&lt;br /&gt;
                        ($id, $uid) = ($user-&amp;gt;{uid}, $user-&amp;gt;{uid});&lt;br /&gt;
                        $requested_user = $reader-&amp;gt;getUser($uid);&lt;br /&gt;
                        $form-&amp;gt;{userfield} = $uid if $admin_flag;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
        } elsif ($user-&amp;gt;{is_admin}) {&lt;br /&gt;
                $id ||= $form-&amp;gt;{userfield} || $user-&amp;gt;{uid};&lt;br /&gt;
                if ($id =~ /^[0-9a-f]{16}$/) {&lt;br /&gt;
                        $requested_user-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                        $fieldkey = &amp;quot;srcid&amp;quot;;&lt;br /&gt;
                        $requested_user-&amp;gt;{$fieldkey} = $id;&lt;br /&gt;
                } elsif ($id =~ /^\d+$/) {&lt;br /&gt;
                        # If it's longer than a uid could possibly be, it&lt;br /&gt;
                        # must be a srcid.  The uid column right now is a&lt;br /&gt;
                        # MEDIUMINT (max 16M) but at most might someday&lt;br /&gt;
                        # be an INT (max 4G).&lt;br /&gt;
                        if (length($id) &amp;gt; 11) {&lt;br /&gt;
                                $requested_user-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                                $fieldkey = &amp;quot;srcid&amp;quot;;&lt;br /&gt;
                                $requested_user-&amp;gt;{$fieldkey} = $id;&lt;br /&gt;
                        } else {&lt;br /&gt;
                                $fieldkey = 'uid';&lt;br /&gt;
                                $requested_user = $reader-&amp;gt;getUser($id);&lt;br /&gt;
                                $uid = $requested_user-&amp;gt;{uid};&lt;br /&gt;
                                $nick = $requested_user-&amp;gt;{nickname};&lt;br /&gt;
                                if ((my $conflict_id = $reader-&amp;gt;getUserUID($id)) &amp;amp;&amp;amp; $form-&amp;gt;{userinfo}) {&lt;br /&gt;
                                        slashDisplay('showInfoConflict', {&lt;br /&gt;
                                                op              =&amp;gt; 'userinfo',&lt;br /&gt;
                                                id              =&amp;gt; $uid,&lt;br /&gt;
                                                nick            =&amp;gt; $nick,&lt;br /&gt;
                                                conflict_id     =&amp;gt; $conflict_id&lt;br /&gt;
                                        });&lt;br /&gt;
                                        return 1;&lt;br /&gt;
                                }&lt;br /&gt;
                        }&lt;br /&gt;
&lt;br /&gt;
                } elsif (length($id) == 32) {&lt;br /&gt;
                        $requested_user-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                        if ($form-&amp;gt;{fieldname}&lt;br /&gt;
                                &amp;amp;&amp;amp; $form-&amp;gt;{fieldname} =~ /^(ipid|subnetid)$/) {&lt;br /&gt;
                                $fieldkey = $form-&amp;gt;{fieldname};&lt;br /&gt;
                        } else {&lt;br /&gt;
                                $fieldkey = 'md5id';&lt;br /&gt;
                        }&lt;br /&gt;
                        $requested_user-&amp;gt;{$fieldkey} = $id;&lt;br /&gt;
                } elsif ($id =~ /^(\d{1,3}\.\d{1,3}.\d{1,3}\.0)$/ &lt;br /&gt;
                                || $id =~ /^(\d{1,3}\.\d{1,3}\.\d{1,3})\.?$/) {&lt;br /&gt;
                        $fieldkey = 'subnetid';&lt;br /&gt;
                        $requested_user-&amp;gt;{subnetid} = $1; &lt;br /&gt;
                        $requested_user-&amp;gt;{subnetid} .= '.0' if $requested_user-&amp;gt;{subnetid} =~ /^\d{1,3}\.\d{1,3}\.\d{1,3}$/; &lt;br /&gt;
                        $requested_user-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                        $requested_user-&amp;gt;{subnetid} = md5_hex($requested_user-&amp;gt;{subnetid});&lt;br /&gt;
&lt;br /&gt;
                } elsif ($id =~ /^([\d+\.]+)$/) {&lt;br /&gt;
                        $fieldkey = 'ipid';&lt;br /&gt;
                        $requested_user-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                        $id ||= $1;&lt;br /&gt;
                        $requested_user-&amp;gt;{ipid} = md5_hex($1);&lt;br /&gt;
&lt;br /&gt;
                } elsif ($id =~ /^(.*@.*\..*?)$/) {&lt;br /&gt;
                        # check for email addy, but make it by uid&lt;br /&gt;
                        $fieldkey = 'uid';&lt;br /&gt;
                        $id = $uid = $reader-&amp;gt;getUserEmail($id);&lt;br /&gt;
                        $requested_user = $reader-&amp;gt;getUser($uid);&lt;br /&gt;
                        $nick = $requested_user-&amp;gt;{nickname};&lt;br /&gt;
&lt;br /&gt;
                } else {  # go by nickname, but make it by uid&lt;br /&gt;
                        $fieldkey = 'uid';&lt;br /&gt;
                        $id = $uid = $reader-&amp;gt;getUserUID($id);&lt;br /&gt;
                        $requested_user = $reader-&amp;gt;getUser($uid);&lt;br /&gt;
                        $nick = $requested_user-&amp;gt;{nickname};&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
        } else {&lt;br /&gt;
                $fieldkey = 'uid';&lt;br /&gt;
                ($id, $uid) = ($user-&amp;gt;{uid}, $user-&amp;gt;{uid});&lt;br /&gt;
                $requested_user = $reader-&amp;gt;getUser($uid);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Can't get user data for the anonymous user.&lt;br /&gt;
        if ($fieldkey eq 'uid' &amp;amp;&amp;amp; isAnon($uid)) {&lt;br /&gt;
                header(getMessage('user_header')) or return;&lt;br /&gt;
                return displayForm();&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $user_change = { };&lt;br /&gt;
        if ($fieldkey eq 'uid' &amp;amp;&amp;amp; !$user-&amp;gt;{is_anon}&lt;br /&gt;
                &amp;amp;&amp;amp; $uid != $user-&amp;gt;{uid} &amp;amp;&amp;amp; !isAnon($uid)) {&lt;br /&gt;
                # Store the fact that this user last looked at that user.&lt;br /&gt;
                # For maximal convenience in stalking.&lt;br /&gt;
                $user_change-&amp;gt;{lastlookuid} = $uid;&lt;br /&gt;
                $user_change-&amp;gt;{lastlooktime} = time;&lt;br /&gt;
                $user-&amp;gt;{lastlookuid} = $uid;&lt;br /&gt;
                $user-&amp;gt;{lastlooktime} = time;&lt;br /&gt;
                $hr-&amp;gt;{tab_selected_1} = 'otheruser';&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # showInfo's header information is delayed until here, because&lt;br /&gt;
        # the target user's info is not available until here.&lt;br /&gt;
        vislenify($requested_user);&lt;br /&gt;
        header(getMessage('user_header', { useredit =&amp;gt; $requested_user, fieldkey =&amp;gt; $fieldkey })) or return;&lt;br /&gt;
        # This is a hardcoded position, bad idea and should be fixed -Brian&lt;br /&gt;
        # Yeah, we should pull this into a template somewhere...&lt;br /&gt;
        print getMessage('note', { note =&amp;gt; $hr-&amp;gt;{note} }) if defined $hr-&amp;gt;{note};&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        my $comments_wanted = $user-&amp;gt;{show_comments_num}&lt;br /&gt;
                || $constants-&amp;gt;{user_comment_display_default};&lt;br /&gt;
        my $min_comment = $form-&amp;gt;{min_comment} || 0;&lt;br /&gt;
        $min_comment = 0 unless $user-&amp;gt;{seclev} &amp;gt; $constants-&amp;gt;{comments_more_seclev}&lt;br /&gt;
                || $constants-&amp;gt;{comments_more_seclev} == 2 &amp;amp;&amp;amp; $user-&amp;gt;{is_subscriber};&lt;br /&gt;
&lt;br /&gt;
        my($netid, $netid_vis) = ('', '');&lt;br /&gt;
&lt;br /&gt;
        my $comment_time;&lt;br /&gt;
        my $non_admin_limit = $comments_wanted;&lt;br /&gt;
&lt;br /&gt;
        if ($requested_user-&amp;gt;{nonuid}) {&lt;br /&gt;
                $requested_user-&amp;gt;{fg} = $user-&amp;gt;{fg};&lt;br /&gt;
                $requested_user-&amp;gt;{bg} = $user-&amp;gt;{bg};&lt;br /&gt;
&lt;br /&gt;
                if ($requested_user-&amp;gt;{ipid}) {&lt;br /&gt;
                        $netid = $requested_user-&amp;gt;{ipid} ;&lt;br /&gt;
&lt;br /&gt;
                } elsif ($requested_user-&amp;gt;{md5id}) {&lt;br /&gt;
                        $netid = $requested_user-&amp;gt;{md5id} ;&lt;br /&gt;
&lt;br /&gt;
                } elsif ($requested_user-&amp;gt;{srcid}) {&lt;br /&gt;
                        $netid = $requested_user-&amp;gt;{srcid} ;&lt;br /&gt;
                } else {&lt;br /&gt;
                        $netid = $requested_user-&amp;gt;{subnetid} ;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                my $data = {&lt;br /&gt;
                        id =&amp;gt; $id,&lt;br /&gt;
                        md5id =&amp;gt; $netid,&lt;br /&gt;
                };&lt;br /&gt;
                vislenify($data); # add $data-&amp;gt;{md5id_vis}&lt;br /&gt;
                $netid_vis = $data-&amp;gt;{md5id_vis};&lt;br /&gt;
&lt;br /&gt;
                $title = getTitle('user_netID_user_title', $data);&lt;br /&gt;
&lt;br /&gt;
                $admin_block = getUserAdmin($netid, $fieldkey, 0) if $admin_flag;&lt;br /&gt;
&lt;br /&gt;
                if ($form-&amp;gt;{fieldname}) {&lt;br /&gt;
                        if ($form-&amp;gt;{fieldname} eq 'ipid') {&lt;br /&gt;
                                $commentcount           = $reader-&amp;gt;countCommentsByIPID($netid);&lt;br /&gt;
                                $commentcount_time      = $reader-&amp;gt;countCommentsByIPID($netid, { cid_at_or_after =&amp;gt; $cid_for_time_period });&lt;br /&gt;
                                $comments = getCommentListing(&amp;quot;ipid&amp;quot;, $netid,&lt;br /&gt;
                                        $min_comment, $time_period, $commentcount, $commentcount_time, $cid_for_time_period, &lt;br /&gt;
                                        $non_admin_limit, $admin_time_period_limit, $admin_non_time_limit)&lt;br /&gt;
                                                if $commentcount;&lt;br /&gt;
                        } elsif ($form-&amp;gt;{fieldname} eq 'subnetid') {&lt;br /&gt;
                                $commentcount           = $reader-&amp;gt;countCommentsBySubnetID($netid);&lt;br /&gt;
                                $commentcount_time      = $reader-&amp;gt;countCommentsBySubnetID($netid, { cid_at_or_after =&amp;gt; $cid_for_time_period });&lt;br /&gt;
                                $comments = getCommentListing(&amp;quot;subnetid&amp;quot;, $netid,&lt;br /&gt;
                                        $min_comment, $time_period, $commentcount, $commentcount_time, $cid_for_time_period,&lt;br /&gt;
                                        $non_admin_limit, $admin_time_period_limit, $admin_non_time_limit)&lt;br /&gt;
                                                if $commentcount;&lt;br /&gt;
&lt;br /&gt;
                        } else {&lt;br /&gt;
                                delete $form-&amp;gt;{fieldname};&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
                if (!defined($comments)) {&lt;br /&gt;
                        # Last resort; here for backwards compatibility mostly.&lt;br /&gt;
                        my $type;&lt;br /&gt;
                        ($commentcount,$type) = $reader-&amp;gt;countCommentsByIPIDOrSubnetID($netid);&lt;br /&gt;
                        $commentcount_time = $reader-&amp;gt;countCommentsByIPIDOrSubnetID($netid, { cid_at_or_after =&amp;gt; $cid_for_time_period });&lt;br /&gt;
                        if ($type eq &amp;quot;ipid&amp;quot;) {&lt;br /&gt;
                                $comments = getCommentListing(&amp;quot;ipid&amp;quot;, $netid,&lt;br /&gt;
                                        $min_comment, $time_period, $commentcount, $commentcount_time, $cid_for_time_period,&lt;br /&gt;
                                        $non_admin_limit, $admin_time_period_limit, $admin_non_time_limit)&lt;br /&gt;
                                                if $commentcount;&lt;br /&gt;
                        } elsif ($type eq &amp;quot;subnetid&amp;quot;) {&lt;br /&gt;
                                $comments = getCommentListing(&amp;quot;subnetid&amp;quot;, $netid,&lt;br /&gt;
                                        $min_comment, $time_period, $commentcount, $commentcount_time,  $cid_for_time_period,&lt;br /&gt;
                                        $non_admin_limit, $admin_time_period_limit, $admin_non_time_limit)&lt;br /&gt;
                                                if $commentcount;&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
        } else {&lt;br /&gt;
                $admin_block = getUserAdmin($id, $fieldkey, 1) if $admin_flag;&lt;br /&gt;
&lt;br /&gt;
                $commentcount      = $reader-&amp;gt;countCommentsByUID($requested_user-&amp;gt;{uid});&lt;br /&gt;
                $commentcount_time = $reader-&amp;gt;countCommentsByUID($requested_user-&amp;gt;{uid}, { cid_at_or_after =&amp;gt; $cid_for_time_period });&lt;br /&gt;
                $comments = getCommentListing(&amp;quot;uid&amp;quot;, $requested_user-&amp;gt;{uid},&lt;br /&gt;
                        $min_comment, $time_period, $commentcount, $commentcount_time, $cid_for_time_period,&lt;br /&gt;
                        $non_admin_limit, $admin_time_period_limit, $admin_non_time_limit,&lt;br /&gt;
                        { use_uid_cid_cutoff =&amp;gt; 1 })&lt;br /&gt;
                                if $commentcount;&lt;br /&gt;
                $netid = $requested_user-&amp;gt;{uid};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Grab the nicks of the uids we have, we're going to be adding them&lt;br /&gt;
        # into the struct.&lt;br /&gt;
        my @users_extra_cols_wanted       = qw( nickname );&lt;br /&gt;
        my @discussions_extra_cols_wanted = qw( type );&lt;br /&gt;
        my $uid_hr = { };&lt;br /&gt;
        my $sid_hr = { };&lt;br /&gt;
        if ($comments &amp;amp;&amp;amp; @$comments) {&lt;br /&gt;
                my %uids = ();&lt;br /&gt;
                my %sids = ();&lt;br /&gt;
                for my $c (@$comments) {&lt;br /&gt;
                        $uids{$c-&amp;gt;{uid}}++;&lt;br /&gt;
                        $sids{$c-&amp;gt;{sid}}++;&lt;br /&gt;
                }&lt;br /&gt;
                my $uids = join(&amp;quot;, &amp;quot;, sort { $a &amp;lt;=&amp;gt; $b } keys %uids);&lt;br /&gt;
                my $sids = join(&amp;quot;, &amp;quot;, sort { $a &amp;lt;=&amp;gt; $b } keys %sids);&lt;br /&gt;
                $uid_hr = $reader-&amp;gt;sqlSelectAllHashref(&lt;br /&gt;
                        &amp;quot;uid&amp;quot;,&lt;br /&gt;
                        &amp;quot;uid, &amp;quot; . join(&amp;quot;, &amp;quot;, @users_extra_cols_wanted),&lt;br /&gt;
                        &amp;quot;users&amp;quot;,&lt;br /&gt;
                        &amp;quot;uid IN ($uids)&amp;quot;&lt;br /&gt;
                );&lt;br /&gt;
&lt;br /&gt;
                $sid_hr = $reader-&amp;gt;sqlSelectAllHashref(&lt;br /&gt;
                        &amp;quot;id&amp;quot;,&lt;br /&gt;
                        &amp;quot;id, &amp;quot; . join(&amp;quot;, &amp;quot;, @discussions_extra_cols_wanted),&lt;br /&gt;
                        &amp;quot;discussions&amp;quot;,&lt;br /&gt;
                        &amp;quot;id IN ($sids)&amp;quot;&lt;br /&gt;
                );&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $cids_seen = {};&lt;br /&gt;
        my $kinds = $slashdb-&amp;gt;getDescriptions('discussion_kinds');&lt;br /&gt;
        for my $comment (@$comments) {&lt;br /&gt;
                $cids_seen-&amp;gt;{$comment-&amp;gt;{cid}}++;&lt;br /&gt;
                my $type;&lt;br /&gt;
                # This works since $sid is numeric.&lt;br /&gt;
                my $replies = $reader-&amp;gt;countCommentsBySidPid($comment-&amp;gt;{sid}, $comment-&amp;gt;{cid});&lt;br /&gt;
&lt;br /&gt;
                # This is cached.&lt;br /&gt;
                my $discussion = $reader-&amp;gt;getDiscussion($comment-&amp;gt;{sid});&lt;br /&gt;
#use Data::Dumper; if ($discussion &amp;amp;&amp;amp; !$discussion-&amp;gt;{dkid}) { print STDERR scalar(gmtime) . &amp;quot; users.pl discussion but no dkid: &amp;quot; . Dumper($discussion) }&lt;br /&gt;
                if (!$discussion || !$discussion-&amp;gt;{dkid}) {&lt;br /&gt;
                        # A comment with no accompanying discussion;&lt;br /&gt;
                        # basically we pretend it doesn't exist.&lt;br /&gt;
                        next;&lt;br /&gt;
                } elsif ($kinds-&amp;gt;{ $discussion-&amp;gt;{dkid} } =~ /^journal(?:-story)?$/) {&lt;br /&gt;
                        $type = 'journal';&lt;br /&gt;
                } elsif ($kinds-&amp;gt;{ $discussion-&amp;gt;{dkid} } eq 'poll') {&lt;br /&gt;
                        $type = 'poll';&lt;br /&gt;
                } else {&lt;br /&gt;
                        $type = 'story';&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                $comment-&amp;gt;{points} += $user-&amp;gt;{karma_bonus}&lt;br /&gt;
                        if $user-&amp;gt;{karma_bonus} &amp;amp;&amp;amp; $comment-&amp;gt;{karma_bonus} eq 'yes';&lt;br /&gt;
                $comment-&amp;gt;{points} += $user-&amp;gt;{subscriber_bonus}&lt;br /&gt;
                        if $user-&amp;gt;{subscriber_bonus} &amp;amp;&amp;amp; $comment-&amp;gt;{subscriber_bonus} eq 'yes';&lt;br /&gt;
&lt;br /&gt;
                # fix points in case they are out of bounds&lt;br /&gt;
                $comment-&amp;gt;{points} = $constants-&amp;gt;{comment_minscore} if $comment-&amp;gt;{points} &amp;lt; $constants-&amp;gt;{comment_minscore};&lt;br /&gt;
                $comment-&amp;gt;{points} = $constants-&amp;gt;{comment_maxscore} if $comment-&amp;gt;{points} &amp;gt; $constants-&amp;gt;{comment_maxscore};&lt;br /&gt;
                vislenify($comment);&lt;br /&gt;
                my $data = {&lt;br /&gt;
                        pid             =&amp;gt; $comment-&amp;gt;{pid},&lt;br /&gt;
                        url             =&amp;gt; $discussion-&amp;gt;{url},&lt;br /&gt;
                        disc_type       =&amp;gt; $type,&lt;br /&gt;
                        disc_title      =&amp;gt; $discussion-&amp;gt;{title},&lt;br /&gt;
                        disc_time       =&amp;gt; $discussion-&amp;gt;{ts},&lt;br /&gt;
                        sid             =&amp;gt; $comment-&amp;gt;{sid},&lt;br /&gt;
                        cid             =&amp;gt; $comment-&amp;gt;{cid},&lt;br /&gt;
                        subj            =&amp;gt; $comment-&amp;gt;{subject},&lt;br /&gt;
                        cdate           =&amp;gt; $comment-&amp;gt;{date},&lt;br /&gt;
                        pts             =&amp;gt; $comment-&amp;gt;{points},&lt;br /&gt;
                        reason          =&amp;gt; $comment-&amp;gt;{reason},&lt;br /&gt;
                        uid             =&amp;gt; $comment-&amp;gt;{uid},&lt;br /&gt;
                        replies         =&amp;gt; $replies,&lt;br /&gt;
                        ipid            =&amp;gt; $comment-&amp;gt;{ipid},&lt;br /&gt;
                        ipid_vis        =&amp;gt; $comment-&amp;gt;{ipid_vis},&lt;br /&gt;
                        karma           =&amp;gt; $comment-&amp;gt;{karma},&lt;br /&gt;
                        tweak           =&amp;gt; $comment-&amp;gt;{tweak},&lt;br /&gt;
                        tweak_orig      =&amp;gt; $comment-&amp;gt;{tweak_orig},&lt;br /&gt;
&lt;br /&gt;
                };&lt;br /&gt;
                #Karma bonus time&lt;br /&gt;
&lt;br /&gt;
                for my $col (@users_extra_cols_wanted) {&lt;br /&gt;
                        $data-&amp;gt;{$col} = $uid_hr-&amp;gt;{$comment-&amp;gt;{uid}}{$col} if defined $uid_hr-&amp;gt;{$comment-&amp;gt;{uid}}{$col};&lt;br /&gt;
                }&lt;br /&gt;
                for my $col(@discussions_extra_cols_wanted) {&lt;br /&gt;
                        $data-&amp;gt;{$col} = $sid_hr-&amp;gt;{$comment-&amp;gt;{sid}}{$col} if defined $sid_hr-&amp;gt;{$comment-&amp;gt;{sid}}{$col};&lt;br /&gt;
                }&lt;br /&gt;
                push @$commentstruct, $data;&lt;br /&gt;
        }&lt;br /&gt;
#       if (grep { !defined($_-&amp;gt;{disc_time}) || !defined($_-&amp;gt;{sid}) } @$commentstruct) { use Data::Dumper; print STDERR &amp;quot;showInfo undef in commentstruct for id=$id: &amp;quot; . Dumper($commentstruct) }&lt;br /&gt;
        # Sort so the chosen group of comments is sorted by discussion&lt;br /&gt;
        @$commentstruct = sort {&lt;br /&gt;
                $b-&amp;gt;{disc_time} cmp $a-&amp;gt;{disc_time} || $b-&amp;gt;{sid} &amp;lt;=&amp;gt; $a-&amp;gt;{sid}&lt;br /&gt;
        } @$commentstruct&lt;br /&gt;
                unless $user-&amp;gt;{user_comment_sort_type} &amp;amp;&amp;amp; $user-&amp;gt;{user_comment_sort_type} == 1;&lt;br /&gt;
&lt;br /&gt;
        my $cid_list = [ keys %$cids_seen ];&lt;br /&gt;
        my $cids_to_mods = {};&lt;br /&gt;
        my $mod_reader = getObject(&amp;quot;Slash::$constants-&amp;gt;{m1_pluginname}&amp;quot;, { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        if ($constants-&amp;gt;{m1} &amp;amp;&amp;amp; $admin_flag &amp;amp;&amp;amp; $constants-&amp;gt;{show_mods_with_comments}) {&lt;br /&gt;
                my $comment_mods = $mod_reader-&amp;gt;getModeratorCommentLog(&amp;quot;DESC&amp;quot;,&lt;br /&gt;
                        $constants-&amp;gt;{mod_limit_with_comments}, &amp;quot;cidin&amp;quot;, $cid_list);&lt;br /&gt;
&lt;br /&gt;
                # Loop through mods and group them by the sid they're attached to&lt;br /&gt;
                while (my $mod = shift @$comment_mods) {&lt;br /&gt;
                        push @{$cids_to_mods-&amp;gt;{$mod-&amp;gt;{cid}}}, $mod;&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $sub_limit = ((($admin_flag || $user-&amp;gt;{uid} == $requested_user-&amp;gt;{uid}) ? $constants-&amp;gt;{submissions_all_page_size} : $constants-&amp;gt;{submissions_accepted_only_page_size}) || &amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        my $sub_options = { limit_days =&amp;gt; 365 };&lt;br /&gt;
        $sub_options-&amp;gt;{accepted_only} = 1 if !$admin_flag &amp;amp;&amp;amp; $user-&amp;gt;{uid} != $requested_user-&amp;gt;{uid};&lt;br /&gt;
&lt;br /&gt;
        my $sub_field = $form-&amp;gt;{fieldname};&lt;br /&gt;
&lt;br /&gt;
        my ($subcount, $ret_field) = $reader-&amp;gt;countSubmissionsByNetID($netid, $sub_field)&lt;br /&gt;
                if $requested_user-&amp;gt;{nonuid};&lt;br /&gt;
        my $submissions = $reader-&amp;gt;getSubmissionsByNetID($netid, $ret_field, $sub_limit, $sub_options)&lt;br /&gt;
                if $requested_user-&amp;gt;{nonuid};&lt;br /&gt;
&lt;br /&gt;
        my $ipid_hoursback = $constants-&amp;gt;{istroll_ipid_hours} || 72;&lt;br /&gt;
        my $uid_hoursback = $constants-&amp;gt;{istroll_uid_hours} || 72;&lt;br /&gt;
&lt;br /&gt;
        if ($requested_user-&amp;gt;{nonuid}) {&lt;br /&gt;
                slashDisplay('netIDInfo', {&lt;br /&gt;
                        title                   =&amp;gt; $title,&lt;br /&gt;
                        id                      =&amp;gt; $id,&lt;br /&gt;
                        useredit                =&amp;gt; $requested_user,&lt;br /&gt;
                        commentstruct           =&amp;gt; $commentstruct || [],&lt;br /&gt;
                        commentcount            =&amp;gt; $commentcount,&lt;br /&gt;
                        min_comment             =&amp;gt; $min_comment,&lt;br /&gt;
                        admin_flag              =&amp;gt; $admin_flag,&lt;br /&gt;
                        admin_block             =&amp;gt; $admin_block,&lt;br /&gt;
                        netid                   =&amp;gt; $netid,&lt;br /&gt;
                        netid_vis               =&amp;gt; $netid_vis,&lt;br /&gt;
                        reasons                 =&amp;gt; $mod_reader-&amp;gt;getReasons(),&lt;br /&gt;
                        subcount                =&amp;gt; $subcount,&lt;br /&gt;
                        submissions             =&amp;gt; $submissions,&lt;br /&gt;
                        hr_hours_back           =&amp;gt; $ipid_hoursback,&lt;br /&gt;
                        cids_to_mods            =&amp;gt; $cids_to_mods,&lt;br /&gt;
                        comment_time            =&amp;gt; $comment_time&lt;br /&gt;
                });&lt;br /&gt;
&lt;br /&gt;
        } else {&lt;br /&gt;
                if (! $requested_user-&amp;gt;{uid}) {&lt;br /&gt;
                        print getError('userinfo_idnf_err', { id =&amp;gt; $id, fieldkey =&amp;gt; $fieldkey});&lt;br /&gt;
                        return 1;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                $karma_flag = 1 if $admin_flag;&lt;br /&gt;
                $requested_user-&amp;gt;{nick_plain} = $nick ||= $requested_user-&amp;gt;{nickname};&lt;br /&gt;
                $nick = strip_literal($nick);&lt;br /&gt;
&lt;br /&gt;
                if ($requested_user-&amp;gt;{uid} == $user-&amp;gt;{uid}) {&lt;br /&gt;
                        $karma_flag = 1;&lt;br /&gt;
                        $nickmatch_flag = 1;&lt;br /&gt;
                        $points = $requested_user-&amp;gt;{points};&lt;br /&gt;
&lt;br /&gt;
                        $mod_flag = 1 if $points &amp;gt; 0;&lt;br /&gt;
&lt;br /&gt;
                        $title = getTitle('userInfo_main_title', { nick =&amp;gt; $nick, uid =&amp;gt; $uid });&lt;br /&gt;
&lt;br /&gt;
                } else {&lt;br /&gt;
                        $title = getTitle('userInfo_user_title', { nick =&amp;gt; $nick, uid =&amp;gt; $uid });&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                my $lastjournal = _get_lastjournal($uid);&lt;br /&gt;
&lt;br /&gt;
                my $subcount = $reader-&amp;gt;countSubmissionsByUID($uid);&lt;br /&gt;
&lt;br /&gt;
                my $submissions = $reader-&amp;gt;getSubmissionsByUID($uid, $sub_limit, $sub_options);&lt;br /&gt;
                my $metamods;&lt;br /&gt;
                if ($constants-&amp;gt;{m2} &amp;amp;&amp;amp; $admin_flag) {&lt;br /&gt;
                        my $metamod_reader = getObject('Slash::Metamod', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
                        $metamods = $metamod_reader-&amp;gt;getMetamodlogForUser($uid, 30);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                my $tags_reader = getObject('Slash::Tags', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
                my $tagshist = [];&lt;br /&gt;
                if ($tags_reader &amp;amp;&amp;amp; $user-&amp;gt;{is_admin}) {&lt;br /&gt;
                        $tagshist = $tags_reader-&amp;gt;getAllTagsFromUser($requested_user-&amp;gt;{uid}, { orderby =&amp;gt; 'created_at', orderdir =&amp;gt; 'DESC', limit =&amp;gt; 30, include_private =&amp;gt; 1 });&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                slashDisplay('userInfo', {&lt;br /&gt;
                        title                   =&amp;gt; $title,&lt;br /&gt;
                        uid                     =&amp;gt; $uid,&lt;br /&gt;
                        useredit                =&amp;gt; $requested_user,&lt;br /&gt;
                        points                  =&amp;gt; $points,&lt;br /&gt;
                        commentstruct           =&amp;gt; $commentstruct || [],&lt;br /&gt;
                        commentcount            =&amp;gt; $commentcount,&lt;br /&gt;
                        min_comment             =&amp;gt; $min_comment,&lt;br /&gt;
                        nickmatch_flag          =&amp;gt; $nickmatch_flag,&lt;br /&gt;
                        mod_flag                =&amp;gt; $mod_flag,&lt;br /&gt;
                        karma_flag              =&amp;gt; $karma_flag,&lt;br /&gt;
                        admin_block             =&amp;gt; $admin_block,&lt;br /&gt;
                        admin_flag              =&amp;gt; $admin_flag,&lt;br /&gt;
                        suadmin_flag            =&amp;gt; $suadmin_flag,&lt;br /&gt;
                        reasons                 =&amp;gt; $mod_reader-&amp;gt;getReasons(),&lt;br /&gt;
                        lastjournal             =&amp;gt; $lastjournal,&lt;br /&gt;
                        hr_hours_back           =&amp;gt; $ipid_hoursback,&lt;br /&gt;
                        cids_to_mods            =&amp;gt; $cids_to_mods,&lt;br /&gt;
                        comment_time            =&amp;gt; $comment_time,&lt;br /&gt;
                        submissions             =&amp;gt; $submissions,&lt;br /&gt;
                        subcount                =&amp;gt; $subcount,&lt;br /&gt;
                        metamods                =&amp;gt; $metamods,&lt;br /&gt;
                        tagshist                =&amp;gt; $tagshist&lt;br /&gt;
                });&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($user_change &amp;amp;&amp;amp; %$user_change) {&lt;br /&gt;
                $slashdb-&amp;gt;setUser($user-&amp;gt;{uid}, $user_change);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        return 1;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub _get_lastjournal {&lt;br /&gt;
        my($uid) = @_;&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $lastjournal = undef;&lt;br /&gt;
        if (my $journal = getObject('Slash::Journal', { db_type =&amp;gt; 'reader' })) {&lt;br /&gt;
                my $j = $journal-&amp;gt;getsByUid($uid, 0, 1);&lt;br /&gt;
                if ($j &amp;amp;&amp;amp; @$j) {&lt;br /&gt;
                        # Yep, there are 1 or more journals... get the first.&lt;br /&gt;
                        $j = $j-&amp;gt;[0];&lt;br /&gt;
                }&lt;br /&gt;
                if ($j &amp;amp;&amp;amp; @$j) {&lt;br /&gt;
                        # Yep, that first journal exists and has entries...&lt;br /&gt;
                        # convert from stupid numeric array to a hashref.&lt;br /&gt;
                        my @field = qw( date article description id&lt;br /&gt;
                                        posttype tid discussion         );&lt;br /&gt;
                        $lastjournal = { };&lt;br /&gt;
                        for my $i (0..$#field) {&lt;br /&gt;
                                $lastjournal-&amp;gt;{$field[$i]} = $j-&amp;gt;[$i];&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($lastjournal) {&lt;br /&gt;
&lt;br /&gt;
                # Strip the article field for display.&lt;br /&gt;
                $lastjournal-&amp;gt;{article} = strip_mode($lastjournal-&amp;gt;{article},&lt;br /&gt;
                        $lastjournal-&amp;gt;{posttype});&lt;br /&gt;
&lt;br /&gt;
                # For display, include a reduced-size version, where the&lt;br /&gt;
                # size is based on the user's maxcomment size (which&lt;br /&gt;
                # defaults to 4K) and can't have too many line-breaking&lt;br /&gt;
                # tags.&lt;br /&gt;
                my $art_shrunk = $lastjournal-&amp;gt;{article};&lt;br /&gt;
                my $maxsize = int($constants-&amp;gt;{default_maxcommentsize} / 25);&lt;br /&gt;
                $maxsize =  80 if $maxsize &amp;lt;  80;&lt;br /&gt;
                $maxsize = 600 if $maxsize &amp;gt; 600;&lt;br /&gt;
                $art_shrunk = chopEntity($art_shrunk, $maxsize);&lt;br /&gt;
&lt;br /&gt;
                my $approvedtags_break = $constants-&amp;gt;{approvedtags_break} || [];&lt;br /&gt;
                my $break_tag = join '|', @$approvedtags_break;&lt;br /&gt;
                if (scalar(() = $art_shrunk =~ /&amp;lt;(?:$break_tag)&amp;gt;/gi) &amp;gt; 2) {&lt;br /&gt;
                        $art_shrunk =~ s/\A&lt;br /&gt;
                        (&lt;br /&gt;
                                (?: &amp;lt;(?:$break_tag)&amp;gt; )?&lt;br /&gt;
                                .*?   &amp;lt;(?:$break_tag)&amp;gt;&lt;br /&gt;
                                .*?&lt;br /&gt;
                        )       &amp;lt;(?:$break_tag)&amp;gt;.*&lt;br /&gt;
                        /$1/six;&lt;br /&gt;
                        if (length($art_shrunk) &amp;lt; 15) {&lt;br /&gt;
                                # This journal entry has too much whitespace&lt;br /&gt;
                                # in its first few chars;  scrap it.&lt;br /&gt;
                                undef $art_shrunk;&lt;br /&gt;
                        }&lt;br /&gt;
                        $art_shrunk = chopEntity($art_shrunk) if defined($art_shrunk);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                if (defined $art_shrunk) {&lt;br /&gt;
                        if (length($art_shrunk) &amp;lt; length($lastjournal-&amp;gt;{article})) {&lt;br /&gt;
                                $art_shrunk .= &amp;quot; ...&amp;quot;;&lt;br /&gt;
                        }&lt;br /&gt;
                        $art_shrunk = strip_html($art_shrunk);&lt;br /&gt;
                        $art_shrunk = balanceTags($art_shrunk);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                $lastjournal-&amp;gt;{article_shrunk} = $art_shrunk;&lt;br /&gt;
&lt;br /&gt;
                if ($lastjournal-&amp;gt;{discussion}) {&lt;br /&gt;
                        $lastjournal-&amp;gt;{commentcount} = $reader-&amp;gt;getDiscussion(&lt;br /&gt;
                                $lastjournal-&amp;gt;{discussion}, 'commentcount');&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
        return $lastjournal;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#####################################################################&lt;br /&gt;
sub validateUser {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        # If we aren't expiring accounts in some way, we don't belong here.&lt;br /&gt;
        if (! allowExpiry()) {&lt;br /&gt;
                displayForm();&lt;br /&gt;
                return;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        # Since we are here, if the minimum values for the comment trigger and&lt;br /&gt;
        # the day trigger are -1, then they should be reset to 1.&lt;br /&gt;
        $constants-&amp;gt;{min_expiry_comm} = $constants-&amp;gt;{min_expiry_days} = 1&lt;br /&gt;
                if $constants-&amp;gt;{min_expiry_comm} &amp;lt;= 0 ||&lt;br /&gt;
                   $constants-&amp;gt;{min_expiry_days} &amp;lt;= 0;&lt;br /&gt;
&lt;br /&gt;
        if ($user-&amp;gt;{is_anon} || $user-&amp;gt;{registered}) {&lt;br /&gt;
                if ($user-&amp;gt;{is_anon}) {&lt;br /&gt;
                        print getError('anon_validation_attempt');&lt;br /&gt;
                        displayForm();&lt;br /&gt;
                        return;&lt;br /&gt;
                } else {&lt;br /&gt;
                        print getMessage('no_registration_needed')&lt;br /&gt;
                                if !$user-&amp;gt;{reg_id};&lt;br /&gt;
                        showInfo({ uid =&amp;gt; $user-&amp;gt;{uid} });&lt;br /&gt;
                        return;&lt;br /&gt;
                }&lt;br /&gt;
        # Maybe this should be taken care of in a more centralized location?&lt;br /&gt;
        } elsif ($user-&amp;gt;{reg_id} eq $form-&amp;gt;{id}) {&lt;br /&gt;
                # We have a user and the registration IDs match. We are happy!&lt;br /&gt;
                my($maxComm, $maxDays) = ($constants-&amp;gt;{max_expiry_comm},&lt;br /&gt;
                                          $constants-&amp;gt;{max_expiry_days});&lt;br /&gt;
                my($userComm, $userDays) =&lt;br /&gt;
                        ($user-&amp;gt;{user_expiry_comm}, $user-&amp;gt;{user_expiry_days});&lt;br /&gt;
&lt;br /&gt;
                # Ensure both $userComm and $userDays aren't -1 (expiry has&lt;br /&gt;
                # just been turned on).&lt;br /&gt;
                $userComm = $constants-&amp;gt;{min_expiry_comm}&lt;br /&gt;
                        if $userComm &amp;lt; $constants-&amp;gt;{min_expiry_comm};&lt;br /&gt;
                $userDays = $constants-&amp;gt;{min_expiry_days}&lt;br /&gt;
                        if $userDays &amp;lt; $constants-&amp;gt;{min_expiry_days};&lt;br /&gt;
&lt;br /&gt;
                my $exp = $constants-&amp;gt;{expiry_exponent};&lt;br /&gt;
&lt;br /&gt;
                # Increment only the trigger that was used.&lt;br /&gt;
                my $new_comment_expiry = ($maxComm &amp;gt; 0 &amp;amp;&amp;amp; $userComm &amp;gt; $maxComm)&lt;br /&gt;
                        ? $maxComm&lt;br /&gt;
                        : $userComm * (($user-&amp;gt;{expiry_comm} &amp;lt; 0)&lt;br /&gt;
                                ? $exp&lt;br /&gt;
                                : 1&lt;br /&gt;
                );&lt;br /&gt;
                my $new_days_expiry = ($maxDays &amp;gt; 0 &amp;amp;&amp;amp; $userDays &amp;gt; $maxDays)&lt;br /&gt;
                        ? $maxDays&lt;br /&gt;
                        : $userDays * (($user-&amp;gt;{expiry_days} &amp;lt; 0)&lt;br /&gt;
                                ? $exp&lt;br /&gt;
                                : 1&lt;br /&gt;
                );&lt;br /&gt;
&lt;br /&gt;
                # Reset re-registration triggers for user.&lt;br /&gt;
                $slashdb-&amp;gt;setUser($user-&amp;gt;{uid}, {&lt;br /&gt;
                        'expiry_comm'           =&amp;gt; $new_comment_expiry,&lt;br /&gt;
                        'expiry_days'           =&amp;gt; $new_days_expiry,&lt;br /&gt;
                        'user_expiry_comm'      =&amp;gt; $new_comment_expiry,&lt;br /&gt;
                        'user_expiry_days'      =&amp;gt; $new_days_expiry,&lt;br /&gt;
                });&lt;br /&gt;
&lt;br /&gt;
                # Handles rest of re-registration process.&lt;br /&gt;
                setUserExpired($user-&amp;gt;{uid}, 0);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('regResult');&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#####################################################################&lt;br /&gt;
sub editTags {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $user = getCurrentUser(); &lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $note = $hr-&amp;gt;{note} || &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        return if $user-&amp;gt;{is_anon}; # shouldn't be, but can't hurt to check&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        my $user_edit = $slashdb-&amp;gt;getUser($user-&amp;gt;{uid});&lt;br /&gt;
        my $title = getTitle('editTags_title');&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('editTags', {&lt;br /&gt;
                user_edit       =&amp;gt; $user_edit,&lt;br /&gt;
                title           =&amp;gt; $title,&lt;br /&gt;
                note            =&amp;gt; $note,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub saveTags {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        return if $user-&amp;gt;{is_anon}; # shouldn't be, but can't hurt to check&lt;br /&gt;
&lt;br /&gt;
        $slashdb-&amp;gt;setUser($user-&amp;gt;{uid}, {&lt;br /&gt;
                tags_turnedoff =&amp;gt;       $form-&amp;gt;{showtags} ? '' : 1 });&lt;br /&gt;
        editTags({ note =&amp;gt; getMessage('savetags_msg') });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#####################################################################&lt;br /&gt;
sub showTags {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $tags_reader = getObject('Slash::Tags', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
        # XXX if $user_edit-&amp;gt;{acl}{spammer}, either abort or put ref=nofollow in all links&lt;br /&gt;
&lt;br /&gt;
        my $tagname = $form-&amp;gt;{tagname} || '';&lt;br /&gt;
        $tagname = '' if !$tags_reader-&amp;gt;tagnameSyntaxOK($tagname);&lt;br /&gt;
&lt;br /&gt;
        my($uid, $user_edit);&lt;br /&gt;
        if ($form-&amp;gt;{uid} || $form-&amp;gt;{nick}) {&lt;br /&gt;
                $uid = $form-&amp;gt;{uid} || $tags_reader-&amp;gt;getUserUID($form-&amp;gt;{nick});&lt;br /&gt;
                $user_edit = $tags_reader-&amp;gt;getUser($uid);&lt;br /&gt;
        }&lt;br /&gt;
        if (!$user_edit || $user_edit-&amp;gt;{is_anon}) {&lt;br /&gt;
                $uid = $user-&amp;gt;{uid};&lt;br /&gt;
                $user_edit = $user;&lt;br /&gt;
        }&lt;br /&gt;
        my $nickname = $user_edit-&amp;gt;{nickname};&lt;br /&gt;
&lt;br /&gt;
        if (!$constants-&amp;gt;{plugin}{Tags}) {&lt;br /&gt;
                print getError('bad_op', { op =&amp;gt; $form-&amp;gt;{op}});&lt;br /&gt;
                return;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $tagnameid = $tags_reader-&amp;gt;getTagnameidFromNameIfExists($tagname);&lt;br /&gt;
        if ($tagnameid) {&lt;br /&gt;
                # Show all user's tags for one particular tagname.&lt;br /&gt;
                my $tags_hr = $tags_reader-&amp;gt;getGroupedTagsFromUser($user_edit-&amp;gt;{uid},&lt;br /&gt;
                        { tagnameid =&amp;gt; $tagnameid });&lt;br /&gt;
                my $tags_ar = $tags_hr-&amp;gt;{$tagname} || [ ];&lt;br /&gt;
                slashDisplay('usertagsforname', {&lt;br /&gt;
                        useredit        =&amp;gt; $user_edit,&lt;br /&gt;
                        tagname         =&amp;gt; $tagname,&lt;br /&gt;
                        tags            =&amp;gt; $tags_ar,&lt;br /&gt;
                });&lt;br /&gt;
&lt;br /&gt;
        } else {&lt;br /&gt;
                my $tags_hr = $tags_reader-&amp;gt;getGroupedTagsFromUser($user_edit-&amp;gt;{uid});&lt;br /&gt;
                my $num_tags = 0;&lt;br /&gt;
                for my $tn (keys %$tags_hr) {&lt;br /&gt;
                        $num_tags += scalar @{ $tags_hr-&amp;gt;{$tn} };&lt;br /&gt;
                }&lt;br /&gt;
                my $cutoff = $constants-&amp;gt;{tags_usershow_cutoff} || 200;&lt;br /&gt;
                if ($num_tags &amp;lt;= $cutoff) {&lt;br /&gt;
                        # Show all user's tags, grouped by tagname.&lt;br /&gt;
                        slashDisplay('usertags', {&lt;br /&gt;
                                useredit        =&amp;gt; $user_edit,&lt;br /&gt;
                                tags_grouped    =&amp;gt; $tags_hr,&lt;br /&gt;
                        });&lt;br /&gt;
                } else {&lt;br /&gt;
                        # Show all user's tagnames, with links to show all&lt;br /&gt;
                        # tags for each particular tagname.&lt;br /&gt;
                        my $tagname_ar = [ sort keys %$tags_hr ];&lt;br /&gt;
                        slashDisplay('usertagnames', {&lt;br /&gt;
                                useredit        =&amp;gt; $user_edit,&lt;br /&gt;
                                tagnames        =&amp;gt; $tagname_ar,&lt;br /&gt;
                        });&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub showBookmarks {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $tags_reader = getObject('Slash::Tags', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
        my($uid, $user_edit);&lt;br /&gt;
        if ($form-&amp;gt;{uid} || $form-&amp;gt;{nick}) {&lt;br /&gt;
                $uid = $form-&amp;gt;{uid} || $tags_reader-&amp;gt;getUserUID($form-&amp;gt;{nick});&lt;br /&gt;
                $user_edit = $tags_reader-&amp;gt;getUser($uid);&lt;br /&gt;
        }&lt;br /&gt;
        if (!$user_edit || $user_edit-&amp;gt;{is_anon}) {&lt;br /&gt;
                $uid = $user-&amp;gt;{uid};&lt;br /&gt;
                $user_edit = $user;&lt;br /&gt;
        }&lt;br /&gt;
        my $nickname = $user_edit-&amp;gt;{nickname};&lt;br /&gt;
&lt;br /&gt;
        if (!$constants-&amp;gt;{plugin}{Tags}) {&lt;br /&gt;
                print getError('bad_op', { op =&amp;gt; $form-&amp;gt;{op}});&lt;br /&gt;
                return;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $tags_ar = $tags_reader-&amp;gt;getGroupedTagsFromUser($user_edit-&amp;gt;{uid}, { type =&amp;gt; &amp;quot;urls&amp;quot;, only_bookmarked =&amp;gt; 1 });&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('userbookmarks', {&lt;br /&gt;
                useredit        =&amp;gt; $user_edit,&lt;br /&gt;
                tags_grouped    =&amp;gt; $tags_ar,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub editKey {&lt;br /&gt;
        my($uid) = @_;&lt;br /&gt;
&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
&lt;br /&gt;
        my $pubkey = $slashdb-&amp;gt;getUser($uid, 'pubkey');&lt;br /&gt;
        my $editkey = slashDisplay('editKey', { pubkey =&amp;gt; $pubkey }, 1);&lt;br /&gt;
        return $editkey;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
# We arrive here without header() having been called.  Some of the&lt;br /&gt;
# functions we dispatch to call it, some do not.&lt;br /&gt;
sub adminDispatch {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $op = $hr-&amp;gt;{op} || $form-&amp;gt;{op};&lt;br /&gt;
&lt;br /&gt;
        if ($op eq 'authoredit') {&lt;br /&gt;
                # editUser() does not call header(), so we DO need to.&lt;br /&gt;
                header(getMessage('user_header'), '', {}) or return;&lt;br /&gt;
                editUser($hr);&lt;br /&gt;
&lt;br /&gt;
        } elsif ($form-&amp;gt;{saveuseradmin}) {&lt;br /&gt;
                # saveUserAdmin() tail-calls showInfo(), which calls&lt;br /&gt;
                # header(), so we need to NOT.&lt;br /&gt;
                saveUserAdmin($hr);&lt;br /&gt;
&lt;br /&gt;
        } elsif ($form-&amp;gt;{userinfo}) {&lt;br /&gt;
                # showInfo() calls header(), so we need to NOT.&lt;br /&gt;
                showInfo($hr);&lt;br /&gt;
&lt;br /&gt;
        } elsif ($form-&amp;gt;{userfield}) {&lt;br /&gt;
                # none of these calls header(), so we DO need to.&lt;br /&gt;
                header(getMessage('user_header'), '', {}) or return;&lt;br /&gt;
                if ($form-&amp;gt;{edituser}) {&lt;br /&gt;
                        editUser($hr);&lt;br /&gt;
&lt;br /&gt;
                } elsif ($form-&amp;gt;{edithome}) {&lt;br /&gt;
                        editHome($hr);&lt;br /&gt;
&lt;br /&gt;
                } elsif ($form-&amp;gt;{editcomm}) {&lt;br /&gt;
                        editComm($hr);&lt;br /&gt;
&lt;br /&gt;
                } elsif ($form-&amp;gt;{changepasswd}) {&lt;br /&gt;
                        changePasswd($hr);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
        } else {&lt;br /&gt;
                # showInfo() calls header(), so we need to NOT.&lt;br /&gt;
                showInfo($hr);&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub tildeEd {&lt;br /&gt;
        my($user_edit) = @_;&lt;br /&gt;
&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        my %story023_default = (&lt;br /&gt;
                author  =&amp;gt; { },&lt;br /&gt;
                nexus   =&amp;gt; { },&lt;br /&gt;
                topic   =&amp;gt; { },&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        my %prefs = ( );&lt;br /&gt;
        for my $field (qw(&lt;br /&gt;
                story_never_topic       story_never_author      story_never_nexus&lt;br /&gt;
                story_always_topic      story_always_author     story_always_nexus      story_brief_always_nexus&lt;br /&gt;
                story_full_brief_nexus  story_full_best_nexus   story_brief_best_nexus&lt;br /&gt;
        )) {&lt;br /&gt;
                for my $id (&lt;br /&gt;
                        grep /^\d+$/,&lt;br /&gt;
                        split /,/,&lt;br /&gt;
                        ($user_edit-&amp;gt;{$field} || &amp;quot;&amp;quot;)&lt;br /&gt;
                ) {&lt;br /&gt;
                        $prefs{$field}{$id} = 1;&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
#print STDERR scalar(localtime) . &amp;quot; prefs: &amp;quot; . Dumper(\%prefs);&lt;br /&gt;
&lt;br /&gt;
        # Set up $author_hr, @aid_order, and $story023_default{author}.&lt;br /&gt;
&lt;br /&gt;
        my $author_hr = $reader-&amp;gt;getDescriptions('authors');&lt;br /&gt;
        my @aid_order = sort { lc $author_hr-&amp;gt;{$a} cmp lc $author_hr-&amp;gt;{$b} } keys %$author_hr;&lt;br /&gt;
        for my $aid (@aid_order) {&lt;br /&gt;
                     if ($prefs{story_never_author}{$aid}) {&lt;br /&gt;
                        $story023_default{author}{$aid} = 0;&lt;br /&gt;
                } elsif ($prefs{story_always_author}{$aid}) {&lt;br /&gt;
                        $story023_default{author}{$aid} = 3;&lt;br /&gt;
                } else {&lt;br /&gt;
                        $story023_default{author}{$aid} = 2;&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Set up $topic_hr, @topictid_order, and $story023_default{topic}.&lt;br /&gt;
&lt;br /&gt;
        my $topic_hr = $reader-&amp;gt;getDescriptions('non_nexus_topics-storypickable');&lt;br /&gt;
        my @topictid_order = sort { lc $topic_hr-&amp;gt;{$a} cmp lc $topic_hr-&amp;gt;{$b} } keys %$topic_hr;&lt;br /&gt;
        for my $tid (@topictid_order) {&lt;br /&gt;
                     if ($prefs{story_never_topic}{$tid}) {&lt;br /&gt;
                        $story023_default{topic}{$tid} = 0;&lt;br /&gt;
                } elsif ($prefs{story_always_topic}{$tid}) {&lt;br /&gt;
                        $story023_default{topic}{$tid} = 3;&lt;br /&gt;
                } else {&lt;br /&gt;
                        $story023_default{topic}{$tid} = 2;&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Set up $nexus_hr, @nexustid_order, and $story023_default{nexus}.&lt;br /&gt;
        my $topic_tree = $reader-&amp;gt;getTopicTree();&lt;br /&gt;
        my $nexus_tids_ar = $reader-&amp;gt;getStorypickableNexusChildren($constants-&amp;gt;{mainpage_nexus_tid}, 1);&lt;br /&gt;
        my $nexus_hr = { };&lt;br /&gt;
&lt;br /&gt;
        for my $tid (@$nexus_tids_ar) {&lt;br /&gt;
                $nexus_hr-&amp;gt;{$tid} = $topic_tree-&amp;gt;{$tid}{textname};&lt;br /&gt;
        }&lt;br /&gt;
        my @nexustid_order = sort {($b == $constants-&amp;gt;{mainpage_nexus_tid}) &amp;lt;=&amp;gt; ($a == $constants-&amp;gt;{mainpage_nexus_tid}) || &lt;br /&gt;
                                    lc $nexus_hr-&amp;gt;{$a} cmp lc $nexus_hr-&amp;gt;{$b} } keys %$nexus_hr;&lt;br /&gt;
&lt;br /&gt;
        my $mp_disp_nexuses = $reader-&amp;gt;getMainpageDisplayableNexuses();&lt;br /&gt;
        my %mp_disp_nexus = ( map { ($_, 1) } @$mp_disp_nexuses );&lt;br /&gt;
        for my $tid (@nexustid_order) {&lt;br /&gt;
                     if ($prefs{story_never_nexus}{$tid}) {&lt;br /&gt;
                        $story023_default{nexus}{$tid} = 0;&lt;br /&gt;
                } elsif ($prefs{story_always_nexus}{$tid}) {&lt;br /&gt;
                        $story023_default{nexus}{$tid} = 5;&lt;br /&gt;
                } elsif ($prefs{story_full_brief_nexus}{$tid}) {&lt;br /&gt;
                        $story023_default{nexus}{$tid} = 4;&lt;br /&gt;
                } elsif ($prefs{story_brief_always_nexus}{$tid}) {&lt;br /&gt;
                        $story023_default{nexus}{$tid} = 3;&lt;br /&gt;
                } elsif ($prefs{story_full_best_nexus}{$tid}) {&lt;br /&gt;
                        $story023_default{nexus}{$tid} = 2;&lt;br /&gt;
                } elsif ($prefs{story_brief_best_nexus}{$tid}) {&lt;br /&gt;
                        $story023_default{nexus}{$tid} = 1;&lt;br /&gt;
                } else {&lt;br /&gt;
                        # If brief_sectional_mainpage is set, then all&lt;br /&gt;
                        # nexuses in getMainpageDisplayableNexuses are,&lt;br /&gt;
                        # by default, shown as brief on the mainpage.&lt;br /&gt;
                        if ($constants-&amp;gt;{brief_sectional_mainpage}&lt;br /&gt;
                                &amp;amp;&amp;amp; $mp_disp_nexus{$tid}&lt;br /&gt;
                        ) {&lt;br /&gt;
                                $story023_default{nexus}{$tid} = 4;&lt;br /&gt;
                        } else {&lt;br /&gt;
                                $story023_default{nexus}{$tid} = 2;&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Set up $section_descref and $box_order, used to decide which&lt;br /&gt;
        # slashboxes appear.  Really this doesn't seem to have anything&lt;br /&gt;
        # to do with sections, so I'm not sure why it's called&lt;br /&gt;
        # &amp;quot;section&amp;quot;_descref.&lt;br /&gt;
&lt;br /&gt;
        my $section_descref = { };&lt;br /&gt;
        my $box_order;&lt;br /&gt;
        my $sections_description = $reader-&amp;gt;getSectionBlocks();&lt;br /&gt;
&lt;br /&gt;
        # the names of all the boxes in @{$skinBoxes-&amp;gt;{$constants-&amp;gt;{mainpage_skid}}}&lt;br /&gt;
        # should be unioned into sections_description.  whether the&lt;br /&gt;
        # values are 0 or 1 is calculated correctly, but we're&lt;br /&gt;
        # missing some 0's that should appear, I think, under&lt;br /&gt;
        # some circumstances.  ah heck, the whole concept of&lt;br /&gt;
        # sectional slashboxes should be redone (why the heck&lt;br /&gt;
        # do we have skinname_more instead of just a block&lt;br /&gt;
        # called olderstories?)&lt;br /&gt;
&lt;br /&gt;
        my $slashboxes_hr = { };&lt;br /&gt;
        my $slashboxes_textlist = $user_edit-&amp;gt;{slashboxes};&lt;br /&gt;
        if (!$slashboxes_textlist) {&lt;br /&gt;
                # Use the default.&lt;br /&gt;
                my($boxes, $skinBoxes) = $reader-&amp;gt;getPortalsCommon();&lt;br /&gt;
                $slashboxes_textlist = join &amp;quot;,&amp;quot;, @{$skinBoxes-&amp;gt;{$constants-&amp;gt;{mainpage_skid}}};&lt;br /&gt;
        }&lt;br /&gt;
        for my $bid (&lt;br /&gt;
                map { /^'?([^']+)'?$/; $1 }&lt;br /&gt;
                split /,/,&lt;br /&gt;
                $slashboxes_textlist&lt;br /&gt;
        ) {&lt;br /&gt;
                $slashboxes_hr-&amp;gt;{$bid} = 1;&lt;br /&gt;
        }&lt;br /&gt;
        for my $ary (sort { lc $a-&amp;gt;[1] cmp lc $b-&amp;gt;[1]} @$sections_description) {&lt;br /&gt;
                my($bid, $title, $boldflag) = @$ary;&lt;br /&gt;
                push @$box_order, $bid;&lt;br /&gt;
                $section_descref-&amp;gt;{$bid}{checked} =&lt;br /&gt;
                        $slashboxes_hr-&amp;gt;{$bid}&lt;br /&gt;
                                ? $constants-&amp;gt;{markup_checked_attribute}&lt;br /&gt;
                                : '';&lt;br /&gt;
                $title =~ s/&amp;lt;(.*?)&amp;gt;//g;&lt;br /&gt;
                $section_descref-&amp;gt;{$bid}{title} = $title;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $dynamic_blocks = getObject(&amp;quot;Slash::DynamicBlocks&amp;quot;);&lt;br /&gt;
        my $extra_blocks = [];&lt;br /&gt;
        if ($dynamic_blocks) {&lt;br /&gt;
                my $userblocks = $dynamic_blocks-&amp;gt;getUserBlocks(&amp;quot;name&amp;quot;, $user_edit-&amp;gt;{uid}) || {};&lt;br /&gt;
                my $friendblocks = $dynamic_blocks-&amp;gt;getFriendBlocks(&amp;quot;name&amp;quot;, $user_edit-&amp;gt;{uid}) || {};&lt;br /&gt;
                push(@$extra_blocks, grep { $slashboxes_textlist =~ $_; } (keys(%$userblocks), keys(%$friendblocks)));&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Userspace.&lt;br /&gt;
        my $userspace = $user_edit-&amp;gt;{mylinks} || &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        # Titles of stuff.&lt;br /&gt;
        my $tildeEd_title = getTitle('tildeEd_title');&lt;br /&gt;
        my $criteria_msg = getMessage('tilded_criteria_msg');&lt;br /&gt;
        my $customize_title = getTitle('tildeEd_customize_title');&lt;br /&gt;
        my $tilded_customize_msg = getMessage('tilded_customize_msg',&lt;br /&gt;
                { userspace =&amp;gt; $userspace });&lt;br /&gt;
        my $tilded_box_msg = getMessage('tilded_box_msg');&lt;br /&gt;
&lt;br /&gt;
        my $tilde_ed = slashDisplay('tildeEd', {&lt;br /&gt;
                user_edit               =&amp;gt; $user_edit,&lt;br /&gt;
                title                   =&amp;gt; $tildeEd_title,&lt;br /&gt;
                criteria_msg            =&amp;gt; $criteria_msg,&lt;br /&gt;
                customize_title         =&amp;gt; $customize_title,&lt;br /&gt;
                tilded_customize_msg    =&amp;gt; $tilded_customize_msg,&lt;br /&gt;
                tilded_box_msg          =&amp;gt; $tilded_box_msg,&lt;br /&gt;
&lt;br /&gt;
                story023_default        =&amp;gt; \%story023_default,&lt;br /&gt;
                authorref               =&amp;gt; $author_hr,&lt;br /&gt;
                aid_order               =&amp;gt; \@aid_order,&lt;br /&gt;
                topicref                =&amp;gt; $topic_hr,&lt;br /&gt;
                topictid_order          =&amp;gt; \@topictid_order,&lt;br /&gt;
                nexusref                =&amp;gt; $nexus_hr,&lt;br /&gt;
                nexustid_order          =&amp;gt; \@nexustid_order,&lt;br /&gt;
&lt;br /&gt;
                section_descref         =&amp;gt; $section_descref,&lt;br /&gt;
                box_order               =&amp;gt; $box_order,&lt;br /&gt;
&lt;br /&gt;
                userspace               =&amp;gt; $userspace,&lt;br /&gt;
                extra_blocks            =&amp;gt; $extra_blocks,&lt;br /&gt;
        }, 1);&lt;br /&gt;
&lt;br /&gt;
        return $tilde_ed;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub changePasswd {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        my $user_edit = {};&lt;br /&gt;
        my $title;&lt;br /&gt;
        my $suadmin_flag = ($user-&amp;gt;{seclev} &amp;gt;= 10000) ? 1 : 0;&lt;br /&gt;
&lt;br /&gt;
        my $admin_flag = ($user-&amp;gt;{is_admin}) ? 1 : 0;&lt;br /&gt;
        my $admin_block = '';&lt;br /&gt;
&lt;br /&gt;
        my $id = '';&lt;br /&gt;
        if ($admin_flag) {&lt;br /&gt;
                if ($form-&amp;gt;{userfield}) {&lt;br /&gt;
                        $id ||= $form-&amp;gt;{userfield};&lt;br /&gt;
                        if ($id =~ /^\d+$/) {&lt;br /&gt;
                                $user_edit = $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                        } else {&lt;br /&gt;
                                $user_edit = $slashdb-&amp;gt;getUser($slashdb-&amp;gt;getUserUID($id));&lt;br /&gt;
                        }&lt;br /&gt;
                } else {&lt;br /&gt;
                        $user_edit = $id eq '' ? $user : $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                        $id = $user_edit-&amp;gt;{uid};&lt;br /&gt;
                }&lt;br /&gt;
        } else {&lt;br /&gt;
                $id = $user-&amp;gt;{uid};&lt;br /&gt;
                $user_edit = $user;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        $admin_block = getUserAdmin($id, 'uid', 1) if $admin_flag;&lt;br /&gt;
&lt;br /&gt;
        # print getMessage('note', { note =&amp;gt; $form-&amp;gt;{note}}) if $form-&amp;gt;{note};&lt;br /&gt;
&lt;br /&gt;
        $title = getTitle('changePasswd_title', { user_edit =&amp;gt; $user_edit });&lt;br /&gt;
&lt;br /&gt;
        my $session = $slashdb-&amp;gt;getDescriptions('session_login');&lt;br /&gt;
        my $session_select = createSelect('session_login', $session, $user_edit-&amp;gt;{session_login}, 1);&lt;br /&gt;
&lt;br /&gt;
        my $clocation = $slashdb-&amp;gt;getDescriptions('cookie_location');&lt;br /&gt;
        my @clocation_order = grep { exists $clocation-&amp;gt;{$_} } qw(none classbid subnetid ipid);&lt;br /&gt;
        my $clocation_select = createSelect('cookie_location', $clocation,&lt;br /&gt;
                $user_edit-&amp;gt;{cookie_location}, 1, 0, \@clocation_order&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        my $got_oldpass = 0;&lt;br /&gt;
        if ($form-&amp;gt;{oldpass}) {&lt;br /&gt;
                my $return_uid = $slashdb-&amp;gt;getUserAuthenticate($id, $form-&amp;gt;{oldpass}, 1);&lt;br /&gt;
                $got_oldpass = 1 if $return_uid &amp;amp;&amp;amp; $id == $return_uid;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('changePasswd', {&lt;br /&gt;
                useredit                =&amp;gt; $user_edit,&lt;br /&gt;
                admin_flag              =&amp;gt; $suadmin_flag,&lt;br /&gt;
                title                   =&amp;gt; $title,&lt;br /&gt;
                session                 =&amp;gt; $session_select,&lt;br /&gt;
                clocation               =&amp;gt; $clocation_select,&lt;br /&gt;
                admin_block             =&amp;gt; $admin_block,&lt;br /&gt;
                got_oldpass             =&amp;gt; $got_oldpass&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub editUser {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $id = $hr-&amp;gt;{uid} || '';&lt;br /&gt;
        my $note = $hr-&amp;gt;{note} || '';&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $plugins = $slashdb-&amp;gt;getDescriptions('plugins');&lt;br /&gt;
&lt;br /&gt;
        my $user_edit = {};&lt;br /&gt;
        my($admin_block, $title);&lt;br /&gt;
        my $admin_flag = ($user-&amp;gt;{is_admin}) ? 1 : 0;&lt;br /&gt;
        my $fieldkey;&lt;br /&gt;
&lt;br /&gt;
        if ($admin_flag &amp;amp;&amp;amp; $form-&amp;gt;{userfield}) {&lt;br /&gt;
                $id ||= $form-&amp;gt;{userfield};&lt;br /&gt;
                if ($form-&amp;gt;{userfield} =~ /^\d+$/) {&lt;br /&gt;
                        $user_edit = $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                        $fieldkey = 'uid';&lt;br /&gt;
                } else {&lt;br /&gt;
                        $user_edit = $slashdb-&amp;gt;getUser($slashdb-&amp;gt;getUserUID($id));&lt;br /&gt;
                        $fieldkey = 'nickname';&lt;br /&gt;
                }&lt;br /&gt;
        } else {&lt;br /&gt;
                $user_edit = $id eq '' ? $user : $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                $fieldkey = 'uid';&lt;br /&gt;
                $id = $user_edit-&amp;gt;{uid};&lt;br /&gt;
        }&lt;br /&gt;
        return if isAnon($user_edit-&amp;gt;{uid}) &amp;amp;&amp;amp; ! $admin_flag;&lt;br /&gt;
&lt;br /&gt;
        $admin_block = getUserAdmin($id, $fieldkey, 1) if $admin_flag;&lt;br /&gt;
        $user_edit-&amp;gt;{homepage} ||= &amp;quot;http://&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        # Remove domain tags, they'll be added back in, in saveUser.&lt;br /&gt;
        for my $dat (@{$user_edit}{qw(sig bio)}) {&lt;br /&gt;
                $dat = parseDomainTags($dat, 0, 1);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        $title = getTitle('editUser_title', { user_edit =&amp;gt; $user_edit});&lt;br /&gt;
&lt;br /&gt;
        my $editkey = &amp;quot;&amp;quot;;&lt;br /&gt;
        $editkey = editKey($user_edit-&amp;gt;{uid}) if $fieldkey eq 'uid' &amp;amp;&amp;amp; $plugins-&amp;gt;{PubKey};&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('editUser', {&lt;br /&gt;
                useredit                =&amp;gt; $user_edit,&lt;br /&gt;
                admin_flag              =&amp;gt; $admin_flag,&lt;br /&gt;
                title                   =&amp;gt; $title,&lt;br /&gt;
                editkey                 =&amp;gt; $editkey,&lt;br /&gt;
                admin_block             =&amp;gt; $admin_block,&lt;br /&gt;
                note                    =&amp;gt; $note,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub editHome {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $id = $hr-&amp;gt;{uid} || '';&lt;br /&gt;
        my $note = $hr-&amp;gt;{note} || '';&lt;br /&gt;
&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        my($formats, $title, $tzformat_select);&lt;br /&gt;
        my $user_edit = {};&lt;br /&gt;
        my $fieldkey;&lt;br /&gt;
&lt;br /&gt;
        my $admin_flag = ($user-&amp;gt;{is_admin}) ? 1 : 0;&lt;br /&gt;
        my $admin_block = '';&lt;br /&gt;
&lt;br /&gt;
        if ($admin_flag &amp;amp;&amp;amp; $form-&amp;gt;{userfield}) {&lt;br /&gt;
                $id ||= $form-&amp;gt;{userfield};&lt;br /&gt;
                if ($form-&amp;gt;{userfield} =~ /^\d+$/) {&lt;br /&gt;
                        $user_edit = $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                        $fieldkey = 'uid';&lt;br /&gt;
                } else {&lt;br /&gt;
                        $user_edit = $slashdb-&amp;gt;getUser($slashdb-&amp;gt;getUserUID($id));&lt;br /&gt;
                        $fieldkey = 'nickname';&lt;br /&gt;
                }&lt;br /&gt;
        } else {&lt;br /&gt;
                $user_edit = $id eq '' ? $user : $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                $fieldkey = 'uid';&lt;br /&gt;
        }&lt;br /&gt;
#use Data::Dumper; $Data::Dumper::Sortkeys = 1; print STDERR scalar(localtime) . &amp;quot; user_edit: &amp;quot; . Dumper($user_edit);&lt;br /&gt;
&lt;br /&gt;
        return if isAnon($user_edit-&amp;gt;{uid}) &amp;amp;&amp;amp; ! $admin_flag;&lt;br /&gt;
        $admin_block = getUserAdmin($id, $fieldkey, 1) if $admin_flag;&lt;br /&gt;
&lt;br /&gt;
        $title = getTitle('editHome_title');&lt;br /&gt;
&lt;br /&gt;
        return if $user-&amp;gt;{seclev} &amp;lt; 100 &amp;amp;&amp;amp; isAnon($user_edit-&amp;gt;{uid});&lt;br /&gt;
&lt;br /&gt;
        $formats = $slashdb-&amp;gt;getDescriptions('dateformats');&lt;br /&gt;
        $tzformat_select = createSelect('tzformat', $formats, $user_edit-&amp;gt;{dfid}, 1);&lt;br /&gt;
&lt;br /&gt;
        my $lb_check = $user_edit-&amp;gt;{lowbandwidth} ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $sd_check = $user_edit-&amp;gt;{simpledesign} ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $i_check = $user_edit-&amp;gt;{noicons}     ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $w_check = $user_edit-&amp;gt;{willing}     ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $classic_check = $user_edit-&amp;gt;{index_classic} ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
&lt;br /&gt;
        my $tilde_ed = tildeEd($user_edit);&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('editHome', {&lt;br /&gt;
                title                   =&amp;gt; $title,&lt;br /&gt;
                admin_block             =&amp;gt; $admin_block,&lt;br /&gt;
                user_edit               =&amp;gt; $user_edit,&lt;br /&gt;
                tzformat_select         =&amp;gt; $tzformat_select,&lt;br /&gt;
                i_check                 =&amp;gt; $i_check,&lt;br /&gt;
                w_check                 =&amp;gt; $w_check,&lt;br /&gt;
                lb_check                =&amp;gt; $lb_check,&lt;br /&gt;
                sd_check                =&amp;gt; $sd_check,&lt;br /&gt;
                classic_check           =&amp;gt; $classic_check,&lt;br /&gt;
                tilde_ed                =&amp;gt; $tilde_ed,&lt;br /&gt;
                note                    =&amp;gt; $note,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub editComm {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $id = $hr-&amp;gt;{uid} || '';&lt;br /&gt;
        my $note = $hr-&amp;gt;{note} || '';&lt;br /&gt;
&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user_edit = {};&lt;br /&gt;
        my($formats, $commentmodes_select, $commentsort_select, $title,&lt;br /&gt;
                $uthreshold_select, $highlightthresh_select, $posttype_select,&lt;br /&gt;
                $bytelimit_select);&lt;br /&gt;
&lt;br /&gt;
        my $admin_block = '';&lt;br /&gt;
        my $fieldkey;&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        my $admin_flag = $user-&amp;gt;{is_admin} ? 1 : 0;&lt;br /&gt;
&lt;br /&gt;
        if ($admin_flag &amp;amp;&amp;amp; $form-&amp;gt;{userfield}) {&lt;br /&gt;
                $id ||= $form-&amp;gt;{userfield};&lt;br /&gt;
                if ($form-&amp;gt;{userfield} =~ /^\d+$/) {&lt;br /&gt;
                        $user_edit = $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                        $fieldkey = 'uid';&lt;br /&gt;
                } else {&lt;br /&gt;
                        $user_edit = $slashdb-&amp;gt;getUser($slashdb-&amp;gt;getUserUID($id));&lt;br /&gt;
                        $fieldkey = 'nickname';&lt;br /&gt;
                }&lt;br /&gt;
        } else {&lt;br /&gt;
                $user_edit = $id eq '' ? $user : $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                $fieldkey = 'uid';&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $hi = $constants-&amp;gt;{comment_maxscore} - $constants-&amp;gt;{comment_minscore};&lt;br /&gt;
        my $lo = -$hi;&lt;br /&gt;
        my @range = map { $_ &amp;gt; 0 ? &amp;quot;+$_&amp;quot; : $_ } ($lo .. $hi);&lt;br /&gt;
&lt;br /&gt;
        my @reasons = ( );&lt;br /&gt;
        my %reason_select = ( );&lt;br /&gt;
        if ($constants-&amp;gt;{m1}) {&lt;br /&gt;
                my $mod_reader = getObject(&amp;quot;Slash::$constants-&amp;gt;{m1_pluginname}&amp;quot;, { db_type =&amp;gt; 'reader' });&lt;br /&gt;
                my $reasons = $mod_reader-&amp;gt;getReasons();&lt;br /&gt;
                for my $id (sort { $a &amp;lt;=&amp;gt; $b } keys %$reasons) {&lt;br /&gt;
                        push @reasons, $reasons-&amp;gt;{$id}{name};&lt;br /&gt;
                }&lt;br /&gt;
                # Reason modifiers&lt;br /&gt;
                for my $reason_name (@reasons) {&lt;br /&gt;
                        my $key = &amp;quot;reason_alter_$reason_name&amp;quot;;&lt;br /&gt;
                        $reason_select{$reason_name} = createSelect(&lt;br /&gt;
                                $key, \@range, &lt;br /&gt;
                                $user_edit-&amp;gt;{$key} || 0, 1, 1&lt;br /&gt;
                        );&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Zoo relation modifiers&lt;br /&gt;
        my %people_select;&lt;br /&gt;
        my @people =  qw(friend foe anonymous fof eof freak fan);&lt;br /&gt;
        for (@people) {&lt;br /&gt;
                my $key = &amp;quot;people_bonus_$_&amp;quot;;&lt;br /&gt;
                $people_select{$_} = createSelect($key, \@range, &lt;br /&gt;
                        $user_edit-&amp;gt;{$key} || 0, 1, 1&lt;br /&gt;
                );&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # New-user modifier&lt;br /&gt;
        my $new_user_bonus_select = createSelect('new_user_bonus', \@range, &lt;br /&gt;
                        $user_edit-&amp;gt;{new_user_bonus} || 0, 1, 1);&lt;br /&gt;
        my $new_user_percent_select = createSelect('new_user_percent',&lt;br /&gt;
                        [( 1..15, 20, 25, 30, 35, 40, 45, 50, 55,&lt;br /&gt;
                          60, 65, 70, 75, 80, 85, 90, 95 )], &lt;br /&gt;
                        $user_edit-&amp;gt;{new_user_percent} || 100, 1, 1);&lt;br /&gt;
        # Karma modifier&lt;br /&gt;
        my $karma_bonus = createSelect('karma_bonus', \@range, &lt;br /&gt;
                        $user_edit-&amp;gt;{karma_bonus} || 0, 1, 1);&lt;br /&gt;
        # Subscriber modifier&lt;br /&gt;
        my $subscriber_bonus = createSelect('subscriber_bonus', \@range, &lt;br /&gt;
                        $user_edit-&amp;gt;{subscriber_bonus} || 0, 1, 1);&lt;br /&gt;
&lt;br /&gt;
        # Length modifier&lt;br /&gt;
        my $small_length_bonus_select = createSelect('clsmall_bonus', \@range, &lt;br /&gt;
                        $user_edit-&amp;gt;{clsmall_bonus} || 0, 1, 1);&lt;br /&gt;
        my $long_length_bonus_select = createSelect('clbig_bonus', \@range, &lt;br /&gt;
                        $user_edit-&amp;gt;{clbig_bonus} || 0, 1, 1);&lt;br /&gt;
&lt;br /&gt;
        return if isAnon($user_edit-&amp;gt;{uid}) &amp;amp;&amp;amp; ! $admin_flag;&lt;br /&gt;
        $admin_block = getUserAdmin($id, $fieldkey, 1) if $admin_flag;&lt;br /&gt;
&lt;br /&gt;
        $title = getTitle('editComm_title');&lt;br /&gt;
&lt;br /&gt;
        $formats = $slashdb-&amp;gt;getDescriptions('commentmodes');&lt;br /&gt;
        $commentmodes_select=createSelect('umode', $formats, $user_edit-&amp;gt;{mode}, 1);&lt;br /&gt;
&lt;br /&gt;
        $formats = $slashdb-&amp;gt;getDescriptions('sortcodes');&lt;br /&gt;
        $commentsort_select = createSelect(&lt;br /&gt;
                'commentsort', $formats, $user_edit-&amp;gt;{commentsort}, 1&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        $formats = $slashdb-&amp;gt;getDescriptions('threshcodes');&lt;br /&gt;
        $uthreshold_select = createSelect(&lt;br /&gt;
                'uthreshold', $formats, $user_edit-&amp;gt;{threshold}, 1&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        $formats = $slashdb-&amp;gt;getDescriptions('threshcodes');&lt;br /&gt;
        $highlightthresh_select = createSelect(&lt;br /&gt;
                'highlightthresh', $formats, $user_edit-&amp;gt;{highlightthresh}, 1&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        $user_edit-&amp;gt;{bytelimit} = $constants-&amp;gt;{defaultbytelimit}&lt;br /&gt;
                if $user_edit-&amp;gt;{bytelimit} &amp;lt; 0 || $user_edit-&amp;gt;{bytelimit} &amp;gt; 7;&lt;br /&gt;
        my $bytelimit_desc = $user_edit-&amp;gt;{is_subscriber} ? 'bytelimit' : 'bytelimit_sub';&lt;br /&gt;
        $formats = $slashdb-&amp;gt;getDescriptions($bytelimit_desc);&lt;br /&gt;
        $bytelimit_select = createSelect(&lt;br /&gt;
                'bytelimit', $formats, $user_edit-&amp;gt;{bytelimit}, 1&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        my $h_check  = $user_edit-&amp;gt;{hardthresh}          ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $r_check  = $user_edit-&amp;gt;{reparent}            ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $n_check  = $user_edit-&amp;gt;{noscores}            ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $s_check  = $user_edit-&amp;gt;{nosigs}              ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $b_check  = $user_edit-&amp;gt;{nobonus}             ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $sb_check = $user_edit-&amp;gt;{nosubscriberbonus}   ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $p_check  = $user_edit-&amp;gt;{postanon}            ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $nospell_check = $user_edit-&amp;gt;{no_spell}       ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $s_mod_check = $user_edit-&amp;gt;{mod_with_comm}    ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $s_m2_check = $user_edit-&amp;gt;{m2_with_mod}       ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        my $s_m2c_check = $user_edit-&amp;gt;{m2_with_comm_mod} ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
&lt;br /&gt;
        $formats = $slashdb-&amp;gt;getDescriptions('postmodes');&lt;br /&gt;
        $posttype_select = createSelect(&lt;br /&gt;
                'posttype', $formats, $user_edit-&amp;gt;{posttype}, 1&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('editComm', {&lt;br /&gt;
                title                   =&amp;gt; $title,&lt;br /&gt;
                admin_block             =&amp;gt; $admin_block,&lt;br /&gt;
                user_edit               =&amp;gt; $user_edit,&lt;br /&gt;
                h_check                 =&amp;gt; $h_check,&lt;br /&gt;
                r_check                 =&amp;gt; $r_check,&lt;br /&gt;
                n_check                 =&amp;gt; $n_check,&lt;br /&gt;
                s_check                 =&amp;gt; $s_check,&lt;br /&gt;
                b_check                 =&amp;gt; $b_check,&lt;br /&gt;
                sb_check                =&amp;gt; $sb_check,&lt;br /&gt;
                p_check                 =&amp;gt; $p_check,&lt;br /&gt;
                s_mod_check             =&amp;gt; $s_mod_check,&lt;br /&gt;
                s_m2_check              =&amp;gt; $s_m2_check,&lt;br /&gt;
                s_m2c_check             =&amp;gt; $s_m2c_check,&lt;br /&gt;
                nospell_check           =&amp;gt; $nospell_check,&lt;br /&gt;
                commentmodes_select     =&amp;gt; $commentmodes_select,&lt;br /&gt;
                commentsort_select      =&amp;gt; $commentsort_select,&lt;br /&gt;
                highlightthresh_select  =&amp;gt; $highlightthresh_select,&lt;br /&gt;
                uthreshold_select       =&amp;gt; $uthreshold_select,&lt;br /&gt;
                posttype_select         =&amp;gt; $posttype_select,&lt;br /&gt;
                reasons                 =&amp;gt; \@reasons,&lt;br /&gt;
                reason_select           =&amp;gt; \%reason_select,&lt;br /&gt;
                people                  =&amp;gt; \@people,&lt;br /&gt;
                people_select           =&amp;gt; \%people_select,&lt;br /&gt;
                new_user_percent_select =&amp;gt; $new_user_percent_select,&lt;br /&gt;
                new_user_bonus_select   =&amp;gt; $new_user_bonus_select,&lt;br /&gt;
                note                    =&amp;gt; $note,&lt;br /&gt;
                karma_bonus             =&amp;gt; $karma_bonus,&lt;br /&gt;
                subscriber_bonus        =&amp;gt; $subscriber_bonus,&lt;br /&gt;
                small_length_bonus_select =&amp;gt; $small_length_bonus_select,&lt;br /&gt;
                long_length_bonus_select =&amp;gt; $long_length_bonus_select,&lt;br /&gt;
                bytelimit_select        =&amp;gt; $bytelimit_select,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub saveUserAdmin {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        my($user_edits_table, $user_edit) = ({}, {});&lt;br /&gt;
        my $author_flag;&lt;br /&gt;
        my $note = '';&lt;br /&gt;
        my $srcid;&lt;br /&gt;
        my $id;&lt;br /&gt;
        my $user_editfield_flag;&lt;br /&gt;
        my $banned = 0;&lt;br /&gt;
        my $banref;&lt;br /&gt;
        if ($form-&amp;gt;{uid}) {&lt;br /&gt;
                $user_editfield_flag = 'uid';&lt;br /&gt;
                $id = $form-&amp;gt;{uid};&lt;br /&gt;
                $user_edit = $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                $srcid = $id;&lt;br /&gt;
&lt;br /&gt;
        } elsif ($form-&amp;gt;{subnetid}) {&lt;br /&gt;
                $user_editfield_flag = 'subnetid';&lt;br /&gt;
                ($id, $user_edit-&amp;gt;{subnetid})  = ($form-&amp;gt;{subnetid}, $form-&amp;gt;{subnetid});&lt;br /&gt;
                $user_edit-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                $srcid = convert_srcid(subnetid =&amp;gt; $id);&lt;br /&gt;
&lt;br /&gt;
        } elsif ($form-&amp;gt;{ipid}) {&lt;br /&gt;
                $user_editfield_flag = 'ipid';&lt;br /&gt;
                ($id, $user_edit-&amp;gt;{ipid})  = ($form-&amp;gt;{ipid}, $form-&amp;gt;{ipid});&lt;br /&gt;
                $user_edit-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                $srcid = convert_srcid(ipid =&amp;gt; $id);&lt;br /&gt;
&lt;br /&gt;
        } elsif ($form-&amp;gt;{md5id}) {&lt;br /&gt;
                $user_editfield_flag = 'md5id';&lt;br /&gt;
                my $fieldname = $form-&amp;gt;{fieldname} || 'md5id';&lt;br /&gt;
                ($id, $user_edit-&amp;gt;{$fieldname})&lt;br /&gt;
                        = ($form-&amp;gt;{md5id}, $form-&amp;gt;{md5id});&lt;br /&gt;
                warn &amp;quot;form field md5id specified, no srcid saving possible&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        } elsif ($form-&amp;gt;{srcid}) {&lt;br /&gt;
                $user_editfield_flag = 'srcid';&lt;br /&gt;
                my $fieldname = $form-&amp;gt;{fieldname} || 'srcid';&lt;br /&gt;
                ($id, $user_edit-&amp;gt;{$fieldname})&lt;br /&gt;
                        = ($form-&amp;gt;{srcid}, $form-&amp;gt;{srcid});&lt;br /&gt;
                $srcid = $id;&lt;br /&gt;
&lt;br /&gt;
        } else {&lt;br /&gt;
                # If we were not fed valid data, don't do anything.&lt;br /&gt;
                return ;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $all_al2types = $reader-&amp;gt;getAL2Types;&lt;br /&gt;
        my $al2_change = { };&lt;br /&gt;
&lt;br /&gt;
        # First, get a hash of what aclams (AL2's and ACLs) this user&lt;br /&gt;
        # had when the previous admin page was loaded.&lt;br /&gt;
        # XXXSRCID Right now acl_old is just calculated for debugging&lt;br /&gt;
        # printing purposes, not actually used.&lt;br /&gt;
        my @al2_old = ( );&lt;br /&gt;
        @al2_old =&lt;br /&gt;
                @{ $form-&amp;gt;{al2_old_multiple}   } if $form-&amp;gt;{al2_old_multiple};&lt;br /&gt;
        my %al2_old = ( map { ($_, 1) } @al2_old );&lt;br /&gt;
        my @acl_old = ( );&lt;br /&gt;
        @acl_old =&lt;br /&gt;
                @{ $form-&amp;gt;{acl_old_multiple}   } if $form-&amp;gt;{acl_old_multiple};&lt;br /&gt;
        my %acl_old = ( map { ($_, 1) } @acl_old );&lt;br /&gt;
&lt;br /&gt;
        # Next, get the list of the new data submitted.  Separate&lt;br /&gt;
        # it out into AL2's which are legitimate.  Anything left&lt;br /&gt;
        # over is an ACL.&lt;br /&gt;
        my @al2_new_formfields = ( );&lt;br /&gt;
        @al2_new_formfields = @{ $form-&amp;gt;{aclams_new_multiple} } if $form-&amp;gt;{aclams_new_multiple};&lt;br /&gt;
        my @al2_new_submitted = map { s/^aclam_//; $_ } @al2_new_formfields;&lt;br /&gt;
        my @al2_new = grep { exists $all_al2types-&amp;gt;{$_} } @al2_new_submitted;&lt;br /&gt;
        my %al2_new = ( map { ($_, 1) } @al2_new );&lt;br /&gt;
        my @acl_new = grep { !$al2_new{$_} } @al2_new_submitted;&lt;br /&gt;
        my %acl_new = ( map { ($_, 1) } @acl_new );&lt;br /&gt;
&lt;br /&gt;
        # Find out what changed for AL2's.&lt;br /&gt;
        for my $al2 (@al2_old, @al2_new) {&lt;br /&gt;
                next if defined($al2_old{$al2}) &amp;amp;&amp;amp; defined($al2_new{$al2})&lt;br /&gt;
                        &amp;amp;&amp;amp; $al2_old{$al2} == $al2_new{$al2};&lt;br /&gt;
                $al2_change-&amp;gt;{$al2} = $al2_new{$al2} ? 1 : 0;&lt;br /&gt;
        }&lt;br /&gt;
#print STDERR &amp;quot;al2_change for '$srcid': &amp;quot; . Dumper($al2_change);&lt;br /&gt;
        # If there's a comment, throw that in.&lt;br /&gt;
        if ($form-&amp;gt;{al2_new_comment}) {&lt;br /&gt;
                $al2_change-&amp;gt;{comment} = $form-&amp;gt;{al2_new_comment};&lt;br /&gt;
        }&lt;br /&gt;
        $al2_change = undef if !keys %$al2_change;&lt;br /&gt;
&lt;br /&gt;
        # Find out what changed for ACL's.&lt;br /&gt;
        my $acl_change = { };&lt;br /&gt;
        for my $acl (@acl_old, @acl_new) {&lt;br /&gt;
                next if $acl_old{$acl} == $acl_new{$acl};&lt;br /&gt;
                $acl_change-&amp;gt;{$acl} = $acl_new{$acl} ? 1 : 0;&lt;br /&gt;
        }&lt;br /&gt;
        $acl_change = undef if !keys %$acl_change;&lt;br /&gt;
&lt;br /&gt;
        if ($user-&amp;gt;{is_admin} &amp;amp;&amp;amp; $srcid) {&lt;br /&gt;
                $slashdb-&amp;gt;setAL2($srcid, $al2_change);&lt;br /&gt;
        }&lt;br /&gt;
        if ($user-&amp;gt;{is_admin} &amp;amp;&amp;amp; ($user_editfield_flag eq 'uid' ||&lt;br /&gt;
                $user_editfield_flag eq 'nickname')) {&lt;br /&gt;
&lt;br /&gt;
                # This admin user cannot assign a seclev higher than he/she&lt;br /&gt;
                # already has.&lt;br /&gt;
                my $seclev = $form-&amp;gt;{seclev};&lt;br /&gt;
                $seclev = $user-&amp;gt;{seclev} if $seclev &amp;gt; $user-&amp;gt;{seclev};&lt;br /&gt;
                $user_edits_table-&amp;gt;{seclev} = $seclev;&lt;br /&gt;
&lt;br /&gt;
                $user_edits_table-&amp;gt;{section} = $form-&amp;gt;{section};&lt;br /&gt;
                $user_edits_table-&amp;gt;{author} = $form-&amp;gt;{author} ? 1 : 0 ;&lt;br /&gt;
                $user_edits_table-&amp;gt;{defaultpoints} = $form-&amp;gt;{defaultpoints};&lt;br /&gt;
                $user_edits_table-&amp;gt;{tokens} = $form-&amp;gt;{tokens};&lt;br /&gt;
                $user_edits_table-&amp;gt;{tag_clout} = $form-&amp;gt;{tag_clout};&lt;br /&gt;
                $user_edits_table-&amp;gt;{m2info} = $form-&amp;gt;{m2info};&lt;br /&gt;
                $user_edits_table-&amp;gt;{acl} = $acl_change if $acl_change;&lt;br /&gt;
                $user_edits_table-&amp;gt;{shill_static_marquee} = $form-&amp;gt;{shill_static_marquee} ? 1 : undef;&lt;br /&gt;
                $user_edits_table-&amp;gt;{u2_friends_bios} = $form-&amp;gt;{u2_friends_bios} ? 1 : undef;&lt;br /&gt;
                $user_edits_table-&amp;gt;{shill_rss_url} = $form-&amp;gt;{shill_rss_url} ? $form-&amp;gt;{shill_rss_url} : undef;&lt;br /&gt;
&lt;br /&gt;
                my $author = $slashdb-&amp;gt;getAuthor($id);&lt;br /&gt;
                my $was_author = ($author &amp;amp;&amp;amp; $author-&amp;gt;{author}) ? 1 : 0;&lt;br /&gt;
&lt;br /&gt;
                $slashdb-&amp;gt;setUser($id, $user_edits_table);&lt;br /&gt;
&lt;br /&gt;
                $note .= getMessage('saveuseradmin_saveduser', { field =&amp;gt; $user_editfield_flag, id =&amp;gt; $id });&lt;br /&gt;
&lt;br /&gt;
                if ($was_author xor $user_edits_table-&amp;gt;{author}) {&lt;br /&gt;
                        # A frequently-asked question for new Slash admins is&lt;br /&gt;
                        # why their authors aren't showing up immediately.&lt;br /&gt;
                        # Give them some help here with an informative message.&lt;br /&gt;
                        $note .= getMessage('saveuseradmin_authorchg', {&lt;br /&gt;
                                basedir =&amp;gt;      $slashdb-&amp;gt;getDescriptions(&amp;quot;site_info&amp;quot;)&lt;br /&gt;
                                        -&amp;gt;{base_install_directory},&lt;br /&gt;
                                virtuser =&amp;gt;     $slashdb-&amp;gt;{virtual_user},&lt;br /&gt;
                        });&lt;br /&gt;
&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if (!$user_edit-&amp;gt;{nonuid}) {&lt;br /&gt;
                if ($form-&amp;gt;{expired} &amp;amp;&amp;amp; $form-&amp;gt;{expired} eq 'on') {&lt;br /&gt;
#                       $slashdb-&amp;gt;setExpired($user_edit-&amp;gt;{uid});&lt;br /&gt;
&lt;br /&gt;
                } else {&lt;br /&gt;
#                       $slashdb-&amp;gt;setUnexpired($user_edit-&amp;gt;{uid});&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $data = { uid =&amp;gt; $id };&lt;br /&gt;
        $data-&amp;gt;{note} = $note if defined $note;&lt;br /&gt;
        showInfo($data);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub savePasswd {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $note = $hr-&amp;gt;{noteref} || undef;&lt;br /&gt;
&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        my $error_flag = 0;&lt;br /&gt;
        my $user_edit = {};&lt;br /&gt;
        my $uid;&lt;br /&gt;
&lt;br /&gt;
        my $user_edits_table = {};&lt;br /&gt;
&lt;br /&gt;
        if ($user-&amp;gt;{is_admin}) {&lt;br /&gt;
                $uid = $form-&amp;gt;{uid} || $user-&amp;gt;{uid};&lt;br /&gt;
        } else {&lt;br /&gt;
                $uid = ($user-&amp;gt;{uid} == $form-&amp;gt;{uid}) ? $form-&amp;gt;{uid} : $user-&amp;gt;{uid};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        $user_edit = $slashdb-&amp;gt;getUser($uid);&lt;br /&gt;
&lt;br /&gt;
        if (!$user_edit-&amp;gt;{nickname}) {&lt;br /&gt;
                $$note .= getError('cookie_err', { titlebar =&amp;gt; 0 }, 0, 1)&lt;br /&gt;
                        if $note;&lt;br /&gt;
                $error_flag++;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($form-&amp;gt;{pass1} ne $form-&amp;gt;{pass2}) {&lt;br /&gt;
                $$note .= getError('saveuser_passnomatch_err', { titlebar =&amp;gt; 0 }, 0, 1)&lt;br /&gt;
                        if $note;&lt;br /&gt;
                $error_flag++;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if (!$form-&amp;gt;{pass1} || length $form-&amp;gt;{pass1} &amp;lt; 6) {&lt;br /&gt;
                $$note .= getError('saveuser_passtooshort_err', { titlebar =&amp;gt; 0 }, 0, 1)&lt;br /&gt;
                        if $note;&lt;br /&gt;
                $error_flag++;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if (!$user-&amp;gt;{is_admin}){&lt;br /&gt;
                # not an admin -- check old password before changing passwd&lt;br /&gt;
                my $return_uid = $slashdb-&amp;gt;getUserAuthenticate($uid, $form-&amp;gt;{oldpass}, 1);&lt;br /&gt;
                if (!$return_uid || $return_uid != $uid) {&lt;br /&gt;
                        $$note .= getError('saveuser_badoldpass_err', { titlebar =&amp;gt; 0 }, 0, 1) &lt;br /&gt;
                                if $note;&lt;br /&gt;
                        $error_flag++;&lt;br /&gt;
&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if (! $error_flag) {&lt;br /&gt;
                $user_edits_table-&amp;gt;{passwd} = $form-&amp;gt;{pass1} if $form-&amp;gt;{pass1};&lt;br /&gt;
                $user_edits_table-&amp;gt;{session_login} = $form-&amp;gt;{session_login};&lt;br /&gt;
                $user_edits_table-&amp;gt;{cookie_location} = $form-&amp;gt;{cookie_location};&lt;br /&gt;
&lt;br /&gt;
                # changed pass, so delete all logtokens&lt;br /&gt;
                $slashdb-&amp;gt;deleteLogToken($form-&amp;gt;{uid}, 1);&lt;br /&gt;
&lt;br /&gt;
                if ($user-&amp;gt;{admin_clearpass}&lt;br /&gt;
                        &amp;amp;&amp;amp; !$user-&amp;gt;{state}{admin_clearpass_thisclick}) {&lt;br /&gt;
                        # User is an admin who sent their password in the clear&lt;br /&gt;
                        # some time ago; now that it's been changed, we'll forget&lt;br /&gt;
                        # about that incident, unless this click was sent in the&lt;br /&gt;
                        # clear as well.&lt;br /&gt;
                        $user_edits_table-&amp;gt;{admin_clearpass} = '';&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                getOtherUserParams($user_edits_table);&lt;br /&gt;
                $slashdb-&amp;gt;setUser($uid, $user_edits_table) ;&lt;br /&gt;
                $$note .= getMessage('saveuser_passchanged_msg',&lt;br /&gt;
                        { nick =&amp;gt; $user_edit-&amp;gt;{nickname}, uid =&amp;gt; $user_edit-&amp;gt;{uid} },&lt;br /&gt;
                0, 1) if $note;&lt;br /&gt;
&lt;br /&gt;
                # only set cookie if user is current user&lt;br /&gt;
                if ($form-&amp;gt;{uid} eq $user-&amp;gt;{uid}) {&lt;br /&gt;
                        $user-&amp;gt;{logtoken} = bakeUserCookie($uid, $slashdb-&amp;gt;getLogToken($form-&amp;gt;{uid}, 1));&lt;br /&gt;
                        setCookie('user', $user-&amp;gt;{logtoken}, $user_edits_table-&amp;gt;{session_login});&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        return $error_flag;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub saveUser {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $gSkin = getCurrentSkin();&lt;br /&gt;
        my $plugins = $slashdb-&amp;gt;getDescriptions('plugins');&lt;br /&gt;
        my $uid;&lt;br /&gt;
        my $user_editfield_flag;&lt;br /&gt;
&lt;br /&gt;
        $uid = $user-&amp;gt;{is_admin} &amp;amp;&amp;amp; $form-&amp;gt;{uid} ? $form-&amp;gt;{uid} : $user-&amp;gt;{uid};&lt;br /&gt;
        my $user_edit = $slashdb-&amp;gt;getUser($uid);&lt;br /&gt;
&lt;br /&gt;
        my($note, $formname);&lt;br /&gt;
&lt;br /&gt;
        $note .= getMessage('savenickname_msg', {&lt;br /&gt;
                nickname =&amp;gt; $user_edit-&amp;gt;{nickname},&lt;br /&gt;
        }, 1);&lt;br /&gt;
&lt;br /&gt;
        if (!$user_edit-&amp;gt;{nickname}) {&lt;br /&gt;
                $note .= getError('cookie_err', 0, 1);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Check to ensure that if a user is changing his email address, that&lt;br /&gt;
        # it doesn't already exist in the userbase.&lt;br /&gt;
        if ($user_edit-&amp;gt;{realemail} ne $form-&amp;gt;{realemail}) {&lt;br /&gt;
                if ($slashdb-&amp;gt;existsEmail($form-&amp;gt;{realemail})) {&lt;br /&gt;
                        $note .= getError('emailexists_err', 0, 1);&lt;br /&gt;
                        $form-&amp;gt;{realemail} = $user_edit-&amp;gt;{realemail}; # can't change!&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my(%extr, $err_message, %limit);&lt;br /&gt;
        $limit{sig} = 120;  # schema is 200, give an extra buffer for domain tags&lt;br /&gt;
        $limit{bio} = $constants-&amp;gt;{users_bio_length} || 1024; # can be up to 2^16&lt;br /&gt;
&lt;br /&gt;
        for my $key (keys %limit) {&lt;br /&gt;
                my $dat = chopEntity($form-&amp;gt;{$key}, $limit{$key});&lt;br /&gt;
                $dat = strip_html($dat);&lt;br /&gt;
                $dat = balanceTags($dat, { deep_nesting =&amp;gt; 2, length =&amp;gt; $limit{$key} });&lt;br /&gt;
                $dat = addDomainTags($dat) if $dat;&lt;br /&gt;
&lt;br /&gt;
                # If the sig becomes too long to fit (domain tagging causes&lt;br /&gt;
                # string expansion and tag balancing can too), warn the user to&lt;br /&gt;
                # use shorter domain names and don't save their change.&lt;br /&gt;
                if ($key eq 'sig' &amp;amp;&amp;amp; defined($dat) &amp;amp;&amp;amp; length($dat) &amp;gt; 200) {&lt;br /&gt;
                        print getError('sig_too_long_err');&lt;br /&gt;
                        $extr{sig} = undef;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                # really, comment filters should ignore short length IMO ... oh well.&lt;br /&gt;
                if (length($dat) &amp;gt; 1 &amp;amp;&amp;amp; ! filterOk('comments', 'postersubj', $dat, \$err_message)) {&lt;br /&gt;
                        print getError('filter message', {&lt;br /&gt;
                                err_message     =&amp;gt; $err_message,&lt;br /&gt;
                                item            =&amp;gt; $key,&lt;br /&gt;
                        });&lt;br /&gt;
                        $extr{$key} = undef;&lt;br /&gt;
                } elsif (! compressOk('comments', 'postersubj', $dat)) {&lt;br /&gt;
                        print getError('compress filter', {&lt;br /&gt;
                                ratio           =&amp;gt; 'postersubj',&lt;br /&gt;
                                item            =&amp;gt; $key,&lt;br /&gt;
                        });&lt;br /&gt;
                        $extr{$key} = undef;&lt;br /&gt;
                } else {&lt;br /&gt;
                        $extr{$key} = $dat;&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # We should do some conformance checking on a user's pubkey,&lt;br /&gt;
        # make sure it looks like one of the known types of public&lt;br /&gt;
        # key.  Until then, just make sure it doesn't have HTML.&lt;br /&gt;
        $form-&amp;gt;{pubkey} = $plugins-&amp;gt;{'PubKey'} ? strip_nohtml($form-&amp;gt;{pubkey}, 1) : '';&lt;br /&gt;
&lt;br /&gt;
        my $homepage = $form-&amp;gt;{homepage};&lt;br /&gt;
        $homepage = '' if $homepage eq 'http://';&lt;br /&gt;
        $homepage = fudgeurl($homepage);&lt;br /&gt;
        $homepage = URI-&amp;gt;new_abs($homepage, $gSkin-&amp;gt;{absolutedir})&lt;br /&gt;
                        -&amp;gt;canonical&lt;br /&gt;
                        -&amp;gt;as_string if $homepage ne '';&lt;br /&gt;
        $homepage = substr($homepage, 0, 100) if $homepage ne '';&lt;br /&gt;
&lt;br /&gt;
        my $calendar_url = $form-&amp;gt;{calendar_url};&lt;br /&gt;
        if (length $calendar_url) {&lt;br /&gt;
                # fudgeurl() doesn't like webcal; will remove later anyway&lt;br /&gt;
                $calendar_url =~ s/^webcal/http/i;&lt;br /&gt;
                $calendar_url = fudgeurl($calendar_url);&lt;br /&gt;
                $calendar_url = URI-&amp;gt;new_abs($calendar_url, $gSkin-&amp;gt;{absolutedir})&lt;br /&gt;
                        -&amp;gt;canonical&lt;br /&gt;
                        -&amp;gt;as_string if $calendar_url ne '';&lt;br /&gt;
&lt;br /&gt;
                $calendar_url =~ s|^http://||i;&lt;br /&gt;
                $calendar_url = substr($calendar_url, 0, 200) if $calendar_url ne '';&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # for the users table&lt;br /&gt;
        my $user_edits_table = {&lt;br /&gt;
                homepage        =&amp;gt; $homepage,&lt;br /&gt;
                realname        =&amp;gt; $form-&amp;gt;{realname},&lt;br /&gt;
                pubkey          =&amp;gt; $form-&amp;gt;{pubkey},&lt;br /&gt;
                copy            =&amp;gt; $form-&amp;gt;{copy},&lt;br /&gt;
                quote           =&amp;gt; $form-&amp;gt;{quote},&lt;br /&gt;
                calendar_url    =&amp;gt; $calendar_url,&lt;br /&gt;
                yahoo           =&amp;gt; $form-&amp;gt;{yahoo},&lt;br /&gt;
                jabber          =&amp;gt; $form-&amp;gt;{jabber},&lt;br /&gt;
                aim             =&amp;gt; $form-&amp;gt;{aim},&lt;br /&gt;
                aimdisplay      =&amp;gt; $form-&amp;gt;{aimdisplay},&lt;br /&gt;
                icq             =&amp;gt; $form-&amp;gt;{icq},&lt;br /&gt;
                playing         =&amp;gt; $form-&amp;gt;{playing},&lt;br /&gt;
                mobile_text_address =&amp;gt; $form-&amp;gt;{mobile_text_address},&lt;br /&gt;
        };&lt;br /&gt;
&lt;br /&gt;
        if ($constants-&amp;gt;{wow}) {&lt;br /&gt;
                my $wowdb = getObject(&amp;quot;Slash::WoW&amp;quot;);&lt;br /&gt;
                if ($wowdb) {&lt;br /&gt;
                        $user_edits_table-&amp;gt;{wow_main_name} = &amp;quot;\L\u$form-&amp;gt;{wow_main_name}&amp;quot;;&lt;br /&gt;
                        $user_edits_table-&amp;gt;{wow_main_realm} = $form-&amp;gt;{wow_main_realm};&lt;br /&gt;
                        my $charid = $wowdb-&amp;gt;getCharidCreate($user_edits_table-&amp;gt;{wow_main_realm},&lt;br /&gt;
                                $user_edits_table-&amp;gt;{wow_main_name});&lt;br /&gt;
                        $wowdb-&amp;gt;setChar($charid, { uid =&amp;gt; $uid }, { if_unclaimed =&amp;gt; 1 }) if $charid;&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        for (keys %extr) {&lt;br /&gt;
                $user_edits_table-&amp;gt;{$_} = $extr{$_} if defined $extr{$_};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # don't want undef, want to be empty string so they&lt;br /&gt;
        # will overwrite the existing record&lt;br /&gt;
        for (keys %$user_edits_table) {&lt;br /&gt;
                $user_edits_table-&amp;gt;{$_} = '' unless defined $user_edits_table-&amp;gt;{$_};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($user_edit-&amp;gt;{realemail} ne $form-&amp;gt;{realemail}) {&lt;br /&gt;
                $user_edits_table-&amp;gt;{realemail} =&lt;br /&gt;
                        chopEntity($form-&amp;gt;{realemail}, 50);&lt;br /&gt;
                my $new_fakeemail = ''; # at emaildisplay 0, don't show any email address&lt;br /&gt;
                if ($user-&amp;gt;{emaildisplay}) {&lt;br /&gt;
                        $new_fakeemail = getArmoredEmail($uid, $user_edits_table-&amp;gt;{realemail})&lt;br /&gt;
                                if $user-&amp;gt;{emaildisplay} == 1;&lt;br /&gt;
                        $new_fakeemail = $user_edits_table-&amp;gt;{realemail}&lt;br /&gt;
                                if $user-&amp;gt;{emaildisplay} == 2;&lt;br /&gt;
                }&lt;br /&gt;
                $user_edits_table-&amp;gt;{fakeemail} = $new_fakeemail;&lt;br /&gt;
&lt;br /&gt;
                $note .= getMessage('changeemail_msg', {&lt;br /&gt;
                        realemail =&amp;gt; $user_edit-&amp;gt;{realemail}&lt;br /&gt;
                }, 1);&lt;br /&gt;
&lt;br /&gt;
                my $saveuser_emailtitle = getTitle('saveUser_email_title', {&lt;br /&gt;
                        nickname  =&amp;gt; $user_edit-&amp;gt;{nickname},&lt;br /&gt;
                        realemail =&amp;gt; $form-&amp;gt;{realemail}&lt;br /&gt;
                }, 1);&lt;br /&gt;
                my $saveuser_email_msg = getMessage('saveuser_email_msg', {&lt;br /&gt;
                        nickname  =&amp;gt; $user_edit-&amp;gt;{nickname},&lt;br /&gt;
                        realemail =&amp;gt; $form-&amp;gt;{realemail}&lt;br /&gt;
                }, 1);&lt;br /&gt;
&lt;br /&gt;
                sendEmail($form-&amp;gt;{realemail}, $saveuser_emailtitle, $saveuser_email_msg);&lt;br /&gt;
                doEmail($uid, $saveuser_emailtitle, $saveuser_email_msg);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        getOtherUserParams($user_edits_table);&lt;br /&gt;
        $slashdb-&amp;gt;setUser($uid, $user_edits_table);&lt;br /&gt;
&lt;br /&gt;
        editUser({ uid =&amp;gt; $uid, note =&amp;gt; $note });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub saveComm {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my($uid, $user_fakeemail);&lt;br /&gt;
&lt;br /&gt;
        if ($user-&amp;gt;{is_admin}) {&lt;br /&gt;
                $uid = $form-&amp;gt;{uid} || $user-&amp;gt;{uid};&lt;br /&gt;
        } else {&lt;br /&gt;
                $uid = ($user-&amp;gt;{uid} == $form-&amp;gt;{uid}) ?&lt;br /&gt;
                        $form-&amp;gt;{uid} : $user-&amp;gt;{uid};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Do the right thing with respect to the chosen email display mode&lt;br /&gt;
        # and the options that can be displayed.&lt;br /&gt;
        my $user_edit = $slashdb-&amp;gt;getUser($uid);&lt;br /&gt;
        my $new_fakeemail = '';         # at emaildisplay 0, don't show any email address&lt;br /&gt;
        if ($form-&amp;gt;{emaildisplay}) {&lt;br /&gt;
                $new_fakeemail = getArmoredEmail($uid)          if $form-&amp;gt;{emaildisplay} == 1;&lt;br /&gt;
                $new_fakeemail = $user_edit-&amp;gt;{realemail}        if $form-&amp;gt;{emaildisplay} == 2;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $name = $user-&amp;gt;{seclev} &amp;amp;&amp;amp; $form-&amp;gt;{name} ?&lt;br /&gt;
                $form-&amp;gt;{name} : $user-&amp;gt;{nickname};&lt;br /&gt;
&lt;br /&gt;
        my $note = getMessage('savenickname_msg',&lt;br /&gt;
                { nickname =&amp;gt; $name });&lt;br /&gt;
&lt;br /&gt;
        print getError('cookie_err') if isAnon($uid) || !$name;&lt;br /&gt;
&lt;br /&gt;
        # Take care of the lists&lt;br /&gt;
        # Enforce Ranges for variables that need it&lt;br /&gt;
        $form-&amp;gt;{commentlimit} = 0 if $form-&amp;gt;{commentlimit} &amp;lt; 1;&lt;br /&gt;
        my $cl_max = $constants-&amp;gt;{comment_commentlimit} || 0;&lt;br /&gt;
        $form-&amp;gt;{commentlimit} = $cl_max if $cl_max &amp;gt; 0 &amp;amp;&amp;amp; $form-&amp;gt;{commentlimit} &amp;gt; $cl_max;&lt;br /&gt;
        $form-&amp;gt;{commentspill} = 0 if $form-&amp;gt;{commentspill} &amp;lt; 1;&lt;br /&gt;
&lt;br /&gt;
        # For some of these values, namely the ones that we happen to&lt;br /&gt;
        # know get stored in users_param, we change them to 'undef'&lt;br /&gt;
        # if they are the default value.  This deletes them from the&lt;br /&gt;
        # users_param table, which has the same effect as storing the&lt;br /&gt;
        # default except it's faster all around.  If we ever change&lt;br /&gt;
        # the schema to promote these fields from params into a&lt;br /&gt;
        # proper users_* table, then this will no longer be correct.&lt;br /&gt;
        # See prepareUser().&lt;br /&gt;
        my $max = $constants-&amp;gt;{comment_maxscore} - $constants-&amp;gt;{comment_minscore};&lt;br /&gt;
        my $min = -$max;&lt;br /&gt;
        my $karma_bonus = ($form-&amp;gt;{karma_bonus} !~ /^[\-+]?\d+$/) ? &amp;quot;+1&amp;quot; : $form-&amp;gt;{karma_bonus};&lt;br /&gt;
        my $subscriber_bonus = ($form-&amp;gt;{subscriber_bonus} !~ /^[\-+]?\d+$/) ? &amp;quot;+1&amp;quot; : $form-&amp;gt;{subscriber_bonus};&lt;br /&gt;
        my $new_user_bonus = ($form-&amp;gt;{new_user_bonus} !~ /^[\-+]?\d+$/) ? 0 : $form-&amp;gt;{new_user_bonus};&lt;br /&gt;
        my $new_user_percent = (($form-&amp;gt;{new_user_percent} &amp;lt;= 100 &amp;amp;&amp;amp; $form-&amp;gt;{new_user_percent} &amp;gt;= 0) &lt;br /&gt;
                        ? $form-&amp;gt;{new_user_percent}&lt;br /&gt;
                        : 100); &lt;br /&gt;
        my $clsmall_bonus = ($form-&amp;gt;{clsmall_bonus} !~ /^[\-+]?\d+$/) ? 0 : $form-&amp;gt;{clsmall_bonus};&lt;br /&gt;
        my $clbig_bonus = ($form-&amp;gt;{clbig_bonus} !~ /^[\-+]?\d+$/) ? 0 : $form-&amp;gt;{clbig_bonus};&lt;br /&gt;
&lt;br /&gt;
        # plum&lt;br /&gt;
        $form-&amp;gt;{d2_comment_q} = (isSubscriber($user_edit) || $user_edit-&amp;gt;{seclev} &amp;gt;= 100)&lt;br /&gt;
                ? $form-&amp;gt;{d2_comment_q}&lt;br /&gt;
                : ($form-&amp;gt;{d2_comment_q} eq '0')&lt;br /&gt;
                        ? 1&lt;br /&gt;
                        : $form-&amp;gt;{d2_comment_q};&lt;br /&gt;
&lt;br /&gt;
        my $user_edits_table = {&lt;br /&gt;
                # MC: More D2 neutring&lt;br /&gt;
                #discussion2            =&amp;gt; $form-&amp;gt;{discussion2} || undef,&lt;br /&gt;
                #d2_comment_q           =&amp;gt; $form-&amp;gt;{d2_comment_q} || undef,&lt;br /&gt;
                #d2_comment_order       =&amp;gt; $form-&amp;gt;{d2_comment_order} || undef,&lt;br /&gt;
                clsmall                 =&amp;gt; $form-&amp;gt;{clsmall},&lt;br /&gt;
                clsmall_bonus           =&amp;gt; ($clsmall_bonus || undef),&lt;br /&gt;
                clbig                   =&amp;gt; $form-&amp;gt;{clbig},&lt;br /&gt;
                clbig_bonus             =&amp;gt; ($clbig_bonus || undef),&lt;br /&gt;
                commentlimit            =&amp;gt; $form-&amp;gt;{commentlimit},&lt;br /&gt;
                bytelimit               =&amp;gt; $form-&amp;gt;{bytelimit},&lt;br /&gt;
                commentsort             =&amp;gt; $form-&amp;gt;{commentsort},&lt;br /&gt;
                commentspill            =&amp;gt; $form-&amp;gt;{commentspill},&lt;br /&gt;
                domaintags              =&amp;gt; ($form-&amp;gt;{domaintags} != 2 ? $form-&amp;gt;{domaintags} : undef),&lt;br /&gt;
                emaildisplay            =&amp;gt; $form-&amp;gt;{emaildisplay} || undef,&lt;br /&gt;
                fakeemail               =&amp;gt; $new_fakeemail,&lt;br /&gt;
                highlightthresh         =&amp;gt; $form-&amp;gt;{highlightthresh},&lt;br /&gt;
                mode                    =&amp;gt; $form-&amp;gt;{umode},&lt;br /&gt;
                posttype                =&amp;gt; $form-&amp;gt;{posttype},&lt;br /&gt;
                threshold               =&amp;gt; $form-&amp;gt;{uthreshold},&lt;br /&gt;
                nosigs                  =&amp;gt; ($form-&amp;gt;{nosigs}     ? 1 : 0),&lt;br /&gt;
                reparent                =&amp;gt; ($form-&amp;gt;{reparent}   ? 1 : 0),&lt;br /&gt;
                noscores                =&amp;gt; ($form-&amp;gt;{noscores}   ? 1 : 0),&lt;br /&gt;
                hardthresh              =&amp;gt; ($form-&amp;gt;{hardthresh} ? 1 : 0),&lt;br /&gt;
                no_spell                =&amp;gt; ($form-&amp;gt;{no_spell}   ? 1 : undef),&lt;br /&gt;
                nobonus                 =&amp;gt; ($form-&amp;gt;{nobonus} ? 1 : undef),&lt;br /&gt;
                nosubscriberbonus       =&amp;gt; ($form-&amp;gt;{nosubscriberbonus} ? 1 : undef),&lt;br /&gt;
                postanon                =&amp;gt; ($form-&amp;gt;{postanon} ? 1 : undef),&lt;br /&gt;
                new_user_percent        =&amp;gt; ($new_user_percent &amp;amp;&amp;amp; $new_user_percent != 100&lt;br /&gt;
                                                ? $new_user_percent : undef),&lt;br /&gt;
                new_user_bonus          =&amp;gt; ($new_user_bonus || undef),&lt;br /&gt;
                karma_bonus             =&amp;gt; ($karma_bonus ne '+1' ? $karma_bonus : undef),&lt;br /&gt;
                subscriber_bonus        =&amp;gt; ($subscriber_bonus || undef),&lt;br /&gt;
                textarea_rows           =&amp;gt; ($form-&amp;gt;{textarea_rows} != $constants-&amp;gt;{textarea_rows}&lt;br /&gt;
                                                ? $form-&amp;gt;{textarea_rows} : undef),&lt;br /&gt;
                textarea_cols           =&amp;gt; ($form-&amp;gt;{textarea_cols} != $constants-&amp;gt;{textarea_cols}&lt;br /&gt;
                                                ? $form-&amp;gt;{textarea_cols} : undef),&lt;br /&gt;
                user_comment_sort_type  =&amp;gt; ($form-&amp;gt;{user_comment_sort_type} != 2&lt;br /&gt;
                                                ? $form-&amp;gt;{user_comment_sort_type} : undef ),&lt;br /&gt;
                mod_with_comm           =&amp;gt; ($form-&amp;gt;{mod_with_comm} ? 1 : undef),&lt;br /&gt;
                m2_with_mod             =&amp;gt; ($form-&amp;gt;{m2_with_mod} ? 1 : undef),&lt;br /&gt;
                m2_with_comm_mod                =&amp;gt; ($form-&amp;gt;{m2_with_mod_on_comm} ? 1 : undef),&lt;br /&gt;
&lt;br /&gt;
        };&lt;br /&gt;
&lt;br /&gt;
        # set our default values for the items where an empty-string won't do &lt;br /&gt;
        my $defaults = {&lt;br /&gt;
                posttype        =&amp;gt; 2,&lt;br /&gt;
                highlightthresh =&amp;gt; 4,&lt;br /&gt;
                reparent        =&amp;gt; 1,&lt;br /&gt;
                commentlimit    =&amp;gt; 100,&lt;br /&gt;
                commentspill    =&amp;gt; 50,&lt;br /&gt;
                mode            =&amp;gt; 'thread'&lt;br /&gt;
        };&lt;br /&gt;
&lt;br /&gt;
        my $mod_reader = getObject(&amp;quot;Slash::$constants-&amp;gt;{m1_pluginname}&amp;quot;, { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my @reasons = ( );&lt;br /&gt;
        my $reasons = $mod_reader-&amp;gt;getReasons();&lt;br /&gt;
        for my $id (sort { $a &amp;lt;=&amp;gt; $b } keys %$reasons) {&lt;br /&gt;
                push @reasons, $reasons-&amp;gt;{$id}{name};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        for my $reason_name (@reasons) {&lt;br /&gt;
                my $key = &amp;quot;reason_alter_$reason_name&amp;quot;;&lt;br /&gt;
                my $answer = $form-&amp;gt;{$key} || 0;&lt;br /&gt;
                $answer = 0 if !$answer || $answer !~ /^[\-+]?\d+$/;&lt;br /&gt;
                $user_edits_table-&amp;gt;{$key} = ($answer == 0) ? '' : $answer;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        for (qw| friend foe anonymous fof eof freak fan |) {&lt;br /&gt;
                my $answer = $form-&amp;gt;{&amp;quot;people_bonus_$_&amp;quot;};&lt;br /&gt;
                $answer = 0 if $answer !~ /^[\-+]?\d+$/;&lt;br /&gt;
                $user_edits_table-&amp;gt;{&amp;quot;people_bonus_$_&amp;quot;} = ($answer == 0) ? '' : $answer;&lt;br /&gt;
        }&lt;br /&gt;
        getOtherUserParams($user_edits_table);&lt;br /&gt;
        setToDefaults($user_edits_table, {}, $defaults) if $form-&amp;gt;{restore_defaults};&lt;br /&gt;
        $slashdb-&amp;gt;setUser($uid, $user_edits_table);&lt;br /&gt;
&lt;br /&gt;
        editComm({ uid =&amp;gt; $uid, note =&amp;gt; $note });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub saveHome {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my($uid, $error);&lt;br /&gt;
&lt;br /&gt;
        if ($user-&amp;gt;{is_admin}) {&lt;br /&gt;
                $uid = $form-&amp;gt;{uid} || $user-&amp;gt;{uid} ;&lt;br /&gt;
        } else {&lt;br /&gt;
                $uid = ($user-&amp;gt;{uid} == $form-&amp;gt;{uid}) ?&lt;br /&gt;
                        $form-&amp;gt;{uid} : $user-&amp;gt;{uid};&lt;br /&gt;
        }&lt;br /&gt;
        my $edit_user = $slashdb-&amp;gt;getUser($uid);&lt;br /&gt;
&lt;br /&gt;
        my $name = $user-&amp;gt;{seclev} &amp;amp;&amp;amp; $form-&amp;gt;{name} ?&lt;br /&gt;
                $form-&amp;gt;{name} : $user-&amp;gt;{nickname};&lt;br /&gt;
        $name = substr($name, 0, 20);&lt;br /&gt;
&lt;br /&gt;
        my $note = getMessage('savenickname_msg',&lt;br /&gt;
                { nickname =&amp;gt; $name });&lt;br /&gt;
&lt;br /&gt;
        if (isAnon($uid) || !$name) {&lt;br /&gt;
                my $cookiemsg = getError('cookie_err');&lt;br /&gt;
                print $cookiemsg;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Using the existing list of slashboxes and the set of&lt;br /&gt;
        # what's checked and not, build up the new list.&lt;br /&gt;
        # (New arrivals go at the end.)&lt;br /&gt;
        my $slashboxes = $edit_user-&amp;gt;{slashboxes};&lt;br /&gt;
        # Only go through all this if the user clicked save,&lt;br /&gt;
        # not &amp;quot;Restore Slashbox Defaults&amp;quot;!&lt;br /&gt;
        my($boxes, $skinBoxes) = $slashdb-&amp;gt;getPortalsCommon();&lt;br /&gt;
        my $default_slashboxes_textlist = join &amp;quot;,&amp;quot;,&lt;br /&gt;
                @{$skinBoxes-&amp;gt;{$constants-&amp;gt;{mainpage_skid}}};&lt;br /&gt;
        if (!$form-&amp;gt;{restore_slashbox_defaults}) {&lt;br /&gt;
                $slashboxes = $default_slashboxes_textlist if !$slashboxes;&lt;br /&gt;
                my @slashboxes = split /,/, $slashboxes;&lt;br /&gt;
                my %slashboxes = ( );&lt;br /&gt;
                for my $i (0..$#slashboxes) {&lt;br /&gt;
                        $slashboxes{$slashboxes[$i]} = $i;&lt;br /&gt;
                }&lt;br /&gt;
                # Add new boxes in.&lt;br /&gt;
                for my $key (sort grep /^showbox_/, keys %$form) {&lt;br /&gt;
                        my($bid) = $key =~ /^showbox_(\w+)$/;&lt;br /&gt;
                        next if length($bid) &amp;lt; 1 || length($bid) &amp;gt; 30 || $bid !~ /^\w+$/;&lt;br /&gt;
                        if (! exists $slashboxes{$bid}) {&lt;br /&gt;
                                $slashboxes{$bid} = 999; # put it at the end&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
                # Remove any boxes that weren't checked.&lt;br /&gt;
                for my $bid (@slashboxes) {&lt;br /&gt;
                        delete $slashboxes{$bid} unless $form-&amp;gt;{&amp;quot;showbox_$bid&amp;quot;};&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                for my $key (sort grep /^dynamic_/, keys %$form) {&lt;br /&gt;
                        my($bid) = $key =~ /^dynamic_(.+)$/;&lt;br /&gt;
                        next if length($bid) &amp;lt; 1;&lt;br /&gt;
                        if (! exists $slashboxes{$bid}) {&lt;br /&gt;
                                $slashboxes{$bid} = 999;&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                @slashboxes = sort {&lt;br /&gt;
                        $slashboxes{$a} &amp;lt;=&amp;gt; $slashboxes{$b}&lt;br /&gt;
                        ||&lt;br /&gt;
                        $a cmp $b&lt;br /&gt;
                } keys %slashboxes;&lt;br /&gt;
                # This probably should be a var (and appear in tilded_customize_msg)&lt;br /&gt;
                $#slashboxes = 19 if $#slashboxes &amp;gt; 19;&lt;br /&gt;
                $slashboxes = join &amp;quot;,&amp;quot;, @slashboxes;&lt;br /&gt;
        }&lt;br /&gt;
        # If we're right back to the default, that means the&lt;br /&gt;
        # empty string.&lt;br /&gt;
        if ($slashboxes eq $default_slashboxes_textlist) {&lt;br /&gt;
                $slashboxes = &amp;quot;&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Set the story_never and story_always fields.&lt;br /&gt;
        my $author_hr = $slashdb-&amp;gt;getDescriptions('authors');&lt;br /&gt;
        my $tree = $slashdb-&amp;gt;getTopicTree();&lt;br /&gt;
        my(@story_never_topic,  @story_never_author,  @story_never_nexus);&lt;br /&gt;
        my(@story_always_topic, @story_always_author);&lt;br /&gt;
        my(@story_always_nexus, @story_full_brief_nexus, @story_brief_always_nexus, @story_full_best_nexus, @story_brief_best_nexus);&lt;br /&gt;
        my($story_topic_all, $story_author_all, $story_nexus_all) = (0, 0, 0);&lt;br /&gt;
&lt;br /&gt;
        # Topics are either present (value=2) or absent (value=0).  If absent,&lt;br /&gt;
        # push them onto the never list.  Otherwise, do nothing.  (There's no&lt;br /&gt;
        # way to have an &amp;quot;always&amp;quot; topic, at the moment.)  If the hidden&lt;br /&gt;
        # field topictids_present is false, then there are no topic tids,&lt;br /&gt;
        # skip this.&lt;br /&gt;
        if ($form-&amp;gt;{topictids_present}) {&lt;br /&gt;
                for my $tid (&lt;br /&gt;
                        sort { $a &amp;lt;=&amp;gt; $b }&lt;br /&gt;
                        grep { !$tree-&amp;gt;{$_}{nexus} }&lt;br /&gt;
                        keys %$tree&lt;br /&gt;
                ) {&lt;br /&gt;
                        my $key = &amp;quot;topictid$tid&amp;quot;;&lt;br /&gt;
                        $story_topic_all++;&lt;br /&gt;
                        if (!$form-&amp;gt;{$key}) {           push @story_never_topic, $tid   }&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
        # Authors are either present (value=2) or absent (value=0).  If&lt;br /&gt;
        # absent, push them onto the never list.  Otherwise, do nothing.&lt;br /&gt;
        # (There's no way to have an &amp;quot;always&amp;quot; author, at the moment.)&lt;br /&gt;
        for my $aid (sort { $a &amp;lt;=&amp;gt; $b } keys %$author_hr) {&lt;br /&gt;
                my $key = &amp;quot;aid$aid&amp;quot;;&lt;br /&gt;
                $story_author_all++;&lt;br /&gt;
                if (!$form-&amp;gt;{$key}) {                   push @story_never_author, $aid  }&lt;br /&gt;
        }&lt;br /&gt;
        # Nexuses can have value 0, 1, 2, 3, 4, 5.  &lt;br /&gt;
        # 0 means the never list,&lt;br /&gt;
        # 1 means brief view of mainpage articles only&lt;br /&gt;
        # 2 means full view of mainpage articles only&lt;br /&gt;
        # 3 means brief view of all content&lt;br /&gt;
        # 4 means full view of mainpage content, brief view of sectional&lt;br /&gt;
        # 5 means full view of all content&lt;br /&gt;
        for my $tid (&lt;br /&gt;
                sort { $a &amp;lt;=&amp;gt; $b }&lt;br /&gt;
                map { /^nexustid(\d+)$/; $1 }&lt;br /&gt;
                grep { /^nexustid\d+$/ }&lt;br /&gt;
                keys %$form&lt;br /&gt;
        ) {&lt;br /&gt;
                my $key = &amp;quot;nexustid$tid&amp;quot;;&lt;br /&gt;
                next unless $tid &amp;amp;&amp;amp; $tree-&amp;gt;{$tid} &amp;amp;&amp;amp; $tree-&amp;gt;{$tid}{nexus};&lt;br /&gt;
                $story_nexus_all++;&lt;br /&gt;
                   if (!$form-&amp;gt;{$key}) {                push @story_never_nexus, $tid   }&lt;br /&gt;
                elsif ($form-&amp;gt;{$key} == 5 ) {           push @story_always_nexus, $tid  }&lt;br /&gt;
                elsif ($form-&amp;gt;{$key} == 4 ) {           push @story_full_brief_nexus, $tid }&lt;br /&gt;
                elsif ($form-&amp;gt;{$key} == 3 ) {           push @story_brief_always_nexus, $tid }&lt;br /&gt;
                elsif ($form-&amp;gt;{$key} == 2 ) {           push @story_full_best_nexus, $tid }&lt;br /&gt;
                elsif ($form-&amp;gt;{$key} == 1 ) {           push @story_brief_best_nexus, $tid }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
#use Data::Dumper; $Data::Dumper::Sortkeys = 1; print STDERR scalar(localtime) . &amp;quot; s_n_t '@story_never_topic' s_n_a '@story_never_author' s_n_n '@story_never_nexus' s_a_n '@story_always_nexus' form: &amp;quot; . Dumper($form);&lt;br /&gt;
        # Sanity check.&lt;br /&gt;
        $#story_never_topic             = 299 if $#story_never_topic   &amp;gt; 299;&lt;br /&gt;
        $#story_never_author            = 299 if $#story_never_author  &amp;gt; 299;&lt;br /&gt;
        $#story_never_nexus             = 299 if $#story_never_nexus   &amp;gt; 299;&lt;br /&gt;
        $#story_always_topic            = 299 if $#story_always_topic  &amp;gt; 299;&lt;br /&gt;
        $#story_always_author           = 299 if $#story_always_author &amp;gt; 299;&lt;br /&gt;
        $#story_always_nexus            = 299 if $#story_always_nexus  &amp;gt; 299;&lt;br /&gt;
        $#story_full_brief_nexus        = 299 if $#story_full_brief_nexus &amp;gt; 299;&lt;br /&gt;
        $#story_brief_always_nexus      = 299 if $#story_brief_always_nexus &amp;gt; 299;&lt;br /&gt;
        $#story_brief_best_nexus        = 299 if $#story_brief_best_nexus &amp;gt; 299;&lt;br /&gt;
        $#story_full_best_nexus         = 299 if $#story_full_best_nexus &amp;gt; 299;&lt;br /&gt;
&lt;br /&gt;
        my $story_never_topic   = join &amp;quot;,&amp;quot;, @story_never_topic;&lt;br /&gt;
        $story_never_topic = ($constants-&amp;gt;{subscribe} &amp;amp;&amp;amp; $user-&amp;gt;{is_subscriber})&lt;br /&gt;
                ? checkList($story_never_topic, 1024)&lt;br /&gt;
                : checkList($story_never_topic);&lt;br /&gt;
        my $story_never_author          = checkList(join &amp;quot;,&amp;quot;, @story_never_author);&lt;br /&gt;
        my $story_never_nexus           = checkList(join &amp;quot;,&amp;quot;, @story_never_nexus);&lt;br /&gt;
        my $story_always_topic          = checkList(join &amp;quot;,&amp;quot;, @story_always_topic);&lt;br /&gt;
        $story_always_topic = ($constants-&amp;gt;{subscribe} &amp;amp;&amp;amp; $user-&amp;gt;{is_subscriber})&lt;br /&gt;
                ? checkList($story_always_topic, 1024)&lt;br /&gt;
                : checkList($story_always_topic);&lt;br /&gt;
        my $story_always_author         = checkList(join &amp;quot;,&amp;quot;, @story_always_author);&lt;br /&gt;
&lt;br /&gt;
        my $story_always_nexus          = checkList(join &amp;quot;,&amp;quot;, @story_always_nexus);&lt;br /&gt;
        my $story_full_brief_nexus      = checkList(join &amp;quot;,&amp;quot;, @story_full_brief_nexus);&lt;br /&gt;
        my $story_brief_always_nexus    = checkList(join &amp;quot;,&amp;quot;, @story_brief_always_nexus);&lt;br /&gt;
        my $story_brief_best_nexus      = checkList(join &amp;quot;,&amp;quot;, @story_brief_best_nexus);&lt;br /&gt;
        my $story_full_best_nexus       = checkList(join &amp;quot;,&amp;quot;, @story_full_best_nexus);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        my $user_edits_table = {&lt;br /&gt;
                story_never_topic               =&amp;gt; $story_never_topic,&lt;br /&gt;
                story_never_author              =&amp;gt; $story_never_author,&lt;br /&gt;
                story_never_nexus               =&amp;gt; $story_never_nexus,&lt;br /&gt;
                story_always_topic              =&amp;gt; $story_always_topic,&lt;br /&gt;
                story_always_author             =&amp;gt; $story_always_author,&lt;br /&gt;
                story_always_nexus              =&amp;gt; $story_always_nexus,&lt;br /&gt;
                story_brief_always_nexus        =&amp;gt; $story_brief_always_nexus,&lt;br /&gt;
                story_full_brief_nexus          =&amp;gt; $story_full_brief_nexus,&lt;br /&gt;
                story_full_best_nexus           =&amp;gt; $story_full_best_nexus,&lt;br /&gt;
                story_brief_best_nexus          =&amp;gt; $story_brief_best_nexus,&lt;br /&gt;
&lt;br /&gt;
                slashboxes      =&amp;gt; checkList($slashboxes, 1024),&lt;br /&gt;
&lt;br /&gt;
                maxstories      =&amp;gt; 30, # XXXSKIN fix this later&lt;br /&gt;
                noboxes         =&amp;gt; ($form-&amp;gt;{useslashboxes} ? 0 : 1),&lt;br /&gt;
                lowbandwidth    =&amp;gt; ($form-&amp;gt;{lowbandwidth} ? 1 : 0),&lt;br /&gt;
                simpledesign    =&amp;gt; ($form-&amp;gt;{simpledesign} ? 1 : 0),&lt;br /&gt;
                noicons         =&amp;gt; ($form-&amp;gt;{noicons} ? 1 : 0),&lt;br /&gt;
                willing         =&amp;gt; ($form-&amp;gt;{willing} ? 1 : 0),&lt;br /&gt;
                index_classic   =&amp;gt; ($form-&amp;gt;{index_classic} ? 1 : undef),&lt;br /&gt;
        };&lt;br /&gt;
&lt;br /&gt;
        if (defined $form-&amp;gt;{tzcode} &amp;amp;&amp;amp; defined $form-&amp;gt;{tzformat}) {&lt;br /&gt;
                $user_edits_table-&amp;gt;{tzcode} = $form-&amp;gt;{tzcode};&lt;br /&gt;
                $user_edits_table-&amp;gt;{dfid}   = $form-&amp;gt;{tzformat};&lt;br /&gt;
                $user_edits_table-&amp;gt;{dst}    = $form-&amp;gt;{dst};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Force the User Space area to contain only known-good HTML tags.&lt;br /&gt;
        # Unfortunately the cookie login model makes it just too risky&lt;br /&gt;
        # to allow scripts in here;  CSS's steal passwords.  There are&lt;br /&gt;
        # no known vulnerabilities at this time, but a combination of the&lt;br /&gt;
        # social engineering taking place (inviting users to put Javascript&lt;br /&gt;
        # from websites in here, and making available script URLs for that&lt;br /&gt;
        # purpose), plus the fact that this could be used to amplify the&lt;br /&gt;
        # seriousness of any future vulnerabilities, means it's way past&lt;br /&gt;
        # time to shut this feature down.  - Jamie 2002/03/06&lt;br /&gt;
&lt;br /&gt;
        # it's a VARCHAR ...&lt;br /&gt;
        my $mylinks_limit = 255;&lt;br /&gt;
        $user_edits_table-&amp;gt;{mylinks} = balanceTags(strip_html(&lt;br /&gt;
                chopEntity($form-&amp;gt;{mylinks} || '', $mylinks_limit)&lt;br /&gt;
        ), { deep_nesting =&amp;gt; 2, length =&amp;gt; $mylinks_limit });&lt;br /&gt;
&lt;br /&gt;
        $user_edits_table-&amp;gt;{mylinks} = '' unless defined $user_edits_table-&amp;gt;{mylinks};&lt;br /&gt;
&lt;br /&gt;
        $error = 1;&lt;br /&gt;
        # must select at least 1/4 of nexuses, topics, authors&lt;br /&gt;
        if      ( scalar(@story_never_author) &amp;gt; ($story_author_all * 3/4) ) {&lt;br /&gt;
                $note = getError('editHome_too_many_disabled');&lt;br /&gt;
        } elsif ( scalar(@story_never_nexus) &amp;gt; ($story_nexus_all * 3/4) ) {&lt;br /&gt;
                $note = getError('editHome_too_many_disabled');&lt;br /&gt;
        } elsif ( scalar(@story_never_topic) &amp;gt; ($story_topic_all * 3/4) ) {&lt;br /&gt;
                $note = getError('editHome_too_many_disabled');&lt;br /&gt;
        } else {&lt;br /&gt;
                $error = 0;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        unless ($error) {&lt;br /&gt;
                # If a user is unwilling to moderate, we should cancel all points, lest&lt;br /&gt;
                # they be preserved when they shouldn't be.&lt;br /&gt;
                if (!isAnon($uid) &amp;amp;&amp;amp; !$form-&amp;gt;{willing}) {&lt;br /&gt;
                        $slashdb-&amp;gt;setUser($uid, { points =&amp;gt; 0 });&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                getOtherUserParams($user_edits_table);&lt;br /&gt;
                if ($form-&amp;gt;{restore_defaults}) {&lt;br /&gt;
                        setToDefaults($user_edits_table, {}, {&lt;br /&gt;
                                maxstories      =&amp;gt; 30,&lt;br /&gt;
                                tzcode          =&amp;gt; &amp;quot;EST&amp;quot;,&lt;br /&gt;
                                # XXX shouldn't this reset ALL the defaults,&lt;br /&gt;
                                # not just these two?&lt;br /&gt;
                        });&lt;br /&gt;
                }&lt;br /&gt;
                if ($form-&amp;gt;{restore_slashbox_defaults}) {&lt;br /&gt;
                        setToDefaults($user_edits_table, {&lt;br /&gt;
                                'story_never_topic' =&amp;gt; 1,&lt;br /&gt;
                                'story_never_author' =&amp;gt; 1,&lt;br /&gt;
                                'story_never_nexus' =&amp;gt; 1,&lt;br /&gt;
                                'story_always_topic' =&amp;gt; 1,&lt;br /&gt;
                                'story_always_author' =&amp;gt; 1,&lt;br /&gt;
                                'story_always_nexus' =&amp;gt; 1,&lt;br /&gt;
                                'story_full_brief_nexus' =&amp;gt; 1,&lt;br /&gt;
                                'story_brief_always_nexus' =&amp;gt; 1,&lt;br /&gt;
                                'story_full_best_nexus' =&amp;gt; 1,&lt;br /&gt;
                                'story_brief_best_nexus' =&amp;gt; 1,&lt;br /&gt;
                                'maxstories' =&amp;gt; 1,&lt;br /&gt;
                                'noboxes' =&amp;gt; 1,&lt;br /&gt;
                                'light' =&amp;gt; 1,&lt;br /&gt;
                                'noicons' =&amp;gt; 1,&lt;br /&gt;
                                'willing' =&amp;gt; 1&lt;br /&gt;
                        }, { slashboxes =&amp;gt; &amp;quot;&amp;quot; });&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
#print scalar(localtime) . &amp;quot; uet: &amp;quot; . Dumper($user_edits_table);&lt;br /&gt;
                $slashdb-&amp;gt;setUser($uid, $user_edits_table);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        editHome({ uid =&amp;gt; $uid, note =&amp;gt; $note });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
# A generic way for a site to allow users to edit data about themselves.&lt;br /&gt;
# Most useful when your plugin or theme wants to let the user change&lt;br /&gt;
# minor settings but you don't want to write a whole new version&lt;br /&gt;
# of users.pl to provide a user interface.  The user can save any&lt;br /&gt;
# param of the format &amp;quot;opt_foo&amp;quot;, as long as &amp;quot;foo&amp;quot; shows up in&lt;br /&gt;
# getMiscUserOpts which lists all the misc opts that this user can edit.&lt;br /&gt;
# This is *not* protected by formkeys (yet), so assume attackers can make&lt;br /&gt;
# users click and accidentally edit their own settings: no really important&lt;br /&gt;
# data should be stored in this way.&lt;br /&gt;
sub editMiscOpts {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $user = getCurrentUser(); &lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $note = $hr-&amp;gt;{note} || &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
        return if $user-&amp;gt;{is_anon}; # shouldn't be, but can't hurt to check&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        my $edit_user = $slashdb-&amp;gt;getUser($user-&amp;gt;{uid});&lt;br /&gt;
        my $title = getTitle('editMiscOpts_title');&lt;br /&gt;
&lt;br /&gt;
        my $opts = $slashdb-&amp;gt;getMiscUserOpts();&lt;br /&gt;
        for my $opt (@$opts) {&lt;br /&gt;
                my $opt_name = &amp;quot;opt_&amp;quot; . $opt-&amp;gt;{name};&lt;br /&gt;
                $opt-&amp;gt;{checked} = $edit_user-&amp;gt;{$opt_name} ? 1 : 0;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('editMiscOpts', {&lt;br /&gt;
#               useredit        =&amp;gt; $user_edit,&lt;br /&gt;
                title           =&amp;gt; $title,&lt;br /&gt;
                opts            =&amp;gt; $opts,&lt;br /&gt;
                note            =&amp;gt; $note,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
#&lt;br /&gt;
sub saveMiscOpts {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        return if $user-&amp;gt;{is_anon}; # shouldn't be, but can't hurt to check&lt;br /&gt;
&lt;br /&gt;
        my $edit_user = $slashdb-&amp;gt;getUser($user-&amp;gt;{uid});&lt;br /&gt;
        my %opts_ok_hash = ( );&lt;br /&gt;
        my $opts = $slashdb-&amp;gt;getMiscUserOpts();&lt;br /&gt;
        for my $opt (@$opts) {&lt;br /&gt;
                $opts_ok_hash{&amp;quot;opt_$opt-&amp;gt;{name}&amp;quot;} = 1;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $update = { };&lt;br /&gt;
        for my $opt (grep /^opt_/, keys %$form) {&lt;br /&gt;
                next unless $opts_ok_hash{$opt};&lt;br /&gt;
                $update-&amp;gt;{$opt} = $form-&amp;gt;{$opt} ? 1 : 0;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Make the changes.&lt;br /&gt;
        $slashdb-&amp;gt;setUser($edit_user-&amp;gt;{uid}, $update);&lt;br /&gt;
&lt;br /&gt;
        # Inform the user the change was made.  Since we don't&lt;br /&gt;
        # require formkeys, we always want to print a message to&lt;br /&gt;
        # make sure the user sees what s/he did.  This is done&lt;br /&gt;
        # by passing in a note which ends up passed to the&lt;br /&gt;
        # editMiscOpts template, which displays it.&lt;br /&gt;
        editMiscOpts({ note =&amp;gt; getMessage('savemiscopts_msg') });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub listReadOnly {&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
        my $readonlylist = $reader-&amp;gt;getAL2List('nopost');&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('listReadOnly', {&lt;br /&gt;
                readonlylist =&amp;gt; $readonlylist,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub listBanned {&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
        my $bannedlist = $reader-&amp;gt;getAL2List('ban');&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('listBanned', {&lt;br /&gt;
                bannedlist =&amp;gt; $bannedlist,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub topAbusers {&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
        my $topabusers = $reader-&amp;gt;getTopAbusers();&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('topAbusers', {&lt;br /&gt;
                topabusers =&amp;gt; $topabusers,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub listAbuses {&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        my $abuses = $reader-&amp;gt;getAbuses($form-&amp;gt;{key}, $form-&amp;gt;{abuseid});&lt;br /&gt;
&lt;br /&gt;
        slashDisplay('listAbuses', {&lt;br /&gt;
                abuseid =&amp;gt; $form-&amp;gt;{abuseid},&lt;br /&gt;
                abuses  =&amp;gt; $abuses,&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub forceAccountVerify {&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        my $uid = $form-&amp;gt;{uid};&lt;br /&gt;
        my $useredit = $slashdb-&amp;gt;getUser($uid);&lt;br /&gt;
&lt;br /&gt;
        if ($useredit-&amp;gt;{uid}) {&lt;br /&gt;
                my $newpasswd = $slashdb-&amp;gt;resetUserAccount($uid);&lt;br /&gt;
                $slashdb-&amp;gt;deleteLogToken($uid, 1);&lt;br /&gt;
                my $emailtitle = getTitle('reset_acct_email_title', {&lt;br /&gt;
                        nickname        =&amp;gt; $useredit-&amp;gt;{nickname}&lt;br /&gt;
                }, 1);&lt;br /&gt;
&lt;br /&gt;
                my $msg = getMessage('reset_acct_msg', {&lt;br /&gt;
                        newpasswd       =&amp;gt; $newpasswd,&lt;br /&gt;
                        tempnick        =&amp;gt; $useredit-&amp;gt;{nickname},&lt;br /&gt;
                }, 1);&lt;br /&gt;
&lt;br /&gt;
                $slashdb-&amp;gt;setUser($useredit-&amp;gt;{uid}, {&lt;br /&gt;
                        waiting_for_account_verify =&amp;gt; 1,&lt;br /&gt;
                        account_verify_request_time =&amp;gt; $slashdb-&amp;gt;getTime()&lt;br /&gt;
                });&lt;br /&gt;
&lt;br /&gt;
                doEmail($useredit-&amp;gt;{uid}, $emailtitle, $msg) if $useredit-&amp;gt;{uid};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        print getMessage(&amp;quot;reset_acct_complete&amp;quot;, { useredit =&amp;gt; $useredit }, 1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub displayForm {&lt;br /&gt;
        my($hr) = @_;&lt;br /&gt;
&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $form = getCurrentForm();&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
&lt;br /&gt;
        my $suadmin_flag = $user-&amp;gt;{seclev} &amp;gt;= 10000 ? 1 : 0;&lt;br /&gt;
&lt;br /&gt;
        print createMenu(&amp;quot;users&amp;quot;, {&lt;br /&gt;
                style           =&amp;gt; 'tabbed',&lt;br /&gt;
                justify         =&amp;gt; 'right',&lt;br /&gt;
                color           =&amp;gt; 'colored',&lt;br /&gt;
                tab_selected    =&amp;gt; $hr-&amp;gt;{tab_selected_1} || &amp;quot;&amp;quot;,&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        my $op = $hr-&amp;gt;{op} || $form-&amp;gt;{op} || 'displayform';&lt;br /&gt;
&lt;br /&gt;
        my $ops = {&lt;br /&gt;
                displayform     =&amp;gt; 'loginForm',&lt;br /&gt;
                edithome        =&amp;gt; 'loginForm',&lt;br /&gt;
                editcomm        =&amp;gt; 'loginForm',&lt;br /&gt;
                edituser        =&amp;gt; 'loginForm',&lt;br /&gt;
#               mailpasswdform  =&amp;gt; 'sendPasswdForm',&lt;br /&gt;
#               newuserform     =&amp;gt; 'newUserForm',&lt;br /&gt;
                userclose       =&amp;gt; 'loginForm',&lt;br /&gt;
                userlogin       =&amp;gt; 'loginForm',&lt;br /&gt;
                editmiscopts    =&amp;gt; 'loginForm',&lt;br /&gt;
                savemiscopts    =&amp;gt; 'loginForm',&lt;br /&gt;
                default         =&amp;gt; 'loginForm'&lt;br /&gt;
        };&lt;br /&gt;
&lt;br /&gt;
        $op = 'default' if !defined($ops-&amp;gt;{$op});&lt;br /&gt;
&lt;br /&gt;
        my($title, $title2, $msg1, $msg2) = ('', '', '', '');&lt;br /&gt;
&lt;br /&gt;
        if ($op eq 'userclose') {&lt;br /&gt;
                $title = getMessage('userclose');&lt;br /&gt;
&lt;br /&gt;
        } elsif ($op eq 'displayForm') {&lt;br /&gt;
                $title = $form-&amp;gt;{unickname}&lt;br /&gt;
                        ? getTitle('displayForm_err_title')&lt;br /&gt;
                        : getTitle('displayForm_title');&lt;br /&gt;
        } elsif ($op eq 'mailpasswdform') {&lt;br /&gt;
                $title = getTitle('mailPasswdForm_title');&lt;br /&gt;
        } elsif ($op eq 'newuserform') {&lt;br /&gt;
                $title = getTitle('newUserForm_title');&lt;br /&gt;
        } else {&lt;br /&gt;
                $title = getTitle('displayForm_title');&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        $form-&amp;gt;{unickname} ||= $form-&amp;gt;{newusernick};&lt;br /&gt;
&lt;br /&gt;
        if ($form-&amp;gt;{newusernick}) {&lt;br /&gt;
                $title2 = getTitle('displayForm_dup_title');&lt;br /&gt;
        } else {&lt;br /&gt;
                $title2 = getTitle('displayForm_new_title');&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        $msg1 = getMessage('dispform_new_msg_1');&lt;br /&gt;
        if (! $form-&amp;gt;{newusernick} &amp;amp;&amp;amp; $op eq 'newuserform') {&lt;br /&gt;
                $msg2 = getMessage('dispform_new_msg_2');&lt;br /&gt;
        } elsif ($op eq 'displayform' || $op eq 'userlogin') {&lt;br /&gt;
                $msg2 = getMessage('newuserform_msg');&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        slashDisplay($ops-&amp;gt;{$op}, {&lt;br /&gt;
                newnick         =&amp;gt; nickFix($form-&amp;gt;{newusernick}),&lt;br /&gt;
                suadmin_flag    =&amp;gt; $suadmin_flag,&lt;br /&gt;
                title           =&amp;gt; $title,&lt;br /&gt;
                title2          =&amp;gt; $title2,&lt;br /&gt;
                logged_in       =&amp;gt; $user-&amp;gt;{is_anon} ? 0 : 1,&lt;br /&gt;
                msg1            =&amp;gt; $msg1,&lt;br /&gt;
                msg2            =&amp;gt; $msg2&lt;br /&gt;
        });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
# this groups all the messages together in&lt;br /&gt;
# one template, called &amp;quot;messages;users;default&amp;quot;&lt;br /&gt;
sub getMessage {&lt;br /&gt;
        my($value, $hashref, $nocomm) = @_;&lt;br /&gt;
        $hashref ||= {};&lt;br /&gt;
        $hashref-&amp;gt;{value} = $value;&lt;br /&gt;
        return slashDisplay('messages', $hashref,&lt;br /&gt;
                { Return =&amp;gt; 1, Nocomm =&amp;gt; $nocomm });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
# this groups all the errors together in&lt;br /&gt;
# one template, called &amp;quot;errors;users;default&amp;quot;&lt;br /&gt;
sub getError {&lt;br /&gt;
        my($value, $hashref, $nocomm) = @_;&lt;br /&gt;
        $hashref ||= {};&lt;br /&gt;
        $hashref-&amp;gt;{value} = $value;&lt;br /&gt;
        return slashDisplay('errors', $hashref,&lt;br /&gt;
                { Return =&amp;gt; 1, Nocomm =&amp;gt; $nocomm });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
# this groups all the titles together in&lt;br /&gt;
# one template, called &amp;quot;users-titles&amp;quot;&lt;br /&gt;
sub getTitle {&lt;br /&gt;
        my($value, $hashref, $nocomm) = @_;&lt;br /&gt;
        $hashref ||= {};&lt;br /&gt;
        $hashref-&amp;gt;{value} = $value;&lt;br /&gt;
        return slashDisplay('titles', $hashref,&lt;br /&gt;
                { Return =&amp;gt; 1, Nocomm =&amp;gt; $nocomm });&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
# getUserAdmin - returns a block of HTML text that provides&lt;br /&gt;
# information and editing capabilities for admin users.&lt;br /&gt;
# Most of this data is already in the getUserAdmin template,&lt;br /&gt;
# but really, we should try to get more of this logic into&lt;br /&gt;
# that template.&lt;br /&gt;
sub getUserAdmin {&lt;br /&gt;
        my($id, $field, $seclev_field) = @_;&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $logdb = getObject('Slash::DB', { db_type =&amp;gt; 'log_slave' });&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        my $user        = getCurrentUser();&lt;br /&gt;
        my $form        = getCurrentForm();&lt;br /&gt;
        my $constants   = getCurrentStatic();&lt;br /&gt;
        my $slashdb     = getCurrentDB();&lt;br /&gt;
        $id ||= $user-&amp;gt;{uid};&lt;br /&gt;
&lt;br /&gt;
        my($expired, $uidstruct, $readonly);&lt;br /&gt;
        my($user_edit, $user_editfield, $ipstruct, $ipstruct_order, $authors, $author_flag, $topabusers, $thresh_select,$section_select);&lt;br /&gt;
        my $srcid;&lt;br /&gt;
        my $proxy_check = {};&lt;br /&gt;
        my @accesshits;&lt;br /&gt;
        my $user_editinfo_flag = (!$form-&amp;gt;{op} || $form-&amp;gt;{op} eq 'userinfo'&lt;br /&gt;
                || $form-&amp;gt;{userinfo} || $form-&amp;gt;{saveuseradmin}&lt;br /&gt;
                ) ? 1 : 0;&lt;br /&gt;
        my $authoredit_flag = ($user-&amp;gt;{seclev} &amp;gt;= 10000) ? 1 : 0;&lt;br /&gt;
        my $sectionref = $reader-&amp;gt;getDescriptions('skins');&lt;br /&gt;
        $sectionref-&amp;gt;{''} = getData('all_sections');&lt;br /&gt;
&lt;br /&gt;
        $field ||= 'uid';&lt;br /&gt;
        if ($field eq 'uid') {&lt;br /&gt;
                $user_edit = $slashdb-&amp;gt;getUser($id);&lt;br /&gt;
                $user_editfield = $user_edit-&amp;gt;{uid};&lt;br /&gt;
                $srcid = convert_srcid( uid =&amp;gt; $id );&lt;br /&gt;
                #$expired = $slashdb-&amp;gt;checkExpired($user_edit-&amp;gt;{uid}) ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
                $ipstruct = $slashdb-&amp;gt;getNetIDStruct($user_edit-&amp;gt;{uid});&lt;br /&gt;
                @accesshits = $logdb-&amp;gt;countAccessLogHitsInLastX($field, $user_edit-&amp;gt;{uid}) if defined($logdb);&lt;br /&gt;
                $section_select = createSelect('section', $sectionref, $user_edit-&amp;gt;{section}, 1);&lt;br /&gt;
&lt;br /&gt;
        } elsif ($field eq 'nickname') {&lt;br /&gt;
                $user_edit = $slashdb-&amp;gt;getUser($slashdb-&amp;gt;getUserUID($id));&lt;br /&gt;
                $user_editfield = $user_edit-&amp;gt;{nickname};&lt;br /&gt;
                #$expired = $slashdb-&amp;gt;checkExpired($user_edit-&amp;gt;{uid}) ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
                $ipstruct = $slashdb-&amp;gt;getNetIDStruct($user_edit-&amp;gt;{uid});&lt;br /&gt;
                @accesshits = $logdb-&amp;gt;countAccessLogHitsInLastX('uid', $user_edit-&amp;gt;{uid}) if defined($logdb);&lt;br /&gt;
                $section_select = createSelect('section', $sectionref, $user_edit-&amp;gt;{section}, 1);&lt;br /&gt;
&lt;br /&gt;
        } elsif ($field eq 'md5id') {&lt;br /&gt;
                $user_edit-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                $user_edit-&amp;gt;{md5id} = $id;&lt;br /&gt;
                if ($form-&amp;gt;{fieldname} &amp;amp;&amp;amp; $form-&amp;gt;{fieldname} =~ /^(ipid|subnetid)$/) {&lt;br /&gt;
                        $uidstruct = $slashdb-&amp;gt;getUIDStruct($form-&amp;gt;{fieldname}, $user_edit-&amp;gt;{md5id});&lt;br /&gt;
                        @accesshits = $logdb-&amp;gt;countAccessLogHitsInLastX($form-&amp;gt;{fieldname}, $user_edit-&amp;gt;{md5id}) if defined($logdb);&lt;br /&gt;
                } else {&lt;br /&gt;
                        $uidstruct = $slashdb-&amp;gt;getUIDStruct('md5id', $user_edit-&amp;gt;{md5id});&lt;br /&gt;
                        @accesshits = $logdb-&amp;gt;countAccessLogHitsInLastX($field, $user_edit-&amp;gt;{md5id}) if defined($logdb);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
        } elsif ($field eq 'ipid') {&lt;br /&gt;
                $user_edit-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                $user_edit-&amp;gt;{ipid} = $id;&lt;br /&gt;
                $srcid = convert_srcid( ipid =&amp;gt; $id );&lt;br /&gt;
                $user_editfield = $id;&lt;br /&gt;
                $uidstruct = $slashdb-&amp;gt;getUIDStruct('ipid', $user_edit-&amp;gt;{ipid});&lt;br /&gt;
                @accesshits = $logdb-&amp;gt;countAccessLogHitsInLastX('host_addr', $user_edit-&amp;gt;{ipid}) if defined($logdb);&lt;br /&gt;
&lt;br /&gt;
                if ($form-&amp;gt;{userfield} =~/^\d+\.\d+\.\d+\.(\d+)$/) {&lt;br /&gt;
                        if ($1 ne &amp;quot;0&amp;quot;){&lt;br /&gt;
                                $proxy_check-&amp;gt;{available} = 1;&lt;br /&gt;
                                $proxy_check-&amp;gt;{results} = $slashdb-&amp;gt;checkForOpenProxy($form-&amp;gt;{userfield}) if $form-&amp;gt;{check_proxy};&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
        } elsif ($field eq 'subnetid') {&lt;br /&gt;
                $user_edit-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                $srcid = convert_srcid( ipid =&amp;gt; $id );&lt;br /&gt;
                if ($id =~ /^(\d+\.\d+\.\d+)(?:\.\d)?/) {&lt;br /&gt;
                        $id = $1 . &amp;quot;.0&amp;quot;;&lt;br /&gt;
                        $user_edit-&amp;gt;{subnetid} = $id;&lt;br /&gt;
                } else {&lt;br /&gt;
                        $user_edit-&amp;gt;{subnetid} = $id;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                $user_editfield = $id;&lt;br /&gt;
                $uidstruct = $slashdb-&amp;gt;getUIDStruct('subnetid', $user_edit-&amp;gt;{subnetid});&lt;br /&gt;
                @accesshits = $logdb-&amp;gt;countAccessLogHitsInLastX($field, $user_edit-&amp;gt;{subnetid}) if defined($logdb);&lt;br /&gt;
&lt;br /&gt;
        } elsif ($field eq &amp;quot;srcid&amp;quot;) {&lt;br /&gt;
                $user_edit-&amp;gt;{nonuid} = 1;&lt;br /&gt;
                $user_edit-&amp;gt;{srcid}  = $id;&lt;br /&gt;
                $srcid = $id;&lt;br /&gt;
&lt;br /&gt;
        } else {&lt;br /&gt;
                $user_edit = $id ? $slashdb-&amp;gt;getUser($id) : $user;&lt;br /&gt;
                $user_editfield = $user_edit-&amp;gt;{uid};&lt;br /&gt;
                $ipstruct = $slashdb-&amp;gt;getNetIDStruct($user_edit-&amp;gt;{uid});&lt;br /&gt;
                @accesshits = $logdb-&amp;gt;countAccessLogHitsInLastX('uid', $user_edit-&amp;gt;{uid}) if defined($logdb);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        ##########&lt;br /&gt;
        # Put together the array and hashref that the template will need&lt;br /&gt;
        # to construct the list for display to the admin.&lt;br /&gt;
        # Note that currently a srcid which is not a uid (i.e. which&lt;br /&gt;
        # represents an IP address or masked IP network) cannot have&lt;br /&gt;
        # any ACLs assigned to it.  This may change in the future.&lt;br /&gt;
        # The term &amp;quot;aclam&amp;quot; is used because it has a field set for both&lt;br /&gt;
        # every ACL and every access modifier (i.e. AL2 bit) that is set&lt;br /&gt;
        # for this user or srcid.&lt;br /&gt;
        # For now, ACLs will be listed for IPs as well.&lt;br /&gt;
        # First get the list of ACLs that can be used.&lt;br /&gt;
        my $all_acls_ar = $reader-&amp;gt;getAllACLNames();&lt;br /&gt;
        my $all_acls_hr = { map { ( $_, 1 ) } @$all_acls_ar };&lt;br /&gt;
        # Add in any ACLs selected for this user (just in case&lt;br /&gt;
        # getAllACLNames is cached and stale).&lt;br /&gt;
        for my $acl (keys %{$user_edit-&amp;gt;{acl}}) {&lt;br /&gt;
                $all_acls_hr-&amp;gt;{$acl} = 1;&lt;br /&gt;
        }&lt;br /&gt;
        # Start creating the $all_aclam_hr data, in which the keys are&lt;br /&gt;
        # the HTML selection names that all begin with aclam_ and the&lt;br /&gt;
        # the values are their names/descriptions shown to the admin.&lt;br /&gt;
        # First put all the ACLs into the hash, if we're editing a user.&lt;br /&gt;
        my $all_aclam_hr = { };&lt;br /&gt;
        if (!$user_edit-&amp;gt;{nonuid}) {&lt;br /&gt;
                $all_aclam_hr = { map { ( &amp;quot;aclam_$_&amp;quot;, &amp;quot;ACL: $_&amp;quot; ) } keys %$all_acls_hr };&lt;br /&gt;
        }&lt;br /&gt;
        # Next put in all the al2 types.&lt;br /&gt;
        my $all_al2types = $reader-&amp;gt;getAL2Types;&lt;br /&gt;
        for my $key (keys %$all_al2types) {&lt;br /&gt;
                next if $key eq 'comment'; # skip the 'comment' type&lt;br /&gt;
                $all_aclam_hr-&amp;gt;{&amp;quot;aclam_$key&amp;quot;} = $all_al2types-&amp;gt;{$key}{title};&lt;br /&gt;
        }&lt;br /&gt;
        # Finally, sort the keys of the hash into the order that we&lt;br /&gt;
        # want them displayed to the admin (ACLs first).&lt;br /&gt;
        my $all_acls_longkeys_hr = { map { ( &amp;quot;aclam_$_&amp;quot;, 1 ) } keys %$all_acls_hr };&lt;br /&gt;
        my $all_aclam_ar = [&lt;br /&gt;
                sort {&lt;br /&gt;
                        (exists($all_acls_longkeys_hr-&amp;gt;{$a}) ? -1 : 1) &amp;lt;=&amp;gt; (exists($all_acls_longkeys_hr-&amp;gt;{$b}) ? -1 : 1)&lt;br /&gt;
                        ||&lt;br /&gt;
                        $all_aclam_hr-&amp;gt;{$a} cmp $all_aclam_hr-&amp;gt;{$b}&lt;br /&gt;
                } keys %$all_aclam_hr&lt;br /&gt;
        ];&lt;br /&gt;
        # Now put together the hashref that identifies which of those&lt;br /&gt;
        # items are selected for this user.&lt;br /&gt;
        my $user_aclam_hr = { };&lt;br /&gt;
        for my $acl (keys %{ $user_edit-&amp;gt;{acl} }) {&lt;br /&gt;
                $user_aclam_hr-&amp;gt;{&amp;quot;aclam_$acl&amp;quot;} = 1;&lt;br /&gt;
        }&lt;br /&gt;
        my $al2_tid_comment = $all_al2types-&amp;gt;{comment}{al2tid} || 0;&lt;br /&gt;
        my $al2_log_ar = [ ];&lt;br /&gt;
        my $al2_hr = { };&lt;br /&gt;
        # XXXSRCID Once we get rid of the silly 'md5id' field and all the&lt;br /&gt;
        # other bizarre backward-compatibility code paths early in this&lt;br /&gt;
        # function, this won't be necessary, but until then we need this&lt;br /&gt;
        # sanity check...&lt;br /&gt;
        if ($srcid) {&lt;br /&gt;
                # getAL2 works with either a srcids hashref or a single srcid&lt;br /&gt;
                $al2_hr = $slashdb-&amp;gt;getAL2($srcid);&lt;br /&gt;
                for my $al2 (keys %{ $al2_hr }) {&lt;br /&gt;
                        $user_aclam_hr-&amp;gt;{&amp;quot;aclam_$al2&amp;quot;} = 1;&lt;br /&gt;
                }&lt;br /&gt;
                $al2_log_ar = $slashdb-&amp;gt;getAL2Log($srcid);&lt;br /&gt;
        }&lt;br /&gt;
        # Generate al2_nick_hr, which will be populated with keys of all&lt;br /&gt;
        # the (presumably) admin uids who have logged rows for this al2,&lt;br /&gt;
        # and values of their nicks.&lt;br /&gt;
        my $al2_nick_hr = { };&lt;br /&gt;
        for my $al2_log (@$al2_log_ar) {&lt;br /&gt;
                my $uid = $al2_log-&amp;gt;{adminuid};&lt;br /&gt;
                next if !$uid; # odd error, might want to flag this&lt;br /&gt;
                $al2_nick_hr-&amp;gt;{$uid} ||= $slashdb-&amp;gt;getUser($uid, 'nickname');&lt;br /&gt;
        }&lt;br /&gt;
        ##########&lt;br /&gt;
&lt;br /&gt;
        $user_edit-&amp;gt;{author} = ($user_edit-&amp;gt;{author} &amp;amp;&amp;amp; $user_edit-&amp;gt;{author} == 1)&lt;br /&gt;
                ? $constants-&amp;gt;{markup_checked_attribute} : '';&lt;br /&gt;
        if (! $user-&amp;gt;{nonuid}) {&lt;br /&gt;
                my $threshcodes = $reader-&amp;gt;getDescriptions('threshcode_values','',1);&lt;br /&gt;
                $thresh_select = createSelect('defaultpoints', $threshcodes, $user_edit-&amp;gt;{defaultpoints}, 1);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if (!ref $ipstruct) {&lt;br /&gt;
                undef $ipstruct;&lt;br /&gt;
        } else {&lt;br /&gt;
                @$ipstruct_order = sort { $ipstruct-&amp;gt;{$b}{dmin} cmp $ipstruct-&amp;gt;{$a}{dmin} } keys %$ipstruct;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $m2total = ($user_edit-&amp;gt;{m2fair} || 0) + ($user_edit-&amp;gt;{m2unfair} || 0);&lt;br /&gt;
        if ($m2total) {&lt;br /&gt;
                $user_edit-&amp;gt;{m2unfairpercent} = sprintf(&amp;quot;%.2f&amp;quot;,&lt;br /&gt;
                        $user_edit-&amp;gt;{m2unfair}*100/$m2total);&lt;br /&gt;
        }&lt;br /&gt;
        my $mod_total = ($user_edit-&amp;gt;{totalmods} || 0) + ($user_edit-&amp;gt;{stirred} || 0);&lt;br /&gt;
        if ($mod_total) {&lt;br /&gt;
                $user_edit-&amp;gt;{stirredpercent} = sprintf(&amp;quot;%.2f&amp;quot;,&lt;br /&gt;
                        $user_edit-&amp;gt;{stirred}*100/$mod_total);&lt;br /&gt;
        }&lt;br /&gt;
        if ($constants-&amp;gt;{subscribe} and my $subscribe = getObject('Slash::Subscribe')) {&lt;br /&gt;
                $user_edit-&amp;gt;{subscribe_payments} =&lt;br /&gt;
                        $subscribe-&amp;gt;getSubscriptionsForUser($user_edit-&amp;gt;{uid});&lt;br /&gt;
                $user_edit-&amp;gt;{subscribe_purchases} =&lt;br /&gt;
                        $subscribe-&amp;gt;getSubscriptionsPurchasedByUser($user_edit-&amp;gt;{uid},{ only_types =&amp;gt; [ &amp;quot;grant&amp;quot;, &amp;quot;gift&amp;quot; ] });&lt;br /&gt;
        }&lt;br /&gt;
        my $ipid = $user_edit-&amp;gt;{ipid};&lt;br /&gt;
        my $subnetid = $user_edit-&amp;gt;{subnetid};&lt;br /&gt;
        my $post_restrictions = {};&lt;br /&gt;
        my ($subnet_karma, $ipid_karma);&lt;br /&gt;
&lt;br /&gt;
        if ($ipid &amp;amp;&amp;amp; !$subnetid) {&lt;br /&gt;
                $ipid = md5_hex($ipid) if length($ipid) != 32;&lt;br /&gt;
                $proxy_check-&amp;gt;{ipid} = $ipid;&lt;br /&gt;
                $proxy_check-&amp;gt;{currently} = $slashdb-&amp;gt;getKnownOpenProxy($ipid, &amp;quot;ipid&amp;quot;);&lt;br /&gt;
                # This next call is very slow.&lt;br /&gt;
                $subnetid = $reader-&amp;gt;getSubnetFromIPIDBasedOnComments($ipid);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if ($subnetid) {&lt;br /&gt;
                $subnetid = md5_hex($subnetid) if length($subnetid) != 32;&lt;br /&gt;
                # These next three calls can be very slow.  In fact, getNetIDKarma&lt;br /&gt;
                # is actually called twice on the same subnetid;  if we can cache&lt;br /&gt;
                # that data somehow that wouldn't be a bad idea.&lt;br /&gt;
                $post_restrictions = $reader-&amp;gt;getNetIDPostingRestrictions(&amp;quot;subnetid&amp;quot;, $subnetid);&lt;br /&gt;
                $subnet_karma = $reader-&amp;gt;getNetIDKarma(&amp;quot;subnetid&amp;quot;, $subnetid);&lt;br /&gt;
                $ipid_karma = $reader-&amp;gt;getNetIDKarma(&amp;quot;ipid&amp;quot;, $ipid) if $ipid;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        my $clout_types_ar = [ sort grep /\D/, keys %{$slashdb-&amp;gt;getCloutTypes} ];&lt;br /&gt;
&lt;br /&gt;
        return slashDisplay('getUserAdmin', {&lt;br /&gt;
                field                   =&amp;gt; $field,&lt;br /&gt;
                useredit                =&amp;gt; $user_edit,&lt;br /&gt;
                srcid                   =&amp;gt; $srcid,&lt;br /&gt;
                all_aclam_ar            =&amp;gt; $all_aclam_ar,&lt;br /&gt;
                all_aclam_hr            =&amp;gt; $all_aclam_hr,&lt;br /&gt;
                user_aclam_hr           =&amp;gt; $user_aclam_hr,&lt;br /&gt;
                al2_old                 =&amp;gt; $al2_hr,&lt;br /&gt;
                al2_log                 =&amp;gt; $al2_log_ar,&lt;br /&gt;
                al2_tid_comment         =&amp;gt; $al2_tid_comment,&lt;br /&gt;
                al2_nick                =&amp;gt; $al2_nick_hr,&lt;br /&gt;
&lt;br /&gt;
                userinfo_flag           =&amp;gt; $user_editinfo_flag,&lt;br /&gt;
                userfield               =&amp;gt; $user_editfield,&lt;br /&gt;
                ipstruct                =&amp;gt; $ipstruct,&lt;br /&gt;
                ipstruct_order          =&amp;gt; $ipstruct_order,&lt;br /&gt;
                uidstruct               =&amp;gt; $uidstruct,&lt;br /&gt;
                accesshits              =&amp;gt; \@accesshits,&lt;br /&gt;
                seclev_field            =&amp;gt; $seclev_field,&lt;br /&gt;
                expired                 =&amp;gt; $expired,&lt;br /&gt;
                topabusers              =&amp;gt; $topabusers,&lt;br /&gt;
                readonly                =&amp;gt; $readonly,&lt;br /&gt;
                thresh_select           =&amp;gt; $thresh_select,&lt;br /&gt;
                authoredit_flag         =&amp;gt; $authoredit_flag,&lt;br /&gt;
                section_select          =&amp;gt; $section_select,&lt;br /&gt;
                all_acls                =&amp;gt; $all_acls_hr,&lt;br /&gt;
                proxy_check             =&amp;gt; $proxy_check,&lt;br /&gt;
                subnet_karma            =&amp;gt; $subnet_karma,&lt;br /&gt;
                ipid_karma              =&amp;gt; $ipid_karma,&lt;br /&gt;
                post_restrictions       =&amp;gt; $post_restrictions,&lt;br /&gt;
&lt;br /&gt;
                clout_types_ar          =&amp;gt; $clout_types_ar,&lt;br /&gt;
        }, 1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
# this is to allow alternate parameters to be specified.  pass in&lt;br /&gt;
# your hash reference to be passed to setUser(), and this will&lt;br /&gt;
# add in those extra parameters.  add the parameters to string_param,&lt;br /&gt;
# type = otherusersparam, code = name of the param.  they will&lt;br /&gt;
# be checked for the main user prefs editing screens, and on&lt;br /&gt;
# user creation -- pudge&lt;br /&gt;
sub getOtherUserParams {&lt;br /&gt;
        my($data) = @_;&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
        my $user    = getCurrentUser();&lt;br /&gt;
        my $form    = getCurrentForm();&lt;br /&gt;
        my $params  = $reader-&amp;gt;getDescriptions('otherusersparam');&lt;br /&gt;
&lt;br /&gt;
        for my $param (keys %$params) {&lt;br /&gt;
                if (exists $form-&amp;gt;{$param}) {&lt;br /&gt;
                        # set user too for output in this request&lt;br /&gt;
                        $data-&amp;gt;{$param} = $user-&amp;gt;{$param} = $form-&amp;gt;{$param} || undef;&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
###############################################################&lt;br /&gt;
# This modifies a hashref to default values -- if nothing&lt;br /&gt;
# else we assume the empty string which clears items in the&lt;br /&gt;
# user_param table &lt;br /&gt;
#&lt;br /&gt;
# takes 3 hashrefs currently&lt;br /&gt;
# $data     - hashref to change to defaults&lt;br /&gt;
# $skip     - hashref of keys to skip modifying&lt;br /&gt;
# $defaults - hashref of defaults to set to something other &lt;br /&gt;
#             than the empty string&lt;br /&gt;
sub setToDefaults {&lt;br /&gt;
        my($data, $skip, $defaults) = @_;&lt;br /&gt;
        foreach my $key (keys %$data) {&lt;br /&gt;
                next if $skip-&amp;gt;{$key};&lt;br /&gt;
                $data-&amp;gt;{$key} = exists $defaults-&amp;gt;{$key} ? $defaults-&amp;gt;{$key} : &amp;quot;&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
sub getCommentListing {&lt;br /&gt;
        my ($type, $value,&lt;br /&gt;
                $min_comment, $time_period, $cc_all, $cc_time_period, $cid_for_time_period,&lt;br /&gt;
                $non_admin_limit, $admin_time_limit, $admin_non_time_limit,&lt;br /&gt;
                $options) = @_;&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
        my $slashdb = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user = getCurrentUser();&lt;br /&gt;
        my $store_cutoff = $options-&amp;gt;{use_uid_cid_cutoff} ? $constants-&amp;gt;{store_com_page1_min_cid_for_user_com_cnt} : 0;&lt;br /&gt;
&lt;br /&gt;
        my $s_opt = {};&lt;br /&gt;
        my $num_wanted = 0;&lt;br /&gt;
        if ($min_comment) {&lt;br /&gt;
                if ($user-&amp;gt;{is_admin}) {&lt;br /&gt;
                        $num_wanted = $admin_non_time_limit;&lt;br /&gt;
                } else {&lt;br /&gt;
                        $num_wanted = $non_admin_limit;&lt;br /&gt;
                }&lt;br /&gt;
        } else {&lt;br /&gt;
&lt;br /&gt;
                if ($user-&amp;gt;{is_admin}) {&lt;br /&gt;
                        if ($cc_time_period &amp;gt;= $admin_non_time_limit) {&lt;br /&gt;
                                $s_opt-&amp;gt;{cid_at_or_after} = $cid_for_time_period;&lt;br /&gt;
                                $num_wanted = $admin_time_limit;&lt;br /&gt;
                        } else {&lt;br /&gt;
                                $num_wanted = $admin_non_time_limit;&lt;br /&gt;
                                if($store_cutoff){&lt;br /&gt;
                                        my $min_cid = $reader-&amp;gt;getUser($value,&lt;br /&gt;
                                                &amp;quot;com_num_&amp;quot;.$num_wanted.&amp;quot;_at_or_after_cid&amp;quot;);&lt;br /&gt;
                                        $s_opt-&amp;gt;{cid_at_or_after} = $min_cid&lt;br /&gt;
                                                if $min_cid &amp;amp;&amp;amp; $min_cid =~ /^\d+$/;&lt;br /&gt;
                                }&lt;br /&gt;
                        }&lt;br /&gt;
                } else {&lt;br /&gt;
                        if ($cc_time_period &amp;gt;= $non_admin_limit ) {&lt;br /&gt;
                                $s_opt-&amp;gt;{cid_at_or_after} = $cid_for_time_period;&lt;br /&gt;
                                $num_wanted = $non_admin_limit;&lt;br /&gt;
                        } else {&lt;br /&gt;
                                $num_wanted = $non_admin_limit;&lt;br /&gt;
                                if($store_cutoff){&lt;br /&gt;
                                        my $min_cid = $reader-&amp;gt;getUser($value,&lt;br /&gt;
                                                &amp;quot;com_num_&amp;quot;.$num_wanted.&amp;quot;_at_or_after_cid&amp;quot;);&lt;br /&gt;
                                        $s_opt-&amp;gt;{cid_at_or_after} = $min_cid&lt;br /&gt;
                                                if $min_cid &amp;amp;&amp;amp; $min_cid =~ /^\d+$/;&lt;br /&gt;
                                }&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
        if ($type eq &amp;quot;uid&amp;quot;) {&lt;br /&gt;
&lt;br /&gt;
                my $comments = $reader-&amp;gt;getCommentsByUID($value, $num_wanted, $min_comment, $s_opt) if $cc_all;&lt;br /&gt;
                if ($store_cutoff&lt;br /&gt;
                        &amp;amp;&amp;amp; $comments &amp;amp;&amp;amp; $cc_all &amp;gt;= $store_cutoff &amp;amp;&amp;amp; $min_comment == 0 &lt;br /&gt;
                        &amp;amp;&amp;amp; scalar(@$comments) == $num_wanted) {&lt;br /&gt;
                        my $min_cid = 0;&lt;br /&gt;
                        for my $comment (@$comments) {&lt;br /&gt;
                                $min_cid = $comment-&amp;gt;{cid}&lt;br /&gt;
                                        if !$min_cid || ($comment-&amp;gt;{cid} &amp;lt; $min_cid); &lt;br /&gt;
                        }&lt;br /&gt;
                        if ($min_cid &amp;amp;&amp;amp; $min_cid =~/^\d+$/) {&lt;br /&gt;
                                $slashdb-&amp;gt;setUser($value, {&lt;br /&gt;
                                        &amp;quot;com_num_&amp;quot;.$num_wanted.&amp;quot;_at_or_after_cid&amp;quot; =&amp;gt; $min_cid&lt;br /&gt;
                                });&lt;br /&gt;
                        }&lt;br /&gt;
&lt;br /&gt;
                }&lt;br /&gt;
                return $comments;&lt;br /&gt;
        } elsif ($type eq &amp;quot;ipid&amp;quot;){&lt;br /&gt;
                return $reader-&amp;gt;getCommentsByIPID($value, $num_wanted, $min_comment, $s_opt) if $cc_all;&lt;br /&gt;
        } elsif ($type eq &amp;quot;subnetid&amp;quot;){&lt;br /&gt;
                return $reader-&amp;gt;getCommentsBySubnetID($value, $num_wanted, $min_comment, $s_opt) if $cc_all;&lt;br /&gt;
        } else {&lt;br /&gt;
                return $reader-&amp;gt;getCommentsByIPIDOrSubnetID($value, $num_wanted, $min_comment, $s_opt) if $cc_all;&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
createEnvironment();&lt;br /&gt;
main();&lt;br /&gt;
&lt;br /&gt;
1;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=Historic:CssWork&amp;diff=5368</id>
		<title>Historic:CssWork</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=Historic:CssWork&amp;diff=5368"/>
		<updated>2014-03-01T18:51:38Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h2&amp;gt;Related pages  &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Official docs&lt;br /&gt;
** [[InstallDoc]] - original INSTALL document&lt;br /&gt;
** [[SlashGuide]] - this is the guide (from htdocs) you are supposed to read immediately after installing slashcode&lt;br /&gt;
** [[SectionTopics]] - This is the 'new' sections and topics rewrite and is more important to read than it first appears, explains what a skin is. Sort of.&lt;br /&gt;
** [[SlashChart]] Png chart of slashcode organization&lt;br /&gt;
** [[SlashManPages]] Man pages available by typing man PAGENAME&lt;br /&gt;
** [[TemplateManPages]] Man pages for the template library used to deliver the html&lt;br /&gt;
&lt;br /&gt;
* [[SlashHelperProgramsInBin]] - provided admin helpers in slash/bin&lt;br /&gt;
* [[SlashGlossary]] Glossary of terms used in Slash code&lt;br /&gt;
* [[FileLocations]] Locations of important files on disk. Has Main Libraries called by all routines&lt;br /&gt;
* [[FileLocations2]] Locations of files on disk continued. This is the stuff in local/slash.&lt;br /&gt;
* [[FileLocations3]] Locations of files on disk continued. This is the stuff in /usr/local/share/perl5/Slash/&lt;br /&gt;
* [[FileLocationsMisc]] Has Apache, Man pages,... &lt;br /&gt;
* [[SqlSchema]] - tables used in the database&lt;br /&gt;
* [[SqlDefaults]] - defaults for those tables&lt;br /&gt;
* [[PerlModuleDisplay]] - this is what actually sends a single template out to the broswer (through Apache)&lt;br /&gt;
* [[PerlModuleUsers]] - &lt;br /&gt;
&lt;br /&gt;
* [[AvailableThemes]] and how they are organized &lt;br /&gt;
* [[ThemesAnatomy]] Overview - &amp;quot;A theme is a website design.&amp;quot; (includes HOWTO-THemes doc)&lt;br /&gt;
** [[TemplateAnatomy]] - All html in these. &amp;quot;parsed by Perl Template Toolkit&amp;quot; (HOWTO-Templates)&lt;br /&gt;
***  [[TemplateTutorialWeb]] - man page&lt;br /&gt;
*** [[TemplateManualDirective]] - man page, has all the keywords used by template library&lt;br /&gt;
*** [[ThePartsOfTemplateLibraryActuallyUsedInSlashCode]] - knowing this can save time reading docs&lt;br /&gt;
*** [[TemplateLists]] - lists of the template in our Theme, some descriptions fm src&lt;br /&gt;
**[[TasksAnatomy]] -&lt;br /&gt;
&lt;br /&gt;
* [[TagboxesAnatomy]] - I don't realy know what these are yet. But there are a lot of them ;-)&lt;br /&gt;
* [[PluginsAnatomy]] - (HOWTO-plugins)&lt;br /&gt;
&lt;br /&gt;
* [[ChangelogForCss]] - Put final finished change here &lt;br /&gt;
* [[HowSlashCssWorks]] Overview&lt;br /&gt;
* [[CssFilesUsedEachPage]] Which css files are used on different pages&lt;br /&gt;
&lt;br /&gt;
* [[http://dev.soylentnews.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=soylentnews/soylentnews.git;a=tree;f=themes;hb=refs/heads/master]] git - themes&lt;br /&gt;
&lt;br /&gt;
http://www.mediawiki.org/wiki/Help:Images&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Unanswered Questions&amp;lt;/h2&amp;gt;&lt;br /&gt;
* The templates are individually output by routine slashDisplay(), but how is the order of delivery determined, and how does one insure a new template goes to the right place on the page?&lt;br /&gt;
* The users home page link goes to /my/homepage. I can find no apache redirect for this nor is there a 'my' folder anywhere. I am guessing this is done in the apache perl module, through some redirects that hook into Apache innards. It is hard to be sure what script is actually being called first. I am assuming it is users. Once an edit is made, you are in /users.pl without /my/&lt;br /&gt;
* Two users scripts, users,users2 Am guesssing users2 is for the d2 interface we are not using, since the forms on the page call users.pl&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Got tired of scrolling through pages of perl code just to see what subs were in a module&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So wrote this, now in /usr/local/sbin/listsubs.sh:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[root@slashcode Slash]# listsubs.sh Admin.pm&lt;br /&gt;
Admin.pm:&lt;br /&gt;
    addSpriteForSid, ajax_authorbox, ajax_learnword, ajax_neverdisplay, &lt;br /&gt;
    ajax_perfbox, ajax_signoff, ajax_signoffbox, ajax_slashdbox, &lt;br /&gt;
    ajax_storyadminbox, ajax_sub_memory, DESTROY, extractRelatedStoriesFromForm, &lt;br /&gt;
    findTheTime, getAccesslogAbusersByID, getAccesslogMaxID, get_ispell_comments, &lt;br /&gt;
    getRecentSubs, getRecentWebheads, getRelated, getSignoffData, &lt;br /&gt;
    getStorySignoffs, getStoryThumbLargeLink, grantStoryPostingAchievements, otherLinks, &lt;br /&gt;
    relatedLinks, showAdminTodo, showAuthorActivityBox, showPerformanceBox, &lt;br /&gt;
    showSignoffBox, showSlashdBox, showStoryAdminBox, write_to_temp_file, &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also will work from a list, as in&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ls *.pm &amp;gt; list.tst&lt;br /&gt;
listsubs.sh &amp;lt; list.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Maybe someone else will find it useful as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Order css files are loaded when simple switch on user prefs page is selected viewing main page main page&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* base.css?T_2_5_0_272 The numbers are the slash verion number (from one of the docs).&lt;br /&gt;
* slashcode.css?T_2_5__0_272&lt;br /&gt;
* slashcode_lite.css?T_2_5__0_272&lt;br /&gt;
* slashcode_lite.css?T_2_5__0_272 (appears to be loading this twice,why?)&lt;br /&gt;
* print.cssT_2_5__0_272&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow a page link from the main page to an individual article page &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Link: http://soylentnews.org/article.pl?sid=14/02/18/0336229&lt;br /&gt;
* article.pl is foind in slash/themes/slashcode/htdocs/article.pl So 'slashcode' is treated as a theme.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;article.pl&amp;lt;/h2&amp;gt;&lt;br /&gt;
The stuff of interest to us&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
use Slash;  -------- located in /local/lib64/perl5/slash.pm&lt;br /&gt;
use Slash::Display;     &lt;br /&gt;
use Slash::Utility;&lt;br /&gt;
&lt;br /&gt;
sub main {&lt;br /&gt;
        my $slashdb   = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user      = getCurrentUser();&lt;br /&gt;
        my $form      = getCurrentForm();&lt;br /&gt;
        my $gSkin     = getCurrentSkin();&lt;br /&gt;
         &lt;br /&gt;
        my $story;&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
                # Make sure the reader is viewing this story in the&lt;br /&gt;
                # proper skin.&lt;br /&gt;
                my $cur_skid = determineCurrentSkin();&lt;br /&gt;
                if ($story-&amp;gt;{primaryskid} != $cur_skid) {&lt;br /&gt;
                        my $cur_skin = $reader-&amp;gt;getSkin($cur_skid);&lt;br /&gt;
                        my $story_skin = $reader-&amp;gt;getSkin($story-&amp;gt;{primaryskid});&lt;br /&gt;
                        if ($story_skin &amp;amp;&amp;amp; $story_skin-&amp;gt;{rootdir}&lt;br /&gt;
                                &amp;amp;&amp;amp; $story_skin-&amp;gt;{rootdir} ne $cur_skin-&amp;gt;{rootdir})$&lt;br /&gt;
                                redirect(&amp;quot;$story_skin-&amp;gt;{rootdir}$ENV{REQUEST_URI}&amp;quot;$&lt;br /&gt;
                                return;&lt;br /&gt;
&lt;br /&gt;
               # XXXSECTIONTOPICS this needs to be updated&lt;br /&gt;
                my $SECT = $reader-&amp;gt;getSection($story-&amp;gt;{section});&lt;br /&gt;
                # This should be a getData call for title&lt;br /&gt;
                my $title = &amp;quot;$constants-&amp;gt;{sitename} | $story-&amp;gt;{title}&amp;quot;;&lt;br /&gt;
                if ($gSkin-&amp;gt;{name} &amp;amp;&amp;amp; $gSkin-&amp;gt;{name} eq &amp;quot;idle&amp;quot;) {&lt;br /&gt;
                        $title = &amp;quot;$gSkin-&amp;gt;{hostname} | $story-&amp;gt;{title}&amp;quot;;&lt;br /&gt;
                &lt;br /&gt;
if (my $pollbooth_db = getObject('Slash::PollBooth')) {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
slashDisplay('display', {&lt;br /&gt;
                        poll                    =&amp;gt; $pollbooth,&lt;br /&gt;
                        section                 =&amp;gt; $SECT,&lt;br /&gt;
                        section_block           =&amp;gt; $reader-&amp;gt;getBlock($SECT-&amp;gt;{secti$&lt;br /&gt;
                        show_poll               =&amp;gt; $pollbooth ? 1 : 0,&lt;br /&gt;
                        story                   =&amp;gt; $story,&lt;br /&gt;
                        stories                 =&amp;gt; \%stories,&lt;br /&gt;
                });&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
               my $called_pc = 0;&lt;br /&gt;
                if ($story-&amp;gt;{discussion}) {&lt;br /&gt;
                        # Still not happy with this logic -Brian&lt;br /&gt;
                        my $discussion = $reader-&amp;gt;getDiscussion($story-&amp;gt;{discussio$&lt;br /&gt;
&lt;br /&gt;
                        }&lt;br /&gt;
                        # If no comments ever have existed and commentstatus is di$&lt;br /&gt;
                        # just skip the display of the comment header bar -Brian&lt;br /&gt;
&lt;br /&gt;
                               &amp;amp;&amp;amp;  $discussion-&amp;gt;{commentstatus} eq 'disabled'&lt;br /&gt;
                        )) {&lt;br /&gt;
                                printComments($discussion);&lt;br /&gt;
                                $called_pc = 1;&lt;br /&gt;
                        }&lt;br /&gt;
                 if (!$called_pc &amp;amp;&amp;amp; $form-&amp;gt;{ssi} &amp;amp;&amp;amp; $form-&amp;gt;{ssi} eq 'yes' &amp;amp;&amp;amp; $form-$&lt;br /&gt;
                        # This is a real hack, we're kind of skipping down&lt;br /&gt;
                        # two levels of code.  But the cchp printing is an&lt;br /&gt;
                        # important optimization;  we avoid having to do&lt;br /&gt;
                        # multiple expensive comment selects.  One problem&lt;br /&gt;
                        # is that if there's no discussion with a story,&lt;br /&gt;
                        # printComments() doesn't get called, which means&lt;br /&gt;
                        # selectComments() doesn't get called, which means&lt;br /&gt;
                        # the cchp file won't be written.  If article.pl&lt;br /&gt;
                       # is being called by slashd, and we need to write&lt;br /&gt;
                        # that file, then here's where we print an empty&lt;br /&gt;
                        # file that will satisfy slashd. - Jamie&lt;br /&gt;
&lt;br /&gt;
                        Slash::Utility::Comments::_print_cchp({ stoid =&amp;gt; &amp;quot;dummy&amp;quot; }$&lt;br /&gt;
                }&lt;br /&gt;
        } else {&lt;br /&gt;
                header('Error', $form-&amp;gt;{section}) or return;&lt;br /&gt;
       &lt;br /&gt;
       my $plugins = $slashdb-&amp;gt;getDescriptions('plugins');&lt;br /&gt;
        if (!$user-&amp;gt;{is_anon} &amp;amp;&amp;amp; $plugins-&amp;gt;{Tags} &amp;amp;&amp;amp; $story) {&lt;br /&gt;
                my $tagsdb = getObject('Slash::Tags');&lt;br /&gt;
                $tagsdb-&amp;gt;markViewed($user-&amp;gt;{uid},&lt;br /&gt;
                        $reader-&amp;gt;getGlobjidCreate('stories', $story-&amp;gt;{stoid}));&lt;br /&gt;
        }&lt;br /&gt;
                        &lt;br /&gt;
        footer();&lt;br /&gt;
        if ($story) {&lt;br /&gt;
                writeLog($story-&amp;gt;{sid} || $sid);&lt;br /&gt;
        } else { &lt;br /&gt;
                writeLog($sid);&lt;br /&gt;
&lt;br /&gt;
               &lt;br /&gt;
createEnvironment();&lt;br /&gt;
main();  &lt;br /&gt;
1; &lt;br /&gt;
&lt;br /&gt;
(EOF)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Slash/DB/MySQL/MySQL.pm&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
479 sub getCSS {&lt;br /&gt;
480         my($self, $layout) = @_;&lt;br /&gt;
481         my $user = getCurrentUser();&lt;br /&gt;
482         my $page = $user-&amp;gt;{currentPage};&lt;br /&gt;
483         my $skin = getCurrentSkin('name');&lt;br /&gt;
484         my $admin = $user-&amp;gt;{is_admin};&lt;br /&gt;
485         my $theme = ($user-&amp;gt;{simpledesign} || $user-&amp;gt;{pda}) ? &amp;quot;light&amp;quot; : $user-&amp;gt;{css_theme};&lt;br /&gt;
486         my $secure = apacheConnectionSSL();&lt;br /&gt;
487         $layout ||= '';&lt;br /&gt;
488         my $constants = getCurrentStatic();&lt;br /&gt;
489&lt;br /&gt;
490         my $expire_time = $constants-&amp;gt;{css_expire} || 3600;&lt;br /&gt;
491         $expire_time += int(rand(60)) if $expire_time;&lt;br /&gt;
492         _genericCacheRefresh($self, 'css', $expire_time);&lt;br /&gt;
493         _genericCacheRefresh($self, 'css_pages', $expire_time);&lt;br /&gt;
494         _genericCacheRefresh($self, 'css_skins', $expire_time);&lt;br /&gt;
495         _genericCacheRefresh($self, 'css_themes', $expire_time);&lt;br /&gt;
496&lt;br /&gt;
497         my $css_ref             = $self-&amp;gt;{_css_cache} ||= {};&lt;br /&gt;
498         my $css_pages_ref       = $self-&amp;gt;{_css_pages_cache};&lt;br /&gt;
499         my $css_skins_ref       = $self-&amp;gt;{_css_skins_cache};&lt;br /&gt;
500         my $css_themes_ref      = $self-&amp;gt;{_css_themes_cache};&lt;br /&gt;
501         my $css_layouts_ref     = $self-&amp;gt;{_css_layouts_cache};&lt;br /&gt;
502&lt;br /&gt;
503         $css_pages_ref = $self-&amp;gt;getCSSValuesHashForCol('page') if !$css_pages_ref;&lt;br /&gt;
504         $css_skins_ref = $self-&amp;gt;getCSSValuesHashForCol('skin') if !$css_skins_ref;&lt;br /&gt;
505         $css_themes_ref = $self-&amp;gt;getCSSValuesHashForCol('theme') if !$css_themes_ref;&lt;br /&gt;
506         $css_layouts_ref = $self-&amp;gt;getCSSValuesHashForCol('layout') if !$css_layouts_ref;&lt;br /&gt;
507&lt;br /&gt;
508         my $lowbandwidth = ($user-&amp;gt;{lowbandwidth} || $user-&amp;gt;{pda}) ? &amp;quot;yes&amp;quot; : &amp;quot;no&amp;quot;;&lt;br /&gt;
509&lt;br /&gt;
510         $page   = '' if !$css_pages_ref-&amp;gt;{$page};&lt;br /&gt;
511         $skin   = '' if !$css_skins_ref-&amp;gt;{$skin};&lt;br /&gt;
512         $theme  = '' if !$css_themes_ref-&amp;gt;{$theme};&lt;br /&gt;
513         $layout = '' if !$css_layouts_ref-&amp;gt;{$layout};&lt;br /&gt;
514&lt;br /&gt;
515         return $css_ref-&amp;gt;{$skin}{$page}{$admin}{$theme}{$lowbandwidth}{$layout}{$secure}&lt;br /&gt;
516                 if exists $css_ref-&amp;gt;{$skin}{$page}{$admin}{$theme}{$lowbandwidth}{$layout}{$secure};&lt;br /&gt;
517&lt;br /&gt;
518         my @clauses;&lt;br /&gt;
519&lt;br /&gt;
520         my $page_q = $self-&amp;gt;sqlQuote($page);&lt;br /&gt;
521         my $page_in = $page ? &amp;quot;(page = '' or page = $page_q)&amp;quot; : &amp;quot;page = ''&amp;quot;;&lt;br /&gt;
522         push @clauses, $page_in;&lt;br /&gt;
523&lt;br /&gt;
524         my $skin_in = $skin ? &amp;quot;(skin = '' or skin = '$skin')&amp;quot; : &amp;quot;skin = ''&amp;quot;;&lt;br /&gt;
525         push @clauses, $skin_in;&lt;br /&gt;
526&lt;br /&gt;
527         push @clauses, &amp;quot;admin='no'&amp;quot; if !$admin;&lt;br /&gt;
528&lt;br /&gt;
529         my $theme_q  = $self-&amp;gt;sqlQuote($theme);&lt;br /&gt;
530         my $theme_in = $theme ? &amp;quot;(theme='' or theme=$theme_q)&amp;quot; : &amp;quot;theme=''&amp;quot;;&lt;br /&gt;
531         push @clauses, $theme_in;&lt;br /&gt;
532&lt;br /&gt;
533         push @clauses, &amp;quot;lowbandwidth='$lowbandwidth'&amp;quot; if $lowbandwidth eq &amp;quot;no&amp;quot;;&lt;br /&gt;
534&lt;br /&gt;
535         my $layout_q = $self-&amp;gt;sqlQuote($layout);&lt;br /&gt;
536         push @clauses, &amp;quot;layout=$layout_q&amp;quot;;&lt;br /&gt;
537&lt;br /&gt;
538         my $where = &amp;quot;css.ctid=css_type.ctid AND &amp;quot;;&lt;br /&gt;
539         $where .= join ' AND ', @clauses;&lt;br /&gt;
540&lt;br /&gt;
541         my $css = $self-&amp;gt;sqlSelectAllHashrefArray(&amp;quot;rel,type,media,file,title,ie_cond,skin&amp;quot;,&lt;br /&gt;
542                 &amp;quot;css, css_type&amp;quot;, $where, &amp;quot;ORDER BY css_type.ordernum, css.ordernum&amp;quot;);&lt;br /&gt;
543         if ($secure) {&lt;br /&gt;
544                 for my $hr (@$css) { $hr-&amp;gt;{file} =~ s/\.css/.ssl.css/ }&lt;br /&gt;
545         }&lt;br /&gt;
546         &lt;br /&gt;
547         $css_ref-&amp;gt;{$skin}{$page}{$admin}{$theme}{$lowbandwidth}{$layout}{$secure} = $css;&lt;br /&gt;
548         return $css;&lt;br /&gt;
549 }&lt;br /&gt;
550 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Slash/Apache/User/User.pm&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
548 {&lt;br /&gt;
549 my %ops_my = (&lt;br /&gt;
550         inbox           =&amp;gt; { args =&amp;gt; 'op=list', uri =&amp;gt; 'messages.pl' },&lt;br /&gt;
551         # XXX change messages to be same as /inbox, move this to /my/preferences/messages&lt;br /&gt;
552         messages        =&amp;gt; { args =&amp;gt; 'op=display_prefs', uri =&amp;gt; 'messages.pl' },&lt;br /&gt;
553         comments        =&amp;gt; { args =&amp;gt; 'op=editcomm' },&lt;br /&gt;
554         homepage        =&amp;gt; { args =&amp;gt; 'op=edithome' },&lt;br /&gt;
555         password        =&amp;gt; { args =&amp;gt; 'op=changeprefs', uri =&amp;gt; 'login.pl' },&lt;br /&gt;
556         logout          =&amp;gt; { args =&amp;gt; 'op=userclose', uri =&amp;gt; 'login.pl' },&lt;br /&gt;
557         misc            =&amp;gt; { args =&amp;gt; 'op=editmiscopts' },&lt;br /&gt;
558         amigos          =&amp;gt; { args =&amp;gt; 'op=friendview', uri =&amp;gt; 'journal.pl' },&lt;br /&gt;
559         bookmarks       =&amp;gt; { args =&amp;gt; 'op=showbookmarks' },&lt;br /&gt;
560         firehose        =&amp;gt; { args =&amp;gt; 'op=userfirehose' },&lt;br /&gt;
561         preferences     =&amp;gt; { args =&amp;gt; 'op=displayprefs', uri =&amp;gt; 'preferences.pl' },&lt;br /&gt;
562         tags            =&amp;gt; { args =&amp;gt; 'op=showtags' },&lt;br /&gt;
563         journal         =&amp;gt; { args =&amp;gt; 'op=list', uri =&amp;gt; 'journal.pl' },&lt;br /&gt;
564&lt;br /&gt;
565         friends         =&amp;gt; { args =&amp;gt; 'op=friends', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
566         fans            =&amp;gt; { args =&amp;gt; 'op=fans', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
567         freaks          =&amp;gt; { args =&amp;gt; 'op=freaks', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
568         foes            =&amp;gt; { args =&amp;gt; 'op=foes', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
569         zoo             =&amp;gt; { args =&amp;gt; 'op=all', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
570&lt;br /&gt;
571         default         =&amp;gt; { args =&amp;gt; 'op=edituser' }&lt;br /&gt;
572 );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;sql/mysql/defaults.sql&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 134 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','base.css','','','','no','',1,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
135 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','comments','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
136 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','article','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
137 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','print','print.css','','','','no','',5,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
138 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','admin.css','','','','yes','',1,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
139 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','pollBooth','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
140 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode_lite.css','','','','no','light',4,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
141 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','journal','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
142 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode_lite.css','','','','no','light',4,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
143 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','journal','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
144 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode.css','','','','no','',3,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
145 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','metamod','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
146 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode_low_bw.css','','','','no','',4,99, &amp;quot;&amp;quot;,&amp;quot;yes&amp;quot;);&lt;br /&gt;
147&lt;br /&gt;
148 #&lt;br /&gt;
149 # Dumping data for table 'css_type'&lt;br /&gt;
150 #&lt;br /&gt;
151 INSERT INTO css_type (ctid, name, ordernum) VALUES (1,'base',1);&lt;br /&gt;
152 INSERT INTO css_type (ctid, name, ordernum) VALUES (2,'page',2);&lt;br /&gt;
153 INSERT INTO css_type (ctid, name, ordernum) VALUES (3,'theme',3);&lt;br /&gt;
154 INSERT INTO css_type (ctid, name, ordernum) VALUES (4,'user_theme',5);&lt;br /&gt;
155 INSERT INTO css_type (ctid, name, ordernum) VALUES (5,'print',6);&lt;br /&gt;
156 INSERT INTO css_type (ctid, name, ordernum) VALUES (6,'skin',4);&lt;br /&gt;
157 INSERT INTO css_type (ctid, name, ordernum) VALUES (7,'handheld',7);&lt;br /&gt;
158 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;plugins/FireHose/mysql_dump.sql &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','firehose','no','',2,0, '');&lt;br /&gt;
==&amp;gt; INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','users','no','',2,0, '');&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','calendar.css','','','firehose','no','',2,0, '');&lt;br /&gt;
==&amp;gt; INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','users','no','',2,0, '');&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','firehose','no','',2,0, '');&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','index2','no','',2,0, ''); &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;I believe that we are not using FireHose but it was needed to make the site work.  As can be seen in the db dump above, it adds the firehose.css file to any of the user pages. Need to verify and then see if we can get the db purged of these values.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Good work. The question in my mind is why the heck css for one module has any effect *at all* on any other module. Talk about lack of localization...-AG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;I think there was some firehose slashboxes that showed up in the users pages.  They needed to be wider than the default, so they patched those pages with the firehose.css. Next step is to get a current dump of the two css tables. The important part is I know what files are for what parts of the code.  Slashcode.css is the theme css file slashcode-lite.css is the style file that is called by a user pref.  This means I need to fix comments.css to remove the theme elements I inserted and put them in the theme file.  I still need to make sure that the changes that benefited the Simplified theme stay intact. -EP&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;fonts&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
This is what I usually start with:&lt;br /&gt;
   font-family: Helvetica,Geneva,Arial,Verdana,sans-serif;&lt;br /&gt;
&lt;br /&gt;
Too many can lead to a LOT of testing being required. As can the wrong order. ;-)&lt;br /&gt;
&lt;br /&gt;
Others I have used in the past:&lt;br /&gt;
font-family: Geneva,Arial,Verdana,Helvetica,Chicago,sans-serif;&lt;br /&gt;
font-family: Helvetica,Arial,Geneva,Chicago,Verdana,sans-serif;&lt;br /&gt;
font-family: Helvetica,Geneva,Arial,Verdana,sans-serif;&lt;br /&gt;
-AG&lt;br /&gt;
&lt;br /&gt;
I have used:&lt;br /&gt;
font-family: Verdana, Geneva, &amp;quot;Bitstream Vera Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif;&lt;br /&gt;
&lt;br /&gt;
Note this has Linux fonts as well to help with these users.&lt;br /&gt;
-EP&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;User Menu&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','Logout','logout','/my/logout',1,0,10);&lt;br /&gt;
124 INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','Preferences','preferences','/users.pl?op=edituser',1,0,20);&lt;br /&gt;
125 INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','Password','password','[% constants.real_rootdir %]/my/password',1,0,40);&lt;br /&gt;
126 INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','~[% user.nickname | strip_literal %] ([% user.uid %])','me','/~[% user.nickname | fixparam %]',1,0,50);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; This code sets up the upper menu on http://slashcott.org/users.pl which is linked from your userid on the home page.  The Preferences is wrong, as it needs to be all three links: Info, Homepage, Comments.  This will allow users with low-bandwidth option set to easily get to the setting to unset low-bandwidth. -EP&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Refernces to css in the man pages in /usr/local/share/man/man3&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
grep -i css *&lt;br /&gt;
&lt;br /&gt;
HTML::CalendarMonth.3pm:.IP &amp;quot;enable_css&amp;quot; 4&lt;br /&gt;
HTML::CalendarMonth.3pm:.IX Item &amp;quot;enable_css&amp;quot;&lt;br /&gt;
HTML::CalendarMonth.3pm:Set some handy \s-1CSS\s0 class attributes on elements, enabled by default.&lt;br /&gt;
HTML::CalendarMonth.3pm:.IP &amp;quot;semantic_css&amp;quot; 4&lt;br /&gt;
HTML::CalendarMonth.3pm:.IX Item &amp;quot;semantic_css&amp;quot;&lt;br /&gt;
HTML::CalendarMonth.3pm:Sets some additional \s-1CSS\s0 class attributes on elements, disabled by&lt;br /&gt;
HTML::CalendarMonth.3pm:.IP &amp;quot;\fIdefault_css()\fR&amp;quot; 4&lt;br /&gt;
HTML::CalendarMonth.3pm:.IX Item &amp;quot;default_css()&amp;quot;&lt;br /&gt;
HTML::CalendarMonth.3pm:document in conjunction with the classes assigned to elements when css&lt;br /&gt;
HTML::ElementSuper.3pm:might be when you'd like to assign multiple \s-1CSS\s0 classes to a single&lt;br /&gt;
HTML::PopupTreeSelect.3pm:.IP &amp;quot;include_css (optional)&amp;quot; 4&lt;br /&gt;
HTML::PopupTreeSelect.3pm:.IX Item &amp;quot;include_css (optional)&amp;quot;&lt;br /&gt;
HTML::PopupTreeSelect.3pm:Set this to 0 and the default \s-1CSS\s0 will not be included in the widget&lt;br /&gt;
HTML::PopupTreeSelect.3pm:output.  This allows you to include your own \s-1CSS\s0 which will be used by&lt;br /&gt;
HTML::PopupTreeSelect.3pm:your widget.  Modifying the \s-1CSS\s0 will allow you to control the fonts,&lt;br /&gt;
HTML::PopupTreeSelect.3pm:If you run the widget with include_css set to 1 then you can use that&lt;br /&gt;
HTML::Tree::Scanning.3pm:tagging, such is as useful in \s-1CSS\s0 \*(-- note the&lt;br /&gt;
Module::Build::API.3pm:.IP &amp;quot;\fIhtml_css()\fR&amp;quot; 4&lt;br /&gt;
Module::Build::API.3pm:.IX Item &amp;quot;html_css()&amp;quot;&lt;br /&gt;
TAP::Parser::YAMLish::Reader.3pm:YAML::Tiny, \s-1YAML\s0, YAML::Syck, Config::Tiny, CSS::Tiny,&lt;br /&gt;
TAP::Parser::YAMLish::Writer.3pm:YAML::Tiny, \s-1YAML\s0, YAML::Syck, Config::Tiny, CSS::Tiny,&lt;br /&gt;
Template::Iterator.3pm:You can then style the \f(CW\*(C`tr.odd\*(C'\fR and \f(CW\*(C`tr.even\*(C'\fR elements using \s-1CSS:\s0&lt;br /&gt;
Template::Toolkit.3pm:kind of text documents: \s-1HTML\s0, \s-1XML\s0, \s-1CSS\s0, Javascript, Perl code, plain text,&lt;br /&gt;
Template::Tutorial::Web.3pm:kind of content they contain.  So you can use \s-1TT\s0 to generate \s-1HTML\s0, \s-1XML\s0, \s-1CSS\s0,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;CSS commit for Feb 23&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Changes to most of the css files to set all sizes to em (some were in px and broke flow). Changed the font-family to a more friendly chain for all platforms, and remove all other font-faimily calls from the code. Changed font sizes from % to ems and adjusted size for some of the main elements. Fix a issue with the middle column size caused by firehose.css. Many small fixes to spacing over many places.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moved all of the slashcode theme items into the slashcode.cssraw file. Some were in comments.cssraw due to some previous work I did.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On article body and comment body, made the font size a bit smaller. Also on comments body set the margins to be smaller.&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;-EP&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=Historic:CssWork&amp;diff=5367</id>
		<title>Historic:CssWork</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=Historic:CssWork&amp;diff=5367"/>
		<updated>2014-03-01T18:48:22Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h2&amp;gt;Related pages  &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Official docs&lt;br /&gt;
** [[InstallDoc]] - original INSTALL document&lt;br /&gt;
** [[SlashGuide]] - this is the guide (from htdocs) you are supposed to read immediately after installing slashcode&lt;br /&gt;
** [[SectionTopics]] - This is the 'new' sections and topics rewrite and is more important to read than it first appears, explains what a skin is. Sort of.&lt;br /&gt;
** [[SlashChart]] Png chart of slashcode organization&lt;br /&gt;
** [[SlashManPages]] Man pages available by typing man PAGENAME&lt;br /&gt;
** [[TemplateManPages]] Man pages for the template library used to deliver the html&lt;br /&gt;
&lt;br /&gt;
* [[SlashHelperProgramsInBin]] - provided admin helpers in slash/bin&lt;br /&gt;
* [[SlashGlossary]] Glossary of terms used in Slash code&lt;br /&gt;
* [[FileLocations]] Locations of important files on disk. Has Main Libraries called by all routines&lt;br /&gt;
* [[FileLocations2]] Locations of files on disk continued. This is the stuff in local/slash.&lt;br /&gt;
* [[FileLocations3]] Locations of files on disk continued. This is the stuff in /usr/local/share/perl5/Slash/&lt;br /&gt;
* [[FileLocationsMisc]] Has Apache, Man pages,... &lt;br /&gt;
* [[SqlSchema]] - tables used in the database&lt;br /&gt;
* [[SqlDefaults]] - defaults for those tables&lt;br /&gt;
* [[PerlModuleDisplay]] - this is what actually sends a single template out to the broswer (through Apache)&lt;br /&gt;
* [[PerlModuleUsers]] - &lt;br /&gt;
&lt;br /&gt;
* [[AvailableThemes]] and how they are organized &lt;br /&gt;
* [[ThemesAnatomy]] Overview - &amp;quot;A theme is a website design.&amp;quot; (includes HOWTO-THemes doc)&lt;br /&gt;
** [[TemplateAnatomy]] - All html in these. &amp;quot;parsed by Perl Template Toolkit&amp;quot; (HOWTO-Templates)&lt;br /&gt;
***  [[TemplateTutorialWeb]] - man page&lt;br /&gt;
*** [[TemplateManualDirective]] - man page, has all the keywords used by template library&lt;br /&gt;
*** [[ThePartsOfTemplateLibraryActuallyUsedInSlashCode]] - knowing this can save time reading docs&lt;br /&gt;
*** [[TemplateLists]] - lists of the template in our Theme, some descriptions fm src&lt;br /&gt;
**[[TasksAnatomy]] -&lt;br /&gt;
&lt;br /&gt;
* [[TagboxesAnatomy]] - I don't realy know what these are yet. But there are a lot of them ;-)&lt;br /&gt;
* [[PluginsAnatomy]] - (HOWTO-plugins)&lt;br /&gt;
&lt;br /&gt;
* [[ChangelogForCss]] - Put final finished change here &lt;br /&gt;
* [[HowSlashCssWorks]] Overview&lt;br /&gt;
* [[CssFilesUsedEachPage]] Which css files are used on different pages&lt;br /&gt;
&lt;br /&gt;
* [[http://dev.soylentnews.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=soylentnews/soylentnews.git;a=tree;f=themes;hb=refs/heads/master]] git - themes&lt;br /&gt;
&lt;br /&gt;
http://www.mediawiki.org/wiki/Help:Images&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Unanswered Questions&amp;lt;/h2&amp;gt;&lt;br /&gt;
* The templates are individually output by routine slashDisplay(), but how is the order of delivery determined, and how does one insure a new template goes to the right place on the page?&lt;br /&gt;
* The users home page link goes to /my/homepage. I can find no apache redirect for this nor is there a 'my' folder anywhere. I am guessing this is done in the apache perl module, through some redirects that hook into Apache innards. It is hard to be sure what script is actually being called first. I am assuming it is users.&lt;br /&gt;
* Two users scripts, users,users2 Am guesssing users2 is for the d2 interface we are not using, since the forms on the page call users.pl&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Got tired of scrolling through pages of perl code just to see what subs were in a module&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So wrote this, now in /usr/local/sbin/listsubs.sh:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[root@slashcode Slash]# listsubs.sh Admin.pm&lt;br /&gt;
Admin.pm:&lt;br /&gt;
    addSpriteForSid, ajax_authorbox, ajax_learnword, ajax_neverdisplay, &lt;br /&gt;
    ajax_perfbox, ajax_signoff, ajax_signoffbox, ajax_slashdbox, &lt;br /&gt;
    ajax_storyadminbox, ajax_sub_memory, DESTROY, extractRelatedStoriesFromForm, &lt;br /&gt;
    findTheTime, getAccesslogAbusersByID, getAccesslogMaxID, get_ispell_comments, &lt;br /&gt;
    getRecentSubs, getRecentWebheads, getRelated, getSignoffData, &lt;br /&gt;
    getStorySignoffs, getStoryThumbLargeLink, grantStoryPostingAchievements, otherLinks, &lt;br /&gt;
    relatedLinks, showAdminTodo, showAuthorActivityBox, showPerformanceBox, &lt;br /&gt;
    showSignoffBox, showSlashdBox, showStoryAdminBox, write_to_temp_file, &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also will work from a list, as in&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ls *.pm &amp;gt; list.tst&lt;br /&gt;
listsubs.sh &amp;lt; list.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Maybe someone else will find it useful as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Order css files are loaded when simple switch on user prefs page is selected viewing main page main page&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* base.css?T_2_5_0_272 The numbers are the slash verion number (from one of the docs).&lt;br /&gt;
* slashcode.css?T_2_5__0_272&lt;br /&gt;
* slashcode_lite.css?T_2_5__0_272&lt;br /&gt;
* slashcode_lite.css?T_2_5__0_272 (appears to be loading this twice,why?)&lt;br /&gt;
* print.cssT_2_5__0_272&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow a page link from the main page to an individual article page &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Link: http://soylentnews.org/article.pl?sid=14/02/18/0336229&lt;br /&gt;
* article.pl is foind in slash/themes/slashcode/htdocs/article.pl So 'slashcode' is treated as a theme.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;article.pl&amp;lt;/h2&amp;gt;&lt;br /&gt;
The stuff of interest to us&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
use Slash;  -------- located in /local/lib64/perl5/slash.pm&lt;br /&gt;
use Slash::Display;     &lt;br /&gt;
use Slash::Utility;&lt;br /&gt;
&lt;br /&gt;
sub main {&lt;br /&gt;
        my $slashdb   = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user      = getCurrentUser();&lt;br /&gt;
        my $form      = getCurrentForm();&lt;br /&gt;
        my $gSkin     = getCurrentSkin();&lt;br /&gt;
         &lt;br /&gt;
        my $story;&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
                # Make sure the reader is viewing this story in the&lt;br /&gt;
                # proper skin.&lt;br /&gt;
                my $cur_skid = determineCurrentSkin();&lt;br /&gt;
                if ($story-&amp;gt;{primaryskid} != $cur_skid) {&lt;br /&gt;
                        my $cur_skin = $reader-&amp;gt;getSkin($cur_skid);&lt;br /&gt;
                        my $story_skin = $reader-&amp;gt;getSkin($story-&amp;gt;{primaryskid});&lt;br /&gt;
                        if ($story_skin &amp;amp;&amp;amp; $story_skin-&amp;gt;{rootdir}&lt;br /&gt;
                                &amp;amp;&amp;amp; $story_skin-&amp;gt;{rootdir} ne $cur_skin-&amp;gt;{rootdir})$&lt;br /&gt;
                                redirect(&amp;quot;$story_skin-&amp;gt;{rootdir}$ENV{REQUEST_URI}&amp;quot;$&lt;br /&gt;
                                return;&lt;br /&gt;
&lt;br /&gt;
               # XXXSECTIONTOPICS this needs to be updated&lt;br /&gt;
                my $SECT = $reader-&amp;gt;getSection($story-&amp;gt;{section});&lt;br /&gt;
                # This should be a getData call for title&lt;br /&gt;
                my $title = &amp;quot;$constants-&amp;gt;{sitename} | $story-&amp;gt;{title}&amp;quot;;&lt;br /&gt;
                if ($gSkin-&amp;gt;{name} &amp;amp;&amp;amp; $gSkin-&amp;gt;{name} eq &amp;quot;idle&amp;quot;) {&lt;br /&gt;
                        $title = &amp;quot;$gSkin-&amp;gt;{hostname} | $story-&amp;gt;{title}&amp;quot;;&lt;br /&gt;
                &lt;br /&gt;
if (my $pollbooth_db = getObject('Slash::PollBooth')) {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
slashDisplay('display', {&lt;br /&gt;
                        poll                    =&amp;gt; $pollbooth,&lt;br /&gt;
                        section                 =&amp;gt; $SECT,&lt;br /&gt;
                        section_block           =&amp;gt; $reader-&amp;gt;getBlock($SECT-&amp;gt;{secti$&lt;br /&gt;
                        show_poll               =&amp;gt; $pollbooth ? 1 : 0,&lt;br /&gt;
                        story                   =&amp;gt; $story,&lt;br /&gt;
                        stories                 =&amp;gt; \%stories,&lt;br /&gt;
                });&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
               my $called_pc = 0;&lt;br /&gt;
                if ($story-&amp;gt;{discussion}) {&lt;br /&gt;
                        # Still not happy with this logic -Brian&lt;br /&gt;
                        my $discussion = $reader-&amp;gt;getDiscussion($story-&amp;gt;{discussio$&lt;br /&gt;
&lt;br /&gt;
                        }&lt;br /&gt;
                        # If no comments ever have existed and commentstatus is di$&lt;br /&gt;
                        # just skip the display of the comment header bar -Brian&lt;br /&gt;
&lt;br /&gt;
                               &amp;amp;&amp;amp;  $discussion-&amp;gt;{commentstatus} eq 'disabled'&lt;br /&gt;
                        )) {&lt;br /&gt;
                                printComments($discussion);&lt;br /&gt;
                                $called_pc = 1;&lt;br /&gt;
                        }&lt;br /&gt;
                 if (!$called_pc &amp;amp;&amp;amp; $form-&amp;gt;{ssi} &amp;amp;&amp;amp; $form-&amp;gt;{ssi} eq 'yes' &amp;amp;&amp;amp; $form-$&lt;br /&gt;
                        # This is a real hack, we're kind of skipping down&lt;br /&gt;
                        # two levels of code.  But the cchp printing is an&lt;br /&gt;
                        # important optimization;  we avoid having to do&lt;br /&gt;
                        # multiple expensive comment selects.  One problem&lt;br /&gt;
                        # is that if there's no discussion with a story,&lt;br /&gt;
                        # printComments() doesn't get called, which means&lt;br /&gt;
                        # selectComments() doesn't get called, which means&lt;br /&gt;
                        # the cchp file won't be written.  If article.pl&lt;br /&gt;
                       # is being called by slashd, and we need to write&lt;br /&gt;
                        # that file, then here's where we print an empty&lt;br /&gt;
                        # file that will satisfy slashd. - Jamie&lt;br /&gt;
&lt;br /&gt;
                        Slash::Utility::Comments::_print_cchp({ stoid =&amp;gt; &amp;quot;dummy&amp;quot; }$&lt;br /&gt;
                }&lt;br /&gt;
        } else {&lt;br /&gt;
                header('Error', $form-&amp;gt;{section}) or return;&lt;br /&gt;
       &lt;br /&gt;
       my $plugins = $slashdb-&amp;gt;getDescriptions('plugins');&lt;br /&gt;
        if (!$user-&amp;gt;{is_anon} &amp;amp;&amp;amp; $plugins-&amp;gt;{Tags} &amp;amp;&amp;amp; $story) {&lt;br /&gt;
                my $tagsdb = getObject('Slash::Tags');&lt;br /&gt;
                $tagsdb-&amp;gt;markViewed($user-&amp;gt;{uid},&lt;br /&gt;
                        $reader-&amp;gt;getGlobjidCreate('stories', $story-&amp;gt;{stoid}));&lt;br /&gt;
        }&lt;br /&gt;
                        &lt;br /&gt;
        footer();&lt;br /&gt;
        if ($story) {&lt;br /&gt;
                writeLog($story-&amp;gt;{sid} || $sid);&lt;br /&gt;
        } else { &lt;br /&gt;
                writeLog($sid);&lt;br /&gt;
&lt;br /&gt;
               &lt;br /&gt;
createEnvironment();&lt;br /&gt;
main();  &lt;br /&gt;
1; &lt;br /&gt;
&lt;br /&gt;
(EOF)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Slash/DB/MySQL/MySQL.pm&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
479 sub getCSS {&lt;br /&gt;
480         my($self, $layout) = @_;&lt;br /&gt;
481         my $user = getCurrentUser();&lt;br /&gt;
482         my $page = $user-&amp;gt;{currentPage};&lt;br /&gt;
483         my $skin = getCurrentSkin('name');&lt;br /&gt;
484         my $admin = $user-&amp;gt;{is_admin};&lt;br /&gt;
485         my $theme = ($user-&amp;gt;{simpledesign} || $user-&amp;gt;{pda}) ? &amp;quot;light&amp;quot; : $user-&amp;gt;{css_theme};&lt;br /&gt;
486         my $secure = apacheConnectionSSL();&lt;br /&gt;
487         $layout ||= '';&lt;br /&gt;
488         my $constants = getCurrentStatic();&lt;br /&gt;
489&lt;br /&gt;
490         my $expire_time = $constants-&amp;gt;{css_expire} || 3600;&lt;br /&gt;
491         $expire_time += int(rand(60)) if $expire_time;&lt;br /&gt;
492         _genericCacheRefresh($self, 'css', $expire_time);&lt;br /&gt;
493         _genericCacheRefresh($self, 'css_pages', $expire_time);&lt;br /&gt;
494         _genericCacheRefresh($self, 'css_skins', $expire_time);&lt;br /&gt;
495         _genericCacheRefresh($self, 'css_themes', $expire_time);&lt;br /&gt;
496&lt;br /&gt;
497         my $css_ref             = $self-&amp;gt;{_css_cache} ||= {};&lt;br /&gt;
498         my $css_pages_ref       = $self-&amp;gt;{_css_pages_cache};&lt;br /&gt;
499         my $css_skins_ref       = $self-&amp;gt;{_css_skins_cache};&lt;br /&gt;
500         my $css_themes_ref      = $self-&amp;gt;{_css_themes_cache};&lt;br /&gt;
501         my $css_layouts_ref     = $self-&amp;gt;{_css_layouts_cache};&lt;br /&gt;
502&lt;br /&gt;
503         $css_pages_ref = $self-&amp;gt;getCSSValuesHashForCol('page') if !$css_pages_ref;&lt;br /&gt;
504         $css_skins_ref = $self-&amp;gt;getCSSValuesHashForCol('skin') if !$css_skins_ref;&lt;br /&gt;
505         $css_themes_ref = $self-&amp;gt;getCSSValuesHashForCol('theme') if !$css_themes_ref;&lt;br /&gt;
506         $css_layouts_ref = $self-&amp;gt;getCSSValuesHashForCol('layout') if !$css_layouts_ref;&lt;br /&gt;
507&lt;br /&gt;
508         my $lowbandwidth = ($user-&amp;gt;{lowbandwidth} || $user-&amp;gt;{pda}) ? &amp;quot;yes&amp;quot; : &amp;quot;no&amp;quot;;&lt;br /&gt;
509&lt;br /&gt;
510         $page   = '' if !$css_pages_ref-&amp;gt;{$page};&lt;br /&gt;
511         $skin   = '' if !$css_skins_ref-&amp;gt;{$skin};&lt;br /&gt;
512         $theme  = '' if !$css_themes_ref-&amp;gt;{$theme};&lt;br /&gt;
513         $layout = '' if !$css_layouts_ref-&amp;gt;{$layout};&lt;br /&gt;
514&lt;br /&gt;
515         return $css_ref-&amp;gt;{$skin}{$page}{$admin}{$theme}{$lowbandwidth}{$layout}{$secure}&lt;br /&gt;
516                 if exists $css_ref-&amp;gt;{$skin}{$page}{$admin}{$theme}{$lowbandwidth}{$layout}{$secure};&lt;br /&gt;
517&lt;br /&gt;
518         my @clauses;&lt;br /&gt;
519&lt;br /&gt;
520         my $page_q = $self-&amp;gt;sqlQuote($page);&lt;br /&gt;
521         my $page_in = $page ? &amp;quot;(page = '' or page = $page_q)&amp;quot; : &amp;quot;page = ''&amp;quot;;&lt;br /&gt;
522         push @clauses, $page_in;&lt;br /&gt;
523&lt;br /&gt;
524         my $skin_in = $skin ? &amp;quot;(skin = '' or skin = '$skin')&amp;quot; : &amp;quot;skin = ''&amp;quot;;&lt;br /&gt;
525         push @clauses, $skin_in;&lt;br /&gt;
526&lt;br /&gt;
527         push @clauses, &amp;quot;admin='no'&amp;quot; if !$admin;&lt;br /&gt;
528&lt;br /&gt;
529         my $theme_q  = $self-&amp;gt;sqlQuote($theme);&lt;br /&gt;
530         my $theme_in = $theme ? &amp;quot;(theme='' or theme=$theme_q)&amp;quot; : &amp;quot;theme=''&amp;quot;;&lt;br /&gt;
531         push @clauses, $theme_in;&lt;br /&gt;
532&lt;br /&gt;
533         push @clauses, &amp;quot;lowbandwidth='$lowbandwidth'&amp;quot; if $lowbandwidth eq &amp;quot;no&amp;quot;;&lt;br /&gt;
534&lt;br /&gt;
535         my $layout_q = $self-&amp;gt;sqlQuote($layout);&lt;br /&gt;
536         push @clauses, &amp;quot;layout=$layout_q&amp;quot;;&lt;br /&gt;
537&lt;br /&gt;
538         my $where = &amp;quot;css.ctid=css_type.ctid AND &amp;quot;;&lt;br /&gt;
539         $where .= join ' AND ', @clauses;&lt;br /&gt;
540&lt;br /&gt;
541         my $css = $self-&amp;gt;sqlSelectAllHashrefArray(&amp;quot;rel,type,media,file,title,ie_cond,skin&amp;quot;,&lt;br /&gt;
542                 &amp;quot;css, css_type&amp;quot;, $where, &amp;quot;ORDER BY css_type.ordernum, css.ordernum&amp;quot;);&lt;br /&gt;
543         if ($secure) {&lt;br /&gt;
544                 for my $hr (@$css) { $hr-&amp;gt;{file} =~ s/\.css/.ssl.css/ }&lt;br /&gt;
545         }&lt;br /&gt;
546         &lt;br /&gt;
547         $css_ref-&amp;gt;{$skin}{$page}{$admin}{$theme}{$lowbandwidth}{$layout}{$secure} = $css;&lt;br /&gt;
548         return $css;&lt;br /&gt;
549 }&lt;br /&gt;
550 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Slash/Apache/User/User.pm&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
548 {&lt;br /&gt;
549 my %ops_my = (&lt;br /&gt;
550         inbox           =&amp;gt; { args =&amp;gt; 'op=list', uri =&amp;gt; 'messages.pl' },&lt;br /&gt;
551         # XXX change messages to be same as /inbox, move this to /my/preferences/messages&lt;br /&gt;
552         messages        =&amp;gt; { args =&amp;gt; 'op=display_prefs', uri =&amp;gt; 'messages.pl' },&lt;br /&gt;
553         comments        =&amp;gt; { args =&amp;gt; 'op=editcomm' },&lt;br /&gt;
554         homepage        =&amp;gt; { args =&amp;gt; 'op=edithome' },&lt;br /&gt;
555         password        =&amp;gt; { args =&amp;gt; 'op=changeprefs', uri =&amp;gt; 'login.pl' },&lt;br /&gt;
556         logout          =&amp;gt; { args =&amp;gt; 'op=userclose', uri =&amp;gt; 'login.pl' },&lt;br /&gt;
557         misc            =&amp;gt; { args =&amp;gt; 'op=editmiscopts' },&lt;br /&gt;
558         amigos          =&amp;gt; { args =&amp;gt; 'op=friendview', uri =&amp;gt; 'journal.pl' },&lt;br /&gt;
559         bookmarks       =&amp;gt; { args =&amp;gt; 'op=showbookmarks' },&lt;br /&gt;
560         firehose        =&amp;gt; { args =&amp;gt; 'op=userfirehose' },&lt;br /&gt;
561         preferences     =&amp;gt; { args =&amp;gt; 'op=displayprefs', uri =&amp;gt; 'preferences.pl' },&lt;br /&gt;
562         tags            =&amp;gt; { args =&amp;gt; 'op=showtags' },&lt;br /&gt;
563         journal         =&amp;gt; { args =&amp;gt; 'op=list', uri =&amp;gt; 'journal.pl' },&lt;br /&gt;
564&lt;br /&gt;
565         friends         =&amp;gt; { args =&amp;gt; 'op=friends', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
566         fans            =&amp;gt; { args =&amp;gt; 'op=fans', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
567         freaks          =&amp;gt; { args =&amp;gt; 'op=freaks', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
568         foes            =&amp;gt; { args =&amp;gt; 'op=foes', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
569         zoo             =&amp;gt; { args =&amp;gt; 'op=all', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
570&lt;br /&gt;
571         default         =&amp;gt; { args =&amp;gt; 'op=edituser' }&lt;br /&gt;
572 );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;sql/mysql/defaults.sql&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 134 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','base.css','','','','no','',1,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
135 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','comments','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
136 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','article','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
137 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','print','print.css','','','','no','',5,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
138 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','admin.css','','','','yes','',1,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
139 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','pollBooth','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
140 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode_lite.css','','','','no','light',4,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
141 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','journal','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
142 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode_lite.css','','','','no','light',4,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
143 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','journal','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
144 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode.css','','','','no','',3,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
145 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','metamod','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
146 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode_low_bw.css','','','','no','',4,99, &amp;quot;&amp;quot;,&amp;quot;yes&amp;quot;);&lt;br /&gt;
147&lt;br /&gt;
148 #&lt;br /&gt;
149 # Dumping data for table 'css_type'&lt;br /&gt;
150 #&lt;br /&gt;
151 INSERT INTO css_type (ctid, name, ordernum) VALUES (1,'base',1);&lt;br /&gt;
152 INSERT INTO css_type (ctid, name, ordernum) VALUES (2,'page',2);&lt;br /&gt;
153 INSERT INTO css_type (ctid, name, ordernum) VALUES (3,'theme',3);&lt;br /&gt;
154 INSERT INTO css_type (ctid, name, ordernum) VALUES (4,'user_theme',5);&lt;br /&gt;
155 INSERT INTO css_type (ctid, name, ordernum) VALUES (5,'print',6);&lt;br /&gt;
156 INSERT INTO css_type (ctid, name, ordernum) VALUES (6,'skin',4);&lt;br /&gt;
157 INSERT INTO css_type (ctid, name, ordernum) VALUES (7,'handheld',7);&lt;br /&gt;
158 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;plugins/FireHose/mysql_dump.sql &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','firehose','no','',2,0, '');&lt;br /&gt;
==&amp;gt; INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','users','no','',2,0, '');&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','calendar.css','','','firehose','no','',2,0, '');&lt;br /&gt;
==&amp;gt; INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','users','no','',2,0, '');&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','firehose','no','',2,0, '');&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','index2','no','',2,0, ''); &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;I believe that we are not using FireHose but it was needed to make the site work.  As can be seen in the db dump above, it adds the firehose.css file to any of the user pages. Need to verify and then see if we can get the db purged of these values.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Good work. The question in my mind is why the heck css for one module has any effect *at all* on any other module. Talk about lack of localization...-AG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;I think there was some firehose slashboxes that showed up in the users pages.  They needed to be wider than the default, so they patched those pages with the firehose.css. Next step is to get a current dump of the two css tables. The important part is I know what files are for what parts of the code.  Slashcode.css is the theme css file slashcode-lite.css is the style file that is called by a user pref.  This means I need to fix comments.css to remove the theme elements I inserted and put them in the theme file.  I still need to make sure that the changes that benefited the Simplified theme stay intact. -EP&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;fonts&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
This is what I usually start with:&lt;br /&gt;
   font-family: Helvetica,Geneva,Arial,Verdana,sans-serif;&lt;br /&gt;
&lt;br /&gt;
Too many can lead to a LOT of testing being required. As can the wrong order. ;-)&lt;br /&gt;
&lt;br /&gt;
Others I have used in the past:&lt;br /&gt;
font-family: Geneva,Arial,Verdana,Helvetica,Chicago,sans-serif;&lt;br /&gt;
font-family: Helvetica,Arial,Geneva,Chicago,Verdana,sans-serif;&lt;br /&gt;
font-family: Helvetica,Geneva,Arial,Verdana,sans-serif;&lt;br /&gt;
-AG&lt;br /&gt;
&lt;br /&gt;
I have used:&lt;br /&gt;
font-family: Verdana, Geneva, &amp;quot;Bitstream Vera Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif;&lt;br /&gt;
&lt;br /&gt;
Note this has Linux fonts as well to help with these users.&lt;br /&gt;
-EP&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;User Menu&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','Logout','logout','/my/logout',1,0,10);&lt;br /&gt;
124 INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','Preferences','preferences','/users.pl?op=edituser',1,0,20);&lt;br /&gt;
125 INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','Password','password','[% constants.real_rootdir %]/my/password',1,0,40);&lt;br /&gt;
126 INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','~[% user.nickname | strip_literal %] ([% user.uid %])','me','/~[% user.nickname | fixparam %]',1,0,50);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; This code sets up the upper menu on http://slashcott.org/users.pl which is linked from your userid on the home page.  The Preferences is wrong, as it needs to be all three links: Info, Homepage, Comments.  This will allow users with low-bandwidth option set to easily get to the setting to unset low-bandwidth. -EP&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Refernces to css in the man pages in /usr/local/share/man/man3&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
grep -i css *&lt;br /&gt;
&lt;br /&gt;
HTML::CalendarMonth.3pm:.IP &amp;quot;enable_css&amp;quot; 4&lt;br /&gt;
HTML::CalendarMonth.3pm:.IX Item &amp;quot;enable_css&amp;quot;&lt;br /&gt;
HTML::CalendarMonth.3pm:Set some handy \s-1CSS\s0 class attributes on elements, enabled by default.&lt;br /&gt;
HTML::CalendarMonth.3pm:.IP &amp;quot;semantic_css&amp;quot; 4&lt;br /&gt;
HTML::CalendarMonth.3pm:.IX Item &amp;quot;semantic_css&amp;quot;&lt;br /&gt;
HTML::CalendarMonth.3pm:Sets some additional \s-1CSS\s0 class attributes on elements, disabled by&lt;br /&gt;
HTML::CalendarMonth.3pm:.IP &amp;quot;\fIdefault_css()\fR&amp;quot; 4&lt;br /&gt;
HTML::CalendarMonth.3pm:.IX Item &amp;quot;default_css()&amp;quot;&lt;br /&gt;
HTML::CalendarMonth.3pm:document in conjunction with the classes assigned to elements when css&lt;br /&gt;
HTML::ElementSuper.3pm:might be when you'd like to assign multiple \s-1CSS\s0 classes to a single&lt;br /&gt;
HTML::PopupTreeSelect.3pm:.IP &amp;quot;include_css (optional)&amp;quot; 4&lt;br /&gt;
HTML::PopupTreeSelect.3pm:.IX Item &amp;quot;include_css (optional)&amp;quot;&lt;br /&gt;
HTML::PopupTreeSelect.3pm:Set this to 0 and the default \s-1CSS\s0 will not be included in the widget&lt;br /&gt;
HTML::PopupTreeSelect.3pm:output.  This allows you to include your own \s-1CSS\s0 which will be used by&lt;br /&gt;
HTML::PopupTreeSelect.3pm:your widget.  Modifying the \s-1CSS\s0 will allow you to control the fonts,&lt;br /&gt;
HTML::PopupTreeSelect.3pm:If you run the widget with include_css set to 1 then you can use that&lt;br /&gt;
HTML::Tree::Scanning.3pm:tagging, such is as useful in \s-1CSS\s0 \*(-- note the&lt;br /&gt;
Module::Build::API.3pm:.IP &amp;quot;\fIhtml_css()\fR&amp;quot; 4&lt;br /&gt;
Module::Build::API.3pm:.IX Item &amp;quot;html_css()&amp;quot;&lt;br /&gt;
TAP::Parser::YAMLish::Reader.3pm:YAML::Tiny, \s-1YAML\s0, YAML::Syck, Config::Tiny, CSS::Tiny,&lt;br /&gt;
TAP::Parser::YAMLish::Writer.3pm:YAML::Tiny, \s-1YAML\s0, YAML::Syck, Config::Tiny, CSS::Tiny,&lt;br /&gt;
Template::Iterator.3pm:You can then style the \f(CW\*(C`tr.odd\*(C'\fR and \f(CW\*(C`tr.even\*(C'\fR elements using \s-1CSS:\s0&lt;br /&gt;
Template::Toolkit.3pm:kind of text documents: \s-1HTML\s0, \s-1XML\s0, \s-1CSS\s0, Javascript, Perl code, plain text,&lt;br /&gt;
Template::Tutorial::Web.3pm:kind of content they contain.  So you can use \s-1TT\s0 to generate \s-1HTML\s0, \s-1XML\s0, \s-1CSS\s0,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;CSS commit for Feb 23&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Changes to most of the css files to set all sizes to em (some were in px and broke flow). Changed the font-family to a more friendly chain for all platforms, and remove all other font-faimily calls from the code. Changed font sizes from % to ems and adjusted size for some of the main elements. Fix a issue with the middle column size caused by firehose.css. Many small fixes to spacing over many places.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moved all of the slashcode theme items into the slashcode.cssraw file. Some were in comments.cssraw due to some previous work I did.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On article body and comment body, made the font size a bit smaller. Also on comments body set the margins to be smaller.&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;-EP&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=Historic:CssWork&amp;diff=5366</id>
		<title>Historic:CssWork</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=Historic:CssWork&amp;diff=5366"/>
		<updated>2014-03-01T18:19:50Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h2&amp;gt;Related pages  &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Official docs&lt;br /&gt;
** [[InstallDoc]] - original INSTALL document&lt;br /&gt;
** [[SlashGuide]] - this is the guide (from htdocs) you are supposed to read immediately after installing slashcode&lt;br /&gt;
** [[SectionTopics]] - This is the 'new' sections and topics rewrite and is more important to read than it first appears, explains what a skin is. Sort of.&lt;br /&gt;
** [[SlashChart]] Png chart of slashcode organization&lt;br /&gt;
** [[SlashManPages]] Man pages available by typing man PAGENAME&lt;br /&gt;
** [[TemplateManPages]] Man pages for the template library used to deliver the html&lt;br /&gt;
&lt;br /&gt;
* [[SlashHelperProgramsInBin]] - provided admin helpers in slash/bin&lt;br /&gt;
* [[SlashGlossary]] Glossary of terms used in Slash code&lt;br /&gt;
* [[FileLocations]] Locations of important files on disk. Has Main Libraries called by all routines&lt;br /&gt;
* [[FileLocations2]] Locations of files on disk continued. This is the stuff in local/slash.&lt;br /&gt;
* [[FileLocations3]] Locations of files on disk continued. This is the stuff in /usr/local/share/perl5/Slash/&lt;br /&gt;
* [[FileLocationsMisc]] Has Apache, Man pages,... &lt;br /&gt;
* [[SqlSchema]] - tables used in the database&lt;br /&gt;
* [[SqlDefaults]] - defaults for those tables&lt;br /&gt;
* [[PerlModuleDisplay]] - this is what actually sends a single template out to the broswer (through Apache)&lt;br /&gt;
* [[PerlModuleUsers]] - &lt;br /&gt;
&lt;br /&gt;
* [[AvailableThemes]] and how they are organized &lt;br /&gt;
* [[ThemesAnatomy]] Overview - &amp;quot;A theme is a website design.&amp;quot; (includes HOWTO-THemes doc)&lt;br /&gt;
** [[TemplateAnatomy]] - All html in these. &amp;quot;parsed by Perl Template Toolkit&amp;quot; (HOWTO-Templates)&lt;br /&gt;
***  [[TemplateTutorialWeb]] - man page&lt;br /&gt;
*** [[TemplateManualDirective]] - man page, has all the keywords used by template library&lt;br /&gt;
*** [[ThePartsOfTemplateLibraryActuallyUsedInSlashCode]] - knowing this can save time reading docs&lt;br /&gt;
*** [[TemplateLists]] - lists of the template in our Theme, some descriptions fm src&lt;br /&gt;
**[[TasksAnatomy]] -&lt;br /&gt;
&lt;br /&gt;
* [[TagboxesAnatomy]] - I don't realy know what these are yet. But there are a lot of them ;-)&lt;br /&gt;
* [[PluginsAnatomy]] - (HOWTO-plugins)&lt;br /&gt;
&lt;br /&gt;
* [[ChangelogForCss]] - Put final finished change here &lt;br /&gt;
* [[HowSlashCssWorks]] Overview&lt;br /&gt;
* [[CssFilesUsedEachPage]] Which css files are used on different pages&lt;br /&gt;
&lt;br /&gt;
* [[http://dev.soylentnews.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=soylentnews/soylentnews.git;a=tree;f=themes;hb=refs/heads/master]] git - themes&lt;br /&gt;
&lt;br /&gt;
http://www.mediawiki.org/wiki/Help:Images&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Unanswered Questions&amp;lt;/h2&amp;gt;&lt;br /&gt;
* The templates are individually output by routine slashDisplay(), but how is the order of delivery determined, and how does one insure a new template goes to the right place on the page?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Got tired of scrolling through pages of perl code just to see what subs were in a module&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So wrote this, now in /usr/local/sbin/listsubs.sh:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[root@slashcode Slash]# listsubs.sh Admin.pm&lt;br /&gt;
Admin.pm:&lt;br /&gt;
    addSpriteForSid, ajax_authorbox, ajax_learnword, ajax_neverdisplay, &lt;br /&gt;
    ajax_perfbox, ajax_signoff, ajax_signoffbox, ajax_slashdbox, &lt;br /&gt;
    ajax_storyadminbox, ajax_sub_memory, DESTROY, extractRelatedStoriesFromForm, &lt;br /&gt;
    findTheTime, getAccesslogAbusersByID, getAccesslogMaxID, get_ispell_comments, &lt;br /&gt;
    getRecentSubs, getRecentWebheads, getRelated, getSignoffData, &lt;br /&gt;
    getStorySignoffs, getStoryThumbLargeLink, grantStoryPostingAchievements, otherLinks, &lt;br /&gt;
    relatedLinks, showAdminTodo, showAuthorActivityBox, showPerformanceBox, &lt;br /&gt;
    showSignoffBox, showSlashdBox, showStoryAdminBox, write_to_temp_file, &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also will work from a list, as in&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ls *.pm &amp;gt; list.tst&lt;br /&gt;
listsubs.sh &amp;lt; list.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Maybe someone else will find it useful as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Order css files are loaded when simple switch on user prefs page is selected viewing main page main page&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* base.css?T_2_5_0_272 The numbers are the slash verion number (from one of the docs).&lt;br /&gt;
* slashcode.css?T_2_5__0_272&lt;br /&gt;
* slashcode_lite.css?T_2_5__0_272&lt;br /&gt;
* slashcode_lite.css?T_2_5__0_272 (appears to be loading this twice,why?)&lt;br /&gt;
* print.cssT_2_5__0_272&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow a page link from the main page to an individual article page &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Link: http://soylentnews.org/article.pl?sid=14/02/18/0336229&lt;br /&gt;
* article.pl is foind in slash/themes/slashcode/htdocs/article.pl So 'slashcode' is treated as a theme.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;article.pl&amp;lt;/h2&amp;gt;&lt;br /&gt;
The stuff of interest to us&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
use Slash;  -------- located in /local/lib64/perl5/slash.pm&lt;br /&gt;
use Slash::Display;     &lt;br /&gt;
use Slash::Utility;&lt;br /&gt;
&lt;br /&gt;
sub main {&lt;br /&gt;
        my $slashdb   = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user      = getCurrentUser();&lt;br /&gt;
        my $form      = getCurrentForm();&lt;br /&gt;
        my $gSkin     = getCurrentSkin();&lt;br /&gt;
         &lt;br /&gt;
        my $story;&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
                # Make sure the reader is viewing this story in the&lt;br /&gt;
                # proper skin.&lt;br /&gt;
                my $cur_skid = determineCurrentSkin();&lt;br /&gt;
                if ($story-&amp;gt;{primaryskid} != $cur_skid) {&lt;br /&gt;
                        my $cur_skin = $reader-&amp;gt;getSkin($cur_skid);&lt;br /&gt;
                        my $story_skin = $reader-&amp;gt;getSkin($story-&amp;gt;{primaryskid});&lt;br /&gt;
                        if ($story_skin &amp;amp;&amp;amp; $story_skin-&amp;gt;{rootdir}&lt;br /&gt;
                                &amp;amp;&amp;amp; $story_skin-&amp;gt;{rootdir} ne $cur_skin-&amp;gt;{rootdir})$&lt;br /&gt;
                                redirect(&amp;quot;$story_skin-&amp;gt;{rootdir}$ENV{REQUEST_URI}&amp;quot;$&lt;br /&gt;
                                return;&lt;br /&gt;
&lt;br /&gt;
               # XXXSECTIONTOPICS this needs to be updated&lt;br /&gt;
                my $SECT = $reader-&amp;gt;getSection($story-&amp;gt;{section});&lt;br /&gt;
                # This should be a getData call for title&lt;br /&gt;
                my $title = &amp;quot;$constants-&amp;gt;{sitename} | $story-&amp;gt;{title}&amp;quot;;&lt;br /&gt;
                if ($gSkin-&amp;gt;{name} &amp;amp;&amp;amp; $gSkin-&amp;gt;{name} eq &amp;quot;idle&amp;quot;) {&lt;br /&gt;
                        $title = &amp;quot;$gSkin-&amp;gt;{hostname} | $story-&amp;gt;{title}&amp;quot;;&lt;br /&gt;
                &lt;br /&gt;
if (my $pollbooth_db = getObject('Slash::PollBooth')) {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
slashDisplay('display', {&lt;br /&gt;
                        poll                    =&amp;gt; $pollbooth,&lt;br /&gt;
                        section                 =&amp;gt; $SECT,&lt;br /&gt;
                        section_block           =&amp;gt; $reader-&amp;gt;getBlock($SECT-&amp;gt;{secti$&lt;br /&gt;
                        show_poll               =&amp;gt; $pollbooth ? 1 : 0,&lt;br /&gt;
                        story                   =&amp;gt; $story,&lt;br /&gt;
                        stories                 =&amp;gt; \%stories,&lt;br /&gt;
                });&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
               my $called_pc = 0;&lt;br /&gt;
                if ($story-&amp;gt;{discussion}) {&lt;br /&gt;
                        # Still not happy with this logic -Brian&lt;br /&gt;
                        my $discussion = $reader-&amp;gt;getDiscussion($story-&amp;gt;{discussio$&lt;br /&gt;
&lt;br /&gt;
                        }&lt;br /&gt;
                        # If no comments ever have existed and commentstatus is di$&lt;br /&gt;
                        # just skip the display of the comment header bar -Brian&lt;br /&gt;
&lt;br /&gt;
                               &amp;amp;&amp;amp;  $discussion-&amp;gt;{commentstatus} eq 'disabled'&lt;br /&gt;
                        )) {&lt;br /&gt;
                                printComments($discussion);&lt;br /&gt;
                                $called_pc = 1;&lt;br /&gt;
                        }&lt;br /&gt;
                 if (!$called_pc &amp;amp;&amp;amp; $form-&amp;gt;{ssi} &amp;amp;&amp;amp; $form-&amp;gt;{ssi} eq 'yes' &amp;amp;&amp;amp; $form-$&lt;br /&gt;
                        # This is a real hack, we're kind of skipping down&lt;br /&gt;
                        # two levels of code.  But the cchp printing is an&lt;br /&gt;
                        # important optimization;  we avoid having to do&lt;br /&gt;
                        # multiple expensive comment selects.  One problem&lt;br /&gt;
                        # is that if there's no discussion with a story,&lt;br /&gt;
                        # printComments() doesn't get called, which means&lt;br /&gt;
                        # selectComments() doesn't get called, which means&lt;br /&gt;
                        # the cchp file won't be written.  If article.pl&lt;br /&gt;
                       # is being called by slashd, and we need to write&lt;br /&gt;
                        # that file, then here's where we print an empty&lt;br /&gt;
                        # file that will satisfy slashd. - Jamie&lt;br /&gt;
&lt;br /&gt;
                        Slash::Utility::Comments::_print_cchp({ stoid =&amp;gt; &amp;quot;dummy&amp;quot; }$&lt;br /&gt;
                }&lt;br /&gt;
        } else {&lt;br /&gt;
                header('Error', $form-&amp;gt;{section}) or return;&lt;br /&gt;
       &lt;br /&gt;
       my $plugins = $slashdb-&amp;gt;getDescriptions('plugins');&lt;br /&gt;
        if (!$user-&amp;gt;{is_anon} &amp;amp;&amp;amp; $plugins-&amp;gt;{Tags} &amp;amp;&amp;amp; $story) {&lt;br /&gt;
                my $tagsdb = getObject('Slash::Tags');&lt;br /&gt;
                $tagsdb-&amp;gt;markViewed($user-&amp;gt;{uid},&lt;br /&gt;
                        $reader-&amp;gt;getGlobjidCreate('stories', $story-&amp;gt;{stoid}));&lt;br /&gt;
        }&lt;br /&gt;
                        &lt;br /&gt;
        footer();&lt;br /&gt;
        if ($story) {&lt;br /&gt;
                writeLog($story-&amp;gt;{sid} || $sid);&lt;br /&gt;
        } else { &lt;br /&gt;
                writeLog($sid);&lt;br /&gt;
&lt;br /&gt;
               &lt;br /&gt;
createEnvironment();&lt;br /&gt;
main();  &lt;br /&gt;
1; &lt;br /&gt;
&lt;br /&gt;
(EOF)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Slash/DB/MySQL/MySQL.pm&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
479 sub getCSS {&lt;br /&gt;
480         my($self, $layout) = @_;&lt;br /&gt;
481         my $user = getCurrentUser();&lt;br /&gt;
482         my $page = $user-&amp;gt;{currentPage};&lt;br /&gt;
483         my $skin = getCurrentSkin('name');&lt;br /&gt;
484         my $admin = $user-&amp;gt;{is_admin};&lt;br /&gt;
485         my $theme = ($user-&amp;gt;{simpledesign} || $user-&amp;gt;{pda}) ? &amp;quot;light&amp;quot; : $user-&amp;gt;{css_theme};&lt;br /&gt;
486         my $secure = apacheConnectionSSL();&lt;br /&gt;
487         $layout ||= '';&lt;br /&gt;
488         my $constants = getCurrentStatic();&lt;br /&gt;
489&lt;br /&gt;
490         my $expire_time = $constants-&amp;gt;{css_expire} || 3600;&lt;br /&gt;
491         $expire_time += int(rand(60)) if $expire_time;&lt;br /&gt;
492         _genericCacheRefresh($self, 'css', $expire_time);&lt;br /&gt;
493         _genericCacheRefresh($self, 'css_pages', $expire_time);&lt;br /&gt;
494         _genericCacheRefresh($self, 'css_skins', $expire_time);&lt;br /&gt;
495         _genericCacheRefresh($self, 'css_themes', $expire_time);&lt;br /&gt;
496&lt;br /&gt;
497         my $css_ref             = $self-&amp;gt;{_css_cache} ||= {};&lt;br /&gt;
498         my $css_pages_ref       = $self-&amp;gt;{_css_pages_cache};&lt;br /&gt;
499         my $css_skins_ref       = $self-&amp;gt;{_css_skins_cache};&lt;br /&gt;
500         my $css_themes_ref      = $self-&amp;gt;{_css_themes_cache};&lt;br /&gt;
501         my $css_layouts_ref     = $self-&amp;gt;{_css_layouts_cache};&lt;br /&gt;
502&lt;br /&gt;
503         $css_pages_ref = $self-&amp;gt;getCSSValuesHashForCol('page') if !$css_pages_ref;&lt;br /&gt;
504         $css_skins_ref = $self-&amp;gt;getCSSValuesHashForCol('skin') if !$css_skins_ref;&lt;br /&gt;
505         $css_themes_ref = $self-&amp;gt;getCSSValuesHashForCol('theme') if !$css_themes_ref;&lt;br /&gt;
506         $css_layouts_ref = $self-&amp;gt;getCSSValuesHashForCol('layout') if !$css_layouts_ref;&lt;br /&gt;
507&lt;br /&gt;
508         my $lowbandwidth = ($user-&amp;gt;{lowbandwidth} || $user-&amp;gt;{pda}) ? &amp;quot;yes&amp;quot; : &amp;quot;no&amp;quot;;&lt;br /&gt;
509&lt;br /&gt;
510         $page   = '' if !$css_pages_ref-&amp;gt;{$page};&lt;br /&gt;
511         $skin   = '' if !$css_skins_ref-&amp;gt;{$skin};&lt;br /&gt;
512         $theme  = '' if !$css_themes_ref-&amp;gt;{$theme};&lt;br /&gt;
513         $layout = '' if !$css_layouts_ref-&amp;gt;{$layout};&lt;br /&gt;
514&lt;br /&gt;
515         return $css_ref-&amp;gt;{$skin}{$page}{$admin}{$theme}{$lowbandwidth}{$layout}{$secure}&lt;br /&gt;
516                 if exists $css_ref-&amp;gt;{$skin}{$page}{$admin}{$theme}{$lowbandwidth}{$layout}{$secure};&lt;br /&gt;
517&lt;br /&gt;
518         my @clauses;&lt;br /&gt;
519&lt;br /&gt;
520         my $page_q = $self-&amp;gt;sqlQuote($page);&lt;br /&gt;
521         my $page_in = $page ? &amp;quot;(page = '' or page = $page_q)&amp;quot; : &amp;quot;page = ''&amp;quot;;&lt;br /&gt;
522         push @clauses, $page_in;&lt;br /&gt;
523&lt;br /&gt;
524         my $skin_in = $skin ? &amp;quot;(skin = '' or skin = '$skin')&amp;quot; : &amp;quot;skin = ''&amp;quot;;&lt;br /&gt;
525         push @clauses, $skin_in;&lt;br /&gt;
526&lt;br /&gt;
527         push @clauses, &amp;quot;admin='no'&amp;quot; if !$admin;&lt;br /&gt;
528&lt;br /&gt;
529         my $theme_q  = $self-&amp;gt;sqlQuote($theme);&lt;br /&gt;
530         my $theme_in = $theme ? &amp;quot;(theme='' or theme=$theme_q)&amp;quot; : &amp;quot;theme=''&amp;quot;;&lt;br /&gt;
531         push @clauses, $theme_in;&lt;br /&gt;
532&lt;br /&gt;
533         push @clauses, &amp;quot;lowbandwidth='$lowbandwidth'&amp;quot; if $lowbandwidth eq &amp;quot;no&amp;quot;;&lt;br /&gt;
534&lt;br /&gt;
535         my $layout_q = $self-&amp;gt;sqlQuote($layout);&lt;br /&gt;
536         push @clauses, &amp;quot;layout=$layout_q&amp;quot;;&lt;br /&gt;
537&lt;br /&gt;
538         my $where = &amp;quot;css.ctid=css_type.ctid AND &amp;quot;;&lt;br /&gt;
539         $where .= join ' AND ', @clauses;&lt;br /&gt;
540&lt;br /&gt;
541         my $css = $self-&amp;gt;sqlSelectAllHashrefArray(&amp;quot;rel,type,media,file,title,ie_cond,skin&amp;quot;,&lt;br /&gt;
542                 &amp;quot;css, css_type&amp;quot;, $where, &amp;quot;ORDER BY css_type.ordernum, css.ordernum&amp;quot;);&lt;br /&gt;
543         if ($secure) {&lt;br /&gt;
544                 for my $hr (@$css) { $hr-&amp;gt;{file} =~ s/\.css/.ssl.css/ }&lt;br /&gt;
545         }&lt;br /&gt;
546         &lt;br /&gt;
547         $css_ref-&amp;gt;{$skin}{$page}{$admin}{$theme}{$lowbandwidth}{$layout}{$secure} = $css;&lt;br /&gt;
548         return $css;&lt;br /&gt;
549 }&lt;br /&gt;
550 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Slash/Apache/User/User.pm&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
548 {&lt;br /&gt;
549 my %ops_my = (&lt;br /&gt;
550         inbox           =&amp;gt; { args =&amp;gt; 'op=list', uri =&amp;gt; 'messages.pl' },&lt;br /&gt;
551         # XXX change messages to be same as /inbox, move this to /my/preferences/messages&lt;br /&gt;
552         messages        =&amp;gt; { args =&amp;gt; 'op=display_prefs', uri =&amp;gt; 'messages.pl' },&lt;br /&gt;
553         comments        =&amp;gt; { args =&amp;gt; 'op=editcomm' },&lt;br /&gt;
554         homepage        =&amp;gt; { args =&amp;gt; 'op=edithome' },&lt;br /&gt;
555         password        =&amp;gt; { args =&amp;gt; 'op=changeprefs', uri =&amp;gt; 'login.pl' },&lt;br /&gt;
556         logout          =&amp;gt; { args =&amp;gt; 'op=userclose', uri =&amp;gt; 'login.pl' },&lt;br /&gt;
557         misc            =&amp;gt; { args =&amp;gt; 'op=editmiscopts' },&lt;br /&gt;
558         amigos          =&amp;gt; { args =&amp;gt; 'op=friendview', uri =&amp;gt; 'journal.pl' },&lt;br /&gt;
559         bookmarks       =&amp;gt; { args =&amp;gt; 'op=showbookmarks' },&lt;br /&gt;
560         firehose        =&amp;gt; { args =&amp;gt; 'op=userfirehose' },&lt;br /&gt;
561         preferences     =&amp;gt; { args =&amp;gt; 'op=displayprefs', uri =&amp;gt; 'preferences.pl' },&lt;br /&gt;
562         tags            =&amp;gt; { args =&amp;gt; 'op=showtags' },&lt;br /&gt;
563         journal         =&amp;gt; { args =&amp;gt; 'op=list', uri =&amp;gt; 'journal.pl' },&lt;br /&gt;
564&lt;br /&gt;
565         friends         =&amp;gt; { args =&amp;gt; 'op=friends', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
566         fans            =&amp;gt; { args =&amp;gt; 'op=fans', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
567         freaks          =&amp;gt; { args =&amp;gt; 'op=freaks', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
568         foes            =&amp;gt; { args =&amp;gt; 'op=foes', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
569         zoo             =&amp;gt; { args =&amp;gt; 'op=all', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
570&lt;br /&gt;
571         default         =&amp;gt; { args =&amp;gt; 'op=edituser' }&lt;br /&gt;
572 );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;sql/mysql/defaults.sql&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 134 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','base.css','','','','no','',1,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
135 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','comments','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
136 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','article','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
137 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','print','print.css','','','','no','',5,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
138 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','admin.css','','','','yes','',1,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
139 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','pollBooth','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
140 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode_lite.css','','','','no','light',4,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
141 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','journal','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
142 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode_lite.css','','','','no','light',4,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
143 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','journal','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
144 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode.css','','','','no','',3,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
145 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','metamod','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
146 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode_low_bw.css','','','','no','',4,99, &amp;quot;&amp;quot;,&amp;quot;yes&amp;quot;);&lt;br /&gt;
147&lt;br /&gt;
148 #&lt;br /&gt;
149 # Dumping data for table 'css_type'&lt;br /&gt;
150 #&lt;br /&gt;
151 INSERT INTO css_type (ctid, name, ordernum) VALUES (1,'base',1);&lt;br /&gt;
152 INSERT INTO css_type (ctid, name, ordernum) VALUES (2,'page',2);&lt;br /&gt;
153 INSERT INTO css_type (ctid, name, ordernum) VALUES (3,'theme',3);&lt;br /&gt;
154 INSERT INTO css_type (ctid, name, ordernum) VALUES (4,'user_theme',5);&lt;br /&gt;
155 INSERT INTO css_type (ctid, name, ordernum) VALUES (5,'print',6);&lt;br /&gt;
156 INSERT INTO css_type (ctid, name, ordernum) VALUES (6,'skin',4);&lt;br /&gt;
157 INSERT INTO css_type (ctid, name, ordernum) VALUES (7,'handheld',7);&lt;br /&gt;
158 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;plugins/FireHose/mysql_dump.sql &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','firehose','no','',2,0, '');&lt;br /&gt;
==&amp;gt; INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','users','no','',2,0, '');&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','calendar.css','','','firehose','no','',2,0, '');&lt;br /&gt;
==&amp;gt; INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','users','no','',2,0, '');&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','firehose','no','',2,0, '');&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','index2','no','',2,0, ''); &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;I believe that we are not using FireHose but it was needed to make the site work.  As can be seen in the db dump above, it adds the firehose.css file to any of the user pages. Need to verify and then see if we can get the db purged of these values.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Good work. The question in my mind is why the heck css for one module has any effect *at all* on any other module. Talk about lack of localization...-AG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;I think there was some firehose slashboxes that showed up in the users pages.  They needed to be wider than the default, so they patched those pages with the firehose.css. Next step is to get a current dump of the two css tables. The important part is I know what files are for what parts of the code.  Slashcode.css is the theme css file slashcode-lite.css is the style file that is called by a user pref.  This means I need to fix comments.css to remove the theme elements I inserted and put them in the theme file.  I still need to make sure that the changes that benefited the Simplified theme stay intact. -EP&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;fonts&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
This is what I usually start with:&lt;br /&gt;
   font-family: Helvetica,Geneva,Arial,Verdana,sans-serif;&lt;br /&gt;
&lt;br /&gt;
Too many can lead to a LOT of testing being required. As can the wrong order. ;-)&lt;br /&gt;
&lt;br /&gt;
Others I have used in the past:&lt;br /&gt;
font-family: Geneva,Arial,Verdana,Helvetica,Chicago,sans-serif;&lt;br /&gt;
font-family: Helvetica,Arial,Geneva,Chicago,Verdana,sans-serif;&lt;br /&gt;
font-family: Helvetica,Geneva,Arial,Verdana,sans-serif;&lt;br /&gt;
-AG&lt;br /&gt;
&lt;br /&gt;
I have used:&lt;br /&gt;
font-family: Verdana, Geneva, &amp;quot;Bitstream Vera Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif;&lt;br /&gt;
&lt;br /&gt;
Note this has Linux fonts as well to help with these users.&lt;br /&gt;
-EP&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;User Menu&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','Logout','logout','/my/logout',1,0,10);&lt;br /&gt;
124 INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','Preferences','preferences','/users.pl?op=edituser',1,0,20);&lt;br /&gt;
125 INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','Password','password','[% constants.real_rootdir %]/my/password',1,0,40);&lt;br /&gt;
126 INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','~[% user.nickname | strip_literal %] ([% user.uid %])','me','/~[% user.nickname | fixparam %]',1,0,50);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; This code sets up the upper menu on http://slashcott.org/users.pl which is linked from your userid on the home page.  The Preferences is wrong, as it needs to be all three links: Info, Homepage, Comments.  This will allow users with low-bandwidth option set to easily get to the setting to unset low-bandwidth. -EP&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Refernces to css in the man pages in /usr/local/share/man/man3&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
grep -i css *&lt;br /&gt;
&lt;br /&gt;
HTML::CalendarMonth.3pm:.IP &amp;quot;enable_css&amp;quot; 4&lt;br /&gt;
HTML::CalendarMonth.3pm:.IX Item &amp;quot;enable_css&amp;quot;&lt;br /&gt;
HTML::CalendarMonth.3pm:Set some handy \s-1CSS\s0 class attributes on elements, enabled by default.&lt;br /&gt;
HTML::CalendarMonth.3pm:.IP &amp;quot;semantic_css&amp;quot; 4&lt;br /&gt;
HTML::CalendarMonth.3pm:.IX Item &amp;quot;semantic_css&amp;quot;&lt;br /&gt;
HTML::CalendarMonth.3pm:Sets some additional \s-1CSS\s0 class attributes on elements, disabled by&lt;br /&gt;
HTML::CalendarMonth.3pm:.IP &amp;quot;\fIdefault_css()\fR&amp;quot; 4&lt;br /&gt;
HTML::CalendarMonth.3pm:.IX Item &amp;quot;default_css()&amp;quot;&lt;br /&gt;
HTML::CalendarMonth.3pm:document in conjunction with the classes assigned to elements when css&lt;br /&gt;
HTML::ElementSuper.3pm:might be when you'd like to assign multiple \s-1CSS\s0 classes to a single&lt;br /&gt;
HTML::PopupTreeSelect.3pm:.IP &amp;quot;include_css (optional)&amp;quot; 4&lt;br /&gt;
HTML::PopupTreeSelect.3pm:.IX Item &amp;quot;include_css (optional)&amp;quot;&lt;br /&gt;
HTML::PopupTreeSelect.3pm:Set this to 0 and the default \s-1CSS\s0 will not be included in the widget&lt;br /&gt;
HTML::PopupTreeSelect.3pm:output.  This allows you to include your own \s-1CSS\s0 which will be used by&lt;br /&gt;
HTML::PopupTreeSelect.3pm:your widget.  Modifying the \s-1CSS\s0 will allow you to control the fonts,&lt;br /&gt;
HTML::PopupTreeSelect.3pm:If you run the widget with include_css set to 1 then you can use that&lt;br /&gt;
HTML::Tree::Scanning.3pm:tagging, such is as useful in \s-1CSS\s0 \*(-- note the&lt;br /&gt;
Module::Build::API.3pm:.IP &amp;quot;\fIhtml_css()\fR&amp;quot; 4&lt;br /&gt;
Module::Build::API.3pm:.IX Item &amp;quot;html_css()&amp;quot;&lt;br /&gt;
TAP::Parser::YAMLish::Reader.3pm:YAML::Tiny, \s-1YAML\s0, YAML::Syck, Config::Tiny, CSS::Tiny,&lt;br /&gt;
TAP::Parser::YAMLish::Writer.3pm:YAML::Tiny, \s-1YAML\s0, YAML::Syck, Config::Tiny, CSS::Tiny,&lt;br /&gt;
Template::Iterator.3pm:You can then style the \f(CW\*(C`tr.odd\*(C'\fR and \f(CW\*(C`tr.even\*(C'\fR elements using \s-1CSS:\s0&lt;br /&gt;
Template::Toolkit.3pm:kind of text documents: \s-1HTML\s0, \s-1XML\s0, \s-1CSS\s0, Javascript, Perl code, plain text,&lt;br /&gt;
Template::Tutorial::Web.3pm:kind of content they contain.  So you can use \s-1TT\s0 to generate \s-1HTML\s0, \s-1XML\s0, \s-1CSS\s0,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;CSS commit for Feb 23&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Changes to most of the css files to set all sizes to em (some were in px and broke flow). Changed the font-family to a more friendly chain for all platforms, and remove all other font-faimily calls from the code. Changed font sizes from % to ems and adjusted size for some of the main elements. Fix a issue with the middle column size caused by firehose.css. Many small fixes to spacing over many places.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moved all of the slashcode theme items into the slashcode.cssraw file. Some were in comments.cssraw due to some previous work I did.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On article body and comment body, made the font size a bit smaller. Also on comments body set the margins to be smaller.&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;-EP&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=SlashGlossary&amp;diff=5323</id>
		<title>SlashGlossary</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=SlashGlossary&amp;diff=5323"/>
		<updated>2014-02-28T23:10:57Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[CssWork]] parent of this page&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Glossary of terms used in slash code&amp;lt;/h2&amp;gt;&lt;br /&gt;
These an be confusing if you are new to slash code. Try to keep these to one displayed line, this is not for full descriptions.&lt;br /&gt;
&lt;br /&gt;
* '''D1''' - The orgiginal Slash interface&lt;br /&gt;
* '''D2''' - The new fancy interface that we have disabled on Soylent.&lt;br /&gt;
* '''Authors''' - Authors approve submissions, have the authority to change the look of the site, and can moderate.&lt;br /&gt;
* '''Comments''' - Users may write comments about a story.&lt;br /&gt;
* '''firehose''' - The Firehose is a collection of content from anywhere on the site that users can vote on and tag.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''nexus''' - a special kind of topic (which we call a topic_nexus when we want to emphasize that it is both). And the non-display aspects of sections -- mainly, the &amp;quot;section_extras&amp;quot; data which ensured that stories in Book Reviews stored a field for ISBN -- were sent over to nexuses.&lt;br /&gt;
* '''plugins''' - &lt;br /&gt;
&lt;br /&gt;
* '''Sections &amp;amp; Topics''' - Seem similar. Sections are similar to the way a newspaper is laid out, i.e.: business section, sports section, local section, etc. Topics can appear anywhere, share similar concepts. The home page has stuff from all sections. (AG note - this now not entirely correct)&lt;br /&gt;
* '''Stories''' - Stories reside in the middle section of the page and have the intro-text of the stories along with the authors and what departments they are from.&lt;br /&gt;
* '''Submissions''' - Stories are submitted by users, and then approved by authors.&lt;br /&gt;
* '''skin''' - from 'sectiontopics' :&lt;br /&gt;
** So &amp;quot;section&amp;quot; has been split into two: &amp;quot;skin&amp;quot; and &amp;quot;nexus&amp;quot;. *Most* of the information that went with a section was used to describe appearances, and that went over to skin. '''So a skin now controls color (through the skin_colors table), it controls which templates are used (the final part of a template's three-part name is now skin, not section), and it controls with which other stories a story is grouped (on which index page)'''. And the non-display aspects of sections -- mainly, the &amp;quot;section_extras&amp;quot; data which ensured that stories in Book Reviews stored a field for ISBN -- were sent over to nexuses.&lt;br /&gt;
** Each skin has precisely one nexus; you can think of a skin as drawing its stories from its nexus. The clever part is that a nexus is just a special kind of topic (which we call a topic_nexus when we want to emphasize that it is both). So if a story has both the Developers topic_nexus, and the Book Reviews topic_nexus, then it will appear on both books.slashdot.org and developers.slashdot.org. And the additional data stored with the story will include the union of all the &amp;quot;extras&amp;quot; data -- not only ISBN and so on, but also any &amp;quot;extras&amp;quot; data that may be in the Developers nexus. There don't actually happen to be any extras for Developers on Slashdot, so maybe this isn't the best example, but if there were, a story that was categorized into both nexuses would include that data too.&lt;br /&gt;
&lt;br /&gt;
* '''tagboxes''' &lt;br /&gt;
* '''tasks''' - periodic tasks run by slashd like cron jobs. &lt;br /&gt;
* '''template''' - html that is parsed by the Perl Template Toolkit. part of a theme&lt;br /&gt;
* '''theme''' - &amp;quot;A theme is a website design.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* '''Users''' - Users are registered to use the site, all other visitors are logged as Anonymous.&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=SlashGlossary&amp;diff=5319</id>
		<title>SlashGlossary</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=SlashGlossary&amp;diff=5319"/>
		<updated>2014-02-28T23:05:18Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[CssWork]] parent of this page&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Glossary of terms used in slash code&amp;lt;/h2&amp;gt;&lt;br /&gt;
These an be confusing if you are new to slash code. Try to keep these to one displayed line, this is not for full descriptions.&lt;br /&gt;
&lt;br /&gt;
* '''theme''' - &amp;quot;A theme is a website design.&amp;quot;&lt;br /&gt;
* '''template''' - html that is parsed by the Perl Template Toolkit. part of a theme&lt;br /&gt;
* '''D1''' - The orgiginal Slash interface&lt;br /&gt;
* '''D2''' - The new fancy interface that we have disabled on Soylent.&lt;br /&gt;
* '''tasks''' - periodic tasks run by slashd like cron jobs. &lt;br /&gt;
* '''tagboxes''' &lt;br /&gt;
* '''plugins''' - &lt;br /&gt;
* '''firehose''' - The Firehose is a collection of content from anywhere on the site that users can vote on and tag.&lt;br /&gt;
&lt;br /&gt;
* '''skin''' - from 'sectiontopics' :&lt;br /&gt;
** So &amp;quot;section&amp;quot; has been split into two: &amp;quot;skin&amp;quot; and &amp;quot;nexus&amp;quot;. *Most* of the information that went with a section was used to describe appearances, and that went over to skin. '''So a skin now controls color (through the skin_colors table), it controls which templates are used (the final part of a template's three-part name is now skin, not section), and it controls with which other stories a story is grouped (on which index page)'''. And the non-display aspects of sections -- mainly, the &amp;quot;section_extras&amp;quot; data which ensured that stories in Book Reviews stored a field for ISBN -- were sent over to nexuses.&lt;br /&gt;
** Each skin has precisely one nexus; you can think of a skin as drawing its stories from its nexus. The clever part is that a nexus is just a special kind of topic (which we call a topic_nexus when we want to emphasize that it is both). So if a story has both the Developers topic_nexus, and the Book Reviews topic_nexus, then it will appear on both books.slashdot.org and developers.slashdot.org. And the additional data stored with the story will include the union of all the &amp;quot;extras&amp;quot; data -- not only ISBN and so on, but also any &amp;quot;extras&amp;quot; data that may be in the Developers nexus. There don't actually happen to be any extras for Developers on Slashdot, so maybe this isn't the best example, but if there were, a story that was categorized into both nexuses would include that data too.&lt;br /&gt;
* '''nexus''' - a special kind of topic (which we call a topic_nexus when we want to emphasize that it is both). And the non-display aspects of sections -- mainly, the &amp;quot;section_extras&amp;quot; data which ensured that stories in Book Reviews stored a field for ISBN -- were sent over to nexuses.&lt;br /&gt;
&lt;br /&gt;
* '''Stories''' - Stories reside in the middle section of the page and have the intro-text of the stories along with the authors and what departments they are from.&lt;br /&gt;
* '''Comments''' - Users may write comments about a story.&lt;br /&gt;
* '''Submissions''' - Stories are submitted by users, and then approved by authors.&lt;br /&gt;
* '''Users''' - Users are registered to use the site, all other visitors are logged as Anonymous.&lt;br /&gt;
* '''Authors''' - Authors approve submissions, have the authority to change the look of the site, and can moderate.&lt;br /&gt;
* '''Sections &amp;amp; Topics''' - Seem similar. Sections are similar to the way a newspaper is laid out, i.e.: business section, sports section, local section, etc. Topics can appear anywhere, share similar concepts. The home page has stuff from all sections. (AG note - this now not entirely correct)&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=SlashGuide&amp;diff=5314</id>
		<title>SlashGuide</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=SlashGuide&amp;diff=5314"/>
		<updated>2014-02-28T22:40:37Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[CssWork]]&lt;br /&gt;
&amp;lt;h2&amp;gt;Slash guide from /usr/local/slash/themes/slashcode/htdocs&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;div class=&amp;quot;pod&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;hr&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;slashguide - The guide to using Slash version 2.0.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;h2&amp;gt;So I have Slash installed, what do I do now?&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The site is running, you can get a front page to display, and slashd is generating static .shtml files. What do I do now? How do I administer the site? How do I change the way it looks? How do I post stories or user submissions? This guide is to answer these and other questions, questions that I've seen asked on the mailing list time and time again. There's been a great need to explain the admin interface for quite some time now. This should hopeful&lt;br /&gt;
ly satisfy this need.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Logging into the admin interface&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;p&amp;gt;The first thing you need to do (and you should do this to get the most out of this document) it log&lt;br /&gt;
 in as an author. (&amp;lt;em&amp;gt;note&amp;lt;/em&amp;gt;: make sure that the author you log in as has a seclev of at least 10000. The default &lt;br /&gt;
author that you set up when you use install-slashsite has this security level.) You can find the login form on the fro&lt;br /&gt;
nt page or at &amp;lt;a href=&amp;quot;http://yoursite/users.pl&amp;quot;&amp;gt;http://yoursite/users.pl&amp;lt;/a&amp;gt; .&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;After you have logged in as an author, you will now see a navigation bar, or navigation list on the&lt;br /&gt;
 top of the page. This is the admin menu. In this list there are the URLs to the various functions of the admin interface. This admin navigation bar will only show links to the admin tasks that the user you're logged in has access to (the seclev value for this author).&amp;lt;/p&amp;gt;&lt;br /&gt;
                &lt;br /&gt;
&amp;lt;h2&amp;gt;Logging out&amp;lt;/h2&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;To log out, go to preferences and click the Log out link.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;h2&amp;gt;Overview of Slash concepts&amp;lt;/h2&amp;gt;&lt;br /&gt;
                &amp;lt;dl&amp;gt;&lt;br /&gt;
                        &amp;lt;dt&amp;gt;&amp;lt;strong&amp;gt;Stories:&amp;lt;/strong&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/dt&amp;gt;&lt;br /&gt;
                        &amp;lt;dd&amp;gt;Stories reside in the middle section of the page and have the intro-text of the stories along with the authors and what departments they are from.&amp;lt;/dd&amp;gt;&lt;br /&gt;
                        &amp;lt;dt&amp;gt;&amp;lt;strong&amp;gt;Comments:&amp;lt;/strong&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/dt&amp;gt;&lt;br /&gt;
                        &amp;lt;dd&amp;gt;Users may write comments about a story.&amp;lt;/dd&amp;gt;&lt;br /&gt;
                        &amp;lt;dt&amp;gt;&amp;lt;strong&amp;gt;Submissions:&amp;lt;/strong&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/dt&amp;gt;&lt;br /&gt;
                        &amp;lt;dd&amp;gt;Stories are submitted by users, and then approved by authors.&amp;lt;/dd&amp;gt;&lt;br /&gt;
                        &amp;lt;dt&amp;gt;&amp;lt;strong&amp;gt;Users:&amp;lt;/strong&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/dt&amp;gt;&lt;br /&gt;
                        &amp;lt;dd&amp;gt;Users are registered to use the site, all other visitors are logged as Anonymous.&amp;lt;/dd&amp;gt;&lt;br /&gt;
                        &amp;lt;dt&amp;gt;&amp;lt;strong&amp;gt;Authors:&amp;lt;/strong&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/dt&amp;gt;&lt;br /&gt;
                        &amp;lt;dd&amp;gt;Authors approve submissions, have the authority to change the look of the site, and can moderate.&amp;lt;/dd&amp;gt;&lt;br /&gt;
                        &amp;lt;dt&amp;gt;&amp;lt;strong&amp;gt;Sections &amp;amp;amp; Topics:&amp;lt;/strong&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/dt&amp;gt;&lt;br /&gt;
                        &amp;lt;dd&amp;gt;&lt;br /&gt;
                                Seem similar.&lt;br /&gt;
                                &amp;lt;p&amp;gt;Sections are similar to the way a newspaper is laid out, i.e.: business section, sports section, local section, etc.&amp;lt;/p&amp;gt;&lt;br /&gt;
                                &amp;lt;p&amp;gt;Topics can appear anywhere, share similar concepts.&amp;lt;/p&amp;gt;&lt;br /&gt;
                                &amp;lt;p&amp;gt;The home page has stuff from all sections.&amp;lt;/p&amp;gt;&lt;br /&gt;
                        &amp;lt;/dd&amp;gt;&lt;br /&gt;
                        &amp;lt;dt&amp;gt;&amp;lt;strong&amp;gt;Blocks:&amp;lt;/strong&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/dt&amp;gt;&lt;br /&gt;
                        &amp;lt;dd&amp;gt;Located on the right hand side, blocks can be customized by users.&amp;lt;/dd&amp;gt;&lt;br /&gt;
                        &amp;lt;dt&amp;gt;&amp;lt;strong&amp;gt;Templates:&amp;lt;/strong&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/dt&amp;gt;&lt;br /&gt;
                        &amp;lt;dd&amp;gt;These store the html for boxes, fancy boxes, headers, footers, etc. The template is where &lt;br /&gt;
the look of the site can be changed. Inside the templates is where you will spend the majority of your time for site design changes.&amp;lt;/dd&amp;gt;&lt;br /&gt;
                        &lt;br /&gt;
&amp;lt;dt&amp;gt;&amp;lt;strong&amp;gt;Variables:&amp;lt;/strong&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/dt&amp;gt;&lt;br /&gt;
                        &lt;br /&gt;
&amp;lt;dd&amp;gt;Govern how links are created, etc.; don't normally need to change them.&amp;lt;/dd&amp;gt;&lt;br /&gt;
                &amp;lt;/dl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;h2&amp;gt;The story list&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;p&amp;gt;Click on the link Stories on the admin menu. On this page you'll see the stories that are running on the site, grouped by the day that they are running on.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;The first column is a number. This is a link to edit the story. Go ahead and click on any one of the numbers for any story that's running. This will take you to a &lt;br /&gt;
&amp;lt;a href=&amp;quot;#story%20editing%20page&amp;quot;&amp;gt;Story editing page&amp;lt;/a&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;p&amp;gt;The second column just links you to the story as the story will be seen (to article.pl).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;p&amp;gt;The third column is the author of the story, the fourth column is the topic, the fifth column the section. The sixth column has two numbers - the first is the total hits for the story, the second number is how many comments there are. The final column is the timestamp of the story.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;h2&amp;gt;Story editing page&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;p&amp;gt;The top of the page is the title and body of the story, as it would be displayed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;p&amp;gt;Going down, next you'll see a block that has three buttons, three pulldowns, and two text fields. The buttons do what they are labeled as, the first pulldown is the topic the story is categorised into, the next pulldown is what section the story is running in, the third pulldown is the author the story is running as. The next text field is the stories title, and the text field below that is the department that it runs as. (Each word that you type in&lt;br /&gt;
 this text field is displayed with dashes between each word. If you enter ``this is a test'', it will be displayed as 'from the this-is-a-test dept.'.) Next, you'll see two more pulldown and a text field containing a date. The first pulldown gives you three display options. You can select to not display the story at all, restrict it to one section, or every section (default). The next pulldown selects whether a story can have comments or not. You can use this to restrict the story to being read-only.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;p&amp;gt;The fixquotes checkbox is for fixing curly quotes if you've pasted text that includes them. The autonode checkbox is for automatically creating glossary-style links to &lt;br /&gt;
&amp;lt;a href=&amp;quot;http://everything2.com&amp;quot;&amp;gt;http://everything2.com&amp;lt;/a&amp;gt; &lt;br /&gt;
&lt;br /&gt;
but it doesn't seem to work anymore. The fastforward checkbox moves a story to the first position on the page (by changing its date).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;p&amp;gt;The timestamp text field contains the time and date that the story will run on. You &lt;br /&gt;
can set it to a&lt;br /&gt;
 future date if you want a story to be delayed. Below this you'll see a text area for the story copy. &lt;br /&gt;
&lt;br /&gt;
This is the full&lt;br /&gt;
 text of the story. You can put html tags in your text if you wish. Below this box, are the same three buttons that you see above. These have the same form action as the ones above, and are only there for convenience. Below this is the &lt;br /&gt;
extended copy text area. This is if you're doing a longer article such as a book review, or a commentary. Below that is an ``import image''. This is something that is being worked on. In other words, it doesn't really work yet! &lt;br /&gt;
You can see how this page works by changing any on of these values for the story. If you select preview it will only display what the change would look like, if you hit ``update'', it will update the story in the database (and on the site),&lt;br /&gt;
 and display what the change looks like.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &lt;br /&gt;
&amp;lt;h2&amp;gt;Submitting a new story&amp;lt;/h2&amp;gt;&lt;br /&gt;
                &lt;br /&gt;
&amp;lt;p&amp;gt;As admin:&amp;lt;/p&amp;gt;&lt;br /&gt;
                &lt;br /&gt;
&amp;lt;p&amp;gt;To post a new story, you need to click on the ``New'' admin menu link. This takes you to a &lt;br /&gt;
Story editing page. Fill out this form with all the values for the story you want to run. To view it before saving, click on the ``preview'' button. Once you feel that the story is ready to be published, you can click on ``save''. This will save the story to the database. You may post-date the story to run at another time &lt;br /&gt;
in the time stamp field, if you want. This is often handy when you want some time to decide if you really want to run a particular story.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &lt;br /&gt;
&amp;lt;p&amp;gt;As a regular user:&amp;lt;/p&amp;gt;&lt;br /&gt;
                &lt;br /&gt;
&amp;lt;p&amp;gt;Same as above, but use the ``Submit Story'' link from the main menu. The story must be approved by &lt;br /&gt;
an author before it appears.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &lt;br /&gt;
&amp;lt;h2&amp;gt;Commenting on a story&amp;lt;/h2&amp;gt;&lt;br /&gt;
                &lt;br /&gt;
&amp;lt;p&amp;gt;Below the story, there is a bar with a ``Reply'' button which can be used to post a comment on a story. Each comment has a ``Reply to This'' link which can be used to comment on that comment.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &lt;br /&gt;
&amp;lt;p&amp;gt;There is a selection box that will allow you to format your message in any of four ways:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;table cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Plain Old Text&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;HTML tags are interpreted, &amp;amp;lt;br&amp;amp;gt; tags are inserted for you&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;HTML Formatted&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;HTML tags are interpreted, you must add your own &amp;amp;lt;br&amp;amp;gt; tags&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Extrans&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;HTML tags are quoted&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Code&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;HTML tags are quoted, text is formatted as code&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &lt;br /&gt;
&amp;lt;h2&amp;gt;Approving user submissions&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &lt;br /&gt;
&amp;lt;p&amp;gt;To approve user submissions so they show up as stories, click on the 'XX Submissions' link (XX being a number). This will take you to a page listing user submissions.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &lt;br /&gt;
&amp;lt;p&amp;gt;Above the submissions list are links that will reload this page according to sections. For instance&lt;br /&gt;
, if you click on the link for ``articles'' this page will only display submissions that are in the 'articles' section. The links on the left are categories set by the second column.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &lt;br /&gt;
&amp;lt;p&amp;gt;Next is the submissions list.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first column is a notes block. This is for the author to write a note pertaining to a &lt;br /&gt;
particular submission, so the author, or other authors, can have something to refer to in the case where they may not want to publish a particular until a later time.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                        &lt;br /&gt;
&amp;lt;li&amp;gt;The second column is also for classifying submissions. Unless you have hundreds of submissions like slashdot does, you probably won't need those fields.&amp;lt;/li&amp;gt;&lt;br /&gt;
                   &lt;br /&gt;
     &lt;br /&gt;
&amp;lt;li&amp;gt;The third column is which section the submission is in.&amp;lt;/li&amp;gt;&lt;br /&gt;
                        &lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;strong&amp;gt;The fourth column contains a box that if checked will delete the submission.&amp;lt;/strong&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
                        &lt;br /&gt;
&amp;lt;li&amp;gt;The fifth column is the timestamp of the submission.&amp;lt;/li&amp;gt;&lt;br /&gt;
                        &lt;br /&gt;
&amp;lt;li&amp;gt;The sixth column is the title of the submission, which is a link to edit the submission. If this is clicked, it takes you to a submission editing page that works just like the &lt;br /&gt;
Story editing page,&lt;br /&gt;
and in fact if the author &amp;lt;em&amp;gt;previews&amp;lt;/em&amp;gt; the submission, the submission then is pulled up&lt;br /&gt;
 in the story editing page where the author can edit the submission further, and decide if the story should be published or not.&amp;lt;/li&amp;gt;&lt;br /&gt;
                        &lt;br /&gt;
&amp;lt;li&amp;gt;The seventh column is the name of the person who made the submission.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                &lt;br /&gt;
&amp;lt;h2&amp;gt;Topics&amp;lt;/h2&amp;gt;&lt;br /&gt;
                &lt;br /&gt;
&amp;lt;p&amp;gt;To edit, add, or delete a topic, click on ``Topics'' from the admin menu. This will take you to a page showing all of the site's topics icons, with a topic name listed below each icon, which is a URL to edit that topic. If this URL is clicked, you will be taken to a page that allows you to edit the topic, select a new topic to edit, &lt;br /&gt;
create a new topic, or delete the topic.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &lt;br /&gt;
&amp;lt;p&amp;gt;The first item on the page is a pulldown with all topics. You can change the topic you want to edit&lt;br /&gt;
 by selecting whatever topic you want from the pulldown and clicking ``Select topic''. If you want to create a new topic, you click on Create new topic. Below that, the icon for the topic is displayed (as it would be seen). &lt;br /&gt;
Next is the ``Tid'' text field. This is the topic ID. Next are the width and height that the image is displayed as, and the text that's displayed in the ``alt'' tag. Next is a pulldown of all the images that are available in the images/topics directory. If you want to have a new image to select from, you'll need to upload and/or copy it to that directory. Finally, there are the ``Save Topic'' and ``Delete Topic'' buttons. They do what they say they do.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;h2&amp;gt;Blocks&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;p&amp;gt;Most important to how the site looks are the blocks, which are edited, added, and deleted via the block editing form. This form essentially manipulates the blocks and sectionblocks tables. To get to the block editing &lt;br /&gt;
page, click on ``Blocks'' from the admin menu.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;On this page, you start out with two pulldowns, each having two buttons: one for editing the block,&lt;br /&gt;
 and one for deleting the block. The first pulldown selects all non-portald blocks, meaning blocks that aren't populated by portald. They are static blocks, their content (what's contained in the column ``block'' in the blocks table) doesn't change unless you change it, whereas the portald blocks are updated by portald. Below these two pulldowns is a `&lt;br /&gt;
`Create a new block'' button, which you can use to create a new block. Upon selecting a block and clicking Edit Block (or creating a new block), the block is pulled up in the block editing form. This form has these elements:&amp;lt;/p&amp;gt;&lt;br /&gt;
                &lt;br /&gt;
&amp;lt;table cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Block ID&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;The block ID&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Title&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;A title for the block&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Seclev&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;The minimum security level an author must have in order to edit this block&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Type&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;The type of block that it is. This is a new concept for blocks and is still being developed, but the current type of blocks are color, static, and portald. If you end up setting a blocks type as 'portald', it will then be seen in the portald pulldown, otherwise, it will appear in the static blocks pulldown.&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &lt;br /&gt;
&amp;lt;td&amp;gt;Section&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;If a block is set with a specific section, the block will only appear in that section if its 'portal' value is one (meaning it's a user selectable slashbox).&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Ordernum&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;This is the order number of the blocks that appear on the right side of the page. &lt;br /&gt;
These are the default blocks for all users. If the ordernumber is -1, it's a user selectable slashbox, if the ordernum is 0, it doesn't appear at all. If the number is 1 or greater, this is the order that it appears on the right side of&lt;br /&gt;
 the page for Anonymous Cowards and users that have not specified their own preferences for slashboxes.&amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Portal&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;If this is checked, then this block shows up on the slashboxes selection in users.pl.&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Retrieve&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;If this is a portald type block, and this is checked, portald will retrieve the content for this block from the URL listed in the next box, RDF/URL.&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;RDF/URL&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;The URL from which portald gets the content for this particular block.&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Description&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;A text description of the block.&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Block&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;The actual block itself. You can only change non-portald blocks (well you can change portald blocks, but portald will overwrite your changes).&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Revert to default&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Use this if you make a mistake while editing the block, or want to revert to what it was originally.&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Save as default&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Use this if you are confident that you want this to be the saved default, in case &lt;br /&gt;
you later edit the block and want something to revert back to.&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Save Block&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Saves the block&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Create a new block&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Opens a new form to create a new block.&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Preview&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;This previews slashboxes. Don't try it with blocks that are code blocks, or partial blocks, it won't work correctly.&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
                &amp;lt;h2&amp;gt;Templates&amp;lt;/h2&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;Templates contain the actual HTML that is used to generate all of the dynamic pages in Slash. Click&lt;br /&gt;
 on the ``Templates'' link from the admin menu. There are three drop-down menus: Section, Page, and Templates. The ``sections'' on this page have nothing to do with the ``sections'' that contain the Slash topics.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;There are three sections:&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;table cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;admin&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Contains the templates for admin pages&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;light&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Contains the templates to be used when users are in ``light'' mode. These pages ar&lt;br /&gt;
e designed for people with slow connections and should not contain too many large graphics.&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;default&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Contains everything else&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;In addition, you can choose All for the section in order to access all of the sections at once.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;When you click the ``Select section'' button, the page will refresh and the Templates menu will contain a list of all the templates in that section.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;The Page menu can be used to select the templates from a particular page. Pages generated by a CGI script will generally use templates from the page that has the same name as the script (eg. users.pl uses templates from the users page). The Select page button will cause the page to refresh, and the Templates menu will contain all of the templates from that page.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;You can select either a section or a page, but not both.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;The ``Templates'' menu will contain a list of the selected templates. Each template has both a name&lt;br /&gt;
 and a number. Two templates from different sections or pages may have the same name, but the number will always be unique. Templates with higher numbers were created after the ones with smaller numbers. Once a template is chosen, it can be either edited or deleted. The ``Create new template'' button on the bottom of the page allows you to create new templates.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;The template editing page will allow you to change the text and the properties of a template. The Seclev field sets the minimum security level that is required in order to edit the template. At the bottom of the page, there is a textbox field containing the text of the template. Anything enclosed within [% ... %] will be interpreted by the template-toolkit. To learn about this syntax, go to &lt;br /&gt;
&lt;br /&gt;
&amp;lt;a href=&amp;quot;http://www.template-toolkit.com.&amp;quot;&amp;gt;http://www.template-toolkit.com.&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;You can view the source of any Slash page in order to see which templates are being used. The source will contain the names of the templates enclosed in html comments. For example, at the beginning of the template editor page:&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;&amp;amp;lt;!-- start template: ID 7, header;misc;admin --&amp;amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;....HTML stuff....&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;&amp;amp;lt;!-- end template: ID 7, header;misc;admin --&amp;amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;The above shows that the ``header (7)'' template is being used, from the ``misc'' page in the ``admin'' section.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''AG note:The above is now incorrect. The last name in the template name is now the skin name. See sectiontopics'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Site Colors&amp;lt;/h2&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;This is where you can change the colors of the site. Click on the ``Site Colors'' link from the admin menu. This will take you to a form that has a pulldown to select which colorblock you want to edit (you can have a &lt;br /&gt;
colorblock for each section, which you would create in the block editor, and it must be named section_colors). Click on the Edit Colors button to edit the color block you select (the default is the main color block colors). &lt;br /&gt;
You will then see a list of eight colors, with four columns:&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;table cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;The color name&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;The name of the color, and the variable it gets assigned to&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;The color value&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;The actual value of the color, hex or canonical. Make sure this is a valid color, &lt;br /&gt;
or it might not display properly.&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;The color name&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;displayed in the font color selected&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;The color&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;A table cell with the selected color&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;Next are the buttons. If you click on Preview, you'll see the color you are selecting, as well &lt;br /&gt;
as providing a link at the top of the page that's a URL to index.pl which will display using the color you want to pre&lt;br /&gt;
view. Clicking on Save Colors will save the colors you've selected, Revert to saved will reload the form with &lt;br /&gt;
the last saved values of colors, Revert to default will reload the page with the default colors, and Save as default saves the colors as the default. Again, as with the blocks, you want to make sure this is what you want saved as the default for your site.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;h2&amp;gt;Sections&amp;lt;/h2&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;Click on Sections from the admin menu. This will take you to a page with a URL list of the site&lt;br /&gt;
's sections. If you click on a particular section, it will then take you to a form for editing the section. This form &lt;br /&gt;
contains:&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;table cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Section name&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;contains the section id&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Article Count&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;the value for how many articles to display on section index&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Title&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;the canonical name for the section&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Polls for this section&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;selects which poll to display for the section&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Isolate mode&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;determines whether the section is part of the site or standalone&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Issue mode&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;whether the section is issue oriented, article based, both, or neither&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Edit section&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;URLs to the block editor for blocks that are specific to the section&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;save section&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;save changes that you've made to the section&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;add section&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;opens up a new form to create a new section&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;delete section&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;delete the section&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
                &amp;lt;h2&amp;gt;Comment filters&amp;lt;/h2&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;Comment filters are regular expressions that are run against content, the comment subject or comment body. If a particular filter is encountered, a message is displayed informing the user, both on submit and preview of the comment. This gives you the ability to prevent certain things from being posted on your site which is totally dependent on what you want to filter, or not filter. Click on ``Comment Filters'' from the admin menu. This will take you to listing of all the comment filters. This list shows various columns for each filter:&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;table cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Filter id&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;the ID for the filter. This is a URL that brings up the filter in a filter editing page.&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Regex&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;this is the core regex of the filter&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Modifier&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;the modifier that would go on the end of the regex, ie. if the modifier is 'gi' &lt;br /&gt;
the regex would be evaluated as /xxx/gi&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Field&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;The form field that the filter is run against. Currently, only postersubj (the comment subject) and postercomment (the comment body) are supported.&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Ratio&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;The percentage that the match will check for. For example, if ``Regex'' is ``(flame)'', ``Ratio'' is 0.1000, the text being checked is 100 characters in size, the regex is put together as /(flame){50,}/. If you have the field ``Minimum match'' set greater than zero, this won't be used. This won't be used if set to zero.&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Minimum match&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &lt;br /&gt;
&amp;lt;td&amp;gt;This is a hard coded minimum match for the regex. If ``Regex'' is(flame)'' and &lt;br /&gt;
Minimum match is 4, the regex constructed will be /(flame){4,}/. Ratio will not be used if this is set greater than zero. This won't be used if set to zero.&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Minimum length&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;The minimum length the field must be for the filter to apply&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Maximum length&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;The maximum length the field must be for the filter to apply&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Error Message&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;The message that's displayed after the ``Lameness filter encountered''.&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;You can also create a new filter with the ``Create a new filter'' button.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;h2&amp;gt;Variables&amp;lt;/h2&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;This is for editing site variables. Select one from the menu and click the 'vars' button to see its&lt;br /&gt;
 current value and a description. You'll need to restart apache and slashd for changes to the vars to show up.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;The main ones you'll want to edit for now are slogan and sitename.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;Turn cache_enabled off to get faster responses while you're working with templates.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;The send_mail var turns the headline mailer on/off. You may need to set smtp_server too. And the stats_reports one will get you a daily stats report.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;hr&amp;gt;&lt;br /&gt;
                &amp;lt;h1&amp;gt;CHANGES&amp;lt;/h1&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;Log&lt;br /&gt;
                &amp;lt;p&amp;gt;Revision 1.5  2005/08/22 22:41:27  pudge&lt;br /&gt;
                &amp;lt;p&amp;gt;Update to proper includes and valid HTML&lt;br /&gt;
                &amp;lt;p&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;Revision 1.4 2005/07/27 22:54:16 pudge&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;Big merge of css branch&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;Revision 1.3.2.2 2005/07/19 17:28:55 tvroom&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;.inc / shtml templates&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;Revision 1.3.2.1 2005/07/14 16:57:33 tvroom&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;Added needed divs&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;Revision 1.3 2002/04/22 14:01:50 pudge&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;Various login fixes: s/(log)(in|out)/$1 $2/gi for @verbs; add proper links to creating accounts etc. on login forms; fix ~$nickname URIs for when $nickname contains some encoded characters (like &amp;quot;/&amp;quot;).&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;Revision 1.2 2001/11/03 03:05:02 brian&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;Fry&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;Revision 1.1.2.1 2001/10/09 17:54:04 pudge&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;Add in slashguide (rewrite of getting_started) and update docs&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;hr&amp;gt;&lt;br /&gt;
                &amp;lt;h1&amp;gt;AUTHOR&amp;lt;/h1&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;Originally, CmdrTaco probably. Revised for Slash 2.0.0 by Nathan Vonnahme and Dan Stahlke&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=SlashGuide&amp;diff=5313</id>
		<title>SlashGuide</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=SlashGuide&amp;diff=5313"/>
		<updated>2014-02-28T22:39:23Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[CssWork]]&lt;br /&gt;
&amp;lt;h2&amp;gt;Slash guide from /usr/local/slash/themes/slashcode/htdocs&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;div class=&amp;quot;pod&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;hr&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;slashguide - The guide to using Slash version 2.0.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;h2&amp;gt;So I have Slash installed, what do I do now?&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The site is running, you can get a front page to display, and slashd is generating static .shtml files. What do I do now? How do I administer the site? How do I change the way it looks? How do I post stories or user submissions? This guide is to answer these and other questions, questions that I've seen asked on the mailing list time and time again. There's been a great need to explain the admin interface for quite some time now. This should hopeful&lt;br /&gt;
ly satisfy this need.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Logging into the admin interface&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;p&amp;gt;The first thing you need to do (and you should do this to get the most out of this document) it log&lt;br /&gt;
 in as an author. (&amp;lt;em&amp;gt;note&amp;lt;/em&amp;gt;: make sure that the author you log in as has a seclev of at least 10000. The default &lt;br /&gt;
author that you set up when you use install-slashsite has this security level.) You can find the login form on the fro&lt;br /&gt;
nt page or at &amp;lt;a href=&amp;quot;http://yoursite/users.pl&amp;quot;&amp;gt;http://yoursite/users.pl&amp;lt;/a&amp;gt; .&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;After you have logged in as an author, you will now see a navigation bar, or navigation list on the&lt;br /&gt;
 top of the page. This is the admin menu. In this list there are the URLs to the various functions of the admin interface. This admin navigation bar will only show links to the admin tasks that the user you're logged in has access to (the seclev value for this author).&amp;lt;/p&amp;gt;&lt;br /&gt;
                &lt;br /&gt;
&amp;lt;h2&amp;gt;Logging out&amp;lt;/h2&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;To log out, go to preferences and click the Log out link.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;h2&amp;gt;Overview of Slash concepts&amp;lt;/h2&amp;gt;&lt;br /&gt;
                &amp;lt;dl&amp;gt;&lt;br /&gt;
                        &amp;lt;dt&amp;gt;&amp;lt;strong&amp;gt;Stories:&amp;lt;/strong&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/dt&amp;gt;&lt;br /&gt;
                        &amp;lt;dd&amp;gt;Stories reside in the middle section of the page and have the intro-text of the stories along with the authors and what departments they are from.&amp;lt;/dd&amp;gt;&lt;br /&gt;
                        &amp;lt;dt&amp;gt;&amp;lt;strong&amp;gt;Comments:&amp;lt;/strong&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/dt&amp;gt;&lt;br /&gt;
                        &amp;lt;dd&amp;gt;Users may write comments about a story.&amp;lt;/dd&amp;gt;&lt;br /&gt;
                        &amp;lt;dt&amp;gt;&amp;lt;strong&amp;gt;Submissions:&amp;lt;/strong&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/dt&amp;gt;&lt;br /&gt;
                        &amp;lt;dd&amp;gt;Stories are submitted by users, and then approved by authors.&amp;lt;/dd&amp;gt;&lt;br /&gt;
                        &amp;lt;dt&amp;gt;&amp;lt;strong&amp;gt;Users:&amp;lt;/strong&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/dt&amp;gt;&lt;br /&gt;
                        &amp;lt;dd&amp;gt;Users are registered to use the site, all other visitors are logged as Anonymous.&amp;lt;/dd&amp;gt;&lt;br /&gt;
                        &amp;lt;dt&amp;gt;&amp;lt;strong&amp;gt;Authors:&amp;lt;/strong&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/dt&amp;gt;&lt;br /&gt;
                        &amp;lt;dd&amp;gt;Authors approve submissions, have the authority to change the look of the site, and can moderate.&amp;lt;/dd&amp;gt;&lt;br /&gt;
                        &amp;lt;dt&amp;gt;&amp;lt;strong&amp;gt;Sections &amp;amp;amp; Topics:&amp;lt;/strong&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/dt&amp;gt;&lt;br /&gt;
                        &amp;lt;dd&amp;gt;&lt;br /&gt;
                                Seem similar.&lt;br /&gt;
                                &amp;lt;p&amp;gt;Sections are similar to the way a newspaper is laid out, i.e.: business section, sports section, local section, etc.&amp;lt;/p&amp;gt;&lt;br /&gt;
                                &amp;lt;p&amp;gt;Topics can appear anywhere, share similar concepts.&amp;lt;/p&amp;gt;&lt;br /&gt;
                                &amp;lt;p&amp;gt;The home page has stuff from all sections.&amp;lt;/p&amp;gt;&lt;br /&gt;
                        &amp;lt;/dd&amp;gt;&lt;br /&gt;
                        &amp;lt;dt&amp;gt;&amp;lt;strong&amp;gt;Blocks:&amp;lt;/strong&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/dt&amp;gt;&lt;br /&gt;
                        &amp;lt;dd&amp;gt;Located on the right hand side, blocks can be customized by users.&amp;lt;/dd&amp;gt;&lt;br /&gt;
                        &amp;lt;dt&amp;gt;&amp;lt;strong&amp;gt;Templates:&amp;lt;/strong&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/dt&amp;gt;&lt;br /&gt;
                        &amp;lt;dd&amp;gt;These store the html for boxes, fancy boxes, headers, footers, etc. The template is where &lt;br /&gt;
the look of the site can be changed. Inside the templates is where you will spend the majority of your time for site design changes.&amp;lt;/dd&amp;gt;&lt;br /&gt;
                        &lt;br /&gt;
&amp;lt;dt&amp;gt;&amp;lt;strong&amp;gt;Variables:&amp;lt;/strong&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/dt&amp;gt;&lt;br /&gt;
                        &lt;br /&gt;
&amp;lt;dd&amp;gt;Govern how links are created, etc.; don't normally need to change them.&amp;lt;/dd&amp;gt;&lt;br /&gt;
                &amp;lt;/dl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;h2&amp;gt;The story list&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;p&amp;gt;Click on the link Stories on the admin menu. On this page you'll see the stories that are running on the site, grouped by the day that they are running on.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;The first column is a number. This is a link to edit the story. Go ahead and click on any one of the numbers for any story that's running. This will take you to a &lt;br /&gt;
&amp;lt;a href=&amp;quot;#story%20editing%20page&amp;quot;&amp;gt;Story editing page&amp;lt;/a&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;p&amp;gt;The second column just links you to the story as the story will be seen (to article.pl).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;p&amp;gt;The third column is the author of the story, the fourth column is the topic, the fifth column the section. The sixth column has two numbers - the first is the total hits for the story, the second number is how many comments there are. The final column is the timestamp of the story.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;h2&amp;gt;Story editing page&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;p&amp;gt;The top of the page is the title and body of the story, as it would be displayed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;p&amp;gt;Going down, next you'll see a block that has three buttons, three pulldowns, and two text fields. The buttons do what they are labeled as, the first pulldown is the topic the story is categorised into, the next pulldown is what section the story is running in, the third pulldown is the author the story is running as. The next text field is the stories title, and the text field below that is the department that it runs as. (Each word that you type in&lt;br /&gt;
 this text field is displayed with dashes between each word. If you enter ``this is a test'', it will be displayed as 'from the this-is-a-test dept.'.) Next, you'll see two more pulldown and a text field containing a date. The first pulldown gives you three display options. You can select to not display the story at all, restrict it to one section, or every section (default). The next pulldown selects whether a story can have comments or not. You can use this to restrict the story to being read-only.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;p&amp;gt;The fixquotes checkbox is for fixing curly quotes if you've pasted text that includes them. The autonode checkbox is for automatically creating glossary-style links to &lt;br /&gt;
&amp;lt;a href=&amp;quot;http://everything2.com&amp;quot;&amp;gt;http://everything2.com&amp;lt;/a&amp;gt; &lt;br /&gt;
&lt;br /&gt;
but it doesn't seem to work anymore. The fastforward checkbox moves a story to the first position on the page (by changing its date).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;p&amp;gt;The timestamp text field contains the time and date that the story will run on. You &lt;br /&gt;
can set it to a&lt;br /&gt;
 future date if you want a story to be delayed. Below this you'll see a text area for the story copy. &lt;br /&gt;
&lt;br /&gt;
This is the full&lt;br /&gt;
 text of the story. You can put html tags in your text if you wish. Below this box, are the same three buttons that you see above. These have the same form action as the ones above, and are only there for convenience. Below this is the &lt;br /&gt;
extended copy text area. This is if you're doing a longer article such as a book review, or a commentary. Below that is an ``import image''. This is something that is being worked on. In other words, it doesn't really work yet! &lt;br /&gt;
You can see how this page works by changing any on of these values for the story. If you select preview it will only display what the change would look like, if you hit ``update'', it will update the story in the database (and on the site),&lt;br /&gt;
 and display what the change looks like.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &lt;br /&gt;
&amp;lt;h2&amp;gt;Submitting a new story&amp;lt;/h2&amp;gt;&lt;br /&gt;
                &lt;br /&gt;
&amp;lt;p&amp;gt;As admin:&amp;lt;/p&amp;gt;&lt;br /&gt;
                &lt;br /&gt;
&amp;lt;p&amp;gt;To post a new story, you need to click on the ``New'' admin menu link. This takes you to a &lt;br /&gt;
Story editing page. Fill out this form with all the values for the story you want to run. To view it before saving, click on the ``preview'' button. Once you feel that the story is ready to be published, you can click on ``save''. This will save the story to the database. You may post-date the story to run at another time &lt;br /&gt;
in the time stamp field, if you want. This is often handy when you want some time to decide if you really want to run a particular story.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &lt;br /&gt;
&amp;lt;p&amp;gt;As a regular user:&amp;lt;/p&amp;gt;&lt;br /&gt;
                &lt;br /&gt;
&amp;lt;p&amp;gt;Same as above, but use the ``Submit Story'' link from the main menu. The story must be approved by &lt;br /&gt;
an author before it appears.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &lt;br /&gt;
&amp;lt;h2&amp;gt;Commenting on a story&amp;lt;/h2&amp;gt;&lt;br /&gt;
                &lt;br /&gt;
&amp;lt;p&amp;gt;Below the story, there is a bar with a ``Reply'' button which can be used to post a comment on a story. Each comment has a ``Reply to This'' link which can be used to comment on that comment.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &lt;br /&gt;
&amp;lt;p&amp;gt;There is a selection box that will allow you to format your message in any of four ways:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;table cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Plain Old Text&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;HTML tags are interpreted, &amp;amp;lt;br&amp;amp;gt; tags are inserted for you&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;HTML Formatted&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;HTML tags are interpreted, you must add your own &amp;amp;lt;br&amp;amp;gt; tags&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Extrans&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;HTML tags are quoted&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Code&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;HTML tags are quoted, text is formatted as code&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &lt;br /&gt;
&amp;lt;h2&amp;gt;Approving user submissions&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &lt;br /&gt;
&amp;lt;p&amp;gt;To approve user submissions so they show up as stories, click on the 'XX Submissions' link (XX being a number). This will take you to a page listing user submissions.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &lt;br /&gt;
&amp;lt;p&amp;gt;Above the submissions list are links that will reload this page according to sections. For instance&lt;br /&gt;
, if you click on the link for ``articles'' this page will only display submissions that are in the 'articles' section. The links on the left are categories set by the second column.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &lt;br /&gt;
&amp;lt;p&amp;gt;Next is the submissions list.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first column is a notes block. This is for the author to write a note pertaining to a &lt;br /&gt;
particular submission, so the author, or other authors, can have something to refer to in the case where they may not want to publish a particular until a later time.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                        &lt;br /&gt;
&amp;lt;li&amp;gt;The second column is also for classifying submissions. Unless you have hundreds of submissions like slashdot does, you probably won't need those fields.&amp;lt;/li&amp;gt;&lt;br /&gt;
                   &lt;br /&gt;
     &lt;br /&gt;
&amp;lt;li&amp;gt;The third column is which section the submission is in.&amp;lt;/li&amp;gt;&lt;br /&gt;
                        &lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;strong&amp;gt;The fourth column contains a box that if checked will delete the submission.&amp;lt;/strong&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
                        &lt;br /&gt;
&amp;lt;li&amp;gt;The fifth column is the timestamp of the submission.&amp;lt;/li&amp;gt;&lt;br /&gt;
                        &lt;br /&gt;
&amp;lt;li&amp;gt;The sixth column is the title of the submission, which is a link to edit the submission. If this is clicked, it takes you to a submission editing page that works just like the &lt;br /&gt;
Story editing page,&lt;br /&gt;
and in fact if the author &amp;lt;em&amp;gt;previews&amp;lt;/em&amp;gt; the submission, the submission then is pulled up&lt;br /&gt;
 in the story editing page where the author can edit the submission further, and decide if the story should be published or not.&amp;lt;/li&amp;gt;&lt;br /&gt;
                        &lt;br /&gt;
&amp;lt;li&amp;gt;The seventh column is the name of the person who made the submission.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                &lt;br /&gt;
&amp;lt;h2&amp;gt;Topics&amp;lt;/h2&amp;gt;&lt;br /&gt;
                &lt;br /&gt;
&amp;lt;p&amp;gt;To edit, add, or delete a topic, click on ``Topics'' from the admin menu. This will take you to a page showing all of the site's topics icons, with a topic name listed below each icon, which is a URL to edit that topic. If this URL is clicked, you will be taken to a page that allows you to edit the topic, select a new topic to edit, &lt;br /&gt;
create a new topic, or delete the topic.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &lt;br /&gt;
&amp;lt;p&amp;gt;The first item on the page is a pulldown with all topics. You can change the topic you want to edit&lt;br /&gt;
 by selecting whatever topic you want from the pulldown and clicking ``Select topic''. If you want to create a new topic, you click on Create new topic. Below that, the icon for the topic is displayed (as it would be seen). &lt;br /&gt;
Next is the ``Tid'' text field. This is the topic ID. Next are the width and height that the image is displayed as, and the text that's displayed in the ``alt'' tag. Next is a pulldown of all the images that are available in the images/topics directory. If you want to have a new image to select from, you'll need to upload and/or copy it to that directory. Finally, there are the ``Save Topic'' and ``Delete Topic'' buttons. They do what they say they do.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;h2&amp;gt;Blocks&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;p&amp;gt;Most important to how the site looks are the blocks, which are edited, added, and deleted via the block editing form. This form essentially manipulates the blocks and sectionblocks tables. To get to the block editing &lt;br /&gt;
page, click on ``Blocks'' from the admin menu.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;On this page, you start out with two pulldowns, each having two buttons: one for editing the block,&lt;br /&gt;
 and one for deleting the block. The first pulldown selects all non-portald blocks, meaning blocks that aren't populated by portald. They are static blocks, their content (what's contained in the column ``block'' in the blocks table) doesn't change unless you change it, whereas the portald blocks are updated by portald. Below these two pulldowns is a `&lt;br /&gt;
`Create a new block'' button, which you can use to create a new block. Upon selecting a block and clicking Edit Block (or creating a new block), the block is pulled up in the block editing form. This form has these elements:&amp;lt;/p&amp;gt;&lt;br /&gt;
                &lt;br /&gt;
&amp;lt;table cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Block ID&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;The block ID&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Title&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;A title for the block&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Seclev&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;The minimum security level an author must have in order to edit this block&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Type&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;The type of block that it is. This is a new concept for blocks and is still being developed, but the current type of blocks are color, static, and portald. If you end up setting a blocks type as 'portald', it will then be seen in the portald pulldown, otherwise, it will appear in the static blocks pulldown.&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &lt;br /&gt;
&amp;lt;td&amp;gt;Section&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;If a block is set with a specific section, the block will only appear in that section if its 'portal' value is one (meaning it's a user selectable slashbox).&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Ordernum&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;This is the order number of the blocks that appear on the right side of the page. &lt;br /&gt;
These are the default blocks for all users. If the ordernumber is -1, it's a user selectable slashbox, if the ordernum is 0, it doesn't appear at all. If the number is 1 or greater, this is the order that it appears on the right side of&lt;br /&gt;
 the page for Anonymous Cowards and users that have not specified their own preferences for slashboxes.&amp;lt;td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Portal&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;If this is checked, then this block shows up on the slashboxes selection in users.pl.&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Retrieve&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;If this is a portald type block, and this is checked, portald will retrieve the content for this block from the URL listed in the next box, RDF/URL.&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;RDF/URL&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;The URL from which portald gets the content for this particular block.&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Description&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;A text description of the block.&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Block&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;The actual block itself. You can only change non-portald blocks (well you can change portald blocks, but portald will overwrite your changes).&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Revert to default&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Use this if you make a mistake while editing the block, or want to revert to what it was originally.&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Save as default&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Use this if you are confident that you want this to be the saved default, in case &lt;br /&gt;
you later edit the block and want something to revert back to.&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Save Block&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Saves the block&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Create a new block&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Opens a new form to create a new block.&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Preview&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;This previews slashboxes. Don't try it with blocks that are code blocks, or partial blocks, it won't work correctly.&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
                &amp;lt;h2&amp;gt;Templates&amp;lt;/h2&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;Templates contain the actual HTML that is used to generate all of the dynamic pages in Slash. Click&lt;br /&gt;
 on the ``Templates'' link from the admin menu. There are three drop-down menus: Section, Page, and Templates. The ``sections'' on this page have nothing to do with the ``sections'' that contain the Slash topics.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;There are three sections:&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;table cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;admin&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Contains the templates for admin pages&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;light&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Contains the templates to be used when users are in ``light'' mode. These pages ar&lt;br /&gt;
e designed for people with slow connections and should not contain too many large graphics.&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;default&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Contains everything else&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;In addition, you can choose All for the section in order to access all of the sections at once.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;When you click the ``Select section'' button, the page will refresh and the Templates menu will contain a list of all the templates in that section.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;The Page menu can be used to select the templates from a particular page. Pages generated by a CGI script will generally use templates from the page that has the same name as the script (eg. users.pl uses templates from the users page). The Select page button will cause the page to refresh, and the Templates menu will contain all of the templates from that page.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;You can select either a section or a page, but not both.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;The ``Templates'' menu will contain a list of the selected templates. Each template has both a name&lt;br /&gt;
 and a number. Two templates from different sections or pages may have the same name, but the number will always be unique. Templates with higher numbers were created after the ones with smaller numbers. Once a template is chosen, it can be either edited or deleted. The ``Create new template'' button on the bottom of the page allows you to create new templates.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;The template editing page will allow you to change the text and the properties of a template. The Seclev field sets the minimum security level that is required in order to edit the template. At the bottom of the page, there is a textbox field containing the text of the template. Anything enclosed within [% ... %] will be interpreted by the template-toolkit. To learn about this syntax, go to &lt;br /&gt;
&lt;br /&gt;
&amp;lt;a href=&amp;quot;http://www.template-toolkit.com.&amp;quot;&amp;gt;http://www.template-toolkit.com.&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;You can view the source of any Slash page in order to see which templates are being used. The source will contain the names of the templates enclosed in html comments. For example, at the beginning of the template editor page:&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;&amp;amp;lt;!-- start template: ID 7, header;misc;admin --&amp;amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;....HTML stuff....&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;&amp;amp;lt;!-- end template: ID 7, header;misc;admin --&amp;amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;The above shows that the ``header (7)'' template is being used, from the ``misc'' page in the ``admin'' section.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''AG note:The above is now incorrect. The last name in the template name is now the skin name. See secgtiontopics'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Site Colors&amp;lt;/h2&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;This is where you can change the colors of the site. Click on the ``Site Colors'' link from the admin menu. This will take you to a form that has a pulldown to select which colorblock you want to edit (you can have a &lt;br /&gt;
colorblock for each section, which you would create in the block editor, and it must be named section_colors). Click on the Edit Colors button to edit the color block you select (the default is the main color block colors). &lt;br /&gt;
You will then see a list of eight colors, with four columns:&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;table cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;The color name&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;The name of the color, and the variable it gets assigned to&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;The color value&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;The actual value of the color, hex or canonical. Make sure this is a valid color, &lt;br /&gt;
or it might not display properly.&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;The color name&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;displayed in the font color selected&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;The color&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;A table cell with the selected color&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;Next are the buttons. If you click on Preview, you'll see the color you are selecting, as well &lt;br /&gt;
as providing a link at the top of the page that's a URL to index.pl which will display using the color you want to pre&lt;br /&gt;
view. Clicking on Save Colors will save the colors you've selected, Revert to saved will reload the form with &lt;br /&gt;
the last saved values of colors, Revert to default will reload the page with the default colors, and Save as default saves the colors as the default. Again, as with the blocks, you want to make sure this is what you want saved as the default for your site.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;h2&amp;gt;Sections&amp;lt;/h2&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;Click on Sections from the admin menu. This will take you to a page with a URL list of the site&lt;br /&gt;
's sections. If you click on a particular section, it will then take you to a form for editing the section. This form &lt;br /&gt;
contains:&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;table cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Section name&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;contains the section id&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Article Count&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;the value for how many articles to display on section index&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Title&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;the canonical name for the section&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Polls for this section&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;selects which poll to display for the section&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Isolate mode&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;determines whether the section is part of the site or standalone&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Issue mode&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;whether the section is issue oriented, article based, both, or neither&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Edit section&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;URLs to the block editor for blocks that are specific to the section&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;save section&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;save changes that you've made to the section&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;add section&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;opens up a new form to create a new section&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;delete section&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;delete the section&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
                &amp;lt;h2&amp;gt;Comment filters&amp;lt;/h2&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;Comment filters are regular expressions that are run against content, the comment subject or comment body. If a particular filter is encountered, a message is displayed informing the user, both on submit and preview of the comment. This gives you the ability to prevent certain things from being posted on your site which is totally dependent on what you want to filter, or not filter. Click on ``Comment Filters'' from the admin menu. This will take you to listing of all the comment filters. This list shows various columns for each filter:&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;table cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Filter id&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;the ID for the filter. This is a URL that brings up the filter in a filter editing page.&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Regex&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;this is the core regex of the filter&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Modifier&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;the modifier that would go on the end of the regex, ie. if the modifier is 'gi' &lt;br /&gt;
the regex would be evaluated as /xxx/gi&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Field&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;The form field that the filter is run against. Currently, only postersubj (the comment subject) and postercomment (the comment body) are supported.&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Ratio&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;The percentage that the match will check for. For example, if ``Regex'' is ``(flame)'', ``Ratio'' is 0.1000, the text being checked is 100 characters in size, the regex is put together as /(flame){50,}/. If you have the field ``Minimum match'' set greater than zero, this won't be used. This won't be used if set to zero.&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Minimum match&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &lt;br /&gt;
&amp;lt;td&amp;gt;This is a hard coded minimum match for the regex. If ``Regex'' is(flame)'' and &lt;br /&gt;
Minimum match is 4, the regex constructed will be /(flame){4,}/. Ratio will not be used if this is set greater than zero. This won't be used if set to zero.&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Minimum length&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;The minimum length the field must be for the filter to apply&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Maximum length&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;The maximum length the field must be for the filter to apply&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;Error Message&amp;lt;/td&amp;gt;&lt;br /&gt;
                                &amp;lt;td&amp;gt;The message that's displayed after the ``Lameness filter encountered''.&amp;lt;/td&amp;gt;&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;You can also create a new filter with the ``Create a new filter'' button.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;h2&amp;gt;Variables&amp;lt;/h2&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;This is for editing site variables. Select one from the menu and click the 'vars' button to see its&lt;br /&gt;
 current value and a description. You'll need to restart apache and slashd for changes to the vars to show up.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;The main ones you'll want to edit for now are slogan and sitename.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;Turn cache_enabled off to get faster responses while you're working with templates.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;The send_mail var turns the headline mailer on/off. You may need to set smtp_server too. And the stats_reports one will get you a daily stats report.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;hr&amp;gt;&lt;br /&gt;
                &amp;lt;h1&amp;gt;CHANGES&amp;lt;/h1&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;Log&lt;br /&gt;
                &amp;lt;p&amp;gt;Revision 1.5  2005/08/22 22:41:27  pudge&lt;br /&gt;
                &amp;lt;p&amp;gt;Update to proper includes and valid HTML&lt;br /&gt;
                &amp;lt;p&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;Revision 1.4 2005/07/27 22:54:16 pudge&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;Big merge of css branch&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;Revision 1.3.2.2 2005/07/19 17:28:55 tvroom&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;.inc / shtml templates&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;Revision 1.3.2.1 2005/07/14 16:57:33 tvroom&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;Added needed divs&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;Revision 1.3 2002/04/22 14:01:50 pudge&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;Various login fixes: s/(log)(in|out)/$1 $2/gi for @verbs; add proper links to creating accounts etc. on login forms; fix ~$nickname URIs for when $nickname contains some encoded characters (like &amp;quot;/&amp;quot;).&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;Revision 1.2 2001/11/03 03:05:02 brian&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;Fry&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;Revision 1.1.2.1 2001/10/09 17:54:04 pudge&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;Add in slashguide (rewrite of getting_started) and update docs&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;hr&amp;gt;&lt;br /&gt;
                &amp;lt;h1&amp;gt;AUTHOR&amp;lt;/h1&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;Originally, CmdrTaco probably. Revised for Slash 2.0.0 by Nathan Vonnahme and Dan Stahlke&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=SlashGlossary&amp;diff=5312</id>
		<title>SlashGlossary</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=SlashGlossary&amp;diff=5312"/>
		<updated>2014-02-28T22:26:06Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[CssWork]] parent of this page&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Glossary of terms used in slash code&amp;lt;/h2&amp;gt;&lt;br /&gt;
These an be confusing if you are new to slash code. Try to keep these to one displayed line, this is not for full descriptions.&lt;br /&gt;
&lt;br /&gt;
* '''theme''' - &amp;quot;A theme is a website design.&amp;quot;&lt;br /&gt;
* '''template''' - html that is parsed by the Perl Template Toolkit. part of a theme&lt;br /&gt;
* '''D1''' - The orgiginal Slash interface&lt;br /&gt;
* '''D2''' - The new fancy interface that we have disabled on Soylent.&lt;br /&gt;
* '''tasks''' - periodic tasks run by slashd like cron jobs. &lt;br /&gt;
* '''tagboxes''' &lt;br /&gt;
* '''plugins''' - &lt;br /&gt;
* '''firehose''' - The Firehose is a collection of content from anywhere on the site that users can vote on and tag.&lt;br /&gt;
&lt;br /&gt;
* '''skin''' - from 'sectiontopics' :&lt;br /&gt;
** So &amp;quot;section&amp;quot; has been split into two: &amp;quot;skin&amp;quot; and &amp;quot;nexus&amp;quot;. *Most* of the information that went with a section was used to describe appearances, and that went over to skin. '''So a skin now controls color (through the skin_colors table), it controls which templates are used (the final part of a template's three-part name is now skin, not section), and it controls with which other stories a story is grouped (on which index page)'''. And the non-display aspects of sections -- mainly, the &amp;quot;section_extras&amp;quot; data which ensured that stories in Book Reviews stored a field for ISBN -- were sent over to nexuses.&lt;br /&gt;
** Each skin has precisely one nexus; you can think of a skin as drawing its stories from its nexus. The clever part is that a nexus is just a special kind of topic (which we call a topic_nexus when we want to emphasize that it is both). So if a story has both the Developers topic_nexus, and the Book Reviews topic_nexus, then it will appear on both books.slashdot.org and developers.slashdot.org. And the additional data stored with the story will include the union of all the &amp;quot;extras&amp;quot; data -- not only ISBN and so on, but also any &amp;quot;extras&amp;quot; data that may be in the Developers nexus. There don't actually happen to be any extras for Developers on Slashdot, so maybe this isn't the best example, but if there were, a story that was categorized into both nexuses would include that data too.&lt;br /&gt;
* '''nexus''' - a special kind of topic (which we call a topic_nexus when we want to emphasize that it is both). And the non-display aspects of sections -- mainly, the &amp;quot;section_extras&amp;quot; data which ensured that stories in Book Reviews stored a field for ISBN -- were sent over to nexuses.&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=SlashGlossary&amp;diff=5311</id>
		<title>SlashGlossary</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=SlashGlossary&amp;diff=5311"/>
		<updated>2014-02-28T22:18:29Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[CssWork]] parent of this page&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Glossary of terms used in slash code&amp;lt;/h2&amp;gt;&lt;br /&gt;
These an be confusing if you are new to slash code. Try to keep these to one displayed line, this is not for full descriptions.&lt;br /&gt;
&lt;br /&gt;
* '''theme''' - &amp;quot;A theme is a website design.&amp;quot;&lt;br /&gt;
* '''template''' - html that is parsed by the Perl Template Toolkit. part of a theme&lt;br /&gt;
* '''D1''' - The orgiginal Slash interface&lt;br /&gt;
* '''D2''' - The new fancy interface that we have disabled on Soylent.&lt;br /&gt;
* '''tasks''' - periodic tasks run by slashd like cron jobs. &lt;br /&gt;
* '''tagboxes''' &lt;br /&gt;
* '''plugins''' - &lt;br /&gt;
* '''firehose''' - The Firehose is a collection of content from anywhere on the site that users can vote on and tag.&lt;br /&gt;
&lt;br /&gt;
* '''skin''' - from 'sectiontopics' :&lt;br /&gt;
** So &amp;quot;section&amp;quot; has been split into two: &amp;quot;skin&amp;quot; and &amp;quot;nexus&amp;quot;. *Most* of the information that went with a section was used to describe appearances, and that went over to skin. '''So a skin now controls color (through the skin_colors table), it controls which templates are used (the final part of a template's three-part name is now skin, not section), and it controls with which other stories a story is grouped (on which index page)'''. And the non-display aspects of sections -- mainly, the &amp;quot;section_extras&amp;quot; data which ensured that stories in Book Reviews stored a field for ISBN -- were sent over to nexuses.&lt;br /&gt;
** Each skin has precisely one nexus; you can think of a skin as drawing its stories from its nexus. The clever part is that a nexus is just a special kind of topic (which we call a topic_nexus when we want to emphasize that it is both). So if a story has both the Developers topic_nexus, and the Book Reviews topic_nexus, then it will appear on both books.slashdot.org and developers.slashdot.org. And the additional data stored with the story will include the union of all the &amp;quot;extras&amp;quot; data -- not only ISBN and so on, but also any &amp;quot;extras&amp;quot; data that may be in the Developers nexus. There don't actually happen to be any extras for Developers on Slashdot, so maybe this isn't the best example, but if there were, a story that was categorized into both nexuses would include that data too.&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=SlashGlossary&amp;diff=5309</id>
		<title>SlashGlossary</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=SlashGlossary&amp;diff=5309"/>
		<updated>2014-02-28T22:16:19Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[CssWork]] parent of this page&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Glossary of terms used in slash code&amp;lt;/h2&amp;gt;&lt;br /&gt;
These an be confusing if you are new to slash code. Try to keep these to one displayed line, this is not for full descriptions.&lt;br /&gt;
&lt;br /&gt;
* '''theme''' - &amp;quot;A theme is a website design.&amp;quot;&lt;br /&gt;
* '''template''' - html that is parsed by the Perl Template Toolkit. part of a theme&lt;br /&gt;
* '''D1''' - The orgiginal Slash interface&lt;br /&gt;
* '''D2''' - The new fancy interface that we have disabled on Soylent.&lt;br /&gt;
* '''tasks''' - periodic tasks run by slashd like cron jobs. &lt;br /&gt;
* '''tagboxes''' &lt;br /&gt;
* '''plugins''' - &lt;br /&gt;
* '''firehose''' - The Firehose is a collection of content from anywhere on the site that users can vote on and tag.&lt;br /&gt;
&lt;br /&gt;
* '''skin''' - from 'sectiontopics' :&lt;br /&gt;
** So &amp;quot;section&amp;quot; has been split into two: &amp;quot;skin&amp;quot; and &amp;quot;nexus&amp;quot;. *Most* of the&lt;br /&gt;
    information that went with a section was used to describe appearances,&lt;br /&gt;
    and that went over to skin. '''So a skin now controls color (through the&lt;br /&gt;
    skin_colors table), it controls which templates are used (the final part&lt;br /&gt;
    of a template's three-part name is now skin, not section), and it&lt;br /&gt;
    controls with which other stories a story is grouped (on which index&lt;br /&gt;
    page)'''. And the non-display aspects of sections -- mainly, the&lt;br /&gt;
    &amp;quot;section_extras&amp;quot; data which ensured that stories in Book Reviews stored&lt;br /&gt;
    a field for ISBN -- were sent over to nexuses.&lt;br /&gt;
** Each skin has precisely one nexus; you can think of a skin as drawing&lt;br /&gt;
    its stories from its nexus. The clever part is that a nexus is just a&lt;br /&gt;
    special kind of topic (which we call a topic_nexus when we want to&lt;br /&gt;
    emphasize that it is both). So if a story has both the Developers&lt;br /&gt;
    topic_nexus, and the Book Reviews topic_nexus, then it will appear on&lt;br /&gt;
    both books.slashdot.org and developers.slashdot.org. And the additional&lt;br /&gt;
    data stored with the story will include the union of all the &amp;quot;extras&amp;quot;&lt;br /&gt;
    data -- not only ISBN and so on, but also any &amp;quot;extras&amp;quot; data that may be&lt;br /&gt;
    in the Developers nexus. There don't actually happen to be any extras&lt;br /&gt;
    for Developers on Slashdot, so maybe this isn't the best example, but if&lt;br /&gt;
    there were, a story that was categorized into both nexuses would include&lt;br /&gt;
    that data too.&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=SectionTopics&amp;diff=5308</id>
		<title>SectionTopics</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=SectionTopics&amp;diff=5308"/>
		<updated>2014-02-28T22:05:37Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[CssWork]] parent&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME&lt;br /&gt;
    sectiontopics - Information about the section-topics rewrite, June 2004&lt;br /&gt;
&lt;br /&gt;
DESCRIPTION&lt;br /&gt;
    In June 2004, the way Slash handles categorization of stories into&lt;br /&gt;
    topics was changed. The confusing relationship between topics, sections,&lt;br /&gt;
    and subsections, which limited choices, was bolted on to the old system&lt;br /&gt;
    as our needs evolved.&lt;br /&gt;
&lt;br /&gt;
    The &amp;quot;section-topics&amp;quot; rewrite, as it's being called, took a look at those&lt;br /&gt;
    needs with the perspective of hindsight, and developed a new system&lt;br /&gt;
    which will be less confusing in the long run. It provides the&lt;br /&gt;
    flexibility that large sites' admins will need, while still retaining&lt;br /&gt;
    ease of use for smaller sites' admins.&lt;br /&gt;
&lt;br /&gt;
    This document attempts to explain the changes for Slash administrators,&lt;br /&gt;
    and it may be informative reading for Slash authors and editors too.&lt;br /&gt;
&lt;br /&gt;
CONCEPTS&lt;br /&gt;
    I'm not going to bother explaining exactly how the old system worked,&lt;br /&gt;
    because it's dead now. Suffice it to say that every story had one&lt;br /&gt;
    section and one or more topics, those being two distinct and disjoint&lt;br /&gt;
    categorizations. Subsections were invented to allow finer-grained&lt;br /&gt;
    control than what sections permitted, and there were ways to constrain&lt;br /&gt;
    certain topics to only being available in certain sections.&lt;br /&gt;
&lt;br /&gt;
    The &amp;quot;section&amp;quot; data type was always confused about whether it wanted to&lt;br /&gt;
    be a categorization and descriptor, or a visual display modifier. In&lt;br /&gt;
    other words, regarding an object that it was assigned to like a story,&lt;br /&gt;
    &amp;quot;section&amp;quot; implied facts about both its data and how it should be viewed.&lt;br /&gt;
    Being in the &amp;quot;Book Reviews&amp;quot; section on Slashdot, for example, implied&lt;br /&gt;
    that additional data like ISBN would be stored along with the rest of&lt;br /&gt;
    the story's data. Being in the &amp;quot;Developers&amp;quot; section meant that it would&lt;br /&gt;
    be grouped with other developer-related stories and that it would appear&lt;br /&gt;
    blue instead of green. If a story was a book review for developers,&lt;br /&gt;
    there was no way to put it in both places; having that blue color meant&lt;br /&gt;
    that no ISBN data could be stored.&lt;br /&gt;
&lt;br /&gt;
    So &amp;quot;section&amp;quot; has been split into two: &amp;quot;skin&amp;quot; and &amp;quot;nexus&amp;quot;. *Most* of the&lt;br /&gt;
    information that went with a section was used to describe appearances,&lt;br /&gt;
    and that went over to skin. So a skin now controls color (through the&lt;br /&gt;
    skin_colors table), it controls which templates are used (the final part&lt;br /&gt;
    of a template's three-part name is now skin, not section), and it&lt;br /&gt;
    controls with which other stories a story is grouped (on which index&lt;br /&gt;
    page). And the non-display aspects of sections -- mainly, the&lt;br /&gt;
    &amp;quot;section_extras&amp;quot; data which ensured that stories in Book Reviews stored&lt;br /&gt;
    a field for ISBN -- were sent over to nexuses.&lt;br /&gt;
&lt;br /&gt;
    Each skin has precisely one nexus; you can think of a skin as drawing&lt;br /&gt;
    its stories from its nexus. The clever part is that a nexus is just a&lt;br /&gt;
    special kind of topic (which we call a topic_nexus when we want to&lt;br /&gt;
    emphasize that it is both). So if a story has both the Developers&lt;br /&gt;
    topic_nexus, and the Book Reviews topic_nexus, then it will appear on&lt;br /&gt;
    both books.slashdot.org and developers.slashdot.org. And the additional&lt;br /&gt;
    data stored with the story will include the union of all the &amp;quot;extras&amp;quot;&lt;br /&gt;
    data -- not only ISBN and so on, but also any &amp;quot;extras&amp;quot; data that may be&lt;br /&gt;
    in the Developers nexus. There don't actually happen to be any extras&lt;br /&gt;
    for Developers on Slashdot, so maybe this isn't the best example, but if&lt;br /&gt;
    there were, a story that was categorized into both nexuses would include&lt;br /&gt;
    that data too.&lt;br /&gt;
&lt;br /&gt;
    Authors are no longer restricted from choosing any topic with any story.&lt;br /&gt;
    Since a nexus is a topic like any other, an author who wishes to make&lt;br /&gt;
    sure a story shows up in the Apple skin can pick the Apple nexus&lt;br /&gt;
    specifically. But what's more likely to happen is that an author will&lt;br /&gt;
    pick topics that make sense for the story (like &amp;quot;Mac OS X&amp;quot;) and that the&lt;br /&gt;
    weights assigned to those topics will propagate upwards into the correct&lt;br /&gt;
    nexus(es) where the story should appear.&lt;br /&gt;
&lt;br /&gt;
    Along the way, stories were given a numeric primary key (stoid), as were&lt;br /&gt;
    skins. Don't worry, a story's sid still works just as it did before; no&lt;br /&gt;
    Slash URLs are required to change, and in particular all the URLs (for&lt;br /&gt;
    search.pl and index.pl) that had &amp;quot;section=&amp;quot; as a parameter still do.&lt;br /&gt;
&lt;br /&gt;
WEIGHTS&lt;br /&gt;
    Each topic picked for a story now must have a weight assigned to it.&lt;br /&gt;
    Weights are floating-point non-negative numbers. The templates shipped&lt;br /&gt;
    with the stock theme assume that authors will be assigning only the&lt;br /&gt;
    weights 0, 10, 20, 30, 40, or 50, but the only weight value that the&lt;br /&gt;
    core code treats specially is 0 (which means &amp;quot;ignore this topic&amp;quot;). How&lt;br /&gt;
    positive weights affect the categorization of stories depends entirely&lt;br /&gt;
    on the topic_parents table.&lt;br /&gt;
&lt;br /&gt;
    Even in the old system, topics could be arranged into a tree -- but to&lt;br /&gt;
    properly represent section-specific topics one would have to layer&lt;br /&gt;
    additional data on top of the tree, confusing matters somewhat. Now,&lt;br /&gt;
    topics (including nexuses) really do form a tree, which is to say a&lt;br /&gt;
    directed graph. All topic-related data is loaded into a $slashd object&lt;br /&gt;
    at once, when getTopicTree is called.&lt;br /&gt;
&lt;br /&gt;
    One key difference between the old system and the new is that,&lt;br /&gt;
    previously, a topic had at most one parent. Now, a topic may have zero&lt;br /&gt;
    or more parents. This allows a topic of &amp;quot;Darwin&amp;quot; to be a child of both&lt;br /&gt;
    &amp;quot;Apple&amp;quot; and &amp;quot;BSD,&amp;quot; which conceptually means that it is a subcategory of&lt;br /&gt;
    both, and which practically means that assigning &amp;quot;Darwin&amp;quot; a weight will&lt;br /&gt;
    allow that weight to propagate up to both.&lt;br /&gt;
&lt;br /&gt;
RENDERING&lt;br /&gt;
    This process of weight-propagation occurs when chosen topics are&lt;br /&gt;
    rendered. Each parent-child relationship from one topic to another&lt;br /&gt;
    includes a minimum weight. For any given story, if topic T1 is assigned&lt;br /&gt;
    weight W, and topic T2 is the parent of T1 with min_weight M, then T2&lt;br /&gt;
    will also be assigned weight W for the story if, and only if, M &amp;lt;= W.&lt;br /&gt;
&lt;br /&gt;
    That assignment continues recursively (to topic T3, and so on) in a&lt;br /&gt;
    process called &amp;quot;rendering&amp;quot; -- performed by renderTopics(). A story&lt;br /&gt;
    author stores his or her topic/weight duples in the story_topics_chosen&lt;br /&gt;
    table, and at story save time, these choices are rendered into a&lt;br /&gt;
    (probably larger) collection of topic/weight duples that are stored in&lt;br /&gt;
    the story_topics_rendered table.&lt;br /&gt;
&lt;br /&gt;
    (The above rule describes most of what is involved in the rendering&lt;br /&gt;
    process. The other rules in the algorithm are that if multiple children&lt;br /&gt;
    of differing weights both propagate up to the same parent, the greater&lt;br /&gt;
    of those weights become the parent's; and that any topic's chosen&lt;br /&gt;
    weight, including a weight of 0, always overrides any weight propagating&lt;br /&gt;
    up from its children.)&lt;br /&gt;
&lt;br /&gt;
    Finally, when the collection of rendered topic/weight duples has been&lt;br /&gt;
    fully formed, all topics with weight 0 are dropped. Weight 0 can exist&lt;br /&gt;
    in chosen topics, but never in rendered topics.&lt;br /&gt;
&lt;br /&gt;
A SIMPLE EXAMPLE&lt;br /&gt;
    That may sound a bit complicated, so here's a description using the&lt;br /&gt;
    default topics and topic_parents included with the default &amp;quot;slashcode&amp;quot;&lt;br /&gt;
    theme:&lt;br /&gt;
&lt;br /&gt;
    tid 1: mainpage (also a nexus)&lt;br /&gt;
    tid 3: opensource (also a nexus)&lt;br /&gt;
    tid 4: slash&lt;br /&gt;
    tid 7: linux&lt;br /&gt;
&lt;br /&gt;
    Tid 4 has tid 3 as a parent, with that relationship having a min_weight&lt;br /&gt;
    of 10 associated with it.&lt;br /&gt;
&lt;br /&gt;
    Tid 7 also have tid 3 as a parent, with min_weight 10.&lt;br /&gt;
&lt;br /&gt;
    Tid 3 has tid 1 as a parent, with min_weight 30.&lt;br /&gt;
&lt;br /&gt;
    The skin at &amp;quot;http://example.com/&amp;quot; reads the nexus tid 1; the skin at&lt;br /&gt;
    &amp;quot;http://opensource.example.com/&amp;quot; reads the nexus tid 3.&lt;br /&gt;
&lt;br /&gt;
    Suppose an editor is working on a story about Slash and assigns it the&lt;br /&gt;
    topic &amp;quot;slash,&amp;quot; tid 4, with weight 10. Weight 10 is described as&lt;br /&gt;
    &amp;quot;Sectional only&amp;quot; in the code. When that story is saved, renderTopics&lt;br /&gt;
    recursively propagates the weight of its topics, or in this case its&lt;br /&gt;
    single topic, up to parents, or in this case parent. Rendering adds tid&lt;br /&gt;
    3, also at weight 10. It does not add tid 1 since !(10 &amp;gt;= 30). The story&lt;br /&gt;
    thus will appear only on &amp;quot;http://opensource.example.com/&amp;quot; and not&lt;br /&gt;
    &amp;quot;http://example.com/&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
    Now suppose the editor re-edits the story, adding important information&lt;br /&gt;
    about Linux. He or she at that point adds the Linux tid 7 with a weight&lt;br /&gt;
    of 30. Now when it is saved, tid 1 is added since 30 &amp;gt;= 30. Now the&lt;br /&gt;
    story will appear at both URLs.&lt;br /&gt;
&lt;br /&gt;
    Now suppose the editor is instructed that this story must be removed&lt;br /&gt;
    from &amp;quot;http://opensource.example.com/&amp;quot;, though it should stay on the main&lt;br /&gt;
    page &amp;quot;http://example.com/&amp;quot;. In the admin.pl editor, he or she adds tid 3&lt;br /&gt;
    with weight 0. That by itself would remove both nexuses when the story&lt;br /&gt;
    saves, since the 0 would prohibit both child tids from propagating&lt;br /&gt;
    higher than tid 3 up to tid 1. Upon clicking Preview, the admin sees&lt;br /&gt;
    that &amp;quot;This story will not appear&amp;quot; (see admin.pl&lt;br /&gt;
    getDescForTopicsRendered()). So the admin also adds tid 1 -- any weight&lt;br /&gt;
    greater than 0 would do, but weight of 30 makes the most sense since the&lt;br /&gt;
    backend describes that as &amp;quot;Mainpageworthy.&amp;quot; Once this story is saved,&lt;br /&gt;
    its rows in story_topics_chosen are:&lt;br /&gt;
&lt;br /&gt;
            tid 1, weight 30&lt;br /&gt;
            tid 3, weight  0&lt;br /&gt;
            tid 4, weight 10&lt;br /&gt;
            tid 7, weight 10&lt;br /&gt;
&lt;br /&gt;
    and its rows in story_topics_rendered are:&lt;br /&gt;
&lt;br /&gt;
            tid 1, weight 30&lt;br /&gt;
            tid 4, weight 10&lt;br /&gt;
            tid 7, weight 10&lt;br /&gt;
&lt;br /&gt;
    Note that, as far as almost all of the code is concerned, the weight&lt;br /&gt;
    value in story_topics_rendered is irrelevant; only whether a row exists&lt;br /&gt;
    or not is noted. (This is why weight of 0 never appears in that table.)&lt;br /&gt;
&lt;br /&gt;
DISPLAY OPTIONS AND WEIGHTS&lt;br /&gt;
    So how are these values of weights 10 and 30 decided, and what are 20&lt;br /&gt;
    and 50 for?&lt;br /&gt;
&lt;br /&gt;
    Previously in Slash, there were three possible values for a story's&lt;br /&gt;
    displaystatus: Never Display, Section-Only, and Always Display.&lt;br /&gt;
    Section-Only meant to only display a story in its section's homepage,&lt;br /&gt;
    not the site's main page, and Always Display meant to display a story&lt;br /&gt;
    both places.&lt;br /&gt;
&lt;br /&gt;
    Now that a story may be part of more than one skin (the new term for&lt;br /&gt;
    &amp;quot;section&amp;quot;), that distinction is not so simple. While the method&lt;br /&gt;
    _displaystatus() will return an old-style displaystatus value for a&lt;br /&gt;
    story, this is for reverse compatibility and is deprecated. The proper&lt;br /&gt;
    question now takes two arguments instead of one: is a story to be&lt;br /&gt;
    displayed _in_ a particular skin.&lt;br /&gt;
&lt;br /&gt;
    The answer to that question is very simple; if a row exists in&lt;br /&gt;
    story_topics_rendered with the story's stoid and the topic's tid, then&lt;br /&gt;
    yes; otherwise, no.&lt;br /&gt;
&lt;br /&gt;
    To prevent everything from breaking at once, and to keep the backend&lt;br /&gt;
    story list looking much the same as it did before (white background for&lt;br /&gt;
    Always Display, light gray for Section-Only, dark gray for Never&lt;br /&gt;
    Display), the &amp;quot;mainpage skin&amp;quot; was created. Defined by the var&lt;br /&gt;
    mainpage_skid [sic, a skid is a skin's numeric primary key], this&lt;br /&gt;
    defines which skin a story must be in to be considered &amp;quot;Always Display.&amp;quot;&lt;br /&gt;
    It also defines which topic nexus will be colored blue instead of yellow&lt;br /&gt;
    in admin.pl?op=topictree (you will need GraphViz installed to see this;&lt;br /&gt;
    see plugins/Admin/README). Nevertheless, Slash is now well-equipped to&lt;br /&gt;
    run a website which consists of many subsites, at different URLs,&lt;br /&gt;
    perhaps only loosely networked and not necessarily with one central&lt;br /&gt;
    &amp;quot;main&amp;quot; page.&lt;br /&gt;
&lt;br /&gt;
    multiple skins and how index.pl uses stories.primaryskid&lt;br /&gt;
&lt;br /&gt;
    skins.cookiedomain and the cookiedomain var&lt;br /&gt;
&lt;br /&gt;
    the Topiclist&lt;br /&gt;
&lt;br /&gt;
    the topic chooser&lt;br /&gt;
&lt;br /&gt;
    no admin.pl interface to edit topic tree yet, but op=topictree (and&lt;br /&gt;
    GraphViz, see plugins/Admin/README)&lt;br /&gt;
&lt;br /&gt;
    suggestions for a clean topic tree (use min_weight 10 to connect&lt;br /&gt;
    many/most topics to logical categorizations, which could/should be&lt;br /&gt;
    nexuses, then connect those to mainpage with min_weight 30, finally&lt;br /&gt;
    bring loose topics to mainpage with min_weight 30)&lt;br /&gt;
&lt;br /&gt;
    utils/convertDBto200406&lt;br /&gt;
&lt;br /&gt;
    and _suggest and how it can be used to advise on a better topic tree&lt;br /&gt;
&lt;br /&gt;
    and _render which needs to be run&lt;br /&gt;
&lt;br /&gt;
VERSION&lt;br /&gt;
    $Id$&lt;br /&gt;
&lt;br /&gt;
[root@slashcode docs]#  &lt;br /&gt;
[root@slashcode docs]# ls&lt;br /&gt;
boilerplates          HOWTO-Themes.html   sectiontopics.txt  slashstyle.txt&lt;br /&gt;
dopods.plx            HOWTO-Themes.pod    slasherd.fig       slashtables.html&lt;br /&gt;
formkeys.txt          HOWTO-Themes.txt    slasherd.pdf       slashtables.pod&lt;br /&gt;
HOWTO-Plugins.html    INSTALL.pod         slasherd.ps        slashtables.txt&lt;br /&gt;
HOWTO-Plugins.pod     INSTALL.txt         slashguide.html    slashtags.html&lt;br /&gt;
HOWTO-Plugins.txt     README.pod          slashguide.pod     slashtags.pod&lt;br /&gt;
HOWTO-Templates.html  README.txt          slashguide.txt     slashtags.txt&lt;br /&gt;
HOWTO-Templates.pod   sectiontopics.html  slashstyle.html&lt;br /&gt;
HOWTO-Templates.txt   sectiontopics.pod   slashstyle.pod&lt;br /&gt;
[root@slashcode docs]# more sectiontopics.txt &lt;br /&gt;
NAME&lt;br /&gt;
    sectiontopics - Information about the section-topics rewrite, June 2004&lt;br /&gt;
&lt;br /&gt;
DESCRIPTION&lt;br /&gt;
    In June 2004, the way Slash handles categorization of stories into&lt;br /&gt;
    topics was changed. The confusing relationship between topics, sections,&lt;br /&gt;
    and subsections, which limited choices, was bolted on to the old system&lt;br /&gt;
    as our needs evolved.&lt;br /&gt;
&lt;br /&gt;
    The &amp;quot;section-topics&amp;quot; rewrite, as it's being called, took a look at those&lt;br /&gt;
    needs with the perspective of hindsight, and developed a new system&lt;br /&gt;
    which will be less confusing in the long run. It provides the&lt;br /&gt;
    flexibility that large sites' admins will need, while still retaining&lt;br /&gt;
    ease of use for smaller sites' admins.&lt;br /&gt;
&lt;br /&gt;
    This document attempts to explain the changes for Slash administrators,&lt;br /&gt;
    and it may be informative reading for Slash authors and editors too.&lt;br /&gt;
&lt;br /&gt;
CONCEPTS&lt;br /&gt;
    I'm not going to bother explaining exactly how the old system worked,&lt;br /&gt;
    because it's dead now. Suffice it to say that every story had one&lt;br /&gt;
    section and one or more topics, those being two distinct and disjoint&lt;br /&gt;
    categorizations. Subsections were invented to allow finer-grained&lt;br /&gt;
    control than what sections permitted, and there were ways to constrain&lt;br /&gt;
    certain topics to only being available in certain sections.&lt;br /&gt;
&lt;br /&gt;
    The &amp;quot;section&amp;quot; data type was always confused about whether it wanted to&lt;br /&gt;
    be a categorization and descriptor, or a visual display modifier. In&lt;br /&gt;
    other words, regarding an object that it was assigned to like a story,&lt;br /&gt;
    &amp;quot;section&amp;quot; implied facts about both its data and how it should be viewed.&lt;br /&gt;
    Being in the &amp;quot;Book Reviews&amp;quot; section on Slashdot, for example, implied&lt;br /&gt;
    that additional data like ISBN would be stored along with the rest of&lt;br /&gt;
    the story's data. Being in the &amp;quot;Developers&amp;quot; section meant that it would&lt;br /&gt;
    be grouped with other developer-related stories and that it would appear&lt;br /&gt;
    blue instead of green. If a story was a book review for developers,&lt;br /&gt;
    there was no way to put it in both places; having that blue color meant&lt;br /&gt;
    that no ISBN data could be stored.&lt;br /&gt;
&lt;br /&gt;
    So &amp;quot;section&amp;quot; has been split into two: &amp;quot;skin&amp;quot; and &amp;quot;nexus&amp;quot;. *Most* of the&lt;br /&gt;
    information that went with a section was used to describe appearances,&lt;br /&gt;
    and that went over to skin. So a skin now controls color (through the&lt;br /&gt;
    skin_colors table), it controls which templates are used (the final part&lt;br /&gt;
    of a template's three-part name is now skin, not section), and it&lt;br /&gt;
    controls with which other stories a story is grouped (on which index&lt;br /&gt;
    page). And the non-display aspects of sections -- mainly, the&lt;br /&gt;
    &amp;quot;section_extras&amp;quot; data which ensured that stories in Book Reviews stored&lt;br /&gt;
    a field for ISBN -- were sent over to nexuses.&lt;br /&gt;
&lt;br /&gt;
    Each skin has precisely one nexus; you can think of a skin as drawing&lt;br /&gt;
    its stories from its nexus. The clever part is that a nexus is just a&lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# cat sectiontopics.txt &lt;br /&gt;
NAME&lt;br /&gt;
    sectiontopics - Information about the section-topics rewrite, June 2004&lt;br /&gt;
&lt;br /&gt;
DESCRIPTION&lt;br /&gt;
    In June 2004, the way Slash handles categorization of stories into&lt;br /&gt;
    topics was changed. The confusing relationship between topics, sections,&lt;br /&gt;
    and subsections, which limited choices, was bolted on to the old system&lt;br /&gt;
    as our needs evolved.&lt;br /&gt;
&lt;br /&gt;
    The &amp;quot;section-topics&amp;quot; rewrite, as it's being called, took a look at those&lt;br /&gt;
    needs with the perspective of hindsight, and developed a new system&lt;br /&gt;
    which will be less confusing in the long run. It provides the&lt;br /&gt;
    flexibility that large sites' admins will need, while still retaining&lt;br /&gt;
    ease of use for smaller sites' admins.&lt;br /&gt;
&lt;br /&gt;
    This document attempts to explain the changes for Slash administrators,&lt;br /&gt;
    and it may be informative reading for Slash authors and editors too.&lt;br /&gt;
&lt;br /&gt;
CONCEPTS&lt;br /&gt;
    I'm not going to bother explaining exactly how the old system worked,&lt;br /&gt;
    because it's dead now. Suffice it to say that every story had one&lt;br /&gt;
    section and one or more topics, those being two distinct and disjoint&lt;br /&gt;
    categorizations. Subsections were invented to allow finer-grained&lt;br /&gt;
    control than what sections permitted, and there were ways to constrain&lt;br /&gt;
    certain topics to only being available in certain sections.&lt;br /&gt;
&lt;br /&gt;
    The &amp;quot;section&amp;quot; data type was always confused about whether it wanted to&lt;br /&gt;
    be a categorization and descriptor, or a visual display modifier. In&lt;br /&gt;
    other words, regarding an object that it was assigned to like a story,&lt;br /&gt;
    &amp;quot;section&amp;quot; implied facts about both its data and how it should be viewed.&lt;br /&gt;
    Being in the &amp;quot;Book Reviews&amp;quot; section on Slashdot, for example, implied&lt;br /&gt;
    that additional data like ISBN would be stored along with the rest of&lt;br /&gt;
    the story's data. Being in the &amp;quot;Developers&amp;quot; section meant that it would&lt;br /&gt;
    be grouped with other developer-related stories and that it would appear&lt;br /&gt;
    blue instead of green. If a story was a book review for developers,&lt;br /&gt;
    there was no way to put it in both places; having that blue color meant&lt;br /&gt;
    that no ISBN data could be stored.&lt;br /&gt;
&lt;br /&gt;
    So &amp;quot;section&amp;quot; has been split into two: &amp;quot;skin&amp;quot; and &amp;quot;nexus&amp;quot;. *Most* of the&lt;br /&gt;
    information that went with a section was used to describe appearances,&lt;br /&gt;
    and that went over to skin. So a skin now controls color (through the&lt;br /&gt;
    skin_colors table), it controls which templates are used (the final part&lt;br /&gt;
    of a template's three-part name is now skin, not section), and it&lt;br /&gt;
    controls with which other stories a story is grouped (on which index&lt;br /&gt;
    page). And the non-display aspects of sections -- mainly, the&lt;br /&gt;
    &amp;quot;section_extras&amp;quot; data which ensured that stories in Book Reviews stored&lt;br /&gt;
    a field for ISBN -- were sent over to nexuses.&lt;br /&gt;
&lt;br /&gt;
    Each skin has precisely one nexus; you can think of a skin as drawing&lt;br /&gt;
    its stories from its nexus. The clever part is that a nexus is just a&lt;br /&gt;
    special kind of topic (which we call a topic_nexus when we want to&lt;br /&gt;
    emphasize that it is both). So if a story has both the Developers&lt;br /&gt;
    topic_nexus, and the Book Reviews topic_nexus, then it will appear on&lt;br /&gt;
    both books.slashdot.org and developers.slashdot.org. And the additional&lt;br /&gt;
    data stored with the story will include the union of all the &amp;quot;extras&amp;quot;&lt;br /&gt;
    data -- not only ISBN and so on, but also any &amp;quot;extras&amp;quot; data that may be&lt;br /&gt;
    in the Developers nexus. There don't actually happen to be any extras&lt;br /&gt;
    for Developers on Slashdot, so maybe this isn't the best example, but if&lt;br /&gt;
    there were, a story that was categorized into both nexuses would include&lt;br /&gt;
    that data too.&lt;br /&gt;
&lt;br /&gt;
    Authors are no longer restricted from choosing any topic with any story.&lt;br /&gt;
    Since a nexus is a topic like any other, an author who wishes to make&lt;br /&gt;
    sure a story shows up in the Apple skin can pick the Apple nexus&lt;br /&gt;
    specifically. But what's more likely to happen is that an author will&lt;br /&gt;
    pick topics that make sense for the story (like &amp;quot;Mac OS X&amp;quot;) and that the&lt;br /&gt;
    weights assigned to those topics will propagate upwards into the correct&lt;br /&gt;
    nexus(es) where the story should appear.&lt;br /&gt;
&lt;br /&gt;
    Along the way, stories were given a numeric primary key (stoid), as were&lt;br /&gt;
    skins. Don't worry, a story's sid still works just as it did before; no&lt;br /&gt;
    Slash URLs are required to change, and in particular all the URLs (for&lt;br /&gt;
    search.pl and index.pl) that had &amp;quot;section=&amp;quot; as a parameter still do.&lt;br /&gt;
&lt;br /&gt;
WEIGHTS&lt;br /&gt;
    Each topic picked for a story now must have a weight assigned to it.&lt;br /&gt;
    Weights are floating-point non-negative numbers. The templates shipped&lt;br /&gt;
    with the stock theme assume that authors will be assigning only the&lt;br /&gt;
    weights 0, 10, 20, 30, 40, or 50, but the only weight value that the&lt;br /&gt;
    core code treats specially is 0 (which means &amp;quot;ignore this topic&amp;quot;). How&lt;br /&gt;
    positive weights affect the categorization of stories depends entirely&lt;br /&gt;
    on the topic_parents table.&lt;br /&gt;
&lt;br /&gt;
    Even in the old system, topics could be arranged into a tree -- but to&lt;br /&gt;
    properly represent section-specific topics one would have to layer&lt;br /&gt;
    additional data on top of the tree, confusing matters somewhat. Now,&lt;br /&gt;
    topics (including nexuses) really do form a tree, which is to say a&lt;br /&gt;
    directed graph. All topic-related data is loaded into a $slashd object&lt;br /&gt;
    at once, when getTopicTree is called.&lt;br /&gt;
&lt;br /&gt;
    One key difference between the old system and the new is that,&lt;br /&gt;
    previously, a topic had at most one parent. Now, a topic may have zero&lt;br /&gt;
    or more parents. This allows a topic of &amp;quot;Darwin&amp;quot; to be a child of both&lt;br /&gt;
    &amp;quot;Apple&amp;quot; and &amp;quot;BSD,&amp;quot; which conceptually means that it is a subcategory of&lt;br /&gt;
    both, and which practically means that assigning &amp;quot;Darwin&amp;quot; a weight will&lt;br /&gt;
    allow that weight to propagate up to both.&lt;br /&gt;
&lt;br /&gt;
RENDERING&lt;br /&gt;
    This process of weight-propagation occurs when chosen topics are&lt;br /&gt;
    rendered. Each parent-child relationship from one topic to another&lt;br /&gt;
    includes a minimum weight. For any given story, if topic T1 is assigned&lt;br /&gt;
    weight W, and topic T2 is the parent of T1 with min_weight M, then T2&lt;br /&gt;
    will also be assigned weight W for the story if, and only if, M &amp;lt;= W.&lt;br /&gt;
&lt;br /&gt;
    That assignment continues recursively (to topic T3, and so on) in a&lt;br /&gt;
    process called &amp;quot;rendering&amp;quot; -- performed by renderTopics(). A story&lt;br /&gt;
    author stores his or her topic/weight duples in the story_topics_chosen&lt;br /&gt;
    table, and at story save time, these choices are rendered into a&lt;br /&gt;
    (probably larger) collection of topic/weight duples that are stored in&lt;br /&gt;
    the story_topics_rendered table.&lt;br /&gt;
&lt;br /&gt;
    (The above rule describes most of what is involved in the rendering&lt;br /&gt;
    process. The other rules in the algorithm are that if multiple children&lt;br /&gt;
    of differing weights both propagate up to the same parent, the greater&lt;br /&gt;
    of those weights become the parent's; and that any topic's chosen&lt;br /&gt;
    weight, including a weight of 0, always overrides any weight propagating&lt;br /&gt;
    up from its children.)&lt;br /&gt;
&lt;br /&gt;
    Finally, when the collection of rendered topic/weight duples has been&lt;br /&gt;
    fully formed, all topics with weight 0 are dropped. Weight 0 can exist&lt;br /&gt;
    in chosen topics, but never in rendered topics.&lt;br /&gt;
&lt;br /&gt;
A SIMPLE EXAMPLE&lt;br /&gt;
    That may sound a bit complicated, so here's a description using the&lt;br /&gt;
    default topics and topic_parents included with the default &amp;quot;slashcode&amp;quot;&lt;br /&gt;
    theme:&lt;br /&gt;
&lt;br /&gt;
    tid 1: mainpage (also a nexus)&lt;br /&gt;
    tid 3: opensource (also a nexus)&lt;br /&gt;
    tid 4: slash&lt;br /&gt;
    tid 7: linux&lt;br /&gt;
&lt;br /&gt;
    Tid 4 has tid 3 as a parent, with that relationship having a min_weight&lt;br /&gt;
    of 10 associated with it.&lt;br /&gt;
&lt;br /&gt;
    Tid 7 also have tid 3 as a parent, with min_weight 10.&lt;br /&gt;
&lt;br /&gt;
    Tid 3 has tid 1 as a parent, with min_weight 30.&lt;br /&gt;
&lt;br /&gt;
    The skin at &amp;quot;http://example.com/&amp;quot; reads the nexus tid 1; the skin at&lt;br /&gt;
    &amp;quot;http://opensource.example.com/&amp;quot; reads the nexus tid 3.&lt;br /&gt;
&lt;br /&gt;
    Suppose an editor is working on a story about Slash and assigns it the&lt;br /&gt;
    topic &amp;quot;slash,&amp;quot; tid 4, with weight 10. Weight 10 is described as&lt;br /&gt;
    &amp;quot;Sectional only&amp;quot; in the code. When that story is saved, renderTopics&lt;br /&gt;
    recursively propagates the weight of its topics, or in this case its&lt;br /&gt;
    single topic, up to parents, or in this case parent. Rendering adds tid&lt;br /&gt;
    3, also at weight 10. It does not add tid 1 since !(10 &amp;gt;= 30). The story&lt;br /&gt;
    thus will appear only on &amp;quot;http://opensource.example.com/&amp;quot; and not&lt;br /&gt;
    &amp;quot;http://example.com/&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
    Now suppose the editor re-edits the story, adding important information&lt;br /&gt;
    about Linux. He or she at that point adds the Linux tid 7 with a weight&lt;br /&gt;
    of 30. Now when it is saved, tid 1 is added since 30 &amp;gt;= 30. Now the&lt;br /&gt;
    story will appear at both URLs.&lt;br /&gt;
&lt;br /&gt;
    Now suppose the editor is instructed that this story must be removed&lt;br /&gt;
    from &amp;quot;http://opensource.example.com/&amp;quot;, though it should stay on the main&lt;br /&gt;
    page &amp;quot;http://example.com/&amp;quot;. In the admin.pl editor, he or she adds tid 3&lt;br /&gt;
    with weight 0. That by itself would remove both nexuses when the story&lt;br /&gt;
    saves, since the 0 would prohibit both child tids from propagating&lt;br /&gt;
    higher than tid 3 up to tid 1. Upon clicking Preview, the admin sees&lt;br /&gt;
    that &amp;quot;This story will not appear&amp;quot; (see admin.pl&lt;br /&gt;
    getDescForTopicsRendered()). So the admin also adds tid 1 -- any weight&lt;br /&gt;
    greater than 0 would do, but weight of 30 makes the most sense since the&lt;br /&gt;
    backend describes that as &amp;quot;Mainpageworthy.&amp;quot; Once this story is saved,&lt;br /&gt;
    its rows in story_topics_chosen are:&lt;br /&gt;
&lt;br /&gt;
            tid 1, weight 30&lt;br /&gt;
            tid 3, weight  0&lt;br /&gt;
            tid 4, weight 10&lt;br /&gt;
            tid 7, weight 10&lt;br /&gt;
&lt;br /&gt;
    and its rows in story_topics_rendered are:&lt;br /&gt;
&lt;br /&gt;
            tid 1, weight 30&lt;br /&gt;
            tid 4, weight 10&lt;br /&gt;
            tid 7, weight 10&lt;br /&gt;
&lt;br /&gt;
    Note that, as far as almost all of the code is concerned, the weight&lt;br /&gt;
    value in story_topics_rendered is irrelevant; only whether a row exists&lt;br /&gt;
    or not is noted. (This is why weight of 0 never appears in that table.)&lt;br /&gt;
&lt;br /&gt;
DISPLAY OPTIONS AND WEIGHTS&lt;br /&gt;
    So how are these values of weights 10 and 30 decided, and what are 20&lt;br /&gt;
    and 50 for?&lt;br /&gt;
&lt;br /&gt;
    Previously in Slash, there were three possible values for a story's&lt;br /&gt;
    displaystatus: Never Display, Section-Only, and Always Display.&lt;br /&gt;
    Section-Only meant to only display a story in its section's homepage,&lt;br /&gt;
    not the site's main page, and Always Display meant to display a story&lt;br /&gt;
    both places.&lt;br /&gt;
&lt;br /&gt;
    Now that a story may be part of more than one skin (the new term for&lt;br /&gt;
    &amp;quot;section&amp;quot;), that distinction is not so simple. While the method&lt;br /&gt;
    _displaystatus() will return an old-style displaystatus value for a&lt;br /&gt;
    story, this is for reverse compatibility and is deprecated. The proper&lt;br /&gt;
    question now takes two arguments instead of one: is a story to be&lt;br /&gt;
    displayed _in_ a particular skin.&lt;br /&gt;
&lt;br /&gt;
    The answer to that question is very simple; if a row exists in&lt;br /&gt;
    story_topics_rendered with the story's stoid and the topic's tid, then&lt;br /&gt;
    yes; otherwise, no.&lt;br /&gt;
&lt;br /&gt;
    To prevent everything from breaking at once, and to keep the backend&lt;br /&gt;
    story list looking much the same as it did before (white background for&lt;br /&gt;
    Always Display, light gray for Section-Only, dark gray for Never&lt;br /&gt;
    Display), the &amp;quot;mainpage skin&amp;quot; was created. Defined by the var&lt;br /&gt;
    mainpage_skid [sic, a skid is a skin's numeric primary key], this&lt;br /&gt;
    defines which skin a story must be in to be considered &amp;quot;Always Display.&amp;quot;&lt;br /&gt;
    It also defines which topic nexus will be colored blue instead of yellow&lt;br /&gt;
    in admin.pl?op=topictree (you will need GraphViz installed to see this;&lt;br /&gt;
    see plugins/Admin/README). Nevertheless, Slash is now well-equipped to&lt;br /&gt;
    run a website which consists of many subsites, at different URLs,&lt;br /&gt;
    perhaps only loosely networked and not necessarily with one central&lt;br /&gt;
    &amp;quot;main&amp;quot; page.&lt;br /&gt;
&lt;br /&gt;
    multiple skins and how index.pl uses stories.primaryskid&lt;br /&gt;
&lt;br /&gt;
    skins.cookiedomain and the cookiedomain var&lt;br /&gt;
&lt;br /&gt;
    the Topiclist&lt;br /&gt;
&lt;br /&gt;
    the topic chooser&lt;br /&gt;
&lt;br /&gt;
    no admin.pl interface to edit topic tree yet, but op=topictree (and&lt;br /&gt;
    GraphViz, see plugins/Admin/README)&lt;br /&gt;
&lt;br /&gt;
    suggestions for a clean topic tree (use min_weight 10 to connect&lt;br /&gt;
    many/most topics to logical categorizations, which could/should be&lt;br /&gt;
    nexuses, then connect those to mainpage with min_weight 30, finally&lt;br /&gt;
    bring loose topics to mainpage with min_weight 30)&lt;br /&gt;
&lt;br /&gt;
    utils/convertDBto200406&lt;br /&gt;
&lt;br /&gt;
    and _suggest and how it can be used to advise on a better topic tree&lt;br /&gt;
&lt;br /&gt;
    and _render which needs to be run&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=SectionTopics&amp;diff=5305</id>
		<title>SectionTopics</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=SectionTopics&amp;diff=5305"/>
		<updated>2014-02-28T21:56:30Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME&lt;br /&gt;
    sectiontopics - Information about the section-topics rewrite, June 2004&lt;br /&gt;
&lt;br /&gt;
DESCRIPTION&lt;br /&gt;
    In June 2004, the way Slash handles categorization of stories into&lt;br /&gt;
    topics was changed. The confusing relationship between topics, sections,&lt;br /&gt;
    and subsections, which limited choices, was bolted on to the old system&lt;br /&gt;
    as our needs evolved.&lt;br /&gt;
&lt;br /&gt;
    The &amp;quot;section-topics&amp;quot; rewrite, as it's being called, took a look at those&lt;br /&gt;
    needs with the perspective of hindsight, and developed a new system&lt;br /&gt;
    which will be less confusing in the long run. It provides the&lt;br /&gt;
    flexibility that large sites' admins will need, while still retaining&lt;br /&gt;
    ease of use for smaller sites' admins.&lt;br /&gt;
&lt;br /&gt;
    This document attempts to explain the changes for Slash administrators,&lt;br /&gt;
    and it may be informative reading for Slash authors and editors too.&lt;br /&gt;
&lt;br /&gt;
CONCEPTS&lt;br /&gt;
    I'm not going to bother explaining exactly how the old system worked,&lt;br /&gt;
    because it's dead now. Suffice it to say that every story had one&lt;br /&gt;
    section and one or more topics, those being two distinct and disjoint&lt;br /&gt;
    categorizations. Subsections were invented to allow finer-grained&lt;br /&gt;
    control than what sections permitted, and there were ways to constrain&lt;br /&gt;
    certain topics to only being available in certain sections.&lt;br /&gt;
&lt;br /&gt;
    The &amp;quot;section&amp;quot; data type was always confused about whether it wanted to&lt;br /&gt;
    be a categorization and descriptor, or a visual display modifier. In&lt;br /&gt;
    other words, regarding an object that it was assigned to like a story,&lt;br /&gt;
    &amp;quot;section&amp;quot; implied facts about both its data and how it should be viewed.&lt;br /&gt;
    Being in the &amp;quot;Book Reviews&amp;quot; section on Slashdot, for example, implied&lt;br /&gt;
    that additional data like ISBN would be stored along with the rest of&lt;br /&gt;
    the story's data. Being in the &amp;quot;Developers&amp;quot; section meant that it would&lt;br /&gt;
    be grouped with other developer-related stories and that it would appear&lt;br /&gt;
    blue instead of green. If a story was a book review for developers,&lt;br /&gt;
    there was no way to put it in both places; having that blue color meant&lt;br /&gt;
    that no ISBN data could be stored.&lt;br /&gt;
&lt;br /&gt;
    So &amp;quot;section&amp;quot; has been split into two: &amp;quot;skin&amp;quot; and &amp;quot;nexus&amp;quot;. *Most* of the&lt;br /&gt;
    information that went with a section was used to describe appearances,&lt;br /&gt;
    and that went over to skin. So a skin now controls color (through the&lt;br /&gt;
    skin_colors table), it controls which templates are used (the final part&lt;br /&gt;
    of a template's three-part name is now skin, not section), and it&lt;br /&gt;
    controls with which other stories a story is grouped (on which index&lt;br /&gt;
    page). And the non-display aspects of sections -- mainly, the&lt;br /&gt;
    &amp;quot;section_extras&amp;quot; data which ensured that stories in Book Reviews stored&lt;br /&gt;
    a field for ISBN -- were sent over to nexuses.&lt;br /&gt;
&lt;br /&gt;
    Each skin has precisely one nexus; you can think of a skin as drawing&lt;br /&gt;
    its stories from its nexus. The clever part is that a nexus is just a&lt;br /&gt;
    special kind of topic (which we call a topic_nexus when we want to&lt;br /&gt;
    emphasize that it is both). So if a story has both the Developers&lt;br /&gt;
    topic_nexus, and the Book Reviews topic_nexus, then it will appear on&lt;br /&gt;
    both books.slashdot.org and developers.slashdot.org. And the additional&lt;br /&gt;
    data stored with the story will include the union of all the &amp;quot;extras&amp;quot;&lt;br /&gt;
    data -- not only ISBN and so on, but also any &amp;quot;extras&amp;quot; data that may be&lt;br /&gt;
    in the Developers nexus. There don't actually happen to be any extras&lt;br /&gt;
    for Developers on Slashdot, so maybe this isn't the best example, but if&lt;br /&gt;
    there were, a story that was categorized into both nexuses would include&lt;br /&gt;
    that data too.&lt;br /&gt;
&lt;br /&gt;
    Authors are no longer restricted from choosing any topic with any story.&lt;br /&gt;
    Since a nexus is a topic like any other, an author who wishes to make&lt;br /&gt;
    sure a story shows up in the Apple skin can pick the Apple nexus&lt;br /&gt;
    specifically. But what's more likely to happen is that an author will&lt;br /&gt;
    pick topics that make sense for the story (like &amp;quot;Mac OS X&amp;quot;) and that the&lt;br /&gt;
    weights assigned to those topics will propagate upwards into the correct&lt;br /&gt;
    nexus(es) where the story should appear.&lt;br /&gt;
&lt;br /&gt;
    Along the way, stories were given a numeric primary key (stoid), as were&lt;br /&gt;
    skins. Don't worry, a story's sid still works just as it did before; no&lt;br /&gt;
    Slash URLs are required to change, and in particular all the URLs (for&lt;br /&gt;
    search.pl and index.pl) that had &amp;quot;section=&amp;quot; as a parameter still do.&lt;br /&gt;
&lt;br /&gt;
WEIGHTS&lt;br /&gt;
    Each topic picked for a story now must have a weight assigned to it.&lt;br /&gt;
    Weights are floating-point non-negative numbers. The templates shipped&lt;br /&gt;
    with the stock theme assume that authors will be assigning only the&lt;br /&gt;
    weights 0, 10, 20, 30, 40, or 50, but the only weight value that the&lt;br /&gt;
    core code treats specially is 0 (which means &amp;quot;ignore this topic&amp;quot;). How&lt;br /&gt;
    positive weights affect the categorization of stories depends entirely&lt;br /&gt;
    on the topic_parents table.&lt;br /&gt;
&lt;br /&gt;
    Even in the old system, topics could be arranged into a tree -- but to&lt;br /&gt;
    properly represent section-specific topics one would have to layer&lt;br /&gt;
    additional data on top of the tree, confusing matters somewhat. Now,&lt;br /&gt;
    topics (including nexuses) really do form a tree, which is to say a&lt;br /&gt;
    directed graph. All topic-related data is loaded into a $slashd object&lt;br /&gt;
    at once, when getTopicTree is called.&lt;br /&gt;
&lt;br /&gt;
    One key difference between the old system and the new is that,&lt;br /&gt;
    previously, a topic had at most one parent. Now, a topic may have zero&lt;br /&gt;
    or more parents. This allows a topic of &amp;quot;Darwin&amp;quot; to be a child of both&lt;br /&gt;
    &amp;quot;Apple&amp;quot; and &amp;quot;BSD,&amp;quot; which conceptually means that it is a subcategory of&lt;br /&gt;
    both, and which practically means that assigning &amp;quot;Darwin&amp;quot; a weight will&lt;br /&gt;
    allow that weight to propagate up to both.&lt;br /&gt;
&lt;br /&gt;
RENDERING&lt;br /&gt;
    This process of weight-propagation occurs when chosen topics are&lt;br /&gt;
    rendered. Each parent-child relationship from one topic to another&lt;br /&gt;
    includes a minimum weight. For any given story, if topic T1 is assigned&lt;br /&gt;
    weight W, and topic T2 is the parent of T1 with min_weight M, then T2&lt;br /&gt;
    will also be assigned weight W for the story if, and only if, M &amp;lt;= W.&lt;br /&gt;
&lt;br /&gt;
    That assignment continues recursively (to topic T3, and so on) in a&lt;br /&gt;
    process called &amp;quot;rendering&amp;quot; -- performed by renderTopics(). A story&lt;br /&gt;
    author stores his or her topic/weight duples in the story_topics_chosen&lt;br /&gt;
    table, and at story save time, these choices are rendered into a&lt;br /&gt;
    (probably larger) collection of topic/weight duples that are stored in&lt;br /&gt;
    the story_topics_rendered table.&lt;br /&gt;
&lt;br /&gt;
    (The above rule describes most of what is involved in the rendering&lt;br /&gt;
    process. The other rules in the algorithm are that if multiple children&lt;br /&gt;
    of differing weights both propagate up to the same parent, the greater&lt;br /&gt;
    of those weights become the parent's; and that any topic's chosen&lt;br /&gt;
    weight, including a weight of 0, always overrides any weight propagating&lt;br /&gt;
    up from its children.)&lt;br /&gt;
&lt;br /&gt;
    Finally, when the collection of rendered topic/weight duples has been&lt;br /&gt;
    fully formed, all topics with weight 0 are dropped. Weight 0 can exist&lt;br /&gt;
    in chosen topics, but never in rendered topics.&lt;br /&gt;
&lt;br /&gt;
A SIMPLE EXAMPLE&lt;br /&gt;
    That may sound a bit complicated, so here's a description using the&lt;br /&gt;
    default topics and topic_parents included with the default &amp;quot;slashcode&amp;quot;&lt;br /&gt;
    theme:&lt;br /&gt;
&lt;br /&gt;
    tid 1: mainpage (also a nexus)&lt;br /&gt;
    tid 3: opensource (also a nexus)&lt;br /&gt;
    tid 4: slash&lt;br /&gt;
    tid 7: linux&lt;br /&gt;
&lt;br /&gt;
    Tid 4 has tid 3 as a parent, with that relationship having a min_weight&lt;br /&gt;
    of 10 associated with it.&lt;br /&gt;
&lt;br /&gt;
    Tid 7 also have tid 3 as a parent, with min_weight 10.&lt;br /&gt;
&lt;br /&gt;
    Tid 3 has tid 1 as a parent, with min_weight 30.&lt;br /&gt;
&lt;br /&gt;
    The skin at &amp;quot;http://example.com/&amp;quot; reads the nexus tid 1; the skin at&lt;br /&gt;
    &amp;quot;http://opensource.example.com/&amp;quot; reads the nexus tid 3.&lt;br /&gt;
&lt;br /&gt;
    Suppose an editor is working on a story about Slash and assigns it the&lt;br /&gt;
    topic &amp;quot;slash,&amp;quot; tid 4, with weight 10. Weight 10 is described as&lt;br /&gt;
    &amp;quot;Sectional only&amp;quot; in the code. When that story is saved, renderTopics&lt;br /&gt;
    recursively propagates the weight of its topics, or in this case its&lt;br /&gt;
    single topic, up to parents, or in this case parent. Rendering adds tid&lt;br /&gt;
    3, also at weight 10. It does not add tid 1 since !(10 &amp;gt;= 30). The story&lt;br /&gt;
    thus will appear only on &amp;quot;http://opensource.example.com/&amp;quot; and not&lt;br /&gt;
    &amp;quot;http://example.com/&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
    Now suppose the editor re-edits the story, adding important information&lt;br /&gt;
    about Linux. He or she at that point adds the Linux tid 7 with a weight&lt;br /&gt;
    of 30. Now when it is saved, tid 1 is added since 30 &amp;gt;= 30. Now the&lt;br /&gt;
    story will appear at both URLs.&lt;br /&gt;
&lt;br /&gt;
    Now suppose the editor is instructed that this story must be removed&lt;br /&gt;
    from &amp;quot;http://opensource.example.com/&amp;quot;, though it should stay on the main&lt;br /&gt;
    page &amp;quot;http://example.com/&amp;quot;. In the admin.pl editor, he or she adds tid 3&lt;br /&gt;
    with weight 0. That by itself would remove both nexuses when the story&lt;br /&gt;
    saves, since the 0 would prohibit both child tids from propagating&lt;br /&gt;
    higher than tid 3 up to tid 1. Upon clicking Preview, the admin sees&lt;br /&gt;
    that &amp;quot;This story will not appear&amp;quot; (see admin.pl&lt;br /&gt;
    getDescForTopicsRendered()). So the admin also adds tid 1 -- any weight&lt;br /&gt;
    greater than 0 would do, but weight of 30 makes the most sense since the&lt;br /&gt;
    backend describes that as &amp;quot;Mainpageworthy.&amp;quot; Once this story is saved,&lt;br /&gt;
    its rows in story_topics_chosen are:&lt;br /&gt;
&lt;br /&gt;
            tid 1, weight 30&lt;br /&gt;
            tid 3, weight  0&lt;br /&gt;
            tid 4, weight 10&lt;br /&gt;
            tid 7, weight 10&lt;br /&gt;
&lt;br /&gt;
    and its rows in story_topics_rendered are:&lt;br /&gt;
&lt;br /&gt;
            tid 1, weight 30&lt;br /&gt;
            tid 4, weight 10&lt;br /&gt;
            tid 7, weight 10&lt;br /&gt;
&lt;br /&gt;
    Note that, as far as almost all of the code is concerned, the weight&lt;br /&gt;
    value in story_topics_rendered is irrelevant; only whether a row exists&lt;br /&gt;
    or not is noted. (This is why weight of 0 never appears in that table.)&lt;br /&gt;
&lt;br /&gt;
DISPLAY OPTIONS AND WEIGHTS&lt;br /&gt;
    So how are these values of weights 10 and 30 decided, and what are 20&lt;br /&gt;
    and 50 for?&lt;br /&gt;
&lt;br /&gt;
    Previously in Slash, there were three possible values for a story's&lt;br /&gt;
    displaystatus: Never Display, Section-Only, and Always Display.&lt;br /&gt;
    Section-Only meant to only display a story in its section's homepage,&lt;br /&gt;
    not the site's main page, and Always Display meant to display a story&lt;br /&gt;
    both places.&lt;br /&gt;
&lt;br /&gt;
    Now that a story may be part of more than one skin (the new term for&lt;br /&gt;
    &amp;quot;section&amp;quot;), that distinction is not so simple. While the method&lt;br /&gt;
    _displaystatus() will return an old-style displaystatus value for a&lt;br /&gt;
    story, this is for reverse compatibility and is deprecated. The proper&lt;br /&gt;
    question now takes two arguments instead of one: is a story to be&lt;br /&gt;
    displayed _in_ a particular skin.&lt;br /&gt;
&lt;br /&gt;
    The answer to that question is very simple; if a row exists in&lt;br /&gt;
    story_topics_rendered with the story's stoid and the topic's tid, then&lt;br /&gt;
    yes; otherwise, no.&lt;br /&gt;
&lt;br /&gt;
    To prevent everything from breaking at once, and to keep the backend&lt;br /&gt;
    story list looking much the same as it did before (white background for&lt;br /&gt;
    Always Display, light gray for Section-Only, dark gray for Never&lt;br /&gt;
    Display), the &amp;quot;mainpage skin&amp;quot; was created. Defined by the var&lt;br /&gt;
    mainpage_skid [sic, a skid is a skin's numeric primary key], this&lt;br /&gt;
    defines which skin a story must be in to be considered &amp;quot;Always Display.&amp;quot;&lt;br /&gt;
    It also defines which topic nexus will be colored blue instead of yellow&lt;br /&gt;
    in admin.pl?op=topictree (you will need GraphViz installed to see this;&lt;br /&gt;
    see plugins/Admin/README). Nevertheless, Slash is now well-equipped to&lt;br /&gt;
    run a website which consists of many subsites, at different URLs,&lt;br /&gt;
    perhaps only loosely networked and not necessarily with one central&lt;br /&gt;
    &amp;quot;main&amp;quot; page.&lt;br /&gt;
&lt;br /&gt;
    multiple skins and how index.pl uses stories.primaryskid&lt;br /&gt;
&lt;br /&gt;
    skins.cookiedomain and the cookiedomain var&lt;br /&gt;
&lt;br /&gt;
    the Topiclist&lt;br /&gt;
&lt;br /&gt;
    the topic chooser&lt;br /&gt;
&lt;br /&gt;
    no admin.pl interface to edit topic tree yet, but op=topictree (and&lt;br /&gt;
    GraphViz, see plugins/Admin/README)&lt;br /&gt;
&lt;br /&gt;
    suggestions for a clean topic tree (use min_weight 10 to connect&lt;br /&gt;
    many/most topics to logical categorizations, which could/should be&lt;br /&gt;
    nexuses, then connect those to mainpage with min_weight 30, finally&lt;br /&gt;
    bring loose topics to mainpage with min_weight 30)&lt;br /&gt;
&lt;br /&gt;
    utils/convertDBto200406&lt;br /&gt;
&lt;br /&gt;
    and _suggest and how it can be used to advise on a better topic tree&lt;br /&gt;
&lt;br /&gt;
    and _render which needs to be run&lt;br /&gt;
&lt;br /&gt;
VERSION&lt;br /&gt;
    $Id$&lt;br /&gt;
&lt;br /&gt;
[root@slashcode docs]#  &lt;br /&gt;
[root@slashcode docs]# ls&lt;br /&gt;
boilerplates          HOWTO-Themes.html   sectiontopics.txt  slashstyle.txt&lt;br /&gt;
dopods.plx            HOWTO-Themes.pod    slasherd.fig       slashtables.html&lt;br /&gt;
formkeys.txt          HOWTO-Themes.txt    slasherd.pdf       slashtables.pod&lt;br /&gt;
HOWTO-Plugins.html    INSTALL.pod         slasherd.ps        slashtables.txt&lt;br /&gt;
HOWTO-Plugins.pod     INSTALL.txt         slashguide.html    slashtags.html&lt;br /&gt;
HOWTO-Plugins.txt     README.pod          slashguide.pod     slashtags.pod&lt;br /&gt;
HOWTO-Templates.html  README.txt          slashguide.txt     slashtags.txt&lt;br /&gt;
HOWTO-Templates.pod   sectiontopics.html  slashstyle.html&lt;br /&gt;
HOWTO-Templates.txt   sectiontopics.pod   slashstyle.pod&lt;br /&gt;
[root@slashcode docs]# more sectiontopics.txt &lt;br /&gt;
NAME&lt;br /&gt;
    sectiontopics - Information about the section-topics rewrite, June 2004&lt;br /&gt;
&lt;br /&gt;
DESCRIPTION&lt;br /&gt;
    In June 2004, the way Slash handles categorization of stories into&lt;br /&gt;
    topics was changed. The confusing relationship between topics, sections,&lt;br /&gt;
    and subsections, which limited choices, was bolted on to the old system&lt;br /&gt;
    as our needs evolved.&lt;br /&gt;
&lt;br /&gt;
    The &amp;quot;section-topics&amp;quot; rewrite, as it's being called, took a look at those&lt;br /&gt;
    needs with the perspective of hindsight, and developed a new system&lt;br /&gt;
    which will be less confusing in the long run. It provides the&lt;br /&gt;
    flexibility that large sites' admins will need, while still retaining&lt;br /&gt;
    ease of use for smaller sites' admins.&lt;br /&gt;
&lt;br /&gt;
    This document attempts to explain the changes for Slash administrators,&lt;br /&gt;
    and it may be informative reading for Slash authors and editors too.&lt;br /&gt;
&lt;br /&gt;
CONCEPTS&lt;br /&gt;
    I'm not going to bother explaining exactly how the old system worked,&lt;br /&gt;
    because it's dead now. Suffice it to say that every story had one&lt;br /&gt;
    section and one or more topics, those being two distinct and disjoint&lt;br /&gt;
    categorizations. Subsections were invented to allow finer-grained&lt;br /&gt;
    control than what sections permitted, and there were ways to constrain&lt;br /&gt;
    certain topics to only being available in certain sections.&lt;br /&gt;
&lt;br /&gt;
    The &amp;quot;section&amp;quot; data type was always confused about whether it wanted to&lt;br /&gt;
    be a categorization and descriptor, or a visual display modifier. In&lt;br /&gt;
    other words, regarding an object that it was assigned to like a story,&lt;br /&gt;
    &amp;quot;section&amp;quot; implied facts about both its data and how it should be viewed.&lt;br /&gt;
    Being in the &amp;quot;Book Reviews&amp;quot; section on Slashdot, for example, implied&lt;br /&gt;
    that additional data like ISBN would be stored along with the rest of&lt;br /&gt;
    the story's data. Being in the &amp;quot;Developers&amp;quot; section meant that it would&lt;br /&gt;
    be grouped with other developer-related stories and that it would appear&lt;br /&gt;
    blue instead of green. If a story was a book review for developers,&lt;br /&gt;
    there was no way to put it in both places; having that blue color meant&lt;br /&gt;
    that no ISBN data could be stored.&lt;br /&gt;
&lt;br /&gt;
    So &amp;quot;section&amp;quot; has been split into two: &amp;quot;skin&amp;quot; and &amp;quot;nexus&amp;quot;. *Most* of the&lt;br /&gt;
    information that went with a section was used to describe appearances,&lt;br /&gt;
    and that went over to skin. So a skin now controls color (through the&lt;br /&gt;
    skin_colors table), it controls which templates are used (the final part&lt;br /&gt;
    of a template's three-part name is now skin, not section), and it&lt;br /&gt;
    controls with which other stories a story is grouped (on which index&lt;br /&gt;
    page). And the non-display aspects of sections -- mainly, the&lt;br /&gt;
    &amp;quot;section_extras&amp;quot; data which ensured that stories in Book Reviews stored&lt;br /&gt;
    a field for ISBN -- were sent over to nexuses.&lt;br /&gt;
&lt;br /&gt;
    Each skin has precisely one nexus; you can think of a skin as drawing&lt;br /&gt;
    its stories from its nexus. The clever part is that a nexus is just a&lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# cat sectiontopics.txt &lt;br /&gt;
NAME&lt;br /&gt;
    sectiontopics - Information about the section-topics rewrite, June 2004&lt;br /&gt;
&lt;br /&gt;
DESCRIPTION&lt;br /&gt;
    In June 2004, the way Slash handles categorization of stories into&lt;br /&gt;
    topics was changed. The confusing relationship between topics, sections,&lt;br /&gt;
    and subsections, which limited choices, was bolted on to the old system&lt;br /&gt;
    as our needs evolved.&lt;br /&gt;
&lt;br /&gt;
    The &amp;quot;section-topics&amp;quot; rewrite, as it's being called, took a look at those&lt;br /&gt;
    needs with the perspective of hindsight, and developed a new system&lt;br /&gt;
    which will be less confusing in the long run. It provides the&lt;br /&gt;
    flexibility that large sites' admins will need, while still retaining&lt;br /&gt;
    ease of use for smaller sites' admins.&lt;br /&gt;
&lt;br /&gt;
    This document attempts to explain the changes for Slash administrators,&lt;br /&gt;
    and it may be informative reading for Slash authors and editors too.&lt;br /&gt;
&lt;br /&gt;
CONCEPTS&lt;br /&gt;
    I'm not going to bother explaining exactly how the old system worked,&lt;br /&gt;
    because it's dead now. Suffice it to say that every story had one&lt;br /&gt;
    section and one or more topics, those being two distinct and disjoint&lt;br /&gt;
    categorizations. Subsections were invented to allow finer-grained&lt;br /&gt;
    control than what sections permitted, and there were ways to constrain&lt;br /&gt;
    certain topics to only being available in certain sections.&lt;br /&gt;
&lt;br /&gt;
    The &amp;quot;section&amp;quot; data type was always confused about whether it wanted to&lt;br /&gt;
    be a categorization and descriptor, or a visual display modifier. In&lt;br /&gt;
    other words, regarding an object that it was assigned to like a story,&lt;br /&gt;
    &amp;quot;section&amp;quot; implied facts about both its data and how it should be viewed.&lt;br /&gt;
    Being in the &amp;quot;Book Reviews&amp;quot; section on Slashdot, for example, implied&lt;br /&gt;
    that additional data like ISBN would be stored along with the rest of&lt;br /&gt;
    the story's data. Being in the &amp;quot;Developers&amp;quot; section meant that it would&lt;br /&gt;
    be grouped with other developer-related stories and that it would appear&lt;br /&gt;
    blue instead of green. If a story was a book review for developers,&lt;br /&gt;
    there was no way to put it in both places; having that blue color meant&lt;br /&gt;
    that no ISBN data could be stored.&lt;br /&gt;
&lt;br /&gt;
    So &amp;quot;section&amp;quot; has been split into two: &amp;quot;skin&amp;quot; and &amp;quot;nexus&amp;quot;. *Most* of the&lt;br /&gt;
    information that went with a section was used to describe appearances,&lt;br /&gt;
    and that went over to skin. So a skin now controls color (through the&lt;br /&gt;
    skin_colors table), it controls which templates are used (the final part&lt;br /&gt;
    of a template's three-part name is now skin, not section), and it&lt;br /&gt;
    controls with which other stories a story is grouped (on which index&lt;br /&gt;
    page). And the non-display aspects of sections -- mainly, the&lt;br /&gt;
    &amp;quot;section_extras&amp;quot; data which ensured that stories in Book Reviews stored&lt;br /&gt;
    a field for ISBN -- were sent over to nexuses.&lt;br /&gt;
&lt;br /&gt;
    Each skin has precisely one nexus; you can think of a skin as drawing&lt;br /&gt;
    its stories from its nexus. The clever part is that a nexus is just a&lt;br /&gt;
    special kind of topic (which we call a topic_nexus when we want to&lt;br /&gt;
    emphasize that it is both). So if a story has both the Developers&lt;br /&gt;
    topic_nexus, and the Book Reviews topic_nexus, then it will appear on&lt;br /&gt;
    both books.slashdot.org and developers.slashdot.org. And the additional&lt;br /&gt;
    data stored with the story will include the union of all the &amp;quot;extras&amp;quot;&lt;br /&gt;
    data -- not only ISBN and so on, but also any &amp;quot;extras&amp;quot; data that may be&lt;br /&gt;
    in the Developers nexus. There don't actually happen to be any extras&lt;br /&gt;
    for Developers on Slashdot, so maybe this isn't the best example, but if&lt;br /&gt;
    there were, a story that was categorized into both nexuses would include&lt;br /&gt;
    that data too.&lt;br /&gt;
&lt;br /&gt;
    Authors are no longer restricted from choosing any topic with any story.&lt;br /&gt;
    Since a nexus is a topic like any other, an author who wishes to make&lt;br /&gt;
    sure a story shows up in the Apple skin can pick the Apple nexus&lt;br /&gt;
    specifically. But what's more likely to happen is that an author will&lt;br /&gt;
    pick topics that make sense for the story (like &amp;quot;Mac OS X&amp;quot;) and that the&lt;br /&gt;
    weights assigned to those topics will propagate upwards into the correct&lt;br /&gt;
    nexus(es) where the story should appear.&lt;br /&gt;
&lt;br /&gt;
    Along the way, stories were given a numeric primary key (stoid), as were&lt;br /&gt;
    skins. Don't worry, a story's sid still works just as it did before; no&lt;br /&gt;
    Slash URLs are required to change, and in particular all the URLs (for&lt;br /&gt;
    search.pl and index.pl) that had &amp;quot;section=&amp;quot; as a parameter still do.&lt;br /&gt;
&lt;br /&gt;
WEIGHTS&lt;br /&gt;
    Each topic picked for a story now must have a weight assigned to it.&lt;br /&gt;
    Weights are floating-point non-negative numbers. The templates shipped&lt;br /&gt;
    with the stock theme assume that authors will be assigning only the&lt;br /&gt;
    weights 0, 10, 20, 30, 40, or 50, but the only weight value that the&lt;br /&gt;
    core code treats specially is 0 (which means &amp;quot;ignore this topic&amp;quot;). How&lt;br /&gt;
    positive weights affect the categorization of stories depends entirely&lt;br /&gt;
    on the topic_parents table.&lt;br /&gt;
&lt;br /&gt;
    Even in the old system, topics could be arranged into a tree -- but to&lt;br /&gt;
    properly represent section-specific topics one would have to layer&lt;br /&gt;
    additional data on top of the tree, confusing matters somewhat. Now,&lt;br /&gt;
    topics (including nexuses) really do form a tree, which is to say a&lt;br /&gt;
    directed graph. All topic-related data is loaded into a $slashd object&lt;br /&gt;
    at once, when getTopicTree is called.&lt;br /&gt;
&lt;br /&gt;
    One key difference between the old system and the new is that,&lt;br /&gt;
    previously, a topic had at most one parent. Now, a topic may have zero&lt;br /&gt;
    or more parents. This allows a topic of &amp;quot;Darwin&amp;quot; to be a child of both&lt;br /&gt;
    &amp;quot;Apple&amp;quot; and &amp;quot;BSD,&amp;quot; which conceptually means that it is a subcategory of&lt;br /&gt;
    both, and which practically means that assigning &amp;quot;Darwin&amp;quot; a weight will&lt;br /&gt;
    allow that weight to propagate up to both.&lt;br /&gt;
&lt;br /&gt;
RENDERING&lt;br /&gt;
    This process of weight-propagation occurs when chosen topics are&lt;br /&gt;
    rendered. Each parent-child relationship from one topic to another&lt;br /&gt;
    includes a minimum weight. For any given story, if topic T1 is assigned&lt;br /&gt;
    weight W, and topic T2 is the parent of T1 with min_weight M, then T2&lt;br /&gt;
    will also be assigned weight W for the story if, and only if, M &amp;lt;= W.&lt;br /&gt;
&lt;br /&gt;
    That assignment continues recursively (to topic T3, and so on) in a&lt;br /&gt;
    process called &amp;quot;rendering&amp;quot; -- performed by renderTopics(). A story&lt;br /&gt;
    author stores his or her topic/weight duples in the story_topics_chosen&lt;br /&gt;
    table, and at story save time, these choices are rendered into a&lt;br /&gt;
    (probably larger) collection of topic/weight duples that are stored in&lt;br /&gt;
    the story_topics_rendered table.&lt;br /&gt;
&lt;br /&gt;
    (The above rule describes most of what is involved in the rendering&lt;br /&gt;
    process. The other rules in the algorithm are that if multiple children&lt;br /&gt;
    of differing weights both propagate up to the same parent, the greater&lt;br /&gt;
    of those weights become the parent's; and that any topic's chosen&lt;br /&gt;
    weight, including a weight of 0, always overrides any weight propagating&lt;br /&gt;
    up from its children.)&lt;br /&gt;
&lt;br /&gt;
    Finally, when the collection of rendered topic/weight duples has been&lt;br /&gt;
    fully formed, all topics with weight 0 are dropped. Weight 0 can exist&lt;br /&gt;
    in chosen topics, but never in rendered topics.&lt;br /&gt;
&lt;br /&gt;
A SIMPLE EXAMPLE&lt;br /&gt;
    That may sound a bit complicated, so here's a description using the&lt;br /&gt;
    default topics and topic_parents included with the default &amp;quot;slashcode&amp;quot;&lt;br /&gt;
    theme:&lt;br /&gt;
&lt;br /&gt;
    tid 1: mainpage (also a nexus)&lt;br /&gt;
    tid 3: opensource (also a nexus)&lt;br /&gt;
    tid 4: slash&lt;br /&gt;
    tid 7: linux&lt;br /&gt;
&lt;br /&gt;
    Tid 4 has tid 3 as a parent, with that relationship having a min_weight&lt;br /&gt;
    of 10 associated with it.&lt;br /&gt;
&lt;br /&gt;
    Tid 7 also have tid 3 as a parent, with min_weight 10.&lt;br /&gt;
&lt;br /&gt;
    Tid 3 has tid 1 as a parent, with min_weight 30.&lt;br /&gt;
&lt;br /&gt;
    The skin at &amp;quot;http://example.com/&amp;quot; reads the nexus tid 1; the skin at&lt;br /&gt;
    &amp;quot;http://opensource.example.com/&amp;quot; reads the nexus tid 3.&lt;br /&gt;
&lt;br /&gt;
    Suppose an editor is working on a story about Slash and assigns it the&lt;br /&gt;
    topic &amp;quot;slash,&amp;quot; tid 4, with weight 10. Weight 10 is described as&lt;br /&gt;
    &amp;quot;Sectional only&amp;quot; in the code. When that story is saved, renderTopics&lt;br /&gt;
    recursively propagates the weight of its topics, or in this case its&lt;br /&gt;
    single topic, up to parents, or in this case parent. Rendering adds tid&lt;br /&gt;
    3, also at weight 10. It does not add tid 1 since !(10 &amp;gt;= 30). The story&lt;br /&gt;
    thus will appear only on &amp;quot;http://opensource.example.com/&amp;quot; and not&lt;br /&gt;
    &amp;quot;http://example.com/&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
    Now suppose the editor re-edits the story, adding important information&lt;br /&gt;
    about Linux. He or she at that point adds the Linux tid 7 with a weight&lt;br /&gt;
    of 30. Now when it is saved, tid 1 is added since 30 &amp;gt;= 30. Now the&lt;br /&gt;
    story will appear at both URLs.&lt;br /&gt;
&lt;br /&gt;
    Now suppose the editor is instructed that this story must be removed&lt;br /&gt;
    from &amp;quot;http://opensource.example.com/&amp;quot;, though it should stay on the main&lt;br /&gt;
    page &amp;quot;http://example.com/&amp;quot;. In the admin.pl editor, he or she adds tid 3&lt;br /&gt;
    with weight 0. That by itself would remove both nexuses when the story&lt;br /&gt;
    saves, since the 0 would prohibit both child tids from propagating&lt;br /&gt;
    higher than tid 3 up to tid 1. Upon clicking Preview, the admin sees&lt;br /&gt;
    that &amp;quot;This story will not appear&amp;quot; (see admin.pl&lt;br /&gt;
    getDescForTopicsRendered()). So the admin also adds tid 1 -- any weight&lt;br /&gt;
    greater than 0 would do, but weight of 30 makes the most sense since the&lt;br /&gt;
    backend describes that as &amp;quot;Mainpageworthy.&amp;quot; Once this story is saved,&lt;br /&gt;
    its rows in story_topics_chosen are:&lt;br /&gt;
&lt;br /&gt;
            tid 1, weight 30&lt;br /&gt;
            tid 3, weight  0&lt;br /&gt;
            tid 4, weight 10&lt;br /&gt;
            tid 7, weight 10&lt;br /&gt;
&lt;br /&gt;
    and its rows in story_topics_rendered are:&lt;br /&gt;
&lt;br /&gt;
            tid 1, weight 30&lt;br /&gt;
            tid 4, weight 10&lt;br /&gt;
            tid 7, weight 10&lt;br /&gt;
&lt;br /&gt;
    Note that, as far as almost all of the code is concerned, the weight&lt;br /&gt;
    value in story_topics_rendered is irrelevant; only whether a row exists&lt;br /&gt;
    or not is noted. (This is why weight of 0 never appears in that table.)&lt;br /&gt;
&lt;br /&gt;
DISPLAY OPTIONS AND WEIGHTS&lt;br /&gt;
    So how are these values of weights 10 and 30 decided, and what are 20&lt;br /&gt;
    and 50 for?&lt;br /&gt;
&lt;br /&gt;
    Previously in Slash, there were three possible values for a story's&lt;br /&gt;
    displaystatus: Never Display, Section-Only, and Always Display.&lt;br /&gt;
    Section-Only meant to only display a story in its section's homepage,&lt;br /&gt;
    not the site's main page, and Always Display meant to display a story&lt;br /&gt;
    both places.&lt;br /&gt;
&lt;br /&gt;
    Now that a story may be part of more than one skin (the new term for&lt;br /&gt;
    &amp;quot;section&amp;quot;), that distinction is not so simple. While the method&lt;br /&gt;
    _displaystatus() will return an old-style displaystatus value for a&lt;br /&gt;
    story, this is for reverse compatibility and is deprecated. The proper&lt;br /&gt;
    question now takes two arguments instead of one: is a story to be&lt;br /&gt;
    displayed _in_ a particular skin.&lt;br /&gt;
&lt;br /&gt;
    The answer to that question is very simple; if a row exists in&lt;br /&gt;
    story_topics_rendered with the story's stoid and the topic's tid, then&lt;br /&gt;
    yes; otherwise, no.&lt;br /&gt;
&lt;br /&gt;
    To prevent everything from breaking at once, and to keep the backend&lt;br /&gt;
    story list looking much the same as it did before (white background for&lt;br /&gt;
    Always Display, light gray for Section-Only, dark gray for Never&lt;br /&gt;
    Display), the &amp;quot;mainpage skin&amp;quot; was created. Defined by the var&lt;br /&gt;
    mainpage_skid [sic, a skid is a skin's numeric primary key], this&lt;br /&gt;
    defines which skin a story must be in to be considered &amp;quot;Always Display.&amp;quot;&lt;br /&gt;
    It also defines which topic nexus will be colored blue instead of yellow&lt;br /&gt;
    in admin.pl?op=topictree (you will need GraphViz installed to see this;&lt;br /&gt;
    see plugins/Admin/README). Nevertheless, Slash is now well-equipped to&lt;br /&gt;
    run a website which consists of many subsites, at different URLs,&lt;br /&gt;
    perhaps only loosely networked and not necessarily with one central&lt;br /&gt;
    &amp;quot;main&amp;quot; page.&lt;br /&gt;
&lt;br /&gt;
    multiple skins and how index.pl uses stories.primaryskid&lt;br /&gt;
&lt;br /&gt;
    skins.cookiedomain and the cookiedomain var&lt;br /&gt;
&lt;br /&gt;
    the Topiclist&lt;br /&gt;
&lt;br /&gt;
    the topic chooser&lt;br /&gt;
&lt;br /&gt;
    no admin.pl interface to edit topic tree yet, but op=topictree (and&lt;br /&gt;
    GraphViz, see plugins/Admin/README)&lt;br /&gt;
&lt;br /&gt;
    suggestions for a clean topic tree (use min_weight 10 to connect&lt;br /&gt;
    many/most topics to logical categorizations, which could/should be&lt;br /&gt;
    nexuses, then connect those to mainpage with min_weight 30, finally&lt;br /&gt;
    bring loose topics to mainpage with min_weight 30)&lt;br /&gt;
&lt;br /&gt;
    utils/convertDBto200406&lt;br /&gt;
&lt;br /&gt;
    and _suggest and how it can be used to advise on a better topic tree&lt;br /&gt;
&lt;br /&gt;
    and _render which needs to be run&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=SectionTopics&amp;diff=5304</id>
		<title>SectionTopics</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=SectionTopics&amp;diff=5304"/>
		<updated>2014-02-28T21:55:07Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: Created page with &amp;quot; NAME     sectiontopics - Information about the section-topics rewrite, June 2004  DESCRIPTION     In June 2004, the way Slash handles categorization of stories into     topic...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
NAME&lt;br /&gt;
    sectiontopics - Information about the section-topics rewrite, June 2004&lt;br /&gt;
&lt;br /&gt;
DESCRIPTION&lt;br /&gt;
    In June 2004, the way Slash handles categorization of stories into&lt;br /&gt;
    topics was changed. The confusing relationship between topics, sections,&lt;br /&gt;
    and subsections, which limited choices, was bolted on to the old system&lt;br /&gt;
    as our needs evolved.&lt;br /&gt;
&lt;br /&gt;
    The &amp;quot;section-topics&amp;quot; rewrite, as it's being called, took a look at those&lt;br /&gt;
    needs with the perspective of hindsight, and developed a new system&lt;br /&gt;
    which will be less confusing in the long run. It provides the&lt;br /&gt;
    flexibility that large sites' admins will need, while still retaining&lt;br /&gt;
    ease of use for smaller sites' admins.&lt;br /&gt;
&lt;br /&gt;
    This document attempts to explain the changes for Slash administrators,&lt;br /&gt;
    and it may be informative reading for Slash authors and editors too.&lt;br /&gt;
&lt;br /&gt;
CONCEPTS&lt;br /&gt;
    I'm not going to bother explaining exactly how the old system worked,&lt;br /&gt;
    because it's dead now. Suffice it to say that every story had one&lt;br /&gt;
    section and one or more topics, those being two distinct and disjoint&lt;br /&gt;
    categorizations. Subsections were invented to allow finer-grained&lt;br /&gt;
    control than what sections permitted, and there were ways to constrain&lt;br /&gt;
    certain topics to only being available in certain sections.&lt;br /&gt;
&lt;br /&gt;
    The &amp;quot;section&amp;quot; data type was always confused about whether it wanted to&lt;br /&gt;
    be a categorization and descriptor, or a visual display modifier. In&lt;br /&gt;
    other words, regarding an object that it was assigned to like a story,&lt;br /&gt;
    &amp;quot;section&amp;quot; implied facts about both its data and how it should be viewed.&lt;br /&gt;
    Being in the &amp;quot;Book Reviews&amp;quot; section on Slashdot, for example, implied&lt;br /&gt;
    that additional data like ISBN would be stored along with the rest of&lt;br /&gt;
    the story's data. Being in the &amp;quot;Developers&amp;quot; section meant that it would&lt;br /&gt;
    be grouped with other developer-related stories and that it would appear&lt;br /&gt;
    blue instead of green. If a story was a book review for developers,&lt;br /&gt;
    there was no way to put it in both places; having that blue color meant&lt;br /&gt;
    that no ISBN data could be stored.&lt;br /&gt;
&lt;br /&gt;
    So &amp;quot;section&amp;quot; has been split into two: &amp;quot;skin&amp;quot; and &amp;quot;nexus&amp;quot;. *Most* of the&lt;br /&gt;
    information that went with a section was used to describe appearances,&lt;br /&gt;
    and that went over to skin. So a skin now controls color (through the&lt;br /&gt;
    skin_colors table), it controls which templates are used (the final part&lt;br /&gt;
    of a template's three-part name is now skin, not section), and it&lt;br /&gt;
    controls with which other stories a story is grouped (on which index&lt;br /&gt;
    page). And the non-display aspects of sections -- mainly, the&lt;br /&gt;
    &amp;quot;section_extras&amp;quot; data which ensured that stories in Book Reviews stored&lt;br /&gt;
    a field for ISBN -- were sent over to nexuses.&lt;br /&gt;
&lt;br /&gt;
    Each skin has precisely one nexus; you can think of a skin as drawing&lt;br /&gt;
    its stories from its nexus. The clever part is that a nexus is just a&lt;br /&gt;
    special kind of topic (which we call a topic_nexus when we want to&lt;br /&gt;
    emphasize that it is both). So if a story has both the Developers&lt;br /&gt;
    topic_nexus, and the Book Reviews topic_nexus, then it will appear on&lt;br /&gt;
    both books.slashdot.org and developers.slashdot.org. And the additional&lt;br /&gt;
    data stored with the story will include the union of all the &amp;quot;extras&amp;quot;&lt;br /&gt;
    data -- not only ISBN and so on, but also any &amp;quot;extras&amp;quot; data that may be&lt;br /&gt;
    in the Developers nexus. There don't actually happen to be any extras&lt;br /&gt;
    for Developers on Slashdot, so maybe this isn't the best example, but if&lt;br /&gt;
    there were, a story that was categorized into both nexuses would include&lt;br /&gt;
    that data too.&lt;br /&gt;
&lt;br /&gt;
    Authors are no longer restricted from choosing any topic with any story.&lt;br /&gt;
    Since a nexus is a topic like any other, an author who wishes to make&lt;br /&gt;
    sure a story shows up in the Apple skin can pick the Apple nexus&lt;br /&gt;
    specifically. But what's more likely to happen is that an author will&lt;br /&gt;
    pick topics that make sense for the story (like &amp;quot;Mac OS X&amp;quot;) and that the&lt;br /&gt;
    weights assigned to those topics will propagate upwards into the correct&lt;br /&gt;
    nexus(es) where the story should appear.&lt;br /&gt;
&lt;br /&gt;
    Along the way, stories were given a numeric primary key (stoid), as were&lt;br /&gt;
    skins. Don't worry, a story's sid still works just as it did before; no&lt;br /&gt;
    Slash URLs are required to change, and in particular all the URLs (for&lt;br /&gt;
    search.pl and index.pl) that had &amp;quot;section=&amp;quot; as a parameter still do.&lt;br /&gt;
&lt;br /&gt;
WEIGHTS&lt;br /&gt;
    Each topic picked for a story now must have a weight assigned to it.&lt;br /&gt;
    Weights are floating-point non-negative numbers. The templates shipped&lt;br /&gt;
    with the stock theme assume that authors will be assigning only the&lt;br /&gt;
    weights 0, 10, 20, 30, 40, or 50, but the only weight value that the&lt;br /&gt;
    core code treats specially is 0 (which means &amp;quot;ignore this topic&amp;quot;). How&lt;br /&gt;
    positive weights affect the categorization of stories depends entirely&lt;br /&gt;
    on the topic_parents table.&lt;br /&gt;
&lt;br /&gt;
    Even in the old system, topics could be arranged into a tree -- but to&lt;br /&gt;
    properly represent section-specific topics one would have to layer&lt;br /&gt;
    additional data on top of the tree, confusing matters somewhat. Now,&lt;br /&gt;
    topics (including nexuses) really do form a tree, which is to say a&lt;br /&gt;
    directed graph. All topic-related data is loaded into a $slashd object&lt;br /&gt;
    at once, when getTopicTree is called.&lt;br /&gt;
&lt;br /&gt;
    One key difference between the old system and the new is that,&lt;br /&gt;
    previously, a topic had at most one parent. Now, a topic may have zero&lt;br /&gt;
    or more parents. This allows a topic of &amp;quot;Darwin&amp;quot; to be a child of both&lt;br /&gt;
    &amp;quot;Apple&amp;quot; and &amp;quot;BSD,&amp;quot; which conceptually means that it is a subcategory of&lt;br /&gt;
    both, and which practically means that assigning &amp;quot;Darwin&amp;quot; a weight will&lt;br /&gt;
    allow that weight to propagate up to both.&lt;br /&gt;
&lt;br /&gt;
RENDERING&lt;br /&gt;
    This process of weight-propagation occurs when chosen topics are&lt;br /&gt;
    rendered. Each parent-child relationship from one topic to another&lt;br /&gt;
    includes a minimum weight. For any given story, if topic T1 is assigned&lt;br /&gt;
    weight W, and topic T2 is the parent of T1 with min_weight M, then T2&lt;br /&gt;
    will also be assigned weight W for the story if, and only if, M &amp;lt;= W.&lt;br /&gt;
&lt;br /&gt;
    That assignment continues recursively (to topic T3, and so on) in a&lt;br /&gt;
    process called &amp;quot;rendering&amp;quot; -- performed by renderTopics(). A story&lt;br /&gt;
    author stores his or her topic/weight duples in the story_topics_chosen&lt;br /&gt;
    table, and at story save time, these choices are rendered into a&lt;br /&gt;
    (probably larger) collection of topic/weight duples that are stored in&lt;br /&gt;
    the story_topics_rendered table.&lt;br /&gt;
&lt;br /&gt;
    (The above rule describes most of what is involved in the rendering&lt;br /&gt;
    process. The other rules in the algorithm are that if multiple children&lt;br /&gt;
    of differing weights both propagate up to the same parent, the greater&lt;br /&gt;
    of those weights become the parent's; and that any topic's chosen&lt;br /&gt;
    weight, including a weight of 0, always overrides any weight propagating&lt;br /&gt;
    up from its children.)&lt;br /&gt;
&lt;br /&gt;
    Finally, when the collection of rendered topic/weight duples has been&lt;br /&gt;
    fully formed, all topics with weight 0 are dropped. Weight 0 can exist&lt;br /&gt;
    in chosen topics, but never in rendered topics.&lt;br /&gt;
&lt;br /&gt;
A SIMPLE EXAMPLE&lt;br /&gt;
    That may sound a bit complicated, so here's a description using the&lt;br /&gt;
    default topics and topic_parents included with the default &amp;quot;slashcode&amp;quot;&lt;br /&gt;
    theme:&lt;br /&gt;
&lt;br /&gt;
    tid 1: mainpage (also a nexus)&lt;br /&gt;
    tid 3: opensource (also a nexus)&lt;br /&gt;
    tid 4: slash&lt;br /&gt;
    tid 7: linux&lt;br /&gt;
&lt;br /&gt;
    Tid 4 has tid 3 as a parent, with that relationship having a min_weight&lt;br /&gt;
    of 10 associated with it.&lt;br /&gt;
&lt;br /&gt;
    Tid 7 also have tid 3 as a parent, with min_weight 10.&lt;br /&gt;
&lt;br /&gt;
    Tid 3 has tid 1 as a parent, with min_weight 30.&lt;br /&gt;
&lt;br /&gt;
    The skin at &amp;quot;http://example.com/&amp;quot; reads the nexus tid 1; the skin at&lt;br /&gt;
    &amp;quot;http://opensource.example.com/&amp;quot; reads the nexus tid 3.&lt;br /&gt;
&lt;br /&gt;
    Suppose an editor is working on a story about Slash and assigns it the&lt;br /&gt;
    topic &amp;quot;slash,&amp;quot; tid 4, with weight 10. Weight 10 is described as&lt;br /&gt;
    &amp;quot;Sectional only&amp;quot; in the code. When that story is saved, renderTopics&lt;br /&gt;
    recursively propagates the weight of its topics, or in this case its&lt;br /&gt;
    single topic, up to parents, or in this case parent. Rendering adds tid&lt;br /&gt;
    3, also at weight 10. It does not add tid 1 since !(10 &amp;gt;= 30). The story&lt;br /&gt;
    thus will appear only on &amp;quot;http://opensource.example.com/&amp;quot; and not&lt;br /&gt;
    &amp;quot;http://example.com/&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
    Now suppose the editor re-edits the story, adding important information&lt;br /&gt;
    about Linux. He or she at that point adds the Linux tid 7 with a weight&lt;br /&gt;
    of 30. Now when it is saved, tid 1 is added since 30 &amp;gt;= 30. Now the&lt;br /&gt;
    story will appear at both URLs.&lt;br /&gt;
&lt;br /&gt;
    Now suppose the editor is instructed that this story must be removed&lt;br /&gt;
    from &amp;quot;http://opensource.example.com/&amp;quot;, though it should stay on the main&lt;br /&gt;
    page &amp;quot;http://example.com/&amp;quot;. In the admin.pl editor, he or she adds tid 3&lt;br /&gt;
    with weight 0. That by itself would remove both nexuses when the story&lt;br /&gt;
    saves, since the 0 would prohibit both child tids from propagating&lt;br /&gt;
    higher than tid 3 up to tid 1. Upon clicking Preview, the admin sees&lt;br /&gt;
    that &amp;quot;This story will not appear&amp;quot; (see admin.pl&lt;br /&gt;
    getDescForTopicsRendered()). So the admin also adds tid 1 -- any weight&lt;br /&gt;
    greater than 0 would do, but weight of 30 makes the most sense since the&lt;br /&gt;
    backend describes that as &amp;quot;Mainpageworthy.&amp;quot; Once this story is saved,&lt;br /&gt;
    its rows in story_topics_chosen are:&lt;br /&gt;
&lt;br /&gt;
            tid 1, weight 30&lt;br /&gt;
            tid 3, weight  0&lt;br /&gt;
            tid 4, weight 10&lt;br /&gt;
            tid 7, weight 10&lt;br /&gt;
&lt;br /&gt;
    and its rows in story_topics_rendered are:&lt;br /&gt;
&lt;br /&gt;
            tid 1, weight 30&lt;br /&gt;
            tid 4, weight 10&lt;br /&gt;
            tid 7, weight 10&lt;br /&gt;
&lt;br /&gt;
    Note that, as far as almost all of the code is concerned, the weight&lt;br /&gt;
    value in story_topics_rendered is irrelevant; only whether a row exists&lt;br /&gt;
    or not is noted. (This is why weight of 0 never appears in that table.)&lt;br /&gt;
&lt;br /&gt;
DISPLAY OPTIONS AND WEIGHTS&lt;br /&gt;
    So how are these values of weights 10 and 30 decided, and what are 20&lt;br /&gt;
    and 50 for?&lt;br /&gt;
&lt;br /&gt;
    Previously in Slash, there were three possible values for a story's&lt;br /&gt;
    displaystatus: Never Display, Section-Only, and Always Display.&lt;br /&gt;
    Section-Only meant to only display a story in its section's homepage,&lt;br /&gt;
    not the site's main page, and Always Display meant to display a story&lt;br /&gt;
    both places.&lt;br /&gt;
&lt;br /&gt;
    Now that a story may be part of more than one skin (the new term for&lt;br /&gt;
    &amp;quot;section&amp;quot;), that distinction is not so simple. While the method&lt;br /&gt;
    _displaystatus() will return an old-style displaystatus value for a&lt;br /&gt;
    story, this is for reverse compatibility and is deprecated. The proper&lt;br /&gt;
    question now takes two arguments instead of one: is a story to be&lt;br /&gt;
    displayed _in_ a particular skin.&lt;br /&gt;
&lt;br /&gt;
    The answer to that question is very simple; if a row exists in&lt;br /&gt;
    story_topics_rendered with the story's stoid and the topic's tid, then&lt;br /&gt;
    yes; otherwise, no.&lt;br /&gt;
&lt;br /&gt;
    To prevent everything from breaking at once, and to keep the backend&lt;br /&gt;
    story list looking much the same as it did before (white background for&lt;br /&gt;
    Always Display, light gray for Section-Only, dark gray for Never&lt;br /&gt;
    Display), the &amp;quot;mainpage skin&amp;quot; was created. Defined by the var&lt;br /&gt;
    mainpage_skid [sic, a skid is a skin's numeric primary key], this&lt;br /&gt;
    defines which skin a story must be in to be considered &amp;quot;Always Display.&amp;quot;&lt;br /&gt;
    It also defines which topic nexus will be colored blue instead of yellow&lt;br /&gt;
    in admin.pl?op=topictree (you will need GraphViz installed to see this;&lt;br /&gt;
    see plugins/Admin/README). Nevertheless, Slash is now well-equipped to&lt;br /&gt;
    run a website which consists of many subsites, at different URLs,&lt;br /&gt;
    perhaps only loosely networked and not necessarily with one central&lt;br /&gt;
    &amp;quot;main&amp;quot; page.&lt;br /&gt;
&lt;br /&gt;
    multiple skins and how index.pl uses stories.primaryskid&lt;br /&gt;
&lt;br /&gt;
    skins.cookiedomain and the cookiedomain var&lt;br /&gt;
&lt;br /&gt;
    the Topiclist&lt;br /&gt;
&lt;br /&gt;
    the topic chooser&lt;br /&gt;
&lt;br /&gt;
    no admin.pl interface to edit topic tree yet, but op=topictree (and&lt;br /&gt;
    GraphViz, see plugins/Admin/README)&lt;br /&gt;
&lt;br /&gt;
    suggestions for a clean topic tree (use min_weight 10 to connect&lt;br /&gt;
    many/most topics to logical categorizations, which could/should be&lt;br /&gt;
    nexuses, then connect those to mainpage with min_weight 30, finally&lt;br /&gt;
    bring loose topics to mainpage with min_weight 30)&lt;br /&gt;
&lt;br /&gt;
    utils/convertDBto200406&lt;br /&gt;
&lt;br /&gt;
    and _suggest and how it can be used to advise on a better topic tree&lt;br /&gt;
&lt;br /&gt;
    and _render which needs to be run&lt;br /&gt;
&lt;br /&gt;
VERSION&lt;br /&gt;
    $Id$&lt;br /&gt;
&lt;br /&gt;
[root@slashcode docs]#  &lt;br /&gt;
[root@slashcode docs]# ls&lt;br /&gt;
boilerplates          HOWTO-Themes.html   sectiontopics.txt  slashstyle.txt&lt;br /&gt;
dopods.plx            HOWTO-Themes.pod    slasherd.fig       slashtables.html&lt;br /&gt;
formkeys.txt          HOWTO-Themes.txt    slasherd.pdf       slashtables.pod&lt;br /&gt;
HOWTO-Plugins.html    INSTALL.pod         slasherd.ps        slashtables.txt&lt;br /&gt;
HOWTO-Plugins.pod     INSTALL.txt         slashguide.html    slashtags.html&lt;br /&gt;
HOWTO-Plugins.txt     README.pod          slashguide.pod     slashtags.pod&lt;br /&gt;
HOWTO-Templates.html  README.txt          slashguide.txt     slashtags.txt&lt;br /&gt;
HOWTO-Templates.pod   sectiontopics.html  slashstyle.html&lt;br /&gt;
HOWTO-Templates.txt   sectiontopics.pod   slashstyle.pod&lt;br /&gt;
[root@slashcode docs]# more sectiontopics.txt &lt;br /&gt;
NAME&lt;br /&gt;
    sectiontopics - Information about the section-topics rewrite, June 2004&lt;br /&gt;
&lt;br /&gt;
DESCRIPTION&lt;br /&gt;
    In June 2004, the way Slash handles categorization of stories into&lt;br /&gt;
    topics was changed. The confusing relationship between topics, sections,&lt;br /&gt;
    and subsections, which limited choices, was bolted on to the old system&lt;br /&gt;
    as our needs evolved.&lt;br /&gt;
&lt;br /&gt;
    The &amp;quot;section-topics&amp;quot; rewrite, as it's being called, took a look at those&lt;br /&gt;
    needs with the perspective of hindsight, and developed a new system&lt;br /&gt;
    which will be less confusing in the long run. It provides the&lt;br /&gt;
    flexibility that large sites' admins will need, while still retaining&lt;br /&gt;
    ease of use for smaller sites' admins.&lt;br /&gt;
&lt;br /&gt;
    This document attempts to explain the changes for Slash administrators,&lt;br /&gt;
    and it may be informative reading for Slash authors and editors too.&lt;br /&gt;
&lt;br /&gt;
CONCEPTS&lt;br /&gt;
    I'm not going to bother explaining exactly how the old system worked,&lt;br /&gt;
    because it's dead now. Suffice it to say that every story had one&lt;br /&gt;
    section and one or more topics, those being two distinct and disjoint&lt;br /&gt;
    categorizations. Subsections were invented to allow finer-grained&lt;br /&gt;
    control than what sections permitted, and there were ways to constrain&lt;br /&gt;
    certain topics to only being available in certain sections.&lt;br /&gt;
&lt;br /&gt;
    The &amp;quot;section&amp;quot; data type was always confused about whether it wanted to&lt;br /&gt;
    be a categorization and descriptor, or a visual display modifier. In&lt;br /&gt;
    other words, regarding an object that it was assigned to like a story,&lt;br /&gt;
    &amp;quot;section&amp;quot; implied facts about both its data and how it should be viewed.&lt;br /&gt;
    Being in the &amp;quot;Book Reviews&amp;quot; section on Slashdot, for example, implied&lt;br /&gt;
    that additional data like ISBN would be stored along with the rest of&lt;br /&gt;
    the story's data. Being in the &amp;quot;Developers&amp;quot; section meant that it would&lt;br /&gt;
    be grouped with other developer-related stories and that it would appear&lt;br /&gt;
    blue instead of green. If a story was a book review for developers,&lt;br /&gt;
    there was no way to put it in both places; having that blue color meant&lt;br /&gt;
    that no ISBN data could be stored.&lt;br /&gt;
&lt;br /&gt;
    So &amp;quot;section&amp;quot; has been split into two: &amp;quot;skin&amp;quot; and &amp;quot;nexus&amp;quot;. *Most* of the&lt;br /&gt;
    information that went with a section was used to describe appearances,&lt;br /&gt;
    and that went over to skin. So a skin now controls color (through the&lt;br /&gt;
    skin_colors table), it controls which templates are used (the final part&lt;br /&gt;
    of a template's three-part name is now skin, not section), and it&lt;br /&gt;
    controls with which other stories a story is grouped (on which index&lt;br /&gt;
    page). And the non-display aspects of sections -- mainly, the&lt;br /&gt;
    &amp;quot;section_extras&amp;quot; data which ensured that stories in Book Reviews stored&lt;br /&gt;
    a field for ISBN -- were sent over to nexuses.&lt;br /&gt;
&lt;br /&gt;
    Each skin has precisely one nexus; you can think of a skin as drawing&lt;br /&gt;
    its stories from its nexus. The clever part is that a nexus is just a&lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# &lt;br /&gt;
[root@slashcode docs]# cat sectiontopics.txt &lt;br /&gt;
NAME&lt;br /&gt;
    sectiontopics - Information about the section-topics rewrite, June 2004&lt;br /&gt;
&lt;br /&gt;
DESCRIPTION&lt;br /&gt;
    In June 2004, the way Slash handles categorization of stories into&lt;br /&gt;
    topics was changed. The confusing relationship between topics, sections,&lt;br /&gt;
    and subsections, which limited choices, was bolted on to the old system&lt;br /&gt;
    as our needs evolved.&lt;br /&gt;
&lt;br /&gt;
    The &amp;quot;section-topics&amp;quot; rewrite, as it's being called, took a look at those&lt;br /&gt;
    needs with the perspective of hindsight, and developed a new system&lt;br /&gt;
    which will be less confusing in the long run. It provides the&lt;br /&gt;
    flexibility that large sites' admins will need, while still retaining&lt;br /&gt;
    ease of use for smaller sites' admins.&lt;br /&gt;
&lt;br /&gt;
    This document attempts to explain the changes for Slash administrators,&lt;br /&gt;
    and it may be informative reading for Slash authors and editors too.&lt;br /&gt;
&lt;br /&gt;
CONCEPTS&lt;br /&gt;
    I'm not going to bother explaining exactly how the old system worked,&lt;br /&gt;
    because it's dead now. Suffice it to say that every story had one&lt;br /&gt;
    section and one or more topics, those being two distinct and disjoint&lt;br /&gt;
    categorizations. Subsections were invented to allow finer-grained&lt;br /&gt;
    control than what sections permitted, and there were ways to constrain&lt;br /&gt;
    certain topics to only being available in certain sections.&lt;br /&gt;
&lt;br /&gt;
    The &amp;quot;section&amp;quot; data type was always confused about whether it wanted to&lt;br /&gt;
    be a categorization and descriptor, or a visual display modifier. In&lt;br /&gt;
    other words, regarding an object that it was assigned to like a story,&lt;br /&gt;
    &amp;quot;section&amp;quot; implied facts about both its data and how it should be viewed.&lt;br /&gt;
    Being in the &amp;quot;Book Reviews&amp;quot; section on Slashdot, for example, implied&lt;br /&gt;
    that additional data like ISBN would be stored along with the rest of&lt;br /&gt;
    the story's data. Being in the &amp;quot;Developers&amp;quot; section meant that it would&lt;br /&gt;
    be grouped with other developer-related stories and that it would appear&lt;br /&gt;
    blue instead of green. If a story was a book review for developers,&lt;br /&gt;
    there was no way to put it in both places; having that blue color meant&lt;br /&gt;
    that no ISBN data could be stored.&lt;br /&gt;
&lt;br /&gt;
    So &amp;quot;section&amp;quot; has been split into two: &amp;quot;skin&amp;quot; and &amp;quot;nexus&amp;quot;. *Most* of the&lt;br /&gt;
    information that went with a section was used to describe appearances,&lt;br /&gt;
    and that went over to skin. So a skin now controls color (through the&lt;br /&gt;
    skin_colors table), it controls which templates are used (the final part&lt;br /&gt;
    of a template's three-part name is now skin, not section), and it&lt;br /&gt;
    controls with which other stories a story is grouped (on which index&lt;br /&gt;
    page). And the non-display aspects of sections -- mainly, the&lt;br /&gt;
    &amp;quot;section_extras&amp;quot; data which ensured that stories in Book Reviews stored&lt;br /&gt;
    a field for ISBN -- were sent over to nexuses.&lt;br /&gt;
&lt;br /&gt;
    Each skin has precisely one nexus; you can think of a skin as drawing&lt;br /&gt;
    its stories from its nexus. The clever part is that a nexus is just a&lt;br /&gt;
    special kind of topic (which we call a topic_nexus when we want to&lt;br /&gt;
    emphasize that it is both). So if a story has both the Developers&lt;br /&gt;
    topic_nexus, and the Book Reviews topic_nexus, then it will appear on&lt;br /&gt;
    both books.slashdot.org and developers.slashdot.org. And the additional&lt;br /&gt;
    data stored with the story will include the union of all the &amp;quot;extras&amp;quot;&lt;br /&gt;
    data -- not only ISBN and so on, but also any &amp;quot;extras&amp;quot; data that may be&lt;br /&gt;
    in the Developers nexus. There don't actually happen to be any extras&lt;br /&gt;
    for Developers on Slashdot, so maybe this isn't the best example, but if&lt;br /&gt;
    there were, a story that was categorized into both nexuses would include&lt;br /&gt;
    that data too.&lt;br /&gt;
&lt;br /&gt;
    Authors are no longer restricted from choosing any topic with any story.&lt;br /&gt;
    Since a nexus is a topic like any other, an author who wishes to make&lt;br /&gt;
    sure a story shows up in the Apple skin can pick the Apple nexus&lt;br /&gt;
    specifically. But what's more likely to happen is that an author will&lt;br /&gt;
    pick topics that make sense for the story (like &amp;quot;Mac OS X&amp;quot;) and that the&lt;br /&gt;
    weights assigned to those topics will propagate upwards into the correct&lt;br /&gt;
    nexus(es) where the story should appear.&lt;br /&gt;
&lt;br /&gt;
    Along the way, stories were given a numeric primary key (stoid), as were&lt;br /&gt;
    skins. Don't worry, a story's sid still works just as it did before; no&lt;br /&gt;
    Slash URLs are required to change, and in particular all the URLs (for&lt;br /&gt;
    search.pl and index.pl) that had &amp;quot;section=&amp;quot; as a parameter still do.&lt;br /&gt;
&lt;br /&gt;
WEIGHTS&lt;br /&gt;
    Each topic picked for a story now must have a weight assigned to it.&lt;br /&gt;
    Weights are floating-point non-negative numbers. The templates shipped&lt;br /&gt;
    with the stock theme assume that authors will be assigning only the&lt;br /&gt;
    weights 0, 10, 20, 30, 40, or 50, but the only weight value that the&lt;br /&gt;
    core code treats specially is 0 (which means &amp;quot;ignore this topic&amp;quot;). How&lt;br /&gt;
    positive weights affect the categorization of stories depends entirely&lt;br /&gt;
    on the topic_parents table.&lt;br /&gt;
&lt;br /&gt;
    Even in the old system, topics could be arranged into a tree -- but to&lt;br /&gt;
    properly represent section-specific topics one would have to layer&lt;br /&gt;
    additional data on top of the tree, confusing matters somewhat. Now,&lt;br /&gt;
    topics (including nexuses) really do form a tree, which is to say a&lt;br /&gt;
    directed graph. All topic-related data is loaded into a $slashd object&lt;br /&gt;
    at once, when getTopicTree is called.&lt;br /&gt;
&lt;br /&gt;
    One key difference between the old system and the new is that,&lt;br /&gt;
    previously, a topic had at most one parent. Now, a topic may have zero&lt;br /&gt;
    or more parents. This allows a topic of &amp;quot;Darwin&amp;quot; to be a child of both&lt;br /&gt;
    &amp;quot;Apple&amp;quot; and &amp;quot;BSD,&amp;quot; which conceptually means that it is a subcategory of&lt;br /&gt;
    both, and which practically means that assigning &amp;quot;Darwin&amp;quot; a weight will&lt;br /&gt;
    allow that weight to propagate up to both.&lt;br /&gt;
&lt;br /&gt;
RENDERING&lt;br /&gt;
    This process of weight-propagation occurs when chosen topics are&lt;br /&gt;
    rendered. Each parent-child relationship from one topic to another&lt;br /&gt;
    includes a minimum weight. For any given story, if topic T1 is assigned&lt;br /&gt;
    weight W, and topic T2 is the parent of T1 with min_weight M, then T2&lt;br /&gt;
    will also be assigned weight W for the story if, and only if, M &amp;lt;= W.&lt;br /&gt;
&lt;br /&gt;
    That assignment continues recursively (to topic T3, and so on) in a&lt;br /&gt;
    process called &amp;quot;rendering&amp;quot; -- performed by renderTopics(). A story&lt;br /&gt;
    author stores his or her topic/weight duples in the story_topics_chosen&lt;br /&gt;
    table, and at story save time, these choices are rendered into a&lt;br /&gt;
    (probably larger) collection of topic/weight duples that are stored in&lt;br /&gt;
    the story_topics_rendered table.&lt;br /&gt;
&lt;br /&gt;
    (The above rule describes most of what is involved in the rendering&lt;br /&gt;
    process. The other rules in the algorithm are that if multiple children&lt;br /&gt;
    of differing weights both propagate up to the same parent, the greater&lt;br /&gt;
    of those weights become the parent's; and that any topic's chosen&lt;br /&gt;
    weight, including a weight of 0, always overrides any weight propagating&lt;br /&gt;
    up from its children.)&lt;br /&gt;
&lt;br /&gt;
    Finally, when the collection of rendered topic/weight duples has been&lt;br /&gt;
    fully formed, all topics with weight 0 are dropped. Weight 0 can exist&lt;br /&gt;
    in chosen topics, but never in rendered topics.&lt;br /&gt;
&lt;br /&gt;
A SIMPLE EXAMPLE&lt;br /&gt;
    That may sound a bit complicated, so here's a description using the&lt;br /&gt;
    default topics and topic_parents included with the default &amp;quot;slashcode&amp;quot;&lt;br /&gt;
    theme:&lt;br /&gt;
&lt;br /&gt;
    tid 1: mainpage (also a nexus)&lt;br /&gt;
    tid 3: opensource (also a nexus)&lt;br /&gt;
    tid 4: slash&lt;br /&gt;
    tid 7: linux&lt;br /&gt;
&lt;br /&gt;
    Tid 4 has tid 3 as a parent, with that relationship having a min_weight&lt;br /&gt;
    of 10 associated with it.&lt;br /&gt;
&lt;br /&gt;
    Tid 7 also have tid 3 as a parent, with min_weight 10.&lt;br /&gt;
&lt;br /&gt;
    Tid 3 has tid 1 as a parent, with min_weight 30.&lt;br /&gt;
&lt;br /&gt;
    The skin at &amp;quot;http://example.com/&amp;quot; reads the nexus tid 1; the skin at&lt;br /&gt;
    &amp;quot;http://opensource.example.com/&amp;quot; reads the nexus tid 3.&lt;br /&gt;
&lt;br /&gt;
    Suppose an editor is working on a story about Slash and assigns it the&lt;br /&gt;
    topic &amp;quot;slash,&amp;quot; tid 4, with weight 10. Weight 10 is described as&lt;br /&gt;
    &amp;quot;Sectional only&amp;quot; in the code. When that story is saved, renderTopics&lt;br /&gt;
    recursively propagates the weight of its topics, or in this case its&lt;br /&gt;
    single topic, up to parents, or in this case parent. Rendering adds tid&lt;br /&gt;
    3, also at weight 10. It does not add tid 1 since !(10 &amp;gt;= 30). The story&lt;br /&gt;
    thus will appear only on &amp;quot;http://opensource.example.com/&amp;quot; and not&lt;br /&gt;
    &amp;quot;http://example.com/&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
    Now suppose the editor re-edits the story, adding important information&lt;br /&gt;
    about Linux. He or she at that point adds the Linux tid 7 with a weight&lt;br /&gt;
    of 30. Now when it is saved, tid 1 is added since 30 &amp;gt;= 30. Now the&lt;br /&gt;
    story will appear at both URLs.&lt;br /&gt;
&lt;br /&gt;
    Now suppose the editor is instructed that this story must be removed&lt;br /&gt;
    from &amp;quot;http://opensource.example.com/&amp;quot;, though it should stay on the main&lt;br /&gt;
    page &amp;quot;http://example.com/&amp;quot;. In the admin.pl editor, he or she adds tid 3&lt;br /&gt;
    with weight 0. That by itself would remove both nexuses when the story&lt;br /&gt;
    saves, since the 0 would prohibit both child tids from propagating&lt;br /&gt;
    higher than tid 3 up to tid 1. Upon clicking Preview, the admin sees&lt;br /&gt;
    that &amp;quot;This story will not appear&amp;quot; (see admin.pl&lt;br /&gt;
    getDescForTopicsRendered()). So the admin also adds tid 1 -- any weight&lt;br /&gt;
    greater than 0 would do, but weight of 30 makes the most sense since the&lt;br /&gt;
    backend describes that as &amp;quot;Mainpageworthy.&amp;quot; Once this story is saved,&lt;br /&gt;
    its rows in story_topics_chosen are:&lt;br /&gt;
&lt;br /&gt;
            tid 1, weight 30&lt;br /&gt;
            tid 3, weight  0&lt;br /&gt;
            tid 4, weight 10&lt;br /&gt;
            tid 7, weight 10&lt;br /&gt;
&lt;br /&gt;
    and its rows in story_topics_rendered are:&lt;br /&gt;
&lt;br /&gt;
            tid 1, weight 30&lt;br /&gt;
            tid 4, weight 10&lt;br /&gt;
            tid 7, weight 10&lt;br /&gt;
&lt;br /&gt;
    Note that, as far as almost all of the code is concerned, the weight&lt;br /&gt;
    value in story_topics_rendered is irrelevant; only whether a row exists&lt;br /&gt;
    or not is noted. (This is why weight of 0 never appears in that table.)&lt;br /&gt;
&lt;br /&gt;
DISPLAY OPTIONS AND WEIGHTS&lt;br /&gt;
    So how are these values of weights 10 and 30 decided, and what are 20&lt;br /&gt;
    and 50 for?&lt;br /&gt;
&lt;br /&gt;
    Previously in Slash, there were three possible values for a story's&lt;br /&gt;
    displaystatus: Never Display, Section-Only, and Always Display.&lt;br /&gt;
    Section-Only meant to only display a story in its section's homepage,&lt;br /&gt;
    not the site's main page, and Always Display meant to display a story&lt;br /&gt;
    both places.&lt;br /&gt;
&lt;br /&gt;
    Now that a story may be part of more than one skin (the new term for&lt;br /&gt;
    &amp;quot;section&amp;quot;), that distinction is not so simple. While the method&lt;br /&gt;
    _displaystatus() will return an old-style displaystatus value for a&lt;br /&gt;
    story, this is for reverse compatibility and is deprecated. The proper&lt;br /&gt;
    question now takes two arguments instead of one: is a story to be&lt;br /&gt;
    displayed _in_ a particular skin.&lt;br /&gt;
&lt;br /&gt;
    The answer to that question is very simple; if a row exists in&lt;br /&gt;
    story_topics_rendered with the story's stoid and the topic's tid, then&lt;br /&gt;
    yes; otherwise, no.&lt;br /&gt;
&lt;br /&gt;
    To prevent everything from breaking at once, and to keep the backend&lt;br /&gt;
    story list looking much the same as it did before (white background for&lt;br /&gt;
    Always Display, light gray for Section-Only, dark gray for Never&lt;br /&gt;
    Display), the &amp;quot;mainpage skin&amp;quot; was created. Defined by the var&lt;br /&gt;
    mainpage_skid [sic, a skid is a skin's numeric primary key], this&lt;br /&gt;
    defines which skin a story must be in to be considered &amp;quot;Always Display.&amp;quot;&lt;br /&gt;
    It also defines which topic nexus will be colored blue instead of yellow&lt;br /&gt;
    in admin.pl?op=topictree (you will need GraphViz installed to see this;&lt;br /&gt;
    see plugins/Admin/README). Nevertheless, Slash is now well-equipped to&lt;br /&gt;
    run a website which consists of many subsites, at different URLs,&lt;br /&gt;
    perhaps only loosely networked and not necessarily with one central&lt;br /&gt;
    &amp;quot;main&amp;quot; page.&lt;br /&gt;
&lt;br /&gt;
    multiple skins and how index.pl uses stories.primaryskid&lt;br /&gt;
&lt;br /&gt;
    skins.cookiedomain and the cookiedomain var&lt;br /&gt;
&lt;br /&gt;
    the Topiclist&lt;br /&gt;
&lt;br /&gt;
    the topic chooser&lt;br /&gt;
&lt;br /&gt;
    no admin.pl interface to edit topic tree yet, but op=topictree (and&lt;br /&gt;
    GraphViz, see plugins/Admin/README)&lt;br /&gt;
&lt;br /&gt;
    suggestions for a clean topic tree (use min_weight 10 to connect&lt;br /&gt;
    many/most topics to logical categorizations, which could/should be&lt;br /&gt;
    nexuses, then connect those to mainpage with min_weight 30, finally&lt;br /&gt;
    bring loose topics to mainpage with min_weight 30)&lt;br /&gt;
&lt;br /&gt;
    utils/convertDBto200406&lt;br /&gt;
&lt;br /&gt;
    and _suggest and how it can be used to advise on a better topic tree&lt;br /&gt;
&lt;br /&gt;
    and _render which needs to be run&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=Historic:CssWork&amp;diff=5303</id>
		<title>Historic:CssWork</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=Historic:CssWork&amp;diff=5303"/>
		<updated>2014-02-28T21:49:26Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h2&amp;gt;Related pages  &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Official docs&lt;br /&gt;
** [[InstallDoc]] - original INSTALL document&lt;br /&gt;
** [[SlashGuide]] - this is the guide (from htdocs) you are supposed to read immediately after installing slashcode&lt;br /&gt;
** [[SectionTopics]] - This is the 'new' sections and topics rewrite and is more important to read than it first appears, explains what a skin is. Sort of.&lt;br /&gt;
** [[SlashChart]] Png chart of slashcode organization&lt;br /&gt;
** [[SlashManPages]] Man pages available by typing man PAGENAME&lt;br /&gt;
** [[TemplateManPages]] Man pages for the template library used to deliver the html&lt;br /&gt;
&lt;br /&gt;
* [[SlashHelperProgramsInBin]] - provided admin helpers in slash/bin&lt;br /&gt;
* [[SlashGlossary]] Glossary of terms used in Slash code&lt;br /&gt;
* [[FileLocations]] Locations of important files on disk. Has Main Libraries called by all routines&lt;br /&gt;
* [[FileLocations2]] Locations of files on disk continued. This is the stuff in local/slash.&lt;br /&gt;
* [[FileLocations3]] Locations of files on disk continued. This is the stuff in /usr/local/share/perl5/Slash/&lt;br /&gt;
* [[FileLocationsMisc]] Has Apache, Man pages,... &lt;br /&gt;
* [[SqlSchema]] - tables used in the database&lt;br /&gt;
* [[SqlDefaults]] - defaults for those tables&lt;br /&gt;
* [[PerlModuleDisplay]] - this is what actually sends a single template out to the broswer (through Apache)&lt;br /&gt;
&lt;br /&gt;
* [[AvailableThemes]] and how they are organized &lt;br /&gt;
* [[ThemesAnatomy]] Overview - &amp;quot;A theme is a website design.&amp;quot; (includes HOWTO-THemes doc)&lt;br /&gt;
** [[TemplateAnatomy]] - All html in these. &amp;quot;parsed by Perl Template Toolkit&amp;quot; (HOWTO-Templates)&lt;br /&gt;
***  [[TemplateTutorialWeb]] - man page&lt;br /&gt;
*** [[TemplateManualDirective]] - man page, has all the keywords used by template library&lt;br /&gt;
*** [[ThePartsOfTemplateLibraryActuallyUsedInSlashCode]] - knowing this can save time reading docs&lt;br /&gt;
*** [[TemplateLists]] - lists of the template in our Theme, some descriptions fm src&lt;br /&gt;
**[[TasksAnatomy]] -&lt;br /&gt;
&lt;br /&gt;
* [[TagboxesAnatomy]] - I don't realy know what these are yet. But there are a lot of them ;-)&lt;br /&gt;
* [[PluginsAnatomy]] - (HOWTO-plugins)&lt;br /&gt;
&lt;br /&gt;
* [[ChangelogForCss]] - Put final finished change here &lt;br /&gt;
* [[HowSlashCssWorks]] Overview&lt;br /&gt;
* [[CssFilesUsedEachPage]] Which css files are used on different pages&lt;br /&gt;
&lt;br /&gt;
* [[http://dev.soylentnews.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=soylentnews/soylentnews.git;a=tree;f=themes;hb=refs/heads/master]] git - themes&lt;br /&gt;
&lt;br /&gt;
http://www.mediawiki.org/wiki/Help:Images&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Unanswered Questions&amp;lt;/h2&amp;gt;&lt;br /&gt;
* The templates are individually output by routine slashDisplay(), but how is the order of delivery determined, and how does one insure a new template goes to the right place on the page?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Got tired of scrolling through pages of perl code just to see what subs were in a module&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So wrote this, now in /usr/local/sbin/listsubs.sh:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[root@slashcode Slash]# listsubs.sh Admin.pm&lt;br /&gt;
Admin.pm:&lt;br /&gt;
    addSpriteForSid, ajax_authorbox, ajax_learnword, ajax_neverdisplay, &lt;br /&gt;
    ajax_perfbox, ajax_signoff, ajax_signoffbox, ajax_slashdbox, &lt;br /&gt;
    ajax_storyadminbox, ajax_sub_memory, DESTROY, extractRelatedStoriesFromForm, &lt;br /&gt;
    findTheTime, getAccesslogAbusersByID, getAccesslogMaxID, get_ispell_comments, &lt;br /&gt;
    getRecentSubs, getRecentWebheads, getRelated, getSignoffData, &lt;br /&gt;
    getStorySignoffs, getStoryThumbLargeLink, grantStoryPostingAchievements, otherLinks, &lt;br /&gt;
    relatedLinks, showAdminTodo, showAuthorActivityBox, showPerformanceBox, &lt;br /&gt;
    showSignoffBox, showSlashdBox, showStoryAdminBox, write_to_temp_file, &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also will work from a list, as in&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ls *.pm &amp;gt; list.tst&lt;br /&gt;
listsubs.sh &amp;lt; list.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Maybe someone else will find it useful as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Order css files are loaded when simple switch on user prefs page is selected viewing main page main page&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* base.css?T_2_5_0_272 The numbers are the slash verion number (from one of the docs).&lt;br /&gt;
* slashcode.css?T_2_5__0_272&lt;br /&gt;
* slashcode_lite.css?T_2_5__0_272&lt;br /&gt;
* slashcode_lite.css?T_2_5__0_272 (appears to be loading this twice,why?)&lt;br /&gt;
* print.cssT_2_5__0_272&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow a page link from the main page to an individual article page &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Link: http://soylentnews.org/article.pl?sid=14/02/18/0336229&lt;br /&gt;
* article.pl is foind in slash/themes/slashcode/htdocs/article.pl So 'slashcode' is treated as a theme.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;article.pl&amp;lt;/h2&amp;gt;&lt;br /&gt;
The stuff of interest to us&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
use Slash;  -------- located in /local/lib64/perl5/slash.pm&lt;br /&gt;
use Slash::Display;     &lt;br /&gt;
use Slash::Utility;&lt;br /&gt;
&lt;br /&gt;
sub main {&lt;br /&gt;
        my $slashdb   = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user      = getCurrentUser();&lt;br /&gt;
        my $form      = getCurrentForm();&lt;br /&gt;
        my $gSkin     = getCurrentSkin();&lt;br /&gt;
         &lt;br /&gt;
        my $story;&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
                # Make sure the reader is viewing this story in the&lt;br /&gt;
                # proper skin.&lt;br /&gt;
                my $cur_skid = determineCurrentSkin();&lt;br /&gt;
                if ($story-&amp;gt;{primaryskid} != $cur_skid) {&lt;br /&gt;
                        my $cur_skin = $reader-&amp;gt;getSkin($cur_skid);&lt;br /&gt;
                        my $story_skin = $reader-&amp;gt;getSkin($story-&amp;gt;{primaryskid});&lt;br /&gt;
                        if ($story_skin &amp;amp;&amp;amp; $story_skin-&amp;gt;{rootdir}&lt;br /&gt;
                                &amp;amp;&amp;amp; $story_skin-&amp;gt;{rootdir} ne $cur_skin-&amp;gt;{rootdir})$&lt;br /&gt;
                                redirect(&amp;quot;$story_skin-&amp;gt;{rootdir}$ENV{REQUEST_URI}&amp;quot;$&lt;br /&gt;
                                return;&lt;br /&gt;
&lt;br /&gt;
               # XXXSECTIONTOPICS this needs to be updated&lt;br /&gt;
                my $SECT = $reader-&amp;gt;getSection($story-&amp;gt;{section});&lt;br /&gt;
                # This should be a getData call for title&lt;br /&gt;
                my $title = &amp;quot;$constants-&amp;gt;{sitename} | $story-&amp;gt;{title}&amp;quot;;&lt;br /&gt;
                if ($gSkin-&amp;gt;{name} &amp;amp;&amp;amp; $gSkin-&amp;gt;{name} eq &amp;quot;idle&amp;quot;) {&lt;br /&gt;
                        $title = &amp;quot;$gSkin-&amp;gt;{hostname} | $story-&amp;gt;{title}&amp;quot;;&lt;br /&gt;
                &lt;br /&gt;
if (my $pollbooth_db = getObject('Slash::PollBooth')) {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
slashDisplay('display', {&lt;br /&gt;
                        poll                    =&amp;gt; $pollbooth,&lt;br /&gt;
                        section                 =&amp;gt; $SECT,&lt;br /&gt;
                        section_block           =&amp;gt; $reader-&amp;gt;getBlock($SECT-&amp;gt;{secti$&lt;br /&gt;
                        show_poll               =&amp;gt; $pollbooth ? 1 : 0,&lt;br /&gt;
                        story                   =&amp;gt; $story,&lt;br /&gt;
                        stories                 =&amp;gt; \%stories,&lt;br /&gt;
                });&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
               my $called_pc = 0;&lt;br /&gt;
                if ($story-&amp;gt;{discussion}) {&lt;br /&gt;
                        # Still not happy with this logic -Brian&lt;br /&gt;
                        my $discussion = $reader-&amp;gt;getDiscussion($story-&amp;gt;{discussio$&lt;br /&gt;
&lt;br /&gt;
                        }&lt;br /&gt;
                        # If no comments ever have existed and commentstatus is di$&lt;br /&gt;
                        # just skip the display of the comment header bar -Brian&lt;br /&gt;
&lt;br /&gt;
                               &amp;amp;&amp;amp;  $discussion-&amp;gt;{commentstatus} eq 'disabled'&lt;br /&gt;
                        )) {&lt;br /&gt;
                                printComments($discussion);&lt;br /&gt;
                                $called_pc = 1;&lt;br /&gt;
                        }&lt;br /&gt;
                 if (!$called_pc &amp;amp;&amp;amp; $form-&amp;gt;{ssi} &amp;amp;&amp;amp; $form-&amp;gt;{ssi} eq 'yes' &amp;amp;&amp;amp; $form-$&lt;br /&gt;
                        # This is a real hack, we're kind of skipping down&lt;br /&gt;
                        # two levels of code.  But the cchp printing is an&lt;br /&gt;
                        # important optimization;  we avoid having to do&lt;br /&gt;
                        # multiple expensive comment selects.  One problem&lt;br /&gt;
                        # is that if there's no discussion with a story,&lt;br /&gt;
                        # printComments() doesn't get called, which means&lt;br /&gt;
                        # selectComments() doesn't get called, which means&lt;br /&gt;
                        # the cchp file won't be written.  If article.pl&lt;br /&gt;
                       # is being called by slashd, and we need to write&lt;br /&gt;
                        # that file, then here's where we print an empty&lt;br /&gt;
                        # file that will satisfy slashd. - Jamie&lt;br /&gt;
&lt;br /&gt;
                        Slash::Utility::Comments::_print_cchp({ stoid =&amp;gt; &amp;quot;dummy&amp;quot; }$&lt;br /&gt;
                }&lt;br /&gt;
        } else {&lt;br /&gt;
                header('Error', $form-&amp;gt;{section}) or return;&lt;br /&gt;
       &lt;br /&gt;
       my $plugins = $slashdb-&amp;gt;getDescriptions('plugins');&lt;br /&gt;
        if (!$user-&amp;gt;{is_anon} &amp;amp;&amp;amp; $plugins-&amp;gt;{Tags} &amp;amp;&amp;amp; $story) {&lt;br /&gt;
                my $tagsdb = getObject('Slash::Tags');&lt;br /&gt;
                $tagsdb-&amp;gt;markViewed($user-&amp;gt;{uid},&lt;br /&gt;
                        $reader-&amp;gt;getGlobjidCreate('stories', $story-&amp;gt;{stoid}));&lt;br /&gt;
        }&lt;br /&gt;
                        &lt;br /&gt;
        footer();&lt;br /&gt;
        if ($story) {&lt;br /&gt;
                writeLog($story-&amp;gt;{sid} || $sid);&lt;br /&gt;
        } else { &lt;br /&gt;
                writeLog($sid);&lt;br /&gt;
&lt;br /&gt;
               &lt;br /&gt;
createEnvironment();&lt;br /&gt;
main();  &lt;br /&gt;
1; &lt;br /&gt;
&lt;br /&gt;
(EOF)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Slash/DB/MySQL/MySQL.pm&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
479 sub getCSS {&lt;br /&gt;
480         my($self, $layout) = @_;&lt;br /&gt;
481         my $user = getCurrentUser();&lt;br /&gt;
482         my $page = $user-&amp;gt;{currentPage};&lt;br /&gt;
483         my $skin = getCurrentSkin('name');&lt;br /&gt;
484         my $admin = $user-&amp;gt;{is_admin};&lt;br /&gt;
485         my $theme = ($user-&amp;gt;{simpledesign} || $user-&amp;gt;{pda}) ? &amp;quot;light&amp;quot; : $user-&amp;gt;{css_theme};&lt;br /&gt;
486         my $secure = apacheConnectionSSL();&lt;br /&gt;
487         $layout ||= '';&lt;br /&gt;
488         my $constants = getCurrentStatic();&lt;br /&gt;
489&lt;br /&gt;
490         my $expire_time = $constants-&amp;gt;{css_expire} || 3600;&lt;br /&gt;
491         $expire_time += int(rand(60)) if $expire_time;&lt;br /&gt;
492         _genericCacheRefresh($self, 'css', $expire_time);&lt;br /&gt;
493         _genericCacheRefresh($self, 'css_pages', $expire_time);&lt;br /&gt;
494         _genericCacheRefresh($self, 'css_skins', $expire_time);&lt;br /&gt;
495         _genericCacheRefresh($self, 'css_themes', $expire_time);&lt;br /&gt;
496&lt;br /&gt;
497         my $css_ref             = $self-&amp;gt;{_css_cache} ||= {};&lt;br /&gt;
498         my $css_pages_ref       = $self-&amp;gt;{_css_pages_cache};&lt;br /&gt;
499         my $css_skins_ref       = $self-&amp;gt;{_css_skins_cache};&lt;br /&gt;
500         my $css_themes_ref      = $self-&amp;gt;{_css_themes_cache};&lt;br /&gt;
501         my $css_layouts_ref     = $self-&amp;gt;{_css_layouts_cache};&lt;br /&gt;
502&lt;br /&gt;
503         $css_pages_ref = $self-&amp;gt;getCSSValuesHashForCol('page') if !$css_pages_ref;&lt;br /&gt;
504         $css_skins_ref = $self-&amp;gt;getCSSValuesHashForCol('skin') if !$css_skins_ref;&lt;br /&gt;
505         $css_themes_ref = $self-&amp;gt;getCSSValuesHashForCol('theme') if !$css_themes_ref;&lt;br /&gt;
506         $css_layouts_ref = $self-&amp;gt;getCSSValuesHashForCol('layout') if !$css_layouts_ref;&lt;br /&gt;
507&lt;br /&gt;
508         my $lowbandwidth = ($user-&amp;gt;{lowbandwidth} || $user-&amp;gt;{pda}) ? &amp;quot;yes&amp;quot; : &amp;quot;no&amp;quot;;&lt;br /&gt;
509&lt;br /&gt;
510         $page   = '' if !$css_pages_ref-&amp;gt;{$page};&lt;br /&gt;
511         $skin   = '' if !$css_skins_ref-&amp;gt;{$skin};&lt;br /&gt;
512         $theme  = '' if !$css_themes_ref-&amp;gt;{$theme};&lt;br /&gt;
513         $layout = '' if !$css_layouts_ref-&amp;gt;{$layout};&lt;br /&gt;
514&lt;br /&gt;
515         return $css_ref-&amp;gt;{$skin}{$page}{$admin}{$theme}{$lowbandwidth}{$layout}{$secure}&lt;br /&gt;
516                 if exists $css_ref-&amp;gt;{$skin}{$page}{$admin}{$theme}{$lowbandwidth}{$layout}{$secure};&lt;br /&gt;
517&lt;br /&gt;
518         my @clauses;&lt;br /&gt;
519&lt;br /&gt;
520         my $page_q = $self-&amp;gt;sqlQuote($page);&lt;br /&gt;
521         my $page_in = $page ? &amp;quot;(page = '' or page = $page_q)&amp;quot; : &amp;quot;page = ''&amp;quot;;&lt;br /&gt;
522         push @clauses, $page_in;&lt;br /&gt;
523&lt;br /&gt;
524         my $skin_in = $skin ? &amp;quot;(skin = '' or skin = '$skin')&amp;quot; : &amp;quot;skin = ''&amp;quot;;&lt;br /&gt;
525         push @clauses, $skin_in;&lt;br /&gt;
526&lt;br /&gt;
527         push @clauses, &amp;quot;admin='no'&amp;quot; if !$admin;&lt;br /&gt;
528&lt;br /&gt;
529         my $theme_q  = $self-&amp;gt;sqlQuote($theme);&lt;br /&gt;
530         my $theme_in = $theme ? &amp;quot;(theme='' or theme=$theme_q)&amp;quot; : &amp;quot;theme=''&amp;quot;;&lt;br /&gt;
531         push @clauses, $theme_in;&lt;br /&gt;
532&lt;br /&gt;
533         push @clauses, &amp;quot;lowbandwidth='$lowbandwidth'&amp;quot; if $lowbandwidth eq &amp;quot;no&amp;quot;;&lt;br /&gt;
534&lt;br /&gt;
535         my $layout_q = $self-&amp;gt;sqlQuote($layout);&lt;br /&gt;
536         push @clauses, &amp;quot;layout=$layout_q&amp;quot;;&lt;br /&gt;
537&lt;br /&gt;
538         my $where = &amp;quot;css.ctid=css_type.ctid AND &amp;quot;;&lt;br /&gt;
539         $where .= join ' AND ', @clauses;&lt;br /&gt;
540&lt;br /&gt;
541         my $css = $self-&amp;gt;sqlSelectAllHashrefArray(&amp;quot;rel,type,media,file,title,ie_cond,skin&amp;quot;,&lt;br /&gt;
542                 &amp;quot;css, css_type&amp;quot;, $where, &amp;quot;ORDER BY css_type.ordernum, css.ordernum&amp;quot;);&lt;br /&gt;
543         if ($secure) {&lt;br /&gt;
544                 for my $hr (@$css) { $hr-&amp;gt;{file} =~ s/\.css/.ssl.css/ }&lt;br /&gt;
545         }&lt;br /&gt;
546         &lt;br /&gt;
547         $css_ref-&amp;gt;{$skin}{$page}{$admin}{$theme}{$lowbandwidth}{$layout}{$secure} = $css;&lt;br /&gt;
548         return $css;&lt;br /&gt;
549 }&lt;br /&gt;
550 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Slash/Apache/User/User.pm&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
548 {&lt;br /&gt;
549 my %ops_my = (&lt;br /&gt;
550         inbox           =&amp;gt; { args =&amp;gt; 'op=list', uri =&amp;gt; 'messages.pl' },&lt;br /&gt;
551         # XXX change messages to be same as /inbox, move this to /my/preferences/messages&lt;br /&gt;
552         messages        =&amp;gt; { args =&amp;gt; 'op=display_prefs', uri =&amp;gt; 'messages.pl' },&lt;br /&gt;
553         comments        =&amp;gt; { args =&amp;gt; 'op=editcomm' },&lt;br /&gt;
554         homepage        =&amp;gt; { args =&amp;gt; 'op=edithome' },&lt;br /&gt;
555         password        =&amp;gt; { args =&amp;gt; 'op=changeprefs', uri =&amp;gt; 'login.pl' },&lt;br /&gt;
556         logout          =&amp;gt; { args =&amp;gt; 'op=userclose', uri =&amp;gt; 'login.pl' },&lt;br /&gt;
557         misc            =&amp;gt; { args =&amp;gt; 'op=editmiscopts' },&lt;br /&gt;
558         amigos          =&amp;gt; { args =&amp;gt; 'op=friendview', uri =&amp;gt; 'journal.pl' },&lt;br /&gt;
559         bookmarks       =&amp;gt; { args =&amp;gt; 'op=showbookmarks' },&lt;br /&gt;
560         firehose        =&amp;gt; { args =&amp;gt; 'op=userfirehose' },&lt;br /&gt;
561         preferences     =&amp;gt; { args =&amp;gt; 'op=displayprefs', uri =&amp;gt; 'preferences.pl' },&lt;br /&gt;
562         tags            =&amp;gt; { args =&amp;gt; 'op=showtags' },&lt;br /&gt;
563         journal         =&amp;gt; { args =&amp;gt; 'op=list', uri =&amp;gt; 'journal.pl' },&lt;br /&gt;
564&lt;br /&gt;
565         friends         =&amp;gt; { args =&amp;gt; 'op=friends', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
566         fans            =&amp;gt; { args =&amp;gt; 'op=fans', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
567         freaks          =&amp;gt; { args =&amp;gt; 'op=freaks', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
568         foes            =&amp;gt; { args =&amp;gt; 'op=foes', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
569         zoo             =&amp;gt; { args =&amp;gt; 'op=all', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
570&lt;br /&gt;
571         default         =&amp;gt; { args =&amp;gt; 'op=edituser' }&lt;br /&gt;
572 );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;sql/mysql/defaults.sql&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 134 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','base.css','','','','no','',1,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
135 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','comments','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
136 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','article','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
137 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','print','print.css','','','','no','',5,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
138 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','admin.css','','','','yes','',1,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
139 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','pollBooth','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
140 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode_lite.css','','','','no','light',4,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
141 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','journal','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
142 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode_lite.css','','','','no','light',4,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
143 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','journal','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
144 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode.css','','','','no','',3,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
145 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','metamod','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
146 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode_low_bw.css','','','','no','',4,99, &amp;quot;&amp;quot;,&amp;quot;yes&amp;quot;);&lt;br /&gt;
147&lt;br /&gt;
148 #&lt;br /&gt;
149 # Dumping data for table 'css_type'&lt;br /&gt;
150 #&lt;br /&gt;
151 INSERT INTO css_type (ctid, name, ordernum) VALUES (1,'base',1);&lt;br /&gt;
152 INSERT INTO css_type (ctid, name, ordernum) VALUES (2,'page',2);&lt;br /&gt;
153 INSERT INTO css_type (ctid, name, ordernum) VALUES (3,'theme',3);&lt;br /&gt;
154 INSERT INTO css_type (ctid, name, ordernum) VALUES (4,'user_theme',5);&lt;br /&gt;
155 INSERT INTO css_type (ctid, name, ordernum) VALUES (5,'print',6);&lt;br /&gt;
156 INSERT INTO css_type (ctid, name, ordernum) VALUES (6,'skin',4);&lt;br /&gt;
157 INSERT INTO css_type (ctid, name, ordernum) VALUES (7,'handheld',7);&lt;br /&gt;
158 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;plugins/FireHose/mysql_dump.sql &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','firehose','no','',2,0, '');&lt;br /&gt;
==&amp;gt; INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','users','no','',2,0, '');&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','calendar.css','','','firehose','no','',2,0, '');&lt;br /&gt;
==&amp;gt; INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','users','no','',2,0, '');&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','firehose','no','',2,0, '');&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','index2','no','',2,0, ''); &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;I believe that we are not using FireHose but it was needed to make the site work.  As can be seen in the db dump above, it adds the firehose.css file to any of the user pages. Need to verify and then see if we can get the db purged of these values.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Good work. The question in my mind is why the heck css for one module has any effect *at all* on any other module. Talk about lack of localization...-AG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;I think there was some firehose slashboxes that showed up in the users pages.  They needed to be wider than the default, so they patched those pages with the firehose.css. Next step is to get a current dump of the two css tables. The important part is I know what files are for what parts of the code.  Slashcode.css is the theme css file slashcode-lite.css is the style file that is called by a user pref.  This means I need to fix comments.css to remove the theme elements I inserted and put them in the theme file.  I still need to make sure that the changes that benefited the Simplified theme stay intact. -EP&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;fonts&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
This is what I usually start with:&lt;br /&gt;
   font-family: Helvetica,Geneva,Arial,Verdana,sans-serif;&lt;br /&gt;
&lt;br /&gt;
Too many can lead to a LOT of testing being required. As can the wrong order. ;-)&lt;br /&gt;
&lt;br /&gt;
Others I have used in the past:&lt;br /&gt;
font-family: Geneva,Arial,Verdana,Helvetica,Chicago,sans-serif;&lt;br /&gt;
font-family: Helvetica,Arial,Geneva,Chicago,Verdana,sans-serif;&lt;br /&gt;
font-family: Helvetica,Geneva,Arial,Verdana,sans-serif;&lt;br /&gt;
-AG&lt;br /&gt;
&lt;br /&gt;
I have used:&lt;br /&gt;
font-family: Verdana, Geneva, &amp;quot;Bitstream Vera Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif;&lt;br /&gt;
&lt;br /&gt;
Note this has Linux fonts as well to help with these users.&lt;br /&gt;
-EP&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;User Menu&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','Logout','logout','/my/logout',1,0,10);&lt;br /&gt;
124 INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','Preferences','preferences','/users.pl?op=edituser',1,0,20);&lt;br /&gt;
125 INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','Password','password','[% constants.real_rootdir %]/my/password',1,0,40);&lt;br /&gt;
126 INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','~[% user.nickname | strip_literal %] ([% user.uid %])','me','/~[% user.nickname | fixparam %]',1,0,50);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; This code sets up the upper menu on http://slashcott.org/users.pl which is linked from your userid on the home page.  The Preferences is wrong, as it needs to be all three links: Info, Homepage, Comments.  This will allow users with low-bandwidth option set to easily get to the setting to unset low-bandwidth. -EP&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Refernces to css in the man pages in /usr/local/share/man/man3&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
grep -i css *&lt;br /&gt;
&lt;br /&gt;
HTML::CalendarMonth.3pm:.IP &amp;quot;enable_css&amp;quot; 4&lt;br /&gt;
HTML::CalendarMonth.3pm:.IX Item &amp;quot;enable_css&amp;quot;&lt;br /&gt;
HTML::CalendarMonth.3pm:Set some handy \s-1CSS\s0 class attributes on elements, enabled by default.&lt;br /&gt;
HTML::CalendarMonth.3pm:.IP &amp;quot;semantic_css&amp;quot; 4&lt;br /&gt;
HTML::CalendarMonth.3pm:.IX Item &amp;quot;semantic_css&amp;quot;&lt;br /&gt;
HTML::CalendarMonth.3pm:Sets some additional \s-1CSS\s0 class attributes on elements, disabled by&lt;br /&gt;
HTML::CalendarMonth.3pm:.IP &amp;quot;\fIdefault_css()\fR&amp;quot; 4&lt;br /&gt;
HTML::CalendarMonth.3pm:.IX Item &amp;quot;default_css()&amp;quot;&lt;br /&gt;
HTML::CalendarMonth.3pm:document in conjunction with the classes assigned to elements when css&lt;br /&gt;
HTML::ElementSuper.3pm:might be when you'd like to assign multiple \s-1CSS\s0 classes to a single&lt;br /&gt;
HTML::PopupTreeSelect.3pm:.IP &amp;quot;include_css (optional)&amp;quot; 4&lt;br /&gt;
HTML::PopupTreeSelect.3pm:.IX Item &amp;quot;include_css (optional)&amp;quot;&lt;br /&gt;
HTML::PopupTreeSelect.3pm:Set this to 0 and the default \s-1CSS\s0 will not be included in the widget&lt;br /&gt;
HTML::PopupTreeSelect.3pm:output.  This allows you to include your own \s-1CSS\s0 which will be used by&lt;br /&gt;
HTML::PopupTreeSelect.3pm:your widget.  Modifying the \s-1CSS\s0 will allow you to control the fonts,&lt;br /&gt;
HTML::PopupTreeSelect.3pm:If you run the widget with include_css set to 1 then you can use that&lt;br /&gt;
HTML::Tree::Scanning.3pm:tagging, such is as useful in \s-1CSS\s0 \*(-- note the&lt;br /&gt;
Module::Build::API.3pm:.IP &amp;quot;\fIhtml_css()\fR&amp;quot; 4&lt;br /&gt;
Module::Build::API.3pm:.IX Item &amp;quot;html_css()&amp;quot;&lt;br /&gt;
TAP::Parser::YAMLish::Reader.3pm:YAML::Tiny, \s-1YAML\s0, YAML::Syck, Config::Tiny, CSS::Tiny,&lt;br /&gt;
TAP::Parser::YAMLish::Writer.3pm:YAML::Tiny, \s-1YAML\s0, YAML::Syck, Config::Tiny, CSS::Tiny,&lt;br /&gt;
Template::Iterator.3pm:You can then style the \f(CW\*(C`tr.odd\*(C'\fR and \f(CW\*(C`tr.even\*(C'\fR elements using \s-1CSS:\s0&lt;br /&gt;
Template::Toolkit.3pm:kind of text documents: \s-1HTML\s0, \s-1XML\s0, \s-1CSS\s0, Javascript, Perl code, plain text,&lt;br /&gt;
Template::Tutorial::Web.3pm:kind of content they contain.  So you can use \s-1TT\s0 to generate \s-1HTML\s0, \s-1XML\s0, \s-1CSS\s0,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;CSS commit for Feb 23&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Changes to most of the css files to set all sizes to em (some were in px and broke flow). Changed the font-family to a more friendly chain for all platforms, and remove all other font-faimily calls from the code. Changed font sizes from % to ems and adjusted size for some of the main elements. Fix a issue with the middle column size caused by firehose.css. Many small fixes to spacing over many places.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moved all of the slashcode theme items into the slashcode.cssraw file. Some were in comments.cssraw due to some previous work I did.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On article body and comment body, made the font size a bit smaller. Also on comments body set the margins to be smaller.&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;-EP&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=Historic:CssWork&amp;diff=5301</id>
		<title>Historic:CssWork</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=Historic:CssWork&amp;diff=5301"/>
		<updated>2014-02-28T18:52:59Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h2&amp;gt;Related pages  &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Official docs&lt;br /&gt;
** [[InstallDoc]] - original INSTALL document&lt;br /&gt;
** [[SlashGuide]] - this is the guide (from htdocs) you are supposed to read immediately after installing slashcode&lt;br /&gt;
** [[SlashChart]] Png chart of slashcode organization&lt;br /&gt;
** [[SlashManPages]] Man pages available by typing man PAGENAME&lt;br /&gt;
** [[TemplateManPages]] Man pages for the template library used to deliver the html&lt;br /&gt;
&lt;br /&gt;
* [[SlashHelperProgramsInBin]] - provided admin helpers in slash/bin&lt;br /&gt;
* [[SlashGlossary]] Glossary of terms used in Slash code&lt;br /&gt;
* [[FileLocations]] Locations of important files on disk. Has Main Libraries called by all routines&lt;br /&gt;
* [[FileLocations2]] Locations of files on disk continued. This is the stuff in local/slash.&lt;br /&gt;
* [[FileLocations3]] Locations of files on disk continued. This is the stuff in /usr/local/share/perl5/Slash/&lt;br /&gt;
* [[FileLocationsMisc]] Has Apache, Man pages,... &lt;br /&gt;
* [[SqlSchema]] - tables used in the database&lt;br /&gt;
* [[SqlDefaults]] - defaults for those tables&lt;br /&gt;
* [[PerlModuleDisplay]] - this is what actually sends a single template out to the broswer (through Apache)&lt;br /&gt;
&lt;br /&gt;
* [[AvailableThemes]] and how they are organized &lt;br /&gt;
* [[ThemesAnatomy]] Overview - &amp;quot;A theme is a website design.&amp;quot; (includes HOWTO-THemes doc)&lt;br /&gt;
** [[TemplateAnatomy]] - All html in these. &amp;quot;parsed by Perl Template Toolkit&amp;quot; (HOWTO-Templates)&lt;br /&gt;
***  [[TemplateTutorialWeb]] - man page&lt;br /&gt;
*** [[TemplateManualDirective]] - man page, has all the keywords used by template library&lt;br /&gt;
*** [[ThePartsOfTemplateLibraryActuallyUsedInSlashCode]] - knowing this can save time reading docs&lt;br /&gt;
*** [[TemplateLists]] - lists of the template in our Theme, some descriptions fm src&lt;br /&gt;
**[[TasksAnatomy]] -&lt;br /&gt;
&lt;br /&gt;
* [[TagboxesAnatomy]] - I don't realy know what these are yet. But there are a lot of them ;-)&lt;br /&gt;
* [[PluginsAnatomy]] - (HOWTO-plugins)&lt;br /&gt;
&lt;br /&gt;
* [[ChangelogForCss]] - Put final finished change here &lt;br /&gt;
* [[HowSlashCssWorks]] Overview&lt;br /&gt;
* [[CssFilesUsedEachPage]] Which css files are used on different pages&lt;br /&gt;
&lt;br /&gt;
* [[http://dev.soylentnews.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=soylentnews/soylentnews.git;a=tree;f=themes;hb=refs/heads/master]] git - themes&lt;br /&gt;
&lt;br /&gt;
http://www.mediawiki.org/wiki/Help:Images&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Unanswered Questions&amp;lt;/h2&amp;gt;&lt;br /&gt;
* The templates are individually output by routine slashDisplay(), but how is the order of delivery determined, and how does one insure a new template goes to the right place on the page?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Got tired of scrolling through pages of perl code just to see what subs were in a module&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So wrote this, now in /usr/local/sbin/listsubs.sh:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[root@slashcode Slash]# listsubs.sh Admin.pm&lt;br /&gt;
Admin.pm:&lt;br /&gt;
    addSpriteForSid, ajax_authorbox, ajax_learnword, ajax_neverdisplay, &lt;br /&gt;
    ajax_perfbox, ajax_signoff, ajax_signoffbox, ajax_slashdbox, &lt;br /&gt;
    ajax_storyadminbox, ajax_sub_memory, DESTROY, extractRelatedStoriesFromForm, &lt;br /&gt;
    findTheTime, getAccesslogAbusersByID, getAccesslogMaxID, get_ispell_comments, &lt;br /&gt;
    getRecentSubs, getRecentWebheads, getRelated, getSignoffData, &lt;br /&gt;
    getStorySignoffs, getStoryThumbLargeLink, grantStoryPostingAchievements, otherLinks, &lt;br /&gt;
    relatedLinks, showAdminTodo, showAuthorActivityBox, showPerformanceBox, &lt;br /&gt;
    showSignoffBox, showSlashdBox, showStoryAdminBox, write_to_temp_file, &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also will work from a list, as in&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ls *.pm &amp;gt; list.tst&lt;br /&gt;
listsubs.sh &amp;lt; list.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Maybe someone else will find it useful as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Order css files are loaded when simple switch on user prefs page is selected viewing main page main page&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* base.css?T_2_5_0_272 The numbers are the slash verion number (from one of the docs).&lt;br /&gt;
* slashcode.css?T_2_5__0_272&lt;br /&gt;
* slashcode_lite.css?T_2_5__0_272&lt;br /&gt;
* slashcode_lite.css?T_2_5__0_272 (appears to be loading this twice,why?)&lt;br /&gt;
* print.cssT_2_5__0_272&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow a page link from the main page to an individual article page &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Link: http://soylentnews.org/article.pl?sid=14/02/18/0336229&lt;br /&gt;
* article.pl is foind in slash/themes/slashcode/htdocs/article.pl So 'slashcode' is treated as a theme.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;article.pl&amp;lt;/h2&amp;gt;&lt;br /&gt;
The stuff of interest to us&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
use Slash;  -------- located in /local/lib64/perl5/slash.pm&lt;br /&gt;
use Slash::Display;     &lt;br /&gt;
use Slash::Utility;&lt;br /&gt;
&lt;br /&gt;
sub main {&lt;br /&gt;
        my $slashdb   = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user      = getCurrentUser();&lt;br /&gt;
        my $form      = getCurrentForm();&lt;br /&gt;
        my $gSkin     = getCurrentSkin();&lt;br /&gt;
         &lt;br /&gt;
        my $story;&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
                # Make sure the reader is viewing this story in the&lt;br /&gt;
                # proper skin.&lt;br /&gt;
                my $cur_skid = determineCurrentSkin();&lt;br /&gt;
                if ($story-&amp;gt;{primaryskid} != $cur_skid) {&lt;br /&gt;
                        my $cur_skin = $reader-&amp;gt;getSkin($cur_skid);&lt;br /&gt;
                        my $story_skin = $reader-&amp;gt;getSkin($story-&amp;gt;{primaryskid});&lt;br /&gt;
                        if ($story_skin &amp;amp;&amp;amp; $story_skin-&amp;gt;{rootdir}&lt;br /&gt;
                                &amp;amp;&amp;amp; $story_skin-&amp;gt;{rootdir} ne $cur_skin-&amp;gt;{rootdir})$&lt;br /&gt;
                                redirect(&amp;quot;$story_skin-&amp;gt;{rootdir}$ENV{REQUEST_URI}&amp;quot;$&lt;br /&gt;
                                return;&lt;br /&gt;
&lt;br /&gt;
               # XXXSECTIONTOPICS this needs to be updated&lt;br /&gt;
                my $SECT = $reader-&amp;gt;getSection($story-&amp;gt;{section});&lt;br /&gt;
                # This should be a getData call for title&lt;br /&gt;
                my $title = &amp;quot;$constants-&amp;gt;{sitename} | $story-&amp;gt;{title}&amp;quot;;&lt;br /&gt;
                if ($gSkin-&amp;gt;{name} &amp;amp;&amp;amp; $gSkin-&amp;gt;{name} eq &amp;quot;idle&amp;quot;) {&lt;br /&gt;
                        $title = &amp;quot;$gSkin-&amp;gt;{hostname} | $story-&amp;gt;{title}&amp;quot;;&lt;br /&gt;
                &lt;br /&gt;
if (my $pollbooth_db = getObject('Slash::PollBooth')) {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
slashDisplay('display', {&lt;br /&gt;
                        poll                    =&amp;gt; $pollbooth,&lt;br /&gt;
                        section                 =&amp;gt; $SECT,&lt;br /&gt;
                        section_block           =&amp;gt; $reader-&amp;gt;getBlock($SECT-&amp;gt;{secti$&lt;br /&gt;
                        show_poll               =&amp;gt; $pollbooth ? 1 : 0,&lt;br /&gt;
                        story                   =&amp;gt; $story,&lt;br /&gt;
                        stories                 =&amp;gt; \%stories,&lt;br /&gt;
                });&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
               my $called_pc = 0;&lt;br /&gt;
                if ($story-&amp;gt;{discussion}) {&lt;br /&gt;
                        # Still not happy with this logic -Brian&lt;br /&gt;
                        my $discussion = $reader-&amp;gt;getDiscussion($story-&amp;gt;{discussio$&lt;br /&gt;
&lt;br /&gt;
                        }&lt;br /&gt;
                        # If no comments ever have existed and commentstatus is di$&lt;br /&gt;
                        # just skip the display of the comment header bar -Brian&lt;br /&gt;
&lt;br /&gt;
                               &amp;amp;&amp;amp;  $discussion-&amp;gt;{commentstatus} eq 'disabled'&lt;br /&gt;
                        )) {&lt;br /&gt;
                                printComments($discussion);&lt;br /&gt;
                                $called_pc = 1;&lt;br /&gt;
                        }&lt;br /&gt;
                 if (!$called_pc &amp;amp;&amp;amp; $form-&amp;gt;{ssi} &amp;amp;&amp;amp; $form-&amp;gt;{ssi} eq 'yes' &amp;amp;&amp;amp; $form-$&lt;br /&gt;
                        # This is a real hack, we're kind of skipping down&lt;br /&gt;
                        # two levels of code.  But the cchp printing is an&lt;br /&gt;
                        # important optimization;  we avoid having to do&lt;br /&gt;
                        # multiple expensive comment selects.  One problem&lt;br /&gt;
                        # is that if there's no discussion with a story,&lt;br /&gt;
                        # printComments() doesn't get called, which means&lt;br /&gt;
                        # selectComments() doesn't get called, which means&lt;br /&gt;
                        # the cchp file won't be written.  If article.pl&lt;br /&gt;
                       # is being called by slashd, and we need to write&lt;br /&gt;
                        # that file, then here's where we print an empty&lt;br /&gt;
                        # file that will satisfy slashd. - Jamie&lt;br /&gt;
&lt;br /&gt;
                        Slash::Utility::Comments::_print_cchp({ stoid =&amp;gt; &amp;quot;dummy&amp;quot; }$&lt;br /&gt;
                }&lt;br /&gt;
        } else {&lt;br /&gt;
                header('Error', $form-&amp;gt;{section}) or return;&lt;br /&gt;
       &lt;br /&gt;
       my $plugins = $slashdb-&amp;gt;getDescriptions('plugins');&lt;br /&gt;
        if (!$user-&amp;gt;{is_anon} &amp;amp;&amp;amp; $plugins-&amp;gt;{Tags} &amp;amp;&amp;amp; $story) {&lt;br /&gt;
                my $tagsdb = getObject('Slash::Tags');&lt;br /&gt;
                $tagsdb-&amp;gt;markViewed($user-&amp;gt;{uid},&lt;br /&gt;
                        $reader-&amp;gt;getGlobjidCreate('stories', $story-&amp;gt;{stoid}));&lt;br /&gt;
        }&lt;br /&gt;
                        &lt;br /&gt;
        footer();&lt;br /&gt;
        if ($story) {&lt;br /&gt;
                writeLog($story-&amp;gt;{sid} || $sid);&lt;br /&gt;
        } else { &lt;br /&gt;
                writeLog($sid);&lt;br /&gt;
&lt;br /&gt;
               &lt;br /&gt;
createEnvironment();&lt;br /&gt;
main();  &lt;br /&gt;
1; &lt;br /&gt;
&lt;br /&gt;
(EOF)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Slash/DB/MySQL/MySQL.pm&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
479 sub getCSS {&lt;br /&gt;
480         my($self, $layout) = @_;&lt;br /&gt;
481         my $user = getCurrentUser();&lt;br /&gt;
482         my $page = $user-&amp;gt;{currentPage};&lt;br /&gt;
483         my $skin = getCurrentSkin('name');&lt;br /&gt;
484         my $admin = $user-&amp;gt;{is_admin};&lt;br /&gt;
485         my $theme = ($user-&amp;gt;{simpledesign} || $user-&amp;gt;{pda}) ? &amp;quot;light&amp;quot; : $user-&amp;gt;{css_theme};&lt;br /&gt;
486         my $secure = apacheConnectionSSL();&lt;br /&gt;
487         $layout ||= '';&lt;br /&gt;
488         my $constants = getCurrentStatic();&lt;br /&gt;
489&lt;br /&gt;
490         my $expire_time = $constants-&amp;gt;{css_expire} || 3600;&lt;br /&gt;
491         $expire_time += int(rand(60)) if $expire_time;&lt;br /&gt;
492         _genericCacheRefresh($self, 'css', $expire_time);&lt;br /&gt;
493         _genericCacheRefresh($self, 'css_pages', $expire_time);&lt;br /&gt;
494         _genericCacheRefresh($self, 'css_skins', $expire_time);&lt;br /&gt;
495         _genericCacheRefresh($self, 'css_themes', $expire_time);&lt;br /&gt;
496&lt;br /&gt;
497         my $css_ref             = $self-&amp;gt;{_css_cache} ||= {};&lt;br /&gt;
498         my $css_pages_ref       = $self-&amp;gt;{_css_pages_cache};&lt;br /&gt;
499         my $css_skins_ref       = $self-&amp;gt;{_css_skins_cache};&lt;br /&gt;
500         my $css_themes_ref      = $self-&amp;gt;{_css_themes_cache};&lt;br /&gt;
501         my $css_layouts_ref     = $self-&amp;gt;{_css_layouts_cache};&lt;br /&gt;
502&lt;br /&gt;
503         $css_pages_ref = $self-&amp;gt;getCSSValuesHashForCol('page') if !$css_pages_ref;&lt;br /&gt;
504         $css_skins_ref = $self-&amp;gt;getCSSValuesHashForCol('skin') if !$css_skins_ref;&lt;br /&gt;
505         $css_themes_ref = $self-&amp;gt;getCSSValuesHashForCol('theme') if !$css_themes_ref;&lt;br /&gt;
506         $css_layouts_ref = $self-&amp;gt;getCSSValuesHashForCol('layout') if !$css_layouts_ref;&lt;br /&gt;
507&lt;br /&gt;
508         my $lowbandwidth = ($user-&amp;gt;{lowbandwidth} || $user-&amp;gt;{pda}) ? &amp;quot;yes&amp;quot; : &amp;quot;no&amp;quot;;&lt;br /&gt;
509&lt;br /&gt;
510         $page   = '' if !$css_pages_ref-&amp;gt;{$page};&lt;br /&gt;
511         $skin   = '' if !$css_skins_ref-&amp;gt;{$skin};&lt;br /&gt;
512         $theme  = '' if !$css_themes_ref-&amp;gt;{$theme};&lt;br /&gt;
513         $layout = '' if !$css_layouts_ref-&amp;gt;{$layout};&lt;br /&gt;
514&lt;br /&gt;
515         return $css_ref-&amp;gt;{$skin}{$page}{$admin}{$theme}{$lowbandwidth}{$layout}{$secure}&lt;br /&gt;
516                 if exists $css_ref-&amp;gt;{$skin}{$page}{$admin}{$theme}{$lowbandwidth}{$layout}{$secure};&lt;br /&gt;
517&lt;br /&gt;
518         my @clauses;&lt;br /&gt;
519&lt;br /&gt;
520         my $page_q = $self-&amp;gt;sqlQuote($page);&lt;br /&gt;
521         my $page_in = $page ? &amp;quot;(page = '' or page = $page_q)&amp;quot; : &amp;quot;page = ''&amp;quot;;&lt;br /&gt;
522         push @clauses, $page_in;&lt;br /&gt;
523&lt;br /&gt;
524         my $skin_in = $skin ? &amp;quot;(skin = '' or skin = '$skin')&amp;quot; : &amp;quot;skin = ''&amp;quot;;&lt;br /&gt;
525         push @clauses, $skin_in;&lt;br /&gt;
526&lt;br /&gt;
527         push @clauses, &amp;quot;admin='no'&amp;quot; if !$admin;&lt;br /&gt;
528&lt;br /&gt;
529         my $theme_q  = $self-&amp;gt;sqlQuote($theme);&lt;br /&gt;
530         my $theme_in = $theme ? &amp;quot;(theme='' or theme=$theme_q)&amp;quot; : &amp;quot;theme=''&amp;quot;;&lt;br /&gt;
531         push @clauses, $theme_in;&lt;br /&gt;
532&lt;br /&gt;
533         push @clauses, &amp;quot;lowbandwidth='$lowbandwidth'&amp;quot; if $lowbandwidth eq &amp;quot;no&amp;quot;;&lt;br /&gt;
534&lt;br /&gt;
535         my $layout_q = $self-&amp;gt;sqlQuote($layout);&lt;br /&gt;
536         push @clauses, &amp;quot;layout=$layout_q&amp;quot;;&lt;br /&gt;
537&lt;br /&gt;
538         my $where = &amp;quot;css.ctid=css_type.ctid AND &amp;quot;;&lt;br /&gt;
539         $where .= join ' AND ', @clauses;&lt;br /&gt;
540&lt;br /&gt;
541         my $css = $self-&amp;gt;sqlSelectAllHashrefArray(&amp;quot;rel,type,media,file,title,ie_cond,skin&amp;quot;,&lt;br /&gt;
542                 &amp;quot;css, css_type&amp;quot;, $where, &amp;quot;ORDER BY css_type.ordernum, css.ordernum&amp;quot;);&lt;br /&gt;
543         if ($secure) {&lt;br /&gt;
544                 for my $hr (@$css) { $hr-&amp;gt;{file} =~ s/\.css/.ssl.css/ }&lt;br /&gt;
545         }&lt;br /&gt;
546         &lt;br /&gt;
547         $css_ref-&amp;gt;{$skin}{$page}{$admin}{$theme}{$lowbandwidth}{$layout}{$secure} = $css;&lt;br /&gt;
548         return $css;&lt;br /&gt;
549 }&lt;br /&gt;
550 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Slash/Apache/User/User.pm&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
548 {&lt;br /&gt;
549 my %ops_my = (&lt;br /&gt;
550         inbox           =&amp;gt; { args =&amp;gt; 'op=list', uri =&amp;gt; 'messages.pl' },&lt;br /&gt;
551         # XXX change messages to be same as /inbox, move this to /my/preferences/messages&lt;br /&gt;
552         messages        =&amp;gt; { args =&amp;gt; 'op=display_prefs', uri =&amp;gt; 'messages.pl' },&lt;br /&gt;
553         comments        =&amp;gt; { args =&amp;gt; 'op=editcomm' },&lt;br /&gt;
554         homepage        =&amp;gt; { args =&amp;gt; 'op=edithome' },&lt;br /&gt;
555         password        =&amp;gt; { args =&amp;gt; 'op=changeprefs', uri =&amp;gt; 'login.pl' },&lt;br /&gt;
556         logout          =&amp;gt; { args =&amp;gt; 'op=userclose', uri =&amp;gt; 'login.pl' },&lt;br /&gt;
557         misc            =&amp;gt; { args =&amp;gt; 'op=editmiscopts' },&lt;br /&gt;
558         amigos          =&amp;gt; { args =&amp;gt; 'op=friendview', uri =&amp;gt; 'journal.pl' },&lt;br /&gt;
559         bookmarks       =&amp;gt; { args =&amp;gt; 'op=showbookmarks' },&lt;br /&gt;
560         firehose        =&amp;gt; { args =&amp;gt; 'op=userfirehose' },&lt;br /&gt;
561         preferences     =&amp;gt; { args =&amp;gt; 'op=displayprefs', uri =&amp;gt; 'preferences.pl' },&lt;br /&gt;
562         tags            =&amp;gt; { args =&amp;gt; 'op=showtags' },&lt;br /&gt;
563         journal         =&amp;gt; { args =&amp;gt; 'op=list', uri =&amp;gt; 'journal.pl' },&lt;br /&gt;
564&lt;br /&gt;
565         friends         =&amp;gt; { args =&amp;gt; 'op=friends', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
566         fans            =&amp;gt; { args =&amp;gt; 'op=fans', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
567         freaks          =&amp;gt; { args =&amp;gt; 'op=freaks', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
568         foes            =&amp;gt; { args =&amp;gt; 'op=foes', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
569         zoo             =&amp;gt; { args =&amp;gt; 'op=all', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
570&lt;br /&gt;
571         default         =&amp;gt; { args =&amp;gt; 'op=edituser' }&lt;br /&gt;
572 );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;sql/mysql/defaults.sql&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 134 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','base.css','','','','no','',1,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
135 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','comments','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
136 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','article','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
137 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','print','print.css','','','','no','',5,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
138 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','admin.css','','','','yes','',1,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
139 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','pollBooth','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
140 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode_lite.css','','','','no','light',4,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
141 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','journal','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
142 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode_lite.css','','','','no','light',4,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
143 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','journal','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
144 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode.css','','','','no','',3,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
145 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','metamod','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
146 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode_low_bw.css','','','','no','',4,99, &amp;quot;&amp;quot;,&amp;quot;yes&amp;quot;);&lt;br /&gt;
147&lt;br /&gt;
148 #&lt;br /&gt;
149 # Dumping data for table 'css_type'&lt;br /&gt;
150 #&lt;br /&gt;
151 INSERT INTO css_type (ctid, name, ordernum) VALUES (1,'base',1);&lt;br /&gt;
152 INSERT INTO css_type (ctid, name, ordernum) VALUES (2,'page',2);&lt;br /&gt;
153 INSERT INTO css_type (ctid, name, ordernum) VALUES (3,'theme',3);&lt;br /&gt;
154 INSERT INTO css_type (ctid, name, ordernum) VALUES (4,'user_theme',5);&lt;br /&gt;
155 INSERT INTO css_type (ctid, name, ordernum) VALUES (5,'print',6);&lt;br /&gt;
156 INSERT INTO css_type (ctid, name, ordernum) VALUES (6,'skin',4);&lt;br /&gt;
157 INSERT INTO css_type (ctid, name, ordernum) VALUES (7,'handheld',7);&lt;br /&gt;
158 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;plugins/FireHose/mysql_dump.sql &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','firehose','no','',2,0, '');&lt;br /&gt;
==&amp;gt; INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','users','no','',2,0, '');&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','calendar.css','','','firehose','no','',2,0, '');&lt;br /&gt;
==&amp;gt; INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','users','no','',2,0, '');&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','firehose','no','',2,0, '');&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','index2','no','',2,0, ''); &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;I believe that we are not using FireHose but it was needed to make the site work.  As can be seen in the db dump above, it adds the firehose.css file to any of the user pages. Need to verify and then see if we can get the db purged of these values.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Good work. The question in my mind is why the heck css for one module has any effect *at all* on any other module. Talk about lack of localization...-AG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;I think there was some firehose slashboxes that showed up in the users pages.  They needed to be wider than the default, so they patched those pages with the firehose.css. Next step is to get a current dump of the two css tables. The important part is I know what files are for what parts of the code.  Slashcode.css is the theme css file slashcode-lite.css is the style file that is called by a user pref.  This means I need to fix comments.css to remove the theme elements I inserted and put them in the theme file.  I still need to make sure that the changes that benefited the Simplified theme stay intact. -EP&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;fonts&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
This is what I usually start with:&lt;br /&gt;
   font-family: Helvetica,Geneva,Arial,Verdana,sans-serif;&lt;br /&gt;
&lt;br /&gt;
Too many can lead to a LOT of testing being required. As can the wrong order. ;-)&lt;br /&gt;
&lt;br /&gt;
Others I have used in the past:&lt;br /&gt;
font-family: Geneva,Arial,Verdana,Helvetica,Chicago,sans-serif;&lt;br /&gt;
font-family: Helvetica,Arial,Geneva,Chicago,Verdana,sans-serif;&lt;br /&gt;
font-family: Helvetica,Geneva,Arial,Verdana,sans-serif;&lt;br /&gt;
-AG&lt;br /&gt;
&lt;br /&gt;
I have used:&lt;br /&gt;
font-family: Verdana, Geneva, &amp;quot;Bitstream Vera Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif;&lt;br /&gt;
&lt;br /&gt;
Note this has Linux fonts as well to help with these users.&lt;br /&gt;
-EP&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;User Menu&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','Logout','logout','/my/logout',1,0,10);&lt;br /&gt;
124 INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','Preferences','preferences','/users.pl?op=edituser',1,0,20);&lt;br /&gt;
125 INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','Password','password','[% constants.real_rootdir %]/my/password',1,0,40);&lt;br /&gt;
126 INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','~[% user.nickname | strip_literal %] ([% user.uid %])','me','/~[% user.nickname | fixparam %]',1,0,50);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; This code sets up the upper menu on http://slashcott.org/users.pl which is linked from your userid on the home page.  The Preferences is wrong, as it needs to be all three links: Info, Homepage, Comments.  This will allow users with low-bandwidth option set to easily get to the setting to unset low-bandwidth. -EP&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Refernces to css in the man pages in /usr/local/share/man/man3&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
grep -i css *&lt;br /&gt;
&lt;br /&gt;
HTML::CalendarMonth.3pm:.IP &amp;quot;enable_css&amp;quot; 4&lt;br /&gt;
HTML::CalendarMonth.3pm:.IX Item &amp;quot;enable_css&amp;quot;&lt;br /&gt;
HTML::CalendarMonth.3pm:Set some handy \s-1CSS\s0 class attributes on elements, enabled by default.&lt;br /&gt;
HTML::CalendarMonth.3pm:.IP &amp;quot;semantic_css&amp;quot; 4&lt;br /&gt;
HTML::CalendarMonth.3pm:.IX Item &amp;quot;semantic_css&amp;quot;&lt;br /&gt;
HTML::CalendarMonth.3pm:Sets some additional \s-1CSS\s0 class attributes on elements, disabled by&lt;br /&gt;
HTML::CalendarMonth.3pm:.IP &amp;quot;\fIdefault_css()\fR&amp;quot; 4&lt;br /&gt;
HTML::CalendarMonth.3pm:.IX Item &amp;quot;default_css()&amp;quot;&lt;br /&gt;
HTML::CalendarMonth.3pm:document in conjunction with the classes assigned to elements when css&lt;br /&gt;
HTML::ElementSuper.3pm:might be when you'd like to assign multiple \s-1CSS\s0 classes to a single&lt;br /&gt;
HTML::PopupTreeSelect.3pm:.IP &amp;quot;include_css (optional)&amp;quot; 4&lt;br /&gt;
HTML::PopupTreeSelect.3pm:.IX Item &amp;quot;include_css (optional)&amp;quot;&lt;br /&gt;
HTML::PopupTreeSelect.3pm:Set this to 0 and the default \s-1CSS\s0 will not be included in the widget&lt;br /&gt;
HTML::PopupTreeSelect.3pm:output.  This allows you to include your own \s-1CSS\s0 which will be used by&lt;br /&gt;
HTML::PopupTreeSelect.3pm:your widget.  Modifying the \s-1CSS\s0 will allow you to control the fonts,&lt;br /&gt;
HTML::PopupTreeSelect.3pm:If you run the widget with include_css set to 1 then you can use that&lt;br /&gt;
HTML::Tree::Scanning.3pm:tagging, such is as useful in \s-1CSS\s0 \*(-- note the&lt;br /&gt;
Module::Build::API.3pm:.IP &amp;quot;\fIhtml_css()\fR&amp;quot; 4&lt;br /&gt;
Module::Build::API.3pm:.IX Item &amp;quot;html_css()&amp;quot;&lt;br /&gt;
TAP::Parser::YAMLish::Reader.3pm:YAML::Tiny, \s-1YAML\s0, YAML::Syck, Config::Tiny, CSS::Tiny,&lt;br /&gt;
TAP::Parser::YAMLish::Writer.3pm:YAML::Tiny, \s-1YAML\s0, YAML::Syck, Config::Tiny, CSS::Tiny,&lt;br /&gt;
Template::Iterator.3pm:You can then style the \f(CW\*(C`tr.odd\*(C'\fR and \f(CW\*(C`tr.even\*(C'\fR elements using \s-1CSS:\s0&lt;br /&gt;
Template::Toolkit.3pm:kind of text documents: \s-1HTML\s0, \s-1XML\s0, \s-1CSS\s0, Javascript, Perl code, plain text,&lt;br /&gt;
Template::Tutorial::Web.3pm:kind of content they contain.  So you can use \s-1TT\s0 to generate \s-1HTML\s0, \s-1XML\s0, \s-1CSS\s0,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;CSS commit for Feb 23&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Changes to most of the css files to set all sizes to em (some were in px and broke flow). Changed the font-family to a more friendly chain for all platforms, and remove all other font-faimily calls from the code. Changed font sizes from % to ems and adjusted size for some of the main elements. Fix a issue with the middle column size caused by firehose.css. Many small fixes to spacing over many places.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moved all of the slashcode theme items into the slashcode.cssraw file. Some were in comments.cssraw due to some previous work I did.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On article body and comment body, made the font size a bit smaller. Also on comments body set the margins to be smaller.&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;-EP&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=TemplateManualDirective&amp;diff=5300</id>
		<title>TemplateManualDirective</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=TemplateManualDirective&amp;diff=5300"/>
		<updated>2014-02-28T18:50:55Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[CssWork]] parent&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;TemplateManualDirective Ref for the template commands &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
man Template::Manual::Directives&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NAME&lt;br /&gt;
       Template::Manual::Directives - Template directives&lt;br /&gt;
&lt;br /&gt;
Accessing and Updating Template Variables&lt;br /&gt;
   GET&lt;br /&gt;
       The &amp;quot;GET&amp;quot; directive retrieves and outputs the value of the named&lt;br /&gt;
       variable.&lt;br /&gt;
&lt;br /&gt;
           [% GET foo %]&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;GET&amp;quot; keyword is optional.  A variable can be specified in a&lt;br /&gt;
       directive tag by itself.&lt;br /&gt;
&lt;br /&gt;
           [% foo %]&lt;br /&gt;
&lt;br /&gt;
       The variable can have an unlimited number of elements, each separated&lt;br /&gt;
       by a dot. Each element can have arguments specified within parentheses.&lt;br /&gt;
&lt;br /&gt;
           [% foo %]&lt;br /&gt;
           [% bar.baz %]&lt;br /&gt;
           [% biz.baz(10) %]&lt;br /&gt;
           ...etc...&lt;br /&gt;
&lt;br /&gt;
       See Template::Manual::Variables for a full discussion on template&lt;br /&gt;
       variables.&lt;br /&gt;
&lt;br /&gt;
       You can also specify expressions using the logical (&amp;quot;and&amp;quot;, &amp;quot;or&amp;quot;, &amp;quot;not&amp;quot;,&lt;br /&gt;
       &amp;quot;?&amp;quot;, &amp;quot;:&amp;quot;) and mathematic operators (&amp;quot;+&amp;quot;, &amp;quot;-&amp;quot;, &amp;quot;*&amp;quot;, &amp;quot;/&amp;quot;, &amp;quot;%&amp;quot;, &amp;quot;mod&amp;quot;,&lt;br /&gt;
       &amp;quot;div&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
           [% template.title or default.title %]&lt;br /&gt;
&lt;br /&gt;
           [% score * 100 %]&lt;br /&gt;
&lt;br /&gt;
           [% order.nitems ? checkout(order.total) : 'no items' %]&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;div&amp;quot; operator returns the integer result of division.  Both &amp;quot;%&amp;quot;&lt;br /&gt;
       and &amp;quot;mod&amp;quot; return the modulus (i.e. remainder) of division.&lt;br /&gt;
&lt;br /&gt;
           [% 15 / 6 %]            # 2.5&lt;br /&gt;
           [% 15 div 6 %]          # 2&lt;br /&gt;
           [% 15 mod 6 %]          # 3&lt;br /&gt;
&lt;br /&gt;
   CALL&lt;br /&gt;
       The &amp;quot;CALL&amp;quot; directive is similar to &amp;quot;GET&amp;quot; in evaluating the variable&lt;br /&gt;
       named, but doesn’t print the result returned.  This can be useful when&lt;br /&gt;
       a variable is bound to a sub-routine or object method which you want to&lt;br /&gt;
       call but aren’t interested in the value returned.&lt;br /&gt;
&lt;br /&gt;
           [% CALL dbi.disconnect %]&lt;br /&gt;
&lt;br /&gt;
           [% CALL inc_page_counter(page_count) %]&lt;br /&gt;
&lt;br /&gt;
   SET&lt;br /&gt;
       The &amp;quot;SET&amp;quot; directive allows you to assign new values to existing&lt;br /&gt;
       variables or create new temporary variables.&lt;br /&gt;
&lt;br /&gt;
           [% SET title = 'Hello World' %]&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;SET&amp;quot; keyword is also optional.&lt;br /&gt;
&lt;br /&gt;
           [% title = 'Hello World' %]&lt;br /&gt;
&lt;br /&gt;
       Variables may be assigned the values of other variables, unquoted&lt;br /&gt;
       numbers (2.718), literal text (’single quotes’) or quoted text (&amp;quot;double&lt;br /&gt;
       quotes&amp;quot;).  In the latter case, any variable references within the text&lt;br /&gt;
       will be interpolated when the string is evaluated.  Variables should be&lt;br /&gt;
       prefixed by &amp;quot;$&amp;quot;, using curly braces to explicitly scope the variable&lt;br /&gt;
       name where necessary.&lt;br /&gt;
&lt;br /&gt;
           [% foo  = 'Foo'  %]               # literal value 'Foo'&lt;br /&gt;
           [% bar  =  foo   %]               # value of variable 'foo'&lt;br /&gt;
           [% cost = '$100' %]               # literal value '$100'&lt;br /&gt;
           [% item = &amp;quot;$bar: ${cost}.00&amp;quot; %]   # value &amp;quot;Foo: $100.00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
       Multiple variables may be assigned in the same directive and are&lt;br /&gt;
       evaluated in the order specified.  Thus, the above could have been&lt;br /&gt;
       written:&lt;br /&gt;
&lt;br /&gt;
           [% foo  = 'Foo'&lt;br /&gt;
              bar  = foo&lt;br /&gt;
              cost = '$100'&lt;br /&gt;
              item = &amp;quot;$bar: ${cost}.00&amp;quot;&lt;br /&gt;
           %]&lt;br /&gt;
&lt;br /&gt;
       Simple expressions can also be used, as per &amp;quot;GET&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
           [% ten    = 10&lt;br /&gt;
              twenty = 20&lt;br /&gt;
              thirty = twenty + ten&lt;br /&gt;
              forty  = 2 * twenty&lt;br /&gt;
              fifty  = 100 div 2&lt;br /&gt;
              six    = twenty mod 7&lt;br /&gt;
           %]&lt;br /&gt;
&lt;br /&gt;
       You can concatenate strings together using the ' _ ' operator.  In Perl&lt;br /&gt;
       5, the &amp;quot;.&amp;quot; is used for string concatenation, but in Perl 6, as in the&lt;br /&gt;
       Template Toolkit, the &amp;quot;.&amp;quot; will be used as the method calling operator&lt;br /&gt;
       and ' _ ' will be used for string concatenation.  Note that the&lt;br /&gt;
       operator must be specified with surrounding whitespace which, as Larry&lt;br /&gt;
       says, is construed as a feature:&lt;br /&gt;
&lt;br /&gt;
           [% copyright = '(C) Copyright' _ year _ ' ' _ author %]&lt;br /&gt;
&lt;br /&gt;
       You can, of course, achieve a similar effect with double quoted string&lt;br /&gt;
       interpolation.&lt;br /&gt;
&lt;br /&gt;
           [% copyright = &amp;quot;(C) Copyright $year $author&amp;quot; %]&lt;br /&gt;
&lt;br /&gt;
   DEFAULT&lt;br /&gt;
       The &amp;quot;DEFAULT&amp;quot; directive is similar to &amp;quot;SET&amp;quot; but only updates variables&lt;br /&gt;
       that are currently undefined or have no &amp;quot;true&amp;quot; value (in the Perl&lt;br /&gt;
       sense).&lt;br /&gt;
&lt;br /&gt;
           [% DEFAULT&lt;br /&gt;
               name = 'John Doe'&lt;br /&gt;
               id   = 'jdoe'&lt;br /&gt;
           %]&lt;br /&gt;
&lt;br /&gt;
       This can be particularly useful in common template components to ensure&lt;br /&gt;
       that some sensible default are provided for otherwise undefined&lt;br /&gt;
       variables.&lt;br /&gt;
&lt;br /&gt;
           [% DEFAULT&lt;br /&gt;
              title = 'Hello World'&lt;br /&gt;
              bgcol = '#ffffff'&lt;br /&gt;
           %]&lt;br /&gt;
           &amp;lt;html&amp;gt;&lt;br /&gt;
             &amp;lt;head&amp;gt;&lt;br /&gt;
               &amp;lt;title&amp;gt;[% title %]&amp;lt;/title&amp;gt;&lt;br /&gt;
             &amp;lt;/head&amp;gt;&lt;br /&gt;
             &amp;lt;body bgcolor=&amp;quot;[% bgcol %]&amp;quot;&amp;gt;&lt;br /&gt;
               ...etc...&lt;br /&gt;
&lt;br /&gt;
Processing Template Files and Blocks&lt;br /&gt;
   INSERT&lt;br /&gt;
       The &amp;quot;INSERT&amp;quot; directive is used to insert the contents of an external&lt;br /&gt;
       file at the current position.&lt;br /&gt;
&lt;br /&gt;
           [% INSERT myfile %]&lt;br /&gt;
&lt;br /&gt;
       No attempt to parse or process the file is made.  The contents,&lt;br /&gt;
       possibly including any embedded template directives, are inserted&lt;br /&gt;
       intact.&lt;br /&gt;
&lt;br /&gt;
       The filename specified should be relative to one of the &amp;quot;INCLUDE_PATH&amp;quot;&lt;br /&gt;
       directories.  Absolute (i.e. starting with &amp;quot;/&amp;quot;) and relative (i.e.&lt;br /&gt;
       starting with &amp;quot;.&amp;quot;) filenames may be used if the &amp;quot;ABSOLUTE&amp;quot; and&lt;br /&gt;
       &amp;quot;RELATIVE&amp;quot; options are set, respectively.  Both these options are&lt;br /&gt;
       disabled by default.&lt;br /&gt;
&lt;br /&gt;
           my $template = Template-&amp;gt;new({&lt;br /&gt;
               INCLUDE_PATH =&amp;gt; '/here:/there',&lt;br /&gt;
           });&lt;br /&gt;
&lt;br /&gt;
           $template-&amp;gt;process('myfile');&lt;br /&gt;
&lt;br /&gt;
       myfile:&lt;br /&gt;
&lt;br /&gt;
           [% INSERT foo %]            # looks for /here/foo then /there/foo&lt;br /&gt;
           [% INSERT /etc/passwd %]    # file error: ABSOLUTE not set&lt;br /&gt;
           [% INSERT ../secret %]      # file error: RELATIVE not set&lt;br /&gt;
&lt;br /&gt;
       For convenience, the filename does not need to be quoted as long as it&lt;br /&gt;
       contains only alphanumeric characters, underscores, dots or forward&lt;br /&gt;
       slashes.  Names containing any other characters should be quoted.&lt;br /&gt;
&lt;br /&gt;
           [% INSERT misc/legalese.txt            %]&lt;br /&gt;
           [% INSERT 'dos98/Program Files/stupid' %]&lt;br /&gt;
&lt;br /&gt;
       To evaluate a variable to specify a filename, you should explicitly&lt;br /&gt;
       prefix it with a &amp;quot;$&amp;quot; or use double-quoted string interpolation.&lt;br /&gt;
&lt;br /&gt;
           [% language = 'en'&lt;br /&gt;
              legalese = 'misc/legalese.txt'&lt;br /&gt;
           %]&lt;br /&gt;
&lt;br /&gt;
           [% INSERT $legalese %]              # misc/legalese.txt&lt;br /&gt;
           [% INSERT &amp;quot;$language/$legalese&amp;quot; %]  # en/misc/legalese.txt&lt;br /&gt;
&lt;br /&gt;
       Multiple files can be specified using &amp;quot;+&amp;quot; as a delimiter.  All files&lt;br /&gt;
       should be unquoted names or quoted strings.  Any variables should be&lt;br /&gt;
       interpolated into double-quoted strings.&lt;br /&gt;
&lt;br /&gt;
           [% INSERT legalese.txt + warning.txt %]&lt;br /&gt;
           [% INSERT  &amp;quot;$legalese&amp;quot; + warning.txt %]  # requires quoting&lt;br /&gt;
&lt;br /&gt;
   INCLUDE&lt;br /&gt;
       The &amp;quot;INCLUDE&amp;quot; directive is used to process and include the output of&lt;br /&gt;
       another template file or block.&lt;br /&gt;
&lt;br /&gt;
           [% INCLUDE header %]&lt;br /&gt;
&lt;br /&gt;
       If a &amp;quot;BLOCK&amp;quot; of the specified name is defined in the same file, or in a&lt;br /&gt;
       file from which the current template has been called (i.e. a parent&lt;br /&gt;
       template) then it will be used in preference to any file of the same&lt;br /&gt;
       name.&lt;br /&gt;
&lt;br /&gt;
           [% INCLUDE table %]     # uses BLOCK defined below&lt;br /&gt;
&lt;br /&gt;
           [% BLOCK table %]&lt;br /&gt;
              &amp;lt;table&amp;gt;&lt;br /&gt;
                ...&lt;br /&gt;
              &amp;lt;/table&amp;gt;&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       If a &amp;quot;BLOCK&amp;quot; definition is not currently visible then the template name&lt;br /&gt;
       should be a file relative to one of the &amp;quot;INCLUDE_PATH&amp;quot; directories, or&lt;br /&gt;
       an absolute or relative file name if the &amp;quot;ABSOLUTE&amp;quot;/&amp;quot;RELATIVE&amp;quot; options&lt;br /&gt;
       are appropriately enabled.  The &amp;quot;INCLUDE&amp;quot; directive automatically&lt;br /&gt;
       quotes the filename specified, as per &amp;quot;INSERT&amp;quot; described above.  When a&lt;br /&gt;
       variable contains the name of the template for the &amp;quot;INCLUDE&amp;quot; directive,&lt;br /&gt;
       it should be explicitly prefixed by &amp;quot;$&amp;quot; or double-quoted&lt;br /&gt;
&lt;br /&gt;
           [% myheader = 'my/misc/header' %]&lt;br /&gt;
           [% INCLUDE   myheader  %]           # 'myheader'&lt;br /&gt;
           [% INCLUDE  $myheader  %]           # 'my/misc/header'&lt;br /&gt;
           [% INCLUDE &amp;quot;$myheader&amp;quot; %]           # 'my/misc/header'&lt;br /&gt;
&lt;br /&gt;
       Any template directives embedded within the file will be processed&lt;br /&gt;
       accordingly.  All variables currently defined will be visible and&lt;br /&gt;
       accessible from within the included template.&lt;br /&gt;
&lt;br /&gt;
           [% title = 'Hello World' %]&lt;br /&gt;
           [% INCLUDE header %]&lt;br /&gt;
           &amp;lt;body&amp;gt;&lt;br /&gt;
           ...&lt;br /&gt;
&lt;br /&gt;
       header:&lt;br /&gt;
&lt;br /&gt;
           &amp;lt;html&amp;gt;&lt;br /&gt;
           &amp;lt;title&amp;gt;[% title %]&amp;lt;/title&amp;gt;&lt;br /&gt;
&lt;br /&gt;
       output:&lt;br /&gt;
&lt;br /&gt;
           &amp;lt;html&amp;gt;&lt;br /&gt;
           &amp;lt;title&amp;gt;Hello World&amp;lt;/title&amp;gt;&lt;br /&gt;
           &amp;lt;body&amp;gt;&lt;br /&gt;
           ...&lt;br /&gt;
&lt;br /&gt;
       Local variable definitions may be specified after the template name,&lt;br /&gt;
       temporarily masking any existing variables.  Insignificant whitespace&lt;br /&gt;
       is ignored within directives so you can add variable definitions on the&lt;br /&gt;
       same line, the next line or split across several line with comments&lt;br /&gt;
       interspersed, if you prefer.&lt;br /&gt;
&lt;br /&gt;
           [% INCLUDE table %]&lt;br /&gt;
&lt;br /&gt;
           [% INCLUDE table title=&amp;quot;Active Projects&amp;quot; %]&lt;br /&gt;
&lt;br /&gt;
           [% INCLUDE table&lt;br /&gt;
                title   = &amp;quot;Active Projects&amp;quot;&lt;br /&gt;
                bgcolor = &amp;quot;#80ff00&amp;quot;    # chartreuse&lt;br /&gt;
                border  = 2&lt;br /&gt;
           %]&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;INCLUDE&amp;quot; directive localises (i.e. copies) all variables before&lt;br /&gt;
       processing the template.  Any changes made within the included template&lt;br /&gt;
       will not affect variables in the including template.&lt;br /&gt;
&lt;br /&gt;
           [% foo = 10 %]&lt;br /&gt;
&lt;br /&gt;
           foo is originally [% foo %]&lt;br /&gt;
           [% INCLUDE bar %]&lt;br /&gt;
           foo is still [% foo %]&lt;br /&gt;
&lt;br /&gt;
           [% BLOCK bar %]&lt;br /&gt;
              foo was [% foo %]&lt;br /&gt;
              [% foo = 20 %]&lt;br /&gt;
              foo is now [% foo %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       output:&lt;br /&gt;
&lt;br /&gt;
           foo is originally 10&lt;br /&gt;
              foo was 10&lt;br /&gt;
              foo is now 20&lt;br /&gt;
           foo is still 10&lt;br /&gt;
&lt;br /&gt;
       Technical Note: the localisation of the stash (that is, the process by&lt;br /&gt;
       which variables are copied before an &amp;quot;INCLUDE&amp;quot; to prevent being&lt;br /&gt;
       overwritten) is only skin deep.  The top-level variable namespace&lt;br /&gt;
       (hash) is copied, but no attempt is made to perform a deep-copy of&lt;br /&gt;
       other structures (hashes, arrays, objects, etc.)  Therefore, a &amp;quot;foo&amp;quot;&lt;br /&gt;
       variable referencing a hash will be copied to create a new &amp;quot;foo&amp;quot;&lt;br /&gt;
       variable but which points to the same hash array.  Thus, if you update&lt;br /&gt;
       compound variables (e.g. &amp;quot;foo.bar&amp;quot;) then you will change the original&lt;br /&gt;
       copy, regardless of any stash localisation.  If you’re not worried&lt;br /&gt;
       about preserving variable values, or you trust the templates you’re&lt;br /&gt;
       including then you might prefer to use the &amp;quot;PROCESS&amp;quot; directive which is&lt;br /&gt;
       faster by virtue of not performing any localisation.&lt;br /&gt;
&lt;br /&gt;
       You can specify dotted variables as &amp;quot;local&amp;quot; variables to an &amp;quot;INCLUDE&amp;quot;&lt;br /&gt;
       directive.  However, be aware that because of the localisation issues&lt;br /&gt;
       explained above (if you skipped the previous Technical Note above then&lt;br /&gt;
       you might want to go back and read it or skip this section too), the&lt;br /&gt;
       variables might not actually be &amp;quot;local&amp;quot;. If the first element of the&lt;br /&gt;
       variable name already references a hash array then the variable update&lt;br /&gt;
       will affect the original variable.&lt;br /&gt;
&lt;br /&gt;
           [% foo = {&lt;br /&gt;
                  bar = 'Baz'&lt;br /&gt;
              }&lt;br /&gt;
           %]&lt;br /&gt;
&lt;br /&gt;
           [% INCLUDE somefile foo.bar='Boz' %]&lt;br /&gt;
&lt;br /&gt;
           [% foo.bar %]           # Boz&lt;br /&gt;
&lt;br /&gt;
       This behaviour can be a little unpredictable (and may well be improved&lt;br /&gt;
       upon in a future version).  If you know what you’re doing with it and&lt;br /&gt;
       you’re sure that the variables in question are defined (nor not) as you&lt;br /&gt;
       expect them to be, then you can rely on this feature to implement some&lt;br /&gt;
       powerful &amp;quot;global&amp;quot; data sharing techniques.  Otherwise, you might prefer&lt;br /&gt;
       to steer well clear and always pass simple (undotted) variables as&lt;br /&gt;
       parameters to &amp;quot;INCLUDE&amp;quot; and other similar directives.&lt;br /&gt;
&lt;br /&gt;
       If you want to process several templates in one go then you can specify&lt;br /&gt;
       each of their names (quoted or unquoted names only, no unquoted&lt;br /&gt;
       $variables) joined together by &amp;quot;+&amp;quot;.  The &amp;quot;INCLUDE&amp;quot; directive will then&lt;br /&gt;
       process them in order.&lt;br /&gt;
&lt;br /&gt;
           [% INCLUDE html/header + &amp;quot;site/$header&amp;quot; + site/menu&lt;br /&gt;
                title = &amp;quot;My Groovy Web Site&amp;quot;&lt;br /&gt;
           %]&lt;br /&gt;
&lt;br /&gt;
       The variable stash is localised once and then the templates specified&lt;br /&gt;
       are processed in order, all within that same variable context.  This&lt;br /&gt;
       makes it slightly faster than specifying several separate &amp;quot;INCLUDE&amp;quot;&lt;br /&gt;
       directives (because you only clone the variable stash once instead of n&lt;br /&gt;
       times), but not quite as &amp;quot;safe&amp;quot; because any variable changes in the&lt;br /&gt;
       first file will be visible in the second, third and so on.  This might&lt;br /&gt;
       be what you want, of course, but then again, it might not.&lt;br /&gt;
&lt;br /&gt;
   PROCESS&lt;br /&gt;
       The PROCESS directive is similar to &amp;quot;INCLUDE&amp;quot; but does not perform any&lt;br /&gt;
       localisation of variables before processing the template.  Any changes&lt;br /&gt;
       made to variables within the included template will be visible in the&lt;br /&gt;
       including template.&lt;br /&gt;
&lt;br /&gt;
           [% foo = 10 %]&lt;br /&gt;
&lt;br /&gt;
           foo is [% foo %]&lt;br /&gt;
           [% PROCESS bar %]&lt;br /&gt;
           foo is [% foo %]&lt;br /&gt;
&lt;br /&gt;
           [% BLOCK bar %]&lt;br /&gt;
              [% foo = 20 %]&lt;br /&gt;
              changed foo to [% foo %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       output:&lt;br /&gt;
&lt;br /&gt;
           foo is 10&lt;br /&gt;
              changed foo to 20&lt;br /&gt;
           foo is 20&lt;br /&gt;
&lt;br /&gt;
       Parameters may be specified in the &amp;quot;PROCESS&amp;quot; directive, but these too&lt;br /&gt;
       will become visible changes to current variable values.&lt;br /&gt;
&lt;br /&gt;
           [% foo = 10 %]&lt;br /&gt;
           foo is [% foo %]&lt;br /&gt;
           [% PROCESS bar&lt;br /&gt;
              foo = 20&lt;br /&gt;
           %]&lt;br /&gt;
           foo is [% foo %]&lt;br /&gt;
&lt;br /&gt;
           [% BLOCK bar %]&lt;br /&gt;
              this is bar, foo is [% foo %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       output:&lt;br /&gt;
&lt;br /&gt;
           foo is 10&lt;br /&gt;
              this is bar, foo is 20&lt;br /&gt;
           foo is 20&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;PROCESS&amp;quot; directive is slightly faster than &amp;quot;INCLUDE&amp;quot; because it&lt;br /&gt;
       avoids the need to localise (i.e. copy) the variable stash before&lt;br /&gt;
       processing the template.  As with &amp;quot;INSERT&amp;quot; and &amp;quot;INCLUDE&amp;quot;, the first&lt;br /&gt;
       parameter does not need to be quoted as long as it contains only&lt;br /&gt;
       alphanumeric characters, underscores, periods or forward slashes.  A&lt;br /&gt;
       &amp;quot;$&amp;quot; prefix can be used to explicitly indicate a variable which should&lt;br /&gt;
       be interpolated to provide the template name:&lt;br /&gt;
&lt;br /&gt;
           [% myheader = 'my/misc/header' %]&lt;br /&gt;
           [% PROCESS  myheader %]              # 'myheader'&lt;br /&gt;
           [% PROCESS $myheader %]              # 'my/misc/header'&lt;br /&gt;
&lt;br /&gt;
       As with &amp;quot;INCLUDE&amp;quot;, multiple templates can be specified, delimited by&lt;br /&gt;
       &amp;quot;+&amp;quot;, and are processed in order.&lt;br /&gt;
&lt;br /&gt;
           [% PROCESS html/header + my/header %]&lt;br /&gt;
&lt;br /&gt;
   WRAPPER&lt;br /&gt;
       It’s not unusual to find yourself adding common headers and footers to&lt;br /&gt;
       pages or sub-sections within a page.  Something like this:&lt;br /&gt;
&lt;br /&gt;
           [% INCLUDE section/header&lt;br /&gt;
              title = 'Quantum Mechanics'&lt;br /&gt;
           %]&lt;br /&gt;
              Quantum mechanics is a very interesting subject wish&lt;br /&gt;
              should prove easy for the layman to fully comprehend.&lt;br /&gt;
           [% INCLUDE section/footer %]&lt;br /&gt;
&lt;br /&gt;
           [% INCLUDE section/header&lt;br /&gt;
              title = 'Desktop Nuclear Fusion for under $50'&lt;br /&gt;
           %]&lt;br /&gt;
              This describes a simple device which generates significant&lt;br /&gt;
              sustainable electrical power from common tap water by process&lt;br /&gt;
              of nuclear fusion.&lt;br /&gt;
           [% INCLUDE section/footer %]&lt;br /&gt;
&lt;br /&gt;
       The individual template components being included might look like&lt;br /&gt;
       these:&lt;br /&gt;
&lt;br /&gt;
       section/header:&lt;br /&gt;
&lt;br /&gt;
           &amp;lt;p&amp;gt;&lt;br /&gt;
           &amp;lt;h2&amp;gt;[% title %]&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
       section/footer:&lt;br /&gt;
&lt;br /&gt;
           &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;WRAPPER&amp;quot; directive provides a way of simplifying this a little. It&lt;br /&gt;
       encloses a block up to a matching &amp;quot;END&amp;quot; directive, which is first&lt;br /&gt;
       processed to generate some output. This is then passed to the named&lt;br /&gt;
       template file or &amp;quot;BLOCK&amp;quot; as the &amp;quot;content&amp;quot; variable.&lt;br /&gt;
&lt;br /&gt;
           [% WRAPPER section&lt;br /&gt;
              title = 'Quantum Mechanics'&lt;br /&gt;
           %]&lt;br /&gt;
              Quantum mechanics is a very interesting subject wish&lt;br /&gt;
              should prove easy for the layman to fully comprehend.&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
           [% WRAPPER section&lt;br /&gt;
              title = 'Desktop Nuclear Fusion for under $50'&lt;br /&gt;
           %]&lt;br /&gt;
              This describes a simple device which generates significant&lt;br /&gt;
              sustainable electrical power from common tap water by process&lt;br /&gt;
              of nuclear fusion.&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       The single ’section’ template can then be defined as:&lt;br /&gt;
&lt;br /&gt;
           &amp;lt;h2&amp;gt;[% title %]&amp;lt;/h2&amp;gt;&lt;br /&gt;
           &amp;lt;p&amp;gt;&lt;br /&gt;
             [% content %]&lt;br /&gt;
           &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
       Like other block directives, it can be used in side-effect notation:&lt;br /&gt;
&lt;br /&gt;
           [% INSERT legalese.txt WRAPPER big_bold_table %]&lt;br /&gt;
&lt;br /&gt;
       It’s also possible to specify multiple templates to a &amp;quot;WRAPPER&amp;quot;&lt;br /&gt;
       directive.  The specification order indicates outermost to innermost&lt;br /&gt;
       wrapper templates.  For example, given the following template block&lt;br /&gt;
       definitions:&lt;br /&gt;
&lt;br /&gt;
           [% BLOCK bold   %]&amp;lt;b&amp;gt;[% content %]&amp;lt;/b&amp;gt;[% END %]&lt;br /&gt;
           [% BLOCK italic %]&amp;lt;i&amp;gt;[% content %]&amp;lt;/i&amp;gt;[% END %]&lt;br /&gt;
&lt;br /&gt;
       the directive&lt;br /&gt;
&lt;br /&gt;
           [% WRAPPER bold+italic %]Hello World[% END %]&lt;br /&gt;
&lt;br /&gt;
       would generate the following output:&lt;br /&gt;
&lt;br /&gt;
           &amp;lt;b&amp;gt;&amp;lt;i&amp;gt;Hello World&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   BLOCK&lt;br /&gt;
       The &amp;quot;BLOCK&amp;quot;...&amp;quot;END&amp;quot; construct can be used to define template component&lt;br /&gt;
       blocks which can be processed with the &amp;quot;INCLUDE&amp;quot;, &amp;quot;PROCESS&amp;quot; and&lt;br /&gt;
       &amp;quot;WRAPPER&amp;quot; directives.&lt;br /&gt;
&lt;br /&gt;
           [% BLOCK tabrow %]&lt;br /&gt;
           &amp;lt;tr&amp;gt;&lt;br /&gt;
             &amp;lt;td&amp;gt;[% name %]&amp;lt;td&amp;gt;&lt;br /&gt;
             &amp;lt;td&amp;gt;[% email %]&amp;lt;/td&amp;gt;&lt;br /&gt;
           &amp;lt;/tr&amp;gt;&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
           &amp;lt;table&amp;gt;&lt;br /&gt;
             [% PROCESS tabrow  name='Fred'  email='fred@nowhere.com' %]&lt;br /&gt;
             [% PROCESS tabrow  name='Alan'  email='alan@nowhere.com' %]&lt;br /&gt;
           &amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
       A &amp;quot;BLOCK&amp;quot; definition can be used before it is defined, as long as the&lt;br /&gt;
       definition resides in the same file.  The block definition itself does&lt;br /&gt;
       not generate any output.&lt;br /&gt;
&lt;br /&gt;
           [% PROCESS tmpblk %]&lt;br /&gt;
&lt;br /&gt;
           [% BLOCK tmpblk %] This is OK [% END %]&lt;br /&gt;
&lt;br /&gt;
       You can use an anonymous &amp;quot;BLOCK&amp;quot; to capture the output of a template&lt;br /&gt;
       fragment.&lt;br /&gt;
&lt;br /&gt;
           [% julius = BLOCK %]&lt;br /&gt;
              And Caesar's spirit, ranging for revenge,&lt;br /&gt;
              With Ate by his side come hot from hell,&lt;br /&gt;
              Shall in these confines with a monarch's voice&lt;br /&gt;
              Cry  'Havoc', and let slip the dogs of war;&lt;br /&gt;
              That this foul deed shall smell above the earth&lt;br /&gt;
              With carrion men, groaning for burial.&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       Like a named block, it can contain any other template directives which&lt;br /&gt;
       are processed when the block is defined.  The output generated by the&lt;br /&gt;
       block is then assigned to the variable &amp;quot;julius&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
       Anonymous &amp;quot;BLOCK&amp;quot;s can also be used to define block macros.  The&lt;br /&gt;
       enclosing block is processed each time the macro is called.&lt;br /&gt;
&lt;br /&gt;
           [% MACRO locate BLOCK %]&lt;br /&gt;
              The [% animal %] sat on the [% place %].&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
           [% locate(animal='cat', place='mat') %]    # The cat sat on the mat&lt;br /&gt;
           [% locate(animal='dog', place='log') %]    # The dog sat on the log&lt;br /&gt;
&lt;br /&gt;
Conditional Processing&lt;br /&gt;
   IF / UNLESS / ELSIF / ELSE&lt;br /&gt;
       The &amp;quot;IF&amp;quot; and &amp;quot;UNLESS&amp;quot; directives can be used to process or ignore a&lt;br /&gt;
       block based on some run-time condition.&lt;br /&gt;
&lt;br /&gt;
           [% IF frames %]&lt;br /&gt;
              [% INCLUDE frameset %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
           [% UNLESS text_mode %]&lt;br /&gt;
              [% INCLUDE biglogo %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       Multiple conditions may be joined with &amp;quot;ELSIF&amp;quot; and/or &amp;quot;ELSE&amp;quot; blocks.&lt;br /&gt;
&lt;br /&gt;
           [% IF age &amp;lt; 10 %]&lt;br /&gt;
              Hello [% name %], does your mother know you're&lt;br /&gt;
              using her AOL account?&lt;br /&gt;
           [% ELSIF age &amp;lt; 18 %]&lt;br /&gt;
              Sorry, you're not old enough to enter&lt;br /&gt;
              (and too dumb to lie about your age)&lt;br /&gt;
           [% ELSE %]&lt;br /&gt;
              Welcome [% name %].&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       The following conditional and boolean operators may be used:&lt;br /&gt;
&lt;br /&gt;
           == != &amp;lt; &amp;lt;= &amp;gt; &amp;gt;= &amp;amp;&amp;amp; || ! and or not&lt;br /&gt;
&lt;br /&gt;
       Conditions may be arbitrarily complex and are evaluated with the same&lt;br /&gt;
       precedence as in Perl.  Parenthesis may be used to explicitly determine&lt;br /&gt;
       evaluation order.&lt;br /&gt;
&lt;br /&gt;
           # ridiculously contrived complex example&lt;br /&gt;
           [% IF (name == 'admin' || uid &amp;lt;= 0) &amp;amp;&amp;amp; mode == 'debug' %]&lt;br /&gt;
              I'm confused.&lt;br /&gt;
           [% ELSIF more &amp;gt; less %]&lt;br /&gt;
              That's more or less correct.&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;and&amp;quot;, &amp;quot;or&amp;quot; and &amp;quot;not&amp;quot; operator are provided as aliases for &amp;quot;&amp;amp;&amp;amp;&amp;quot;,&lt;br /&gt;
       &amp;quot;||&amp;quot; and &amp;quot;!&amp;quot;, respectively.  Unlike Perl, which treats &amp;quot;and&amp;quot;, &amp;quot;or&amp;quot; and&lt;br /&gt;
       &amp;quot;not&amp;quot; as separate, lower-precedence versions of the other operators,&lt;br /&gt;
       the Template Toolkit performs a straightforward substitution of &amp;quot;and&amp;quot;&lt;br /&gt;
       for &amp;quot;&amp;amp;&amp;amp;&amp;quot;, and so on.  That means that &amp;quot;and&amp;quot;, &amp;quot;or&amp;quot; and &amp;quot;not&amp;quot; have the&lt;br /&gt;
       same operator precedence as &amp;quot;&amp;amp;&amp;amp;&amp;quot;, &amp;quot;||&amp;quot; and &amp;quot;!&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
   SWITCH / CASE&lt;br /&gt;
       The &amp;quot;SWITCH&amp;quot; / &amp;quot;CASE&amp;quot; construct can be used to perform a multi-way&lt;br /&gt;
       conditional test.  The &amp;quot;SWITCH&amp;quot; directive expects an expression which&lt;br /&gt;
       is first evaluated and then compared against each CASE statement in&lt;br /&gt;
       turn.  Each &amp;quot;CASE&amp;quot; directive should contain a single value or a list of&lt;br /&gt;
       values which should match.  &amp;quot;CASE&amp;quot; may also be left blank or written as&lt;br /&gt;
       &amp;quot;[% CASE DEFAULT %]&amp;quot; to specify a default match.  Only one &amp;quot;CASE&amp;quot;&lt;br /&gt;
       matches, there is no drop-through between &amp;quot;CASE&amp;quot; statements.&lt;br /&gt;
&lt;br /&gt;
           [% SWITCH myvar %]&lt;br /&gt;
           [%   CASE 'value1' %]&lt;br /&gt;
                  ...&lt;br /&gt;
           [%   CASE ['value2', 'value3'] %]   # multiple values&lt;br /&gt;
                  ...&lt;br /&gt;
           [%   CASE myhash.keys %]            # ditto&lt;br /&gt;
                  ...&lt;br /&gt;
           [%   CASE %]                        # default&lt;br /&gt;
                  ...&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
Loop Processing&lt;br /&gt;
   FOREACH&lt;br /&gt;
       The &amp;quot;FOREACH&amp;quot; directive will iterate through the items in a list,&lt;br /&gt;
       processing the enclosed block for each one.&lt;br /&gt;
&lt;br /&gt;
           [% foo   = 'Foo'&lt;br /&gt;
              items = [ 'one', 'two', 'three' ]&lt;br /&gt;
           %]&lt;br /&gt;
&lt;br /&gt;
           Things:&lt;br /&gt;
           [% FOREACH thing IN [ foo 'Bar' &amp;quot;$foo Baz&amp;quot; ] %]&lt;br /&gt;
              * [% thing %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
           Items:&lt;br /&gt;
           [% FOREACH i IN items %]&lt;br /&gt;
              * [% i %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
           Stuff:&lt;br /&gt;
           [% stuff = [ foo &amp;quot;$foo Bar&amp;quot; ] %]&lt;br /&gt;
           [% FOREACH s IN stuff %]&lt;br /&gt;
              * [% s %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       output:&lt;br /&gt;
&lt;br /&gt;
           Things:&lt;br /&gt;
             * Foo&lt;br /&gt;
             * Bar&lt;br /&gt;
             * Foo Baz&lt;br /&gt;
&lt;br /&gt;
           Items:&lt;br /&gt;
             * one&lt;br /&gt;
             * two&lt;br /&gt;
             * three&lt;br /&gt;
&lt;br /&gt;
           Stuff:&lt;br /&gt;
             * Foo&lt;br /&gt;
             * Foo Bar&lt;br /&gt;
&lt;br /&gt;
       You can use also use &amp;quot;=&amp;quot; instead of &amp;quot;IN&amp;quot; if you prefer.&lt;br /&gt;
&lt;br /&gt;
           [% FOREACH i = items %]&lt;br /&gt;
&lt;br /&gt;
       When the &amp;quot;FOREACH&amp;quot; directive is used without specifying a target&lt;br /&gt;
       variable, any iterated values which are hash references will be&lt;br /&gt;
       automatically imported.&lt;br /&gt;
&lt;br /&gt;
           [% userlist = [&lt;br /&gt;
               { id =&amp;gt; 'tom',   name =&amp;gt; 'Thomas'  },&lt;br /&gt;
               { id =&amp;gt; 'dick',  name =&amp;gt; 'Richard'  },&lt;br /&gt;
               { id =&amp;gt; 'larry', name =&amp;gt; 'Lawrence' },&lt;br /&gt;
              ]&lt;br /&gt;
           %]&lt;br /&gt;
&lt;br /&gt;
           [% FOREACH user IN userlist %]&lt;br /&gt;
              [% user.id %] [% user.name %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       short form:&lt;br /&gt;
&lt;br /&gt;
           [% FOREACH userlist %]&lt;br /&gt;
              [% id %] [% name %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       Note that this particular usage creates a localised variable context to&lt;br /&gt;
       prevent the imported hash keys from overwriting any existing variables.&lt;br /&gt;
       The imported definitions and any other variables defined in such a&lt;br /&gt;
       &amp;quot;FOREACH&amp;quot; loop will be lost at the end of the loop, when the previous&lt;br /&gt;
       context and variable values are restored.&lt;br /&gt;
&lt;br /&gt;
       However, under normal operation, the loop variable remains in scope&lt;br /&gt;
       after the &amp;quot;FOREACH&amp;quot; loop has ended (caveat: overwriting any variable&lt;br /&gt;
       previously in scope). This is useful as the loop variable is secretly&lt;br /&gt;
       an iterator object (see below) and can be used to analyse the last&lt;br /&gt;
       entry processed by the loop.&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;FOREACH&amp;quot; directive can also be used to iterate through the entries&lt;br /&gt;
       in a hash array.  Each entry in the hash is returned in sorted order&lt;br /&gt;
       (based on the key) as a hash array containing ’key’ and ’value’ items.&lt;br /&gt;
&lt;br /&gt;
           [% users = {&lt;br /&gt;
                tom   =&amp;gt; 'Thomas',&lt;br /&gt;
                dick  =&amp;gt; 'Richard',&lt;br /&gt;
                larry =&amp;gt; 'Lawrence',&lt;br /&gt;
              }&lt;br /&gt;
           %]&lt;br /&gt;
&lt;br /&gt;
           [% FOREACH u IN users %]&lt;br /&gt;
              * [% u.key %] : [% u.value %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       Output:&lt;br /&gt;
&lt;br /&gt;
              * dick : Richard&lt;br /&gt;
              * larry : Lawrence&lt;br /&gt;
              * tom : Thomas&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;NEXT&amp;quot; directive starts the next iteration in the &amp;quot;FOREACH&amp;quot; loop.&lt;br /&gt;
&lt;br /&gt;
           [% FOREACH user IN userlist %]&lt;br /&gt;
              [% NEXT IF user.isguest %]&lt;br /&gt;
              Name: [% user.name %]    Email: [% user.email %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;LAST&amp;quot; directive can be used to prematurely exit the loop.  &amp;quot;BREAK&amp;quot;&lt;br /&gt;
       is also provided as an alias for &amp;quot;LAST&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
           [% FOREACH match IN results.nsort('score').reverse %]&lt;br /&gt;
              [% LAST IF match.score &amp;lt; 50 %]&lt;br /&gt;
              [% match.score %] : [% match.url %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;FOREACH&amp;quot; directive is implemented using the Template::Iterator&lt;br /&gt;
       module.  A reference to the iterator object for a &amp;quot;FOREACH&amp;quot; directive&lt;br /&gt;
       is implicitly available in the &amp;quot;loop&amp;quot; variable.  The following methods&lt;br /&gt;
       can be called on the &amp;quot;loop&amp;quot; iterator.&lt;br /&gt;
&lt;br /&gt;
           size()      number of elements in the list&lt;br /&gt;
           max()       index number of last element (size - 1)&lt;br /&gt;
           index()     index of current iteration from 0 to max()&lt;br /&gt;
           count()     iteration counter from 1 to size() (i.e. index() + 1)&lt;br /&gt;
           first()     true if the current iteration is the first&lt;br /&gt;
           last()      true if the current iteration is the last&lt;br /&gt;
           prev()      return the previous item in the list&lt;br /&gt;
           next()      return the next item in the list&lt;br /&gt;
&lt;br /&gt;
       See Template::Iterator for further details.&lt;br /&gt;
&lt;br /&gt;
       Example:&lt;br /&gt;
&lt;br /&gt;
           [% FOREACH item IN [ 'foo', 'bar', 'baz' ] -%]&lt;br /&gt;
              [%- &amp;quot;&amp;lt;ul&amp;gt;\n&amp;quot; IF loop.first %]&lt;br /&gt;
              &amp;lt;li&amp;gt;[% loop.count %]/[% loop.size %]: [% item %]&lt;br /&gt;
              [%- &amp;quot;&amp;lt;/ul&amp;gt;\n&amp;quot; IF loop.last %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       Output:&lt;br /&gt;
&lt;br /&gt;
           &amp;lt;ul&amp;gt;&lt;br /&gt;
           &amp;lt;li&amp;gt;1/3: foo&lt;br /&gt;
           &amp;lt;li&amp;gt;2/3: bar&lt;br /&gt;
           &amp;lt;li&amp;gt;3/3: baz&lt;br /&gt;
           &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
       Nested loops will work as expected, with the &amp;quot;loop&amp;quot; variable correctly&lt;br /&gt;
       referencing the innermost loop and being restored to any previous value&lt;br /&gt;
       (i.e. an outer loop) at the end of the loop.&lt;br /&gt;
&lt;br /&gt;
           [% FOREACH group IN grouplist;&lt;br /&gt;
                # loop =&amp;gt; group iterator&lt;br /&gt;
                &amp;quot;Groups:\n&amp;quot; IF loop.first;&lt;br /&gt;
&lt;br /&gt;
                FOREACH user IN group.userlist;&lt;br /&gt;
                   # loop =&amp;gt; user iterator&lt;br /&gt;
                   &amp;quot;$loop.count: $user.name\n&amp;quot;;&lt;br /&gt;
                END;&lt;br /&gt;
&lt;br /&gt;
                # loop =&amp;gt; group iterator&lt;br /&gt;
                &amp;quot;End of Groups\n&amp;quot; IF loop.last;&lt;br /&gt;
              END&lt;br /&gt;
           %]&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;iterator&amp;quot; plugin can also be used to explicitly create an iterator&lt;br /&gt;
       object.  This can be useful within nested loops where you need to keep&lt;br /&gt;
       a reference to the outer iterator within the inner loop.  The iterator&lt;br /&gt;
       plugin effectively allows you to create an iterator by a name other&lt;br /&gt;
       than &amp;quot;loop&amp;quot;.  See Template::Plugin::Iterator for further details.&lt;br /&gt;
&lt;br /&gt;
           [% USE giter = iterator(grouplist) %]&lt;br /&gt;
&lt;br /&gt;
           [% FOREACH group IN giter %]&lt;br /&gt;
              [% FOREACH user IN group.userlist %]&lt;br /&gt;
                    user #[% loop.count %] in&lt;br /&gt;
                    group [% giter.count %] is&lt;br /&gt;
                    named [% user.name %]&lt;br /&gt;
              [% END %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
   WHILE&lt;br /&gt;
       The &amp;quot;WHILE&amp;quot; directive can be used to repeatedly process a template&lt;br /&gt;
       block while a conditional expression evaluates true.  The expression&lt;br /&gt;
       may be arbitrarily complex as per &amp;quot;IF&amp;quot; / &amp;quot;UNLESS&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
           [% WHILE total &amp;lt; 100 %]&lt;br /&gt;
              ...&lt;br /&gt;
              [% total = calculate_new_total %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       An assignment can be enclosed in parenthesis to evaluate the assigned&lt;br /&gt;
       value.&lt;br /&gt;
&lt;br /&gt;
           [% WHILE (user = get_next_user_record) %]&lt;br /&gt;
              [% user.name %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;NEXT&amp;quot; directive can be used to start the next iteration of a&lt;br /&gt;
       &amp;quot;WHILE&amp;quot; loop and &amp;quot;BREAK&amp;quot; can be used to exit the loop, both as per&lt;br /&gt;
       &amp;quot;FOREACH&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
       The Template Toolkit uses a failsafe counter to prevent runaway &amp;quot;WHILE&amp;quot;&lt;br /&gt;
       loops which would otherwise never terminate.  If the loop exceeds 1000&lt;br /&gt;
       iterations then an &amp;quot;undef&amp;quot; exception will be thrown, reporting the&lt;br /&gt;
       error:&lt;br /&gt;
&lt;br /&gt;
           WHILE loop terminated (&amp;gt; 1000 iterations)&lt;br /&gt;
&lt;br /&gt;
       The $Template::Directive::WHILE_MAX variable controls this behaviour&lt;br /&gt;
       and can be set to a higher value if necessary.&lt;br /&gt;
&lt;br /&gt;
Filters, Plugins, Macros and Perl&lt;br /&gt;
   FILTER&lt;br /&gt;
       The &amp;quot;FILTER&amp;quot; directive can be used to post-process the output of a&lt;br /&gt;
       block.  A number of standard filters are provided with the Template&lt;br /&gt;
       Toolkit.  The &amp;quot;html&amp;quot; filter, for example, escapes the ’&amp;lt;’, ’&amp;gt;’ and ’&amp;amp;’&lt;br /&gt;
       characters to prevent them from being interpreted as HTML tags or&lt;br /&gt;
       entity reference markers.&lt;br /&gt;
&lt;br /&gt;
           [% FILTER html %]&lt;br /&gt;
              HTML text may have &amp;lt; and &amp;gt; characters embedded&lt;br /&gt;
              which you want converted to the correct HTML entities.&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       output:&lt;br /&gt;
&lt;br /&gt;
              HTML text may have &amp;amp;lt; and &amp;amp;gt; characters embedded&lt;br /&gt;
              which you want converted to the correct HTML entities.&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;FILTER&amp;quot; directive can also follow various other non-block&lt;br /&gt;
       directives.  For example:&lt;br /&gt;
&lt;br /&gt;
           [% INCLUDE mytext FILTER html %]&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;|&amp;quot; character can also be used as an alias for &amp;quot;FILTER&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
           [% INCLUDE mytext | html %]&lt;br /&gt;
&lt;br /&gt;
       Multiple filters can be chained together and will be called in&lt;br /&gt;
       sequence.&lt;br /&gt;
&lt;br /&gt;
           [% INCLUDE mytext FILTER html FILTER html_para %]&lt;br /&gt;
&lt;br /&gt;
       or&lt;br /&gt;
&lt;br /&gt;
           [% INCLUDE mytext | html | html_para %]&lt;br /&gt;
&lt;br /&gt;
       Filters come in two flavours, known as ’static’ or ’dynamic’.  A static&lt;br /&gt;
       filter is a simple subroutine which accepts a text string as the only&lt;br /&gt;
       argument and returns the modified text.  The &amp;quot;html&amp;quot; filter is an&lt;br /&gt;
       example of a static filter, implemented as:&lt;br /&gt;
&lt;br /&gt;
           sub html_filter {&lt;br /&gt;
               my $text = shift;&lt;br /&gt;
               for ($text) {&lt;br /&gt;
                   s/&amp;amp;/&amp;amp;amp;/g;&lt;br /&gt;
                   s/&amp;lt;/&amp;amp;lt;/g;&lt;br /&gt;
                   s/&amp;gt;/&amp;amp;gt;/g;&lt;br /&gt;
               }&lt;br /&gt;
               return $text;&lt;br /&gt;
           }&lt;br /&gt;
&lt;br /&gt;
       Dynamic filters can accept arguments which are specified when the&lt;br /&gt;
       filter is called from a template.  The &amp;quot;repeat&amp;quot; filter is such an&lt;br /&gt;
       example, accepting a numerical argument which specifies the number of&lt;br /&gt;
       times that the input text should be repeated.&lt;br /&gt;
&lt;br /&gt;
           [% FILTER repeat(3) %]blah [% END %]&lt;br /&gt;
&lt;br /&gt;
       output:&lt;br /&gt;
&lt;br /&gt;
           blah blah blah&lt;br /&gt;
&lt;br /&gt;
       These are implemented as filter ’factories’.  The factory subroutine is&lt;br /&gt;
       passed a reference to the current Template::Context object along with&lt;br /&gt;
       any additional arguments specified.  It should then return a subroutine&lt;br /&gt;
       reference (e.g. a closure) which implements the filter.  The &amp;quot;repeat&amp;quot;&lt;br /&gt;
       filter factory is implemented like this:&lt;br /&gt;
&lt;br /&gt;
           sub repeat_filter_factory {&lt;br /&gt;
               my ($context, $iter) = @_;&lt;br /&gt;
               $iter = 1 unless defined $iter;&lt;br /&gt;
&lt;br /&gt;
               return sub {&lt;br /&gt;
                   my $text = shift;&lt;br /&gt;
                   $text = '' unless defined $text;&lt;br /&gt;
                   return join('\n', $text) x $iter;&lt;br /&gt;
               }&lt;br /&gt;
           }&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;FILTERS&amp;quot; option, described in Template::Manual::Config, allows&lt;br /&gt;
       custom filters to be defined when a Template object is instantiated.&lt;br /&gt;
       The define_filter() method allows further filters to be defined at any&lt;br /&gt;
       time.&lt;br /&gt;
&lt;br /&gt;
       When using a filter, it is possible to assign an alias to it for&lt;br /&gt;
       further use.  This is most useful for dynamic filters that you want to&lt;br /&gt;
       re-use with the same configuration.&lt;br /&gt;
&lt;br /&gt;
           [% FILTER echo = repeat(2) %]&lt;br /&gt;
           Is there anybody out there?&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
           [% FILTER echo %]&lt;br /&gt;
           Mother, should I build a wall?&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       Output:&lt;br /&gt;
&lt;br /&gt;
           Is there anybody out there?&lt;br /&gt;
           Is there anybody out there?&lt;br /&gt;
&lt;br /&gt;
           Mother, should I build a wall?&lt;br /&gt;
           Mother, should I build a wall?&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;FILTER&amp;quot; directive automatically quotes the name of the filter.  As&lt;br /&gt;
       with &amp;quot;INCLUDE&amp;quot; et al, you can use a variable to provide the name of the&lt;br /&gt;
       filter, prefixed by &amp;quot;$&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
           [% myfilter = 'html' %]&lt;br /&gt;
           [% FILTER $myfilter %]      # same as [% FILTER html %]&lt;br /&gt;
              ...&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       A template variable can also be used to define a static filter&lt;br /&gt;
       subroutine.  However, the Template Toolkit will automatically call any&lt;br /&gt;
       subroutine bound to a variable and use the value returned.  Thus, the&lt;br /&gt;
       above example could be implemented as:&lt;br /&gt;
&lt;br /&gt;
           my $vars = {&lt;br /&gt;
               myfilter =&amp;gt; sub { return 'html' },&lt;br /&gt;
           };&lt;br /&gt;
&lt;br /&gt;
       template:&lt;br /&gt;
&lt;br /&gt;
           [% FILTER $myfilter %]      # same as [% FILTER html %]&lt;br /&gt;
              ...&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       To define a template variable that evaluates to a subroutine reference&lt;br /&gt;
       that can be used by the &amp;quot;FILTER&amp;quot; directive, you should create a&lt;br /&gt;
       subroutine that, when called automatically by the Template Toolkit,&lt;br /&gt;
       returns another subroutine reference which can then be used to perform&lt;br /&gt;
       the filter operation.  Note that only static filters can be implemented&lt;br /&gt;
       in this way.&lt;br /&gt;
&lt;br /&gt;
           my $vars = {&lt;br /&gt;
               myfilter =&amp;gt; sub { \&amp;amp;my_filter_sub },&lt;br /&gt;
           };&lt;br /&gt;
&lt;br /&gt;
           sub my_filter_sub {&lt;br /&gt;
               my $text = shift;&lt;br /&gt;
               # do something&lt;br /&gt;
               return $text;&lt;br /&gt;
           }&lt;br /&gt;
&lt;br /&gt;
       template:&lt;br /&gt;
&lt;br /&gt;
           [% FILTER $myfilter %]&lt;br /&gt;
              ...&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       Alternately, you can bless a subroutine reference into a class (any&lt;br /&gt;
       class will do) to fool the Template Toolkit into thinking it’s an&lt;br /&gt;
       object rather than a subroutine.  This will then bypass the automatic&lt;br /&gt;
       &amp;quot;call-a-subroutine-to-return-a-value&amp;quot; magic.&lt;br /&gt;
&lt;br /&gt;
           my $vars = {&lt;br /&gt;
               myfilter =&amp;gt; bless(\&amp;amp;my_filter_sub, 'anything_you_like'),&lt;br /&gt;
           };&lt;br /&gt;
&lt;br /&gt;
       template:&lt;br /&gt;
&lt;br /&gt;
           [% FILTER $myfilter %]&lt;br /&gt;
              ...&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       Filters bound to template variables remain local to the variable&lt;br /&gt;
       context in which they are defined. That is, if you define a filter in a&lt;br /&gt;
       &amp;quot;PERL&amp;quot; block within a template that is loaded via &amp;quot;INCLUDE&amp;quot;, then the&lt;br /&gt;
       filter definition will only exist until the end of that template when&lt;br /&gt;
       the stash is delocalised, restoring the previous variable state. If you&lt;br /&gt;
       want to define a filter which persists for the lifetime of the&lt;br /&gt;
       processor, or define additional dynamic filter factories, then you can&lt;br /&gt;
       call the define_filter() method on the current Template::Context&lt;br /&gt;
       object.&lt;br /&gt;
&lt;br /&gt;
       See Template::Manual::Filters for a complete list of available filters,&lt;br /&gt;
       their descriptions and examples of use.&lt;br /&gt;
&lt;br /&gt;
   USE&lt;br /&gt;
       The &amp;quot;USE&amp;quot; directive can be used to load and initialise &amp;quot;plugin&amp;quot;&lt;br /&gt;
       extension modules.&lt;br /&gt;
&lt;br /&gt;
           [% USE myplugin %]&lt;br /&gt;
&lt;br /&gt;
       A plugin is a regular Perl module that conforms to a particular object-&lt;br /&gt;
       oriented interface, allowing it to be loaded into and used&lt;br /&gt;
       automatically by the Template Toolkit.  For details of this interface&lt;br /&gt;
       and information on writing plugins, consult Template::Plugin.&lt;br /&gt;
&lt;br /&gt;
       A number of standard plugins are included with the Template Toolkit&lt;br /&gt;
       (see below and Template::Manual::Plugins).  The names of these standard&lt;br /&gt;
       plugins are case insensitive.&lt;br /&gt;
&lt;br /&gt;
           [% USE CGI   %]        # =&amp;gt; Template::Plugin::CGI&lt;br /&gt;
           [% USE Cgi   %]        # =&amp;gt; Template::Plugin::CGI&lt;br /&gt;
           [% USE cgi   %]        # =&amp;gt; Template::Plugin::CGI&lt;br /&gt;
&lt;br /&gt;
       You can also define further plugins using the &amp;quot;PLUGINS&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
           my $tt = Template-&amp;gt;new({&lt;br /&gt;
               PLUGINS =&amp;gt; {&lt;br /&gt;
                   foo =&amp;gt; 'My::Plugin::Foo',&lt;br /&gt;
                   bar =&amp;gt; 'My::Plugin::Bar',&lt;br /&gt;
               },&lt;br /&gt;
           });&lt;br /&gt;
&lt;br /&gt;
       The recommended convention is to specify these plugin names in lower&lt;br /&gt;
       case.  The Template Toolkit first looks for an exact case-sensitive&lt;br /&gt;
       match and then tries the lower case conversion of the name specified.&lt;br /&gt;
&lt;br /&gt;
           [% USE Foo %]      # look for 'Foo' then 'foo'&lt;br /&gt;
&lt;br /&gt;
       If you define all your &amp;quot;PLUGINS&amp;quot; with lower case names then they will&lt;br /&gt;
       be located regardless of how the user specifies the name in the &amp;quot;USE&amp;quot;&lt;br /&gt;
       directive.  If, on the other hand, you define your &amp;quot;PLUGINS&amp;quot; with upper&lt;br /&gt;
       or mixed case names then the name specified in the &amp;quot;USE&amp;quot; directive must&lt;br /&gt;
       match the case exactly.&lt;br /&gt;
&lt;br /&gt;
       If the plugin isn’t defined in either the standard plugins&lt;br /&gt;
       ($Template::Plugins::STD_PLUGINS) or via the &amp;quot;PLUGINS&amp;quot; option, then the&lt;br /&gt;
       &amp;quot;PLUGIN_BASE&amp;quot; is searched.&lt;br /&gt;
&lt;br /&gt;
       In this case the plugin name is case-sensitive.  It is appended to each&lt;br /&gt;
       of the &amp;quot;PLUGIN_BASE&amp;quot; module namespaces in turn (default:&lt;br /&gt;
       &amp;quot;Template::Plugin&amp;quot;) to construct a full module name which it attempts&lt;br /&gt;
       to locate and load.  Any periods, ’&amp;quot;.&amp;quot;’, in the name will be converted&lt;br /&gt;
       to ’&amp;quot;::&amp;quot;’.&lt;br /&gt;
&lt;br /&gt;
           [% USE MyPlugin %]     #  =&amp;gt; Template::Plugin::MyPlugin&lt;br /&gt;
           [% USE Foo.Bar  %]     #  =&amp;gt; Template::Plugin::Foo::Bar&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;LOAD_PERL&amp;quot; option (disabled by default) provides a further way by&lt;br /&gt;
       which external Perl modules may be loaded.  If a regular Perl module&lt;br /&gt;
       (i.e. not a &amp;quot;Template::Plugin::*&amp;quot; or other module relative to some&lt;br /&gt;
       &amp;quot;PLUGIN_BASE&amp;quot;) supports an object-oriented interface and a &amp;quot;new()&amp;quot;&lt;br /&gt;
       constructor then it can be loaded and instantiated automatically.  The&lt;br /&gt;
       following trivial example shows how the IO::File module might be used.&lt;br /&gt;
&lt;br /&gt;
           [% USE file = IO.File('/tmp/mydata') %]&lt;br /&gt;
&lt;br /&gt;
           [% WHILE (line = file.getline) %]&lt;br /&gt;
              &amp;lt;!-- [% line %] --&amp;gt;&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       Any additional parameters supplied in parenthesis after the plugin name&lt;br /&gt;
       will be also be passed to the &amp;quot;new()&amp;quot; constructor.  A reference to the&lt;br /&gt;
       current Template::Context object is passed as the first parameter.&lt;br /&gt;
&lt;br /&gt;
           [% USE MyPlugin('foo', 123) %]&lt;br /&gt;
&lt;br /&gt;
       equivalent to:&lt;br /&gt;
&lt;br /&gt;
           Template::Plugin::MyPlugin-&amp;gt;new($context, 'foo', 123);&lt;br /&gt;
&lt;br /&gt;
       The only exception to this is when a module is loaded via the&lt;br /&gt;
       &amp;quot;LOAD_PERL&amp;quot; option.  In this case the $context reference is not passed&lt;br /&gt;
       to the &amp;quot;new()&amp;quot; constructor.  This is based on the assumption that the&lt;br /&gt;
       module is a regular Perl module rather than a Template Toolkit plugin&lt;br /&gt;
       so isn’t expecting a context reference and wouldn’t know what to do&lt;br /&gt;
       with it anyway.&lt;br /&gt;
&lt;br /&gt;
       Named parameters may also be specified.  These are collated into a hash&lt;br /&gt;
       which is passed by reference as the last parameter to the constructor,&lt;br /&gt;
       as per the general code calling interface.&lt;br /&gt;
&lt;br /&gt;
           [% USE url('/cgi-bin/foo', mode='submit', debug=1) %]&lt;br /&gt;
&lt;br /&gt;
       equivalent to:&lt;br /&gt;
&lt;br /&gt;
           Template::Plugin::URL-&amp;gt;new(&lt;br /&gt;
               $context,&lt;br /&gt;
               '/cgi-bin/foo'&lt;br /&gt;
               { mode =&amp;gt; 'submit', debug =&amp;gt; 1 }&lt;br /&gt;
           );&lt;br /&gt;
&lt;br /&gt;
       The plugin may represent any data type; a simple variable, hash, list&lt;br /&gt;
       or code reference, but in the general case it will be an object&lt;br /&gt;
       reference.  Methods can be called on the object (or the relevant&lt;br /&gt;
       members of the specific data type) in the usual way:&lt;br /&gt;
&lt;br /&gt;
           [% USE table(mydata, rows=3) %]&lt;br /&gt;
&lt;br /&gt;
           [% FOREACH row IN table.rows %]&lt;br /&gt;
              &amp;lt;tr&amp;gt;&lt;br /&gt;
              [% FOREACH item IN row %]&lt;br /&gt;
               &amp;lt;td&amp;gt;[% item %]&amp;lt;/td&amp;gt;&lt;br /&gt;
              [% END %]&lt;br /&gt;
              &amp;lt;/tr&amp;gt;&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       An alternative name may be provided for the plugin by which it can be&lt;br /&gt;
       referenced:&lt;br /&gt;
&lt;br /&gt;
           [% USE scores = table(myscores, cols=5) %]&lt;br /&gt;
&lt;br /&gt;
           [% FOREACH row IN scores.rows %]&lt;br /&gt;
              ...&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       You can use this approach to create multiple plugin objects with&lt;br /&gt;
       different configurations.  This example shows how the format plugin is&lt;br /&gt;
       used to create sub-routines bound to variables for formatting text as&lt;br /&gt;
       per &amp;quot;printf()&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
           [% USE bold = format('&amp;lt;b&amp;gt;%s&amp;lt;/b&amp;gt;') %]&lt;br /&gt;
           [% USE ital = format('&amp;lt;i&amp;gt;%s&amp;lt;/i&amp;gt;') %]&lt;br /&gt;
           [% bold('This is bold')   %]&lt;br /&gt;
           [% ital('This is italic') %]&lt;br /&gt;
&lt;br /&gt;
       Output:&lt;br /&gt;
&lt;br /&gt;
           &amp;lt;b&amp;gt;This is bold&amp;lt;/b&amp;gt;&lt;br /&gt;
           &amp;lt;i&amp;gt;This is italic&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
       This next example shows how the URL plugin can be used to build dynamic&lt;br /&gt;
       URLs from a base part and optional query parameters.&lt;br /&gt;
&lt;br /&gt;
           [% USE mycgi = URL('/cgi-bin/foo.pl', debug=1) %]&lt;br /&gt;
           &amp;lt;a href=&amp;quot;[% mycgi %]&amp;quot;&amp;gt;...&lt;br /&gt;
           &amp;lt;a href=&amp;quot;[% mycgi(mode='submit') %]&amp;quot;...&lt;br /&gt;
&lt;br /&gt;
       Output:&lt;br /&gt;
&lt;br /&gt;
           &amp;lt;a href=&amp;quot;/cgi-bin/foo.pl?debug=1&amp;quot;&amp;gt;...&lt;br /&gt;
           &amp;lt;a href=&amp;quot;/cgi-bin/foo.pl?mode=submit&amp;amp;debug=1&amp;quot;&amp;gt;...&lt;br /&gt;
&lt;br /&gt;
       The CGI plugin is an example of one which delegates to another Perl&lt;br /&gt;
       module. In this case, to Lincoln Stein’s &amp;quot;CGI&amp;quot; module.  All of the&lt;br /&gt;
       methods provided by the &amp;quot;CGI&amp;quot; module are available via the plugin.&lt;br /&gt;
&lt;br /&gt;
           [% USE CGI;&lt;br /&gt;
              CGI.start_form;&lt;br /&gt;
              CGI.checkbox_group( name   = 'colours',&lt;br /&gt;
                                  values = [ 'red' 'green' 'blue' ] );&lt;br /&gt;
              CGI.popup_menu( name   = 'items',&lt;br /&gt;
                              values = [ 'foo' 'bar' 'baz' ] );&lt;br /&gt;
              CGI.end_form&lt;br /&gt;
           %]&lt;br /&gt;
&lt;br /&gt;
       See Template::Manual::Plugins for more information on the plugins&lt;br /&gt;
       distributed with the toolkit or available from CPAN.&lt;br /&gt;
&lt;br /&gt;
   MACRO&lt;br /&gt;
       The &amp;quot;MACRO&amp;quot; directive allows you to define a directive or directive&lt;br /&gt;
       block which is then evaluated each time the macro is called.&lt;br /&gt;
&lt;br /&gt;
           [% MACRO header INCLUDE header %]&lt;br /&gt;
&lt;br /&gt;
       Calling the macro as:&lt;br /&gt;
&lt;br /&gt;
           [% header %]&lt;br /&gt;
&lt;br /&gt;
       is then equivalent to:&lt;br /&gt;
&lt;br /&gt;
           [% INCLUDE header %]&lt;br /&gt;
&lt;br /&gt;
       Macros can be passed named parameters when called.  These values remain&lt;br /&gt;
       local to the macro.&lt;br /&gt;
&lt;br /&gt;
           [% header(title='Hello World') %]&lt;br /&gt;
&lt;br /&gt;
       equivalent to:&lt;br /&gt;
&lt;br /&gt;
           [% INCLUDE header title='Hello World' %]&lt;br /&gt;
&lt;br /&gt;
       A &amp;quot;MACRO&amp;quot; definition may include parameter names.  Values passed to the&lt;br /&gt;
       macros are then mapped to these local variables.  Other named&lt;br /&gt;
       parameters may follow these.&lt;br /&gt;
&lt;br /&gt;
           [% MACRO header(title) INCLUDE header %]&lt;br /&gt;
           [% header('Hello World') %]&lt;br /&gt;
           [% header('Hello World', bgcol='#123456') %]&lt;br /&gt;
&lt;br /&gt;
       equivalent to:&lt;br /&gt;
&lt;br /&gt;
           [% INCLUDE header title='Hello World' %]&lt;br /&gt;
           [% INCLUDE header title='Hello World' bgcol='#123456' %]&lt;br /&gt;
&lt;br /&gt;
       Here’s another example, defining a macro for display numbers in comma-&lt;br /&gt;
       delimited groups of 3, using the chunk and join virtual method.&lt;br /&gt;
&lt;br /&gt;
           [% MACRO number(n) GET n.chunk(-3).join(',') %]&lt;br /&gt;
           [% number(1234567) %]    # 1,234,567&lt;br /&gt;
&lt;br /&gt;
       A &amp;quot;MACRO&amp;quot; may precede any directive and must conform to the structure&lt;br /&gt;
       of the directive.&lt;br /&gt;
&lt;br /&gt;
           [% MACRO header IF frames %]&lt;br /&gt;
              [% INCLUDE frames/header %]&lt;br /&gt;
           [% ELSE %]&lt;br /&gt;
              [% INCLUDE header %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
           [% header %]&lt;br /&gt;
&lt;br /&gt;
       A &amp;quot;MACRO&amp;quot; may also be defined as an anonymous &amp;quot;BLOCK&amp;quot;.  The block will&lt;br /&gt;
       be evaluated each time the macro is called.&lt;br /&gt;
&lt;br /&gt;
           [% MACRO header BLOCK %]&lt;br /&gt;
              ...content...&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
           [% header %]&lt;br /&gt;
&lt;br /&gt;
       If you’ve got the &amp;quot;EVAL_PERL&amp;quot; option set, then you can even define a&lt;br /&gt;
       &amp;quot;MACRO&amp;quot; as a &amp;quot;PERL&amp;quot; block (see below):&lt;br /&gt;
&lt;br /&gt;
           [% MACRO triple(n) PERL %]&lt;br /&gt;
                my $n = $stash-&amp;gt;get('n');&lt;br /&gt;
                print $n * 3;&lt;br /&gt;
           [% END -%]&lt;br /&gt;
&lt;br /&gt;
   PERL&lt;br /&gt;
       (for the advanced reader)&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;PERL&amp;quot; directive is used to mark the start of a block which&lt;br /&gt;
       contains Perl code for evaluation.  The &amp;quot;EVAL_PERL&amp;quot; option must be&lt;br /&gt;
       enabled for Perl code to be evaluated or a &amp;quot;perl&amp;quot; exception will be&lt;br /&gt;
       thrown with the message ’&amp;quot;EVAL_PERL not set&amp;quot;’.&lt;br /&gt;
&lt;br /&gt;
       Perl code is evaluated in the &amp;quot;Template::Perl&amp;quot; package.  The $context&lt;br /&gt;
       package variable contains a reference to the current Template::Context&lt;br /&gt;
       object.  This can be used to access the functionality of the Template&lt;br /&gt;
       Toolkit to process other templates, load plugins, filters, etc.  See&lt;br /&gt;
       Template::Context for further details.&lt;br /&gt;
&lt;br /&gt;
           [% PERL %]&lt;br /&gt;
              print $context-&amp;gt;include('myfile');&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       The $stash variable contains a reference to the top-level stash object&lt;br /&gt;
       which manages template variables.  Through this, variable values can be&lt;br /&gt;
       retrieved and updated.  See Template::Stash for further details.&lt;br /&gt;
&lt;br /&gt;
           [% PERL %]&lt;br /&gt;
              $stash-&amp;gt;set(foo =&amp;gt; 'bar');&lt;br /&gt;
              print &amp;quot;foo value: &amp;quot;, $stash-&amp;gt;get('foo');&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       Output:&lt;br /&gt;
&lt;br /&gt;
           foo value: bar&lt;br /&gt;
&lt;br /&gt;
       Output is generated from the &amp;quot;PERL&amp;quot; block by calling &amp;quot;print()&amp;quot;.  Note&lt;br /&gt;
       that the &amp;quot;Template::Perl::PERLOUT&amp;quot; handle is selected (tied to an&lt;br /&gt;
       output buffer) instead of &amp;quot;STDOUT&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
           [% PERL %]&lt;br /&gt;
              print &amp;quot;foo\n&amp;quot;;                           # OK&lt;br /&gt;
              print PERLOUT &amp;quot;bar\n&amp;quot;;                   # OK, same as above&lt;br /&gt;
              print Template::Perl::PERLOUT &amp;quot;baz\n&amp;quot;;   # OK, same as above&lt;br /&gt;
              print STDOUT &amp;quot;qux\n&amp;quot;;                    # WRONG!&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;PERL&amp;quot; block may contain other template directives.  These are&lt;br /&gt;
       processed before the Perl code is evaluated.&lt;br /&gt;
&lt;br /&gt;
           [% name = 'Fred Smith' %]&lt;br /&gt;
&lt;br /&gt;
           [% PERL %]&lt;br /&gt;
              print &amp;quot;[% name %]\n&amp;quot;;&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       Thus, the Perl code in the above example is evaluated as:&lt;br /&gt;
&lt;br /&gt;
           print &amp;quot;Fred Smith\n&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
       Exceptions may be thrown from within &amp;quot;PERL&amp;quot; blocks using &amp;quot;die()&amp;quot;.  They&lt;br /&gt;
       will be correctly caught by enclosing &amp;quot;TRY&amp;quot; blocks.&lt;br /&gt;
&lt;br /&gt;
           [% TRY %]&lt;br /&gt;
              [% PERL %]&lt;br /&gt;
                 die &amp;quot;nothing to live for\n&amp;quot;;&lt;br /&gt;
              [% END %]&lt;br /&gt;
           [% CATCH %]&lt;br /&gt;
              error: [% error.info %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       output:&lt;br /&gt;
              error: nothing to live for&lt;br /&gt;
&lt;br /&gt;
   RAWPERL&lt;br /&gt;
       (for the very advanced reader)&lt;br /&gt;
&lt;br /&gt;
       The Template Toolkit parser reads a source template and generates the&lt;br /&gt;
       text of a Perl subroutine as output.  It then uses &amp;quot;eval()&amp;quot; to evaluate&lt;br /&gt;
       it into a subroutine reference.  This subroutine is then called to&lt;br /&gt;
       process the template, passing a reference to the current&lt;br /&gt;
       Template::Context object through which the functionality of the&lt;br /&gt;
       Template Toolkit can be accessed.  The subroutine reference can be&lt;br /&gt;
       cached, allowing the template to be processed repeatedly without&lt;br /&gt;
       requiring any further parsing.&lt;br /&gt;
&lt;br /&gt;
       For example, a template such as:&lt;br /&gt;
&lt;br /&gt;
           [% PROCESS header %]&lt;br /&gt;
           The [% animal %] sat on the [% location %]&lt;br /&gt;
           [% PROCESS footer %]&lt;br /&gt;
&lt;br /&gt;
       is converted into the following Perl subroutine definition:&lt;br /&gt;
&lt;br /&gt;
           sub {&lt;br /&gt;
               my $context = shift;&lt;br /&gt;
               my $stash   = $context-&amp;gt;stash;&lt;br /&gt;
               my $output  = '';&lt;br /&gt;
               my $error;&lt;br /&gt;
&lt;br /&gt;
               eval { BLOCK: {&lt;br /&gt;
                   $output .=  $context-&amp;gt;process('header');&lt;br /&gt;
                   $output .=  &amp;quot;The &amp;quot;;&lt;br /&gt;
                   $output .=  $stash-&amp;gt;get('animal');&lt;br /&gt;
                   $output .=  &amp;quot; sat on the &amp;quot;;&lt;br /&gt;
                   $output .=  $stash-&amp;gt;get('location');&lt;br /&gt;
                   $output .=  $context-&amp;gt;process('footer');&lt;br /&gt;
                   $output .=  &amp;quot;\n&amp;quot;;&lt;br /&gt;
               } };&lt;br /&gt;
               if ($@) {&lt;br /&gt;
                   $error = $context-&amp;gt;catch($@, \$output);&lt;br /&gt;
                   die $error unless $error-&amp;gt;type eq 'return';&lt;br /&gt;
               }&lt;br /&gt;
&lt;br /&gt;
               return $output;&lt;br /&gt;
           }&lt;br /&gt;
&lt;br /&gt;
       To examine the Perl code generated, such as in the above example, set&lt;br /&gt;
       the $Template::Parser::DEBUG package variable to any true value.  You&lt;br /&gt;
       can also set the $Template::Directive::PRETTY variable true to have the&lt;br /&gt;
       code formatted in a readable manner for human consumption.  The source&lt;br /&gt;
       code for each generated template subroutine will be printed to &amp;quot;STDERR&amp;quot;&lt;br /&gt;
       on compilation (i.e. the first time a template is used).&lt;br /&gt;
&lt;br /&gt;
           $Template::Parser::DEBUG = 1;&lt;br /&gt;
           $Template::Directive::PRETTY = 1;&lt;br /&gt;
&lt;br /&gt;
           $template-&amp;gt;process($file, $vars)&lt;br /&gt;
               || die $template-&amp;gt;error(), &amp;quot;\n&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;PERL&amp;quot; ... &amp;quot;END&amp;quot; construct allows Perl code to be embedded into a&lt;br /&gt;
       template when the &amp;quot;EVAL_PERL&amp;quot; option is set.  It is evaluated at&lt;br /&gt;
       &amp;quot;runtime&amp;quot; using &amp;quot;eval()&amp;quot; each time the template subroutine is called.&lt;br /&gt;
       This is inherently flexible, but not as efficient as it could be,&lt;br /&gt;
       especially in a persistent server environment where a template may be&lt;br /&gt;
       processed many times.&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;RAWPERL&amp;quot; directive allows you to write Perl code that is&lt;br /&gt;
       integrated directly into the generated Perl subroutine text.  It is&lt;br /&gt;
       evaluated once at compile time and is stored in cached form as part of&lt;br /&gt;
       the compiled template subroutine.  This makes &amp;quot;RAWPERL&amp;quot; blocks more&lt;br /&gt;
       efficient than &amp;quot;PERL&amp;quot; blocks.&lt;br /&gt;
&lt;br /&gt;
       The downside is that you must code much closer to the metal. For&lt;br /&gt;
       example, in a &amp;quot;PERL&amp;quot; block you can call print() to generate some&lt;br /&gt;
       output. &amp;quot;RAWPERL&amp;quot; blocks don’t afford such luxury. The code is inserted&lt;br /&gt;
       directly into the generated subroutine text and should conform to the&lt;br /&gt;
       convention of appending to the $output variable.&lt;br /&gt;
&lt;br /&gt;
           [% PROCESS  header %]&lt;br /&gt;
&lt;br /&gt;
           [% RAWPERL %]&lt;br /&gt;
              $output .= &amp;quot;Some output\n&amp;quot;;&lt;br /&gt;
              ...&lt;br /&gt;
              $output .= &amp;quot;Some more output\n&amp;quot;;&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       The critical section of the generated subroutine for this example would&lt;br /&gt;
       then look something like:&lt;br /&gt;
&lt;br /&gt;
           ...&lt;br /&gt;
           eval { BLOCK: {&lt;br /&gt;
               $output .=  $context-&amp;gt;process('header');&lt;br /&gt;
               $output .=  &amp;quot;\n&amp;quot;;&lt;br /&gt;
               $output .= &amp;quot;Some output\n&amp;quot;;&lt;br /&gt;
               ...&lt;br /&gt;
               $output .= &amp;quot;Some more output\n&amp;quot;;&lt;br /&gt;
               $output .=  &amp;quot;\n&amp;quot;;&lt;br /&gt;
           } };&lt;br /&gt;
           ...&lt;br /&gt;
&lt;br /&gt;
       As with &amp;quot;PERL&amp;quot; blocks, the $context and $stash references are pre-&lt;br /&gt;
       defined and available for use within &amp;quot;RAWPERL&amp;quot; code.&lt;br /&gt;
&lt;br /&gt;
Exception Handling and Flow Control&lt;br /&gt;
   TRY / THROW / CATCH / FINAL&lt;br /&gt;
       (more advanced material)&lt;br /&gt;
&lt;br /&gt;
       The Template Toolkit supports fully functional, nested exception&lt;br /&gt;
       handling.  The &amp;quot;TRY&amp;quot; directive introduces an exception handling scope&lt;br /&gt;
       which continues until the matching &amp;quot;END&amp;quot; directive.  Any errors that&lt;br /&gt;
       occur within that block will be caught and can be handled by one of the&lt;br /&gt;
       &amp;quot;CATCH&amp;quot; blocks defined.&lt;br /&gt;
&lt;br /&gt;
           [% TRY %]&lt;br /&gt;
              ...blah...blah...&lt;br /&gt;
              [% CALL somecode %]&lt;br /&gt;
              ...etc...&lt;br /&gt;
              [% INCLUDE someblock %]&lt;br /&gt;
              ...and so on...&lt;br /&gt;
           [% CATCH %]&lt;br /&gt;
              An error occurred!&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       Errors are raised as exceptions (objects of the Template::Exception&lt;br /&gt;
       class) which contain two fields: &amp;quot;type&amp;quot; and &amp;quot;info&amp;quot;. The exception&lt;br /&gt;
       &amp;quot;type&amp;quot; is used to indicate the kind of error that occurred. It is a&lt;br /&gt;
       simple text string which can contain letters, numbers, ’&amp;quot;_&amp;quot;’ or ’&amp;quot;.&amp;quot;’.&lt;br /&gt;
       The &amp;quot;info&amp;quot; field contains an error message indicating what actually&lt;br /&gt;
       went wrong. Within a catch block, the exception object is aliased to&lt;br /&gt;
       the &amp;quot;error&amp;quot; variable. You can access the &amp;quot;type&amp;quot; and &amp;quot;info&amp;quot; fields&lt;br /&gt;
       directly.&lt;br /&gt;
&lt;br /&gt;
           [% mydsn = 'dbi:MySQL:foobar' %]&lt;br /&gt;
           ...&lt;br /&gt;
&lt;br /&gt;
           [% TRY %]&lt;br /&gt;
              [% USE DBI(mydsn) %]&lt;br /&gt;
           [% CATCH %]&lt;br /&gt;
              ERROR! Type: [% error.type %]&lt;br /&gt;
                     Info: [% error.info %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       output (assuming a non-existent database called ’&amp;quot;foobar&amp;quot;’):&lt;br /&gt;
&lt;br /&gt;
           ERROR!  Type: DBI&lt;br /&gt;
                   Info: Unknown database &amp;quot;foobar&amp;quot;&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;error&amp;quot; variable can also be specified by itself and will return a&lt;br /&gt;
       string of the form &amp;quot;&amp;quot;$type error - $info&amp;quot;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
           ...&lt;br /&gt;
           [% CATCH %]&lt;br /&gt;
           ERROR: [% error %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       Output:&lt;br /&gt;
&lt;br /&gt;
           ERROR: DBI error - Unknown database &amp;quot;foobar&amp;quot;&lt;br /&gt;
&lt;br /&gt;
       Each &amp;quot;CATCH&amp;quot; block may be specified with a particular exception type&lt;br /&gt;
       denoting the kind of error that it should catch.  Multiple &amp;quot;CATCH&amp;quot;&lt;br /&gt;
       blocks can be provided to handle different types of exception that may&lt;br /&gt;
       be thrown in the &amp;quot;TRY&amp;quot; block.  A &amp;quot;CATCH&amp;quot; block specified without any&lt;br /&gt;
       type, as in the previous example, is a default handler which will catch&lt;br /&gt;
       any otherwise uncaught exceptions.  This can also be specified as &amp;quot;[%&lt;br /&gt;
       CATCH DEFAULT %]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
           [% TRY %]&lt;br /&gt;
              [% INCLUDE myfile %]&lt;br /&gt;
              [% USE DBI(mydsn) %]&lt;br /&gt;
              [% CALL somecode %]&lt;br /&gt;
           [% CATCH file %]&lt;br /&gt;
              File Error! [% error.info %]&lt;br /&gt;
           [% CATCH DBI %]&lt;br /&gt;
              [% INCLUDE database/error.html %]&lt;br /&gt;
           [% CATCH %]&lt;br /&gt;
              [% error %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       Remember that you can specify multiple directives within a single tag,&lt;br /&gt;
       each delimited by ’&amp;quot;;&amp;quot;’.  So the above example can be written more&lt;br /&gt;
       concisely as:&lt;br /&gt;
&lt;br /&gt;
           [% TRY;&lt;br /&gt;
                  INCLUDE myfile;&lt;br /&gt;
                  USE DBI(mydsn);&lt;br /&gt;
                  CALL somecode;&lt;br /&gt;
              CATCH file;&lt;br /&gt;
                  &amp;quot;File Error! $error.info&amp;quot;;&lt;br /&gt;
              CATCH DBI;&lt;br /&gt;
                  INCLUDE database/error.html;&lt;br /&gt;
              CATCH;&lt;br /&gt;
                  error;&lt;br /&gt;
              END&lt;br /&gt;
           %]&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;DBI&amp;quot; plugin throws exceptions of the &amp;quot;DBI&amp;quot; type (in case that&lt;br /&gt;
       wasn’t already obvious).  The other specific exception caught here is&lt;br /&gt;
       of the &amp;quot;file&amp;quot; type.&lt;br /&gt;
&lt;br /&gt;
       A &amp;quot;file&amp;quot; exception is automatically thrown by the Template Toolkit when&lt;br /&gt;
       it can’t find a file, or fails to load, parse or process a file that&lt;br /&gt;
       has been requested by an &amp;quot;INCLUDE&amp;quot;, &amp;quot;PROCESS&amp;quot;, &amp;quot;INSERT&amp;quot; or &amp;quot;WRAPPER&amp;quot;&lt;br /&gt;
       directive.  If &amp;quot;myfile&amp;quot; can’t be found in the example above, the &amp;quot;[%&lt;br /&gt;
       INCLUDE myfile %]&amp;quot; directive will raise a &amp;quot;file&amp;quot; exception which is&lt;br /&gt;
       then caught by the &amp;quot;[% CATCH file %]&amp;quot; block.  The output generated&lt;br /&gt;
       would be:&lt;br /&gt;
&lt;br /&gt;
           File Error! myfile: not found&lt;br /&gt;
&lt;br /&gt;
       Note that the &amp;quot;DEFAULT&amp;quot; option (disabled by default) allows you to&lt;br /&gt;
       specify a default file to be used any time a template file can’t be&lt;br /&gt;
       found. This will prevent file exceptions from ever being raised when a&lt;br /&gt;
       non-existent file is requested (unless, of course, the &amp;quot;DEFAULT&amp;quot; file&lt;br /&gt;
       your specify doesn’t exist).  Errors encountered once the file has been&lt;br /&gt;
       found (i.e. read error, parse error) will be raised as file exceptions&lt;br /&gt;
       as per usual.&lt;br /&gt;
&lt;br /&gt;
       Uncaught exceptions (i.e. if the &amp;quot;TRY&amp;quot; block doesn’t have a type&lt;br /&gt;
       specific or default &amp;quot;CATCH&amp;quot; handler) may be caught by enclosing &amp;quot;TRY&amp;quot;&lt;br /&gt;
       blocks which can be nested indefinitely across multiple templates. If&lt;br /&gt;
       the error isn’t caught at any level then processing will stop and the&lt;br /&gt;
       Template process() method will return a false value to the caller. The&lt;br /&gt;
       relevant Template::Exception object can be retrieved by calling the&lt;br /&gt;
       error() method.&lt;br /&gt;
&lt;br /&gt;
           [% TRY %]&lt;br /&gt;
              ...&lt;br /&gt;
              [% TRY %]&lt;br /&gt;
                 [% INCLUDE $user.header %]&lt;br /&gt;
              [% CATCH file %]&lt;br /&gt;
                 [% INCLUDE header %]&lt;br /&gt;
              [% END %]&lt;br /&gt;
              ...&lt;br /&gt;
           [% CATCH DBI %]&lt;br /&gt;
              [% INCLUDE database/error.html %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       In this example, the inner &amp;quot;TRY&amp;quot; block is used to ensure that the first&lt;br /&gt;
       &amp;quot;INCLUDE&amp;quot; directive works as expected.  We’re using a variable to&lt;br /&gt;
       provide the name of the template we want to include, &amp;quot;user.header&amp;quot;, and&lt;br /&gt;
       it’s possible this contains the name of a non-existent template, or&lt;br /&gt;
       perhaps one containing invalid template directives.  If the &amp;quot;INCLUDE&amp;quot;&lt;br /&gt;
       fails with a &amp;quot;file&amp;quot; error then we &amp;quot;CATCH&amp;quot; it in the inner block and&lt;br /&gt;
       &amp;quot;INCLUDE&amp;quot; the default &amp;quot;header&amp;quot; file instead.  Any &amp;quot;DBI&amp;quot; errors that&lt;br /&gt;
       occur within the scope of the outer &amp;quot;TRY&amp;quot; block will be caught in the&lt;br /&gt;
       relevant &amp;quot;CATCH&amp;quot; block, causing the &amp;quot;database/error.html&amp;quot; template to&lt;br /&gt;
       be processed.  Note that included templates inherit all currently&lt;br /&gt;
       defined template variable so these error files can quite happily access&lt;br /&gt;
       the &amp;lt;error&amp;gt; variable to retrieve information about the currently caught&lt;br /&gt;
       exception.  For example, the &amp;quot;database/error.html&amp;quot; template might look&lt;br /&gt;
       like this:&lt;br /&gt;
&lt;br /&gt;
           &amp;lt;h2&amp;gt;Database Error&amp;lt;/h2&amp;gt;&lt;br /&gt;
           A database error has occurred: [% error.info %]&lt;br /&gt;
&lt;br /&gt;
       You can also specify a &amp;quot;FINAL&amp;quot; block.  This is always processed&lt;br /&gt;
       regardless of the outcome of the &amp;quot;TRY&amp;quot; and/or &amp;quot;CATCH&amp;quot; blocks.  If an&lt;br /&gt;
       exception is uncaught then the &amp;quot;FINAL&amp;quot; block is processed before&lt;br /&gt;
       jumping to the enclosing block or returning to the caller.&lt;br /&gt;
&lt;br /&gt;
           [% TRY %]&lt;br /&gt;
              ...&lt;br /&gt;
           [% CATCH this %]&lt;br /&gt;
              ...&lt;br /&gt;
           [% CATCH that %]&lt;br /&gt;
              ...&lt;br /&gt;
           [% FINAL %]&lt;br /&gt;
              All done!&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       The output from the &amp;quot;TRY&amp;quot; block is left intact up to the point where an&lt;br /&gt;
       exception occurs.  For example, this template:&lt;br /&gt;
&lt;br /&gt;
           [% TRY %]&lt;br /&gt;
              This gets printed&lt;br /&gt;
              [% THROW food 'carrots' %]&lt;br /&gt;
              This doesn't&lt;br /&gt;
           [% CATCH food %]&lt;br /&gt;
              culinary delights: [% error.info %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       generates the following output:&lt;br /&gt;
&lt;br /&gt;
           This gets printed&lt;br /&gt;
           culinary delights: carrots&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;CLEAR&amp;quot; directive can be used in a &amp;quot;CATCH&amp;quot; or &amp;quot;FINAL&amp;quot; block to&lt;br /&gt;
       clear any output created in the &amp;quot;TRY&amp;quot; block.&lt;br /&gt;
&lt;br /&gt;
           [% TRY %]&lt;br /&gt;
              This gets printed&lt;br /&gt;
              [% THROW food 'carrots' %]&lt;br /&gt;
              This doesn't&lt;br /&gt;
           [% CATCH food %]&lt;br /&gt;
              [% CLEAR %]&lt;br /&gt;
              culinary delights: [% error.info %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       Output:&lt;br /&gt;
&lt;br /&gt;
           culinary delights: carrots&lt;br /&gt;
&lt;br /&gt;
       Exception types are hierarchical, with each level being separated by&lt;br /&gt;
       the familiar dot operator.  A &amp;quot;DBI.connect&amp;quot; exception is a more&lt;br /&gt;
       specific kind of &amp;quot;DBI&amp;quot; error.  Similarly, an &amp;quot;example.error.barf&amp;quot; is a&lt;br /&gt;
       more specific kind of &amp;quot;example.error&amp;quot; type which itself is also a&lt;br /&gt;
       &amp;quot;example&amp;quot; error.&lt;br /&gt;
&lt;br /&gt;
       A &amp;quot;CATCH&amp;quot; handler that specifies a general exception type (such as&lt;br /&gt;
       &amp;quot;DBI&amp;quot; or &amp;quot;example.error&amp;quot;) will also catch more specific types that have&lt;br /&gt;
       the same prefix as long as a more specific handler isn’t defined.  Note&lt;br /&gt;
       that the order in which &amp;quot;CATCH&amp;quot; handlers are defined is irrelevant; a&lt;br /&gt;
       more specific handler will always catch an exception in preference to a&lt;br /&gt;
       more generic or default one.&lt;br /&gt;
&lt;br /&gt;
           [% TRY %]&lt;br /&gt;
              ...&lt;br /&gt;
           [% CATCH DBI ;&lt;br /&gt;
                INCLUDE database/error.html ;&lt;br /&gt;
              CATCH DBI.connect ;&lt;br /&gt;
                INCLUDE database/connect.html ;&lt;br /&gt;
              CATCH ;&lt;br /&gt;
                INCLUDE error.html ;&lt;br /&gt;
              END&lt;br /&gt;
           %]&lt;br /&gt;
&lt;br /&gt;
       In this example, a &amp;quot;DBI.connect&amp;quot; error has it’s own handler, a more&lt;br /&gt;
       general &amp;quot;DBI&amp;quot; block is used for all other &amp;quot;DBI&amp;quot; or &amp;quot;DBI.*&amp;quot; errors and a&lt;br /&gt;
       default handler catches everything else.&lt;br /&gt;
&lt;br /&gt;
       Exceptions can be raised in a template using the &amp;quot;THROW&amp;quot; directive.&lt;br /&gt;
       The first parameter is the exception type which doesn’t need to be&lt;br /&gt;
       quoted (but can be, it’s the same as &amp;quot;INCLUDE&amp;quot;) followed by the&lt;br /&gt;
       relevant error message which can be any regular value such as a quoted&lt;br /&gt;
       string, variable, etc.&lt;br /&gt;
&lt;br /&gt;
           [% THROW food &amp;quot;Missing ingredients: $recipe.error&amp;quot; %]&lt;br /&gt;
           [% THROW user.login 'no user id: please login' %]&lt;br /&gt;
           [% THROW $myerror.type &amp;quot;My Error: $myerror.info&amp;quot; %]&lt;br /&gt;
&lt;br /&gt;
       It’s also possible to specify additional positional or named parameters&lt;br /&gt;
       to the &amp;quot;THROW&amp;quot; directive if you want to pass more than just a simple&lt;br /&gt;
       message back as the error info field.&lt;br /&gt;
&lt;br /&gt;
           [% THROW food 'eggs' 'flour' msg='Missing Ingredients' %]&lt;br /&gt;
&lt;br /&gt;
       In this case, the error &amp;quot;info&amp;quot; field will be a hash array containing&lt;br /&gt;
       the named arguments and an &amp;quot;args&amp;quot; item which contains a list of the&lt;br /&gt;
       positional arguments.&lt;br /&gt;
&lt;br /&gt;
           type =&amp;gt; 'food',&lt;br /&gt;
           info =&amp;gt; {&lt;br /&gt;
               msg  =&amp;gt; 'Missing Ingredients',&lt;br /&gt;
               args =&amp;gt; ['eggs', 'flour'],&lt;br /&gt;
           }&lt;br /&gt;
&lt;br /&gt;
       In addition to specifying individual positional arguments as &amp;quot;[%&lt;br /&gt;
       error.info.args.n %]&amp;quot;, the &amp;quot;info&amp;quot; hash contains keys directly pointing&lt;br /&gt;
       to the positional arguments, as a convenient shortcut.&lt;br /&gt;
&lt;br /&gt;
           [% error.info.0 %]   # same as [% error.info.args.0 %]&lt;br /&gt;
&lt;br /&gt;
       Exceptions can also be thrown from Perl code which you’ve bound to&lt;br /&gt;
       template variables, or defined as a plugin or other extension.  To&lt;br /&gt;
       raise an exception, call &amp;quot;die()&amp;quot; passing a reference to a&lt;br /&gt;
       Template::Exception object as the argument.  This will then be caught&lt;br /&gt;
       by any enclosing &amp;quot;TRY&amp;quot; blocks from where the code was called.&lt;br /&gt;
&lt;br /&gt;
           use Template::Exception;&lt;br /&gt;
           ...&lt;br /&gt;
           my $vars = {&lt;br /&gt;
               foo =&amp;gt; sub {&lt;br /&gt;
                   # ... do something ...&lt;br /&gt;
                   die Template::Exception-&amp;gt;new('myerr.naughty',&lt;br /&gt;
                                                'Bad, bad error');&lt;br /&gt;
               },&lt;br /&gt;
           };&lt;br /&gt;
&lt;br /&gt;
       Template:&lt;br /&gt;
&lt;br /&gt;
           [% TRY %]&lt;br /&gt;
              [% foo %]&lt;br /&gt;
           [% CATCH myerr ;&lt;br /&gt;
                &amp;quot;Error: $error&amp;quot; ;&lt;br /&gt;
              END&lt;br /&gt;
           %]&lt;br /&gt;
&lt;br /&gt;
       Output:&lt;br /&gt;
&lt;br /&gt;
           Error: myerr.naughty error - Bad, bad error&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;info&amp;quot; field can also be a reference to another object or data&lt;br /&gt;
       structure, if required.&lt;br /&gt;
&lt;br /&gt;
           die Template::Exception-&amp;gt;new('myerror', {&lt;br /&gt;
               module =&amp;gt; 'foo.pl',&lt;br /&gt;
               errors =&amp;gt; [ 'bad permissions', 'naughty boy' ],&lt;br /&gt;
           });&lt;br /&gt;
&lt;br /&gt;
       Later, in a template:&lt;br /&gt;
&lt;br /&gt;
           [% TRY %]&lt;br /&gt;
              ...&lt;br /&gt;
           [% CATCH myerror %]&lt;br /&gt;
              [% error.info.errors.size or 'no';&lt;br /&gt;
                 error.info.errors.size == 1 ? ' error' : ' errors' %]&lt;br /&gt;
              in [% error.info.module %]:&lt;br /&gt;
                 [% error.info.errors.join(', ') %].&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       Generating the output:&lt;br /&gt;
&lt;br /&gt;
              2 errors in foo.pl:&lt;br /&gt;
                 bad permissions, naughty boy.&lt;br /&gt;
&lt;br /&gt;
       You can also call &amp;quot;die()&amp;quot; with a single string, as is common in much&lt;br /&gt;
       existing Perl code.  This will automatically be converted to an&lt;br /&gt;
       exception of the ’&amp;quot;undef&amp;quot;’ type (that’s the literal string ’&amp;quot;undef&amp;quot;’,&lt;br /&gt;
       not the undefined value).  If the string isn’t terminated with a&lt;br /&gt;
       newline then Perl will append the familiar &amp;quot; at $file line $line&amp;quot;&lt;br /&gt;
       message.&lt;br /&gt;
&lt;br /&gt;
           sub foo {&lt;br /&gt;
               # ... do something ...&lt;br /&gt;
               die &amp;quot;I'm sorry, Dave, I can't do that\n&amp;quot;;&lt;br /&gt;
           }&lt;br /&gt;
&lt;br /&gt;
       If you’re writing a plugin, or some extension code that has the current&lt;br /&gt;
       Template::Context in scope (you can safely skip this section if this&lt;br /&gt;
       means nothing to you) then you can also raise an exception by calling&lt;br /&gt;
       the context throw() method. You can pass it an Template::Exception&lt;br /&gt;
       object reference, a pair of &amp;quot;($type, $info)&amp;quot; parameters or just an&lt;br /&gt;
       $info string to create an exception of ’&amp;quot;undef&amp;quot;’ type.&lt;br /&gt;
&lt;br /&gt;
           $context-&amp;gt;throw($e);            # exception object&lt;br /&gt;
           $context-&amp;gt;throw('Denied');      # 'undef' type&lt;br /&gt;
           $context-&amp;gt;throw('user.passwd', 'Bad Password');&lt;br /&gt;
&lt;br /&gt;
   NEXT&lt;br /&gt;
       The &amp;quot;NEXT&amp;quot; directive can be used to start the next iteration of a&lt;br /&gt;
       &amp;quot;FOREACH&amp;quot; or &amp;quot;WHILE&amp;quot; loop.&lt;br /&gt;
&lt;br /&gt;
           [% FOREACH user IN users %]&lt;br /&gt;
              [% NEXT IF user.isguest %]&lt;br /&gt;
              Name: [% user.name %]    Email: [% user.email %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
   LAST&lt;br /&gt;
       The &amp;quot;LAST&amp;quot; directive can be used to prematurely exit a &amp;quot;FOREACH&amp;quot; or&lt;br /&gt;
       &amp;quot;WHILE&amp;quot; loop.&lt;br /&gt;
&lt;br /&gt;
           [% FOREACH user IN users %]&lt;br /&gt;
              Name: [% user.name %]    Email: [% user.email %]&lt;br /&gt;
              [% LAST IF some.condition %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       &amp;quot;BREAK&amp;quot; can also be used as an alias for &amp;quot;LAST&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
   RETURN&lt;br /&gt;
       The &amp;quot;RETURN&amp;quot; directive can be used to stop processing the current&lt;br /&gt;
       template and return to the template from which it was called, resuming&lt;br /&gt;
       processing at the point immediately after the &amp;quot;INCLUDE&amp;quot;, &amp;quot;PROCESS&amp;quot; or&lt;br /&gt;
       &amp;quot;WRAPPER&amp;quot; directive. If there is no enclosing template then the&lt;br /&gt;
       Template process() method will return to the calling code with a true&lt;br /&gt;
       value.&lt;br /&gt;
&lt;br /&gt;
           Before&lt;br /&gt;
           [% INCLUDE half_wit %]&lt;br /&gt;
           After&lt;br /&gt;
&lt;br /&gt;
           [% BLOCK half_wit %]&lt;br /&gt;
           This is just half...&lt;br /&gt;
           [% RETURN %]&lt;br /&gt;
           ...a complete block&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       Output:&lt;br /&gt;
&lt;br /&gt;
           Before&lt;br /&gt;
           This is just half...&lt;br /&gt;
           After&lt;br /&gt;
&lt;br /&gt;
   STOP&lt;br /&gt;
       The &amp;quot;STOP&amp;quot; directive can be used to indicate that the processor should&lt;br /&gt;
       stop gracefully without processing any more of the template document.&lt;br /&gt;
       This is a planned stop and the Template process() method will return a&lt;br /&gt;
       true value to the caller. This indicates that the template was&lt;br /&gt;
       processed successfully according to the directives within it.&lt;br /&gt;
&lt;br /&gt;
           [% IF something.terrible.happened %]&lt;br /&gt;
              [% INCLUDE fatal/error.html %]&lt;br /&gt;
              [% STOP %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
           [% TRY %]&lt;br /&gt;
              [% USE DBI(mydsn) %]&lt;br /&gt;
              ...&lt;br /&gt;
           [% CATCH DBI.connect %]&lt;br /&gt;
              &amp;lt;h1&amp;gt;Cannot connect to the database: [% error.info %]&amp;lt;/h1&amp;gt;&lt;br /&gt;
              &amp;lt;p&amp;gt;&lt;br /&gt;
                We apologise for the inconvenience.&lt;br /&gt;
              &amp;lt;/p&amp;gt;&lt;br /&gt;
              [% INCLUDE footer %]&lt;br /&gt;
              [% STOP %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
   CLEAR&lt;br /&gt;
       The &amp;quot;CLEAR&amp;quot; directive can be used to clear the output buffer for the&lt;br /&gt;
       current enclosing block.   It is most commonly used to clear the output&lt;br /&gt;
       generated from a &amp;quot;TRY&amp;quot; block up to the point where the error occurred.&lt;br /&gt;
&lt;br /&gt;
           [% TRY %]&lt;br /&gt;
              blah blah blah            # this is normally left intact&lt;br /&gt;
              [% THROW some 'error' %]  # up to the point of error&lt;br /&gt;
              ...&lt;br /&gt;
           [% CATCH %]&lt;br /&gt;
              [% CLEAR %]               # clear the TRY output&lt;br /&gt;
              [% error %]               # print error string&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
Miscellaneous&lt;br /&gt;
   META&lt;br /&gt;
       The &amp;quot;META&amp;quot; directive allows simple metadata items to be defined within&lt;br /&gt;
       a template. These are evaluated when the template is parsed and as such&lt;br /&gt;
       may only contain simple values (e.g. it’s not possible to interpolate&lt;br /&gt;
       other variables values into &amp;quot;META&amp;quot; variables).&lt;br /&gt;
&lt;br /&gt;
           [% META&lt;br /&gt;
              title   = 'The Cat in the Hat'&lt;br /&gt;
              author  = 'Dr. Seuss'&lt;br /&gt;
              version = 1.23&lt;br /&gt;
           %]&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;template&amp;quot; variable contains a reference to the main template being&lt;br /&gt;
       processed.  These metadata items may be retrieved as attributes of the&lt;br /&gt;
       template.&lt;br /&gt;
&lt;br /&gt;
           &amp;lt;h1&amp;gt;[% template.title %]&amp;lt;/h1&amp;gt;&lt;br /&gt;
           &amp;lt;h2&amp;gt;[% template.author %]&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;name&amp;quot; and &amp;quot;modtime&amp;quot; metadata items are automatically defined for&lt;br /&gt;
       each template to contain its name and modification time in seconds&lt;br /&gt;
       since the epoch.&lt;br /&gt;
&lt;br /&gt;
           [% USE date %]              # use Date plugin to format time&lt;br /&gt;
           ...&lt;br /&gt;
           [% template.name %] last modified&lt;br /&gt;
           at [% date.format(template.modtime) %]&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;PRE_PROCESS&amp;quot; and &amp;quot;POST_PROCESS&amp;quot; options allow common headers and&lt;br /&gt;
       footers to be added to all templates.  The &amp;quot;template&amp;quot; reference is&lt;br /&gt;
       correctly defined when these templates are processed, allowing headers&lt;br /&gt;
       and footers to reference metadata items from the main template.&lt;br /&gt;
&lt;br /&gt;
           $template = Template-&amp;gt;new({&lt;br /&gt;
               PRE_PROCESS  =&amp;gt; 'header',&lt;br /&gt;
               POST_PROCESS =&amp;gt; 'footer',&lt;br /&gt;
           });&lt;br /&gt;
&lt;br /&gt;
           $template-&amp;gt;process('cat_in_hat');&lt;br /&gt;
&lt;br /&gt;
       header:&lt;br /&gt;
&lt;br /&gt;
           &amp;lt;html&amp;gt;&lt;br /&gt;
             &amp;lt;head&amp;gt;&lt;br /&gt;
               &amp;lt;title&amp;gt;[% template.title %]&amp;lt;/title&amp;gt;&lt;br /&gt;
             &amp;lt;/head&amp;gt;&lt;br /&gt;
             &amp;lt;body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
       cat_in_hat:&lt;br /&gt;
&lt;br /&gt;
           [% META&lt;br /&gt;
                title   = 'The Cat in the Hat'&lt;br /&gt;
                author  = 'Dr. Seuss'&lt;br /&gt;
                version = 1.23&lt;br /&gt;
                year    = 2000&lt;br /&gt;
           %]&lt;br /&gt;
&lt;br /&gt;
               The cat in the hat sat on the mat.&lt;br /&gt;
&lt;br /&gt;
       footer:&lt;br /&gt;
&lt;br /&gt;
               &amp;lt;hr&amp;gt;&lt;br /&gt;
               &amp;amp;copy; [% template.year %] [% template.author %]&lt;br /&gt;
             &amp;lt;/body&amp;gt;&lt;br /&gt;
           &amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
       The output generated from the above example is:&lt;br /&gt;
&lt;br /&gt;
           &amp;lt;html&amp;gt;&lt;br /&gt;
             &amp;lt;head&amp;gt;&lt;br /&gt;
               &amp;lt;title&amp;gt;The Cat in the Hat&amp;lt;/title&amp;gt;&lt;br /&gt;
             &amp;lt;/head&amp;gt;&lt;br /&gt;
             &amp;lt;body&amp;gt;&lt;br /&gt;
               The cat in the hat sat on the mat.&lt;br /&gt;
               &amp;lt;hr&amp;gt;&lt;br /&gt;
               &amp;amp;copy; 2000 Dr. Seuss&lt;br /&gt;
             &amp;lt;/body&amp;gt;&lt;br /&gt;
           &amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   TAGS&lt;br /&gt;
       The &amp;quot;TAGS&amp;quot; directive can be used to set the &amp;quot;START_TAG&amp;quot; and &amp;quot;END_TAG&amp;quot;&lt;br /&gt;
       values on a per-template file basis.&lt;br /&gt;
&lt;br /&gt;
           [% TAGS &amp;lt;+ +&amp;gt; %]&lt;br /&gt;
&lt;br /&gt;
           &amp;lt;+ INCLUDE header +&amp;gt;&lt;br /&gt;
&lt;br /&gt;
       The TAGS directive may also be used to set a named &amp;quot;TAG_STYLE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
           [% TAGS html %]&lt;br /&gt;
           &amp;lt;!-- INCLUDE header --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
       See the TAGS and TAG_STYLE configuration options for further details.&lt;br /&gt;
&lt;br /&gt;
   DEBUG&lt;br /&gt;
       The &amp;quot;DEBUG&amp;quot; directive can be used to enable or disable directive debug&lt;br /&gt;
       messages within a template.  The &amp;quot;DEBUG&amp;quot; configuration option must be&lt;br /&gt;
       set to include &amp;quot;DEBUG_DIRS&amp;quot; for the &amp;quot;DEBUG&amp;quot; directives to have any&lt;br /&gt;
       effect.  If &amp;quot;DEBUG_DIRS&amp;quot; is not set then the parser will automatically&lt;br /&gt;
       ignore and remove any &amp;quot;DEBUG&amp;quot; directives.&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;DEBUG&amp;quot; directive can be used with an &amp;quot;on&amp;quot; or &amp;quot;off&amp;quot; parameter to&lt;br /&gt;
       enable or disable directive debugging messages from that point forward.&lt;br /&gt;
       When enabled, the output of each directive in the generated output will&lt;br /&gt;
       be prefixed by a comment indicate the file, line and original directive&lt;br /&gt;
       text.&lt;br /&gt;
&lt;br /&gt;
           [% DEBUG on %]&lt;br /&gt;
           directive debugging is on (assuming DEBUG option is set true)&lt;br /&gt;
           [% DEBUG off %]&lt;br /&gt;
           directive debugging is off&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;format&amp;quot; parameter can be used to change the format of the&lt;br /&gt;
       debugging message.&lt;br /&gt;
&lt;br /&gt;
           [% DEBUG format '&amp;lt;!-- $file line $line : [% $text %] --&amp;gt;' %]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
perl v5.10.1                      2013-07-23   Template::Manual::Directives(3)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=TemplateManualDirective&amp;diff=5299</id>
		<title>TemplateManualDirective</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=TemplateManualDirective&amp;diff=5299"/>
		<updated>2014-02-28T18:48:44Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: Created page with &amp;quot; &amp;lt;h2&amp;gt;TemplateManualDirective Ref for the template commands &amp;lt;/h2&amp;gt;  man Template::Manual::Directives  &amp;lt;pre&amp;gt;  NAME        Template::Manual::Directives - Template directives  Acce...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;TemplateManualDirective Ref for the template commands &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
man Template::Manual::Directives&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NAME&lt;br /&gt;
       Template::Manual::Directives - Template directives&lt;br /&gt;
&lt;br /&gt;
Accessing and Updating Template Variables&lt;br /&gt;
   GET&lt;br /&gt;
       The &amp;quot;GET&amp;quot; directive retrieves and outputs the value of the named&lt;br /&gt;
       variable.&lt;br /&gt;
&lt;br /&gt;
           [% GET foo %]&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;GET&amp;quot; keyword is optional.  A variable can be specified in a&lt;br /&gt;
       directive tag by itself.&lt;br /&gt;
&lt;br /&gt;
           [% foo %]&lt;br /&gt;
&lt;br /&gt;
       The variable can have an unlimited number of elements, each separated&lt;br /&gt;
       by a dot. Each element can have arguments specified within parentheses.&lt;br /&gt;
&lt;br /&gt;
           [% foo %]&lt;br /&gt;
           [% bar.baz %]&lt;br /&gt;
           [% biz.baz(10) %]&lt;br /&gt;
           ...etc...&lt;br /&gt;
&lt;br /&gt;
       See Template::Manual::Variables for a full discussion on template&lt;br /&gt;
       variables.&lt;br /&gt;
&lt;br /&gt;
       You can also specify expressions using the logical (&amp;quot;and&amp;quot;, &amp;quot;or&amp;quot;, &amp;quot;not&amp;quot;,&lt;br /&gt;
       &amp;quot;?&amp;quot;, &amp;quot;:&amp;quot;) and mathematic operators (&amp;quot;+&amp;quot;, &amp;quot;-&amp;quot;, &amp;quot;*&amp;quot;, &amp;quot;/&amp;quot;, &amp;quot;%&amp;quot;, &amp;quot;mod&amp;quot;,&lt;br /&gt;
       &amp;quot;div&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
           [% template.title or default.title %]&lt;br /&gt;
&lt;br /&gt;
           [% score * 100 %]&lt;br /&gt;
&lt;br /&gt;
           [% order.nitems ? checkout(order.total) : 'no items' %]&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;div&amp;quot; operator returns the integer result of division.  Both &amp;quot;%&amp;quot;&lt;br /&gt;
       and &amp;quot;mod&amp;quot; return the modulus (i.e. remainder) of division.&lt;br /&gt;
&lt;br /&gt;
           [% 15 / 6 %]            # 2.5&lt;br /&gt;
           [% 15 div 6 %]          # 2&lt;br /&gt;
           [% 15 mod 6 %]          # 3&lt;br /&gt;
&lt;br /&gt;
   CALL&lt;br /&gt;
       The &amp;quot;CALL&amp;quot; directive is similar to &amp;quot;GET&amp;quot; in evaluating the variable&lt;br /&gt;
       named, but doesn’t print the result returned.  This can be useful when&lt;br /&gt;
       a variable is bound to a sub-routine or object method which you want to&lt;br /&gt;
       call but aren’t interested in the value returned.&lt;br /&gt;
&lt;br /&gt;
           [% CALL dbi.disconnect %]&lt;br /&gt;
&lt;br /&gt;
           [% CALL inc_page_counter(page_count) %]&lt;br /&gt;
&lt;br /&gt;
   SET&lt;br /&gt;
       The &amp;quot;SET&amp;quot; directive allows you to assign new values to existing&lt;br /&gt;
       variables or create new temporary variables.&lt;br /&gt;
&lt;br /&gt;
           [% SET title = 'Hello World' %]&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;SET&amp;quot; keyword is also optional.&lt;br /&gt;
&lt;br /&gt;
           [% title = 'Hello World' %]&lt;br /&gt;
&lt;br /&gt;
       Variables may be assigned the values of other variables, unquoted&lt;br /&gt;
       numbers (2.718), literal text (’single quotes’) or quoted text (&amp;quot;double&lt;br /&gt;
       quotes&amp;quot;).  In the latter case, any variable references within the text&lt;br /&gt;
       will be interpolated when the string is evaluated.  Variables should be&lt;br /&gt;
       prefixed by &amp;quot;$&amp;quot;, using curly braces to explicitly scope the variable&lt;br /&gt;
       name where necessary.&lt;br /&gt;
&lt;br /&gt;
           [% foo  = 'Foo'  %]               # literal value 'Foo'&lt;br /&gt;
           [% bar  =  foo   %]               # value of variable 'foo'&lt;br /&gt;
           [% cost = '$100' %]               # literal value '$100'&lt;br /&gt;
           [% item = &amp;quot;$bar: ${cost}.00&amp;quot; %]   # value &amp;quot;Foo: $100.00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
       Multiple variables may be assigned in the same directive and are&lt;br /&gt;
       evaluated in the order specified.  Thus, the above could have been&lt;br /&gt;
       written:&lt;br /&gt;
&lt;br /&gt;
           [% foo  = 'Foo'&lt;br /&gt;
              bar  = foo&lt;br /&gt;
              cost = '$100'&lt;br /&gt;
              item = &amp;quot;$bar: ${cost}.00&amp;quot;&lt;br /&gt;
           %]&lt;br /&gt;
&lt;br /&gt;
       Simple expressions can also be used, as per &amp;quot;GET&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
           [% ten    = 10&lt;br /&gt;
              twenty = 20&lt;br /&gt;
              thirty = twenty + ten&lt;br /&gt;
              forty  = 2 * twenty&lt;br /&gt;
              fifty  = 100 div 2&lt;br /&gt;
              six    = twenty mod 7&lt;br /&gt;
           %]&lt;br /&gt;
&lt;br /&gt;
       You can concatenate strings together using the ' _ ' operator.  In Perl&lt;br /&gt;
       5, the &amp;quot;.&amp;quot; is used for string concatenation, but in Perl 6, as in the&lt;br /&gt;
       Template Toolkit, the &amp;quot;.&amp;quot; will be used as the method calling operator&lt;br /&gt;
       and ' _ ' will be used for string concatenation.  Note that the&lt;br /&gt;
       operator must be specified with surrounding whitespace which, as Larry&lt;br /&gt;
       says, is construed as a feature:&lt;br /&gt;
&lt;br /&gt;
           [% copyright = '(C) Copyright' _ year _ ' ' _ author %]&lt;br /&gt;
&lt;br /&gt;
       You can, of course, achieve a similar effect with double quoted string&lt;br /&gt;
       interpolation.&lt;br /&gt;
&lt;br /&gt;
           [% copyright = &amp;quot;(C) Copyright $year $author&amp;quot; %]&lt;br /&gt;
&lt;br /&gt;
   DEFAULT&lt;br /&gt;
       The &amp;quot;DEFAULT&amp;quot; directive is similar to &amp;quot;SET&amp;quot; but only updates variables&lt;br /&gt;
       that are currently undefined or have no &amp;quot;true&amp;quot; value (in the Perl&lt;br /&gt;
       sense).&lt;br /&gt;
&lt;br /&gt;
           [% DEFAULT&lt;br /&gt;
               name = 'John Doe'&lt;br /&gt;
               id   = 'jdoe'&lt;br /&gt;
           %]&lt;br /&gt;
&lt;br /&gt;
       This can be particularly useful in common template components to ensure&lt;br /&gt;
       that some sensible default are provided for otherwise undefined&lt;br /&gt;
       variables.&lt;br /&gt;
&lt;br /&gt;
           [% DEFAULT&lt;br /&gt;
              title = 'Hello World'&lt;br /&gt;
              bgcol = '#ffffff'&lt;br /&gt;
           %]&lt;br /&gt;
           &amp;lt;html&amp;gt;&lt;br /&gt;
             &amp;lt;head&amp;gt;&lt;br /&gt;
               &amp;lt;title&amp;gt;[% title %]&amp;lt;/title&amp;gt;&lt;br /&gt;
             &amp;lt;/head&amp;gt;&lt;br /&gt;
             &amp;lt;body bgcolor=&amp;quot;[% bgcol %]&amp;quot;&amp;gt;&lt;br /&gt;
               ...etc...&lt;br /&gt;
&lt;br /&gt;
Processing Template Files and Blocks&lt;br /&gt;
   INSERT&lt;br /&gt;
       The &amp;quot;INSERT&amp;quot; directive is used to insert the contents of an external&lt;br /&gt;
       file at the current position.&lt;br /&gt;
&lt;br /&gt;
           [% INSERT myfile %]&lt;br /&gt;
&lt;br /&gt;
       No attempt to parse or process the file is made.  The contents,&lt;br /&gt;
       possibly including any embedded template directives, are inserted&lt;br /&gt;
       intact.&lt;br /&gt;
&lt;br /&gt;
       The filename specified should be relative to one of the &amp;quot;INCLUDE_PATH&amp;quot;&lt;br /&gt;
       directories.  Absolute (i.e. starting with &amp;quot;/&amp;quot;) and relative (i.e.&lt;br /&gt;
       starting with &amp;quot;.&amp;quot;) filenames may be used if the &amp;quot;ABSOLUTE&amp;quot; and&lt;br /&gt;
       &amp;quot;RELATIVE&amp;quot; options are set, respectively.  Both these options are&lt;br /&gt;
       disabled by default.&lt;br /&gt;
&lt;br /&gt;
           my $template = Template-&amp;gt;new({&lt;br /&gt;
               INCLUDE_PATH =&amp;gt; '/here:/there',&lt;br /&gt;
           });&lt;br /&gt;
&lt;br /&gt;
           $template-&amp;gt;process('myfile');&lt;br /&gt;
&lt;br /&gt;
       myfile:&lt;br /&gt;
&lt;br /&gt;
           [% INSERT foo %]            # looks for /here/foo then /there/foo&lt;br /&gt;
           [% INSERT /etc/passwd %]    # file error: ABSOLUTE not set&lt;br /&gt;
           [% INSERT ../secret %]      # file error: RELATIVE not set&lt;br /&gt;
&lt;br /&gt;
       For convenience, the filename does not need to be quoted as long as it&lt;br /&gt;
       contains only alphanumeric characters, underscores, dots or forward&lt;br /&gt;
       slashes.  Names containing any other characters should be quoted.&lt;br /&gt;
&lt;br /&gt;
           [% INSERT misc/legalese.txt            %]&lt;br /&gt;
           [% INSERT 'dos98/Program Files/stupid' %]&lt;br /&gt;
&lt;br /&gt;
       To evaluate a variable to specify a filename, you should explicitly&lt;br /&gt;
       prefix it with a &amp;quot;$&amp;quot; or use double-quoted string interpolation.&lt;br /&gt;
&lt;br /&gt;
           [% language = 'en'&lt;br /&gt;
              legalese = 'misc/legalese.txt'&lt;br /&gt;
           %]&lt;br /&gt;
&lt;br /&gt;
           [% INSERT $legalese %]              # misc/legalese.txt&lt;br /&gt;
           [% INSERT &amp;quot;$language/$legalese&amp;quot; %]  # en/misc/legalese.txt&lt;br /&gt;
&lt;br /&gt;
       Multiple files can be specified using &amp;quot;+&amp;quot; as a delimiter.  All files&lt;br /&gt;
       should be unquoted names or quoted strings.  Any variables should be&lt;br /&gt;
       interpolated into double-quoted strings.&lt;br /&gt;
&lt;br /&gt;
           [% INSERT legalese.txt + warning.txt %]&lt;br /&gt;
           [% INSERT  &amp;quot;$legalese&amp;quot; + warning.txt %]  # requires quoting&lt;br /&gt;
&lt;br /&gt;
   INCLUDE&lt;br /&gt;
       The &amp;quot;INCLUDE&amp;quot; directive is used to process and include the output of&lt;br /&gt;
       another template file or block.&lt;br /&gt;
&lt;br /&gt;
           [% INCLUDE header %]&lt;br /&gt;
&lt;br /&gt;
       If a &amp;quot;BLOCK&amp;quot; of the specified name is defined in the same file, or in a&lt;br /&gt;
       file from which the current template has been called (i.e. a parent&lt;br /&gt;
       template) then it will be used in preference to any file of the same&lt;br /&gt;
       name.&lt;br /&gt;
&lt;br /&gt;
           [% INCLUDE table %]     # uses BLOCK defined below&lt;br /&gt;
&lt;br /&gt;
           [% BLOCK table %]&lt;br /&gt;
              &amp;lt;table&amp;gt;&lt;br /&gt;
                ...&lt;br /&gt;
              &amp;lt;/table&amp;gt;&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       If a &amp;quot;BLOCK&amp;quot; definition is not currently visible then the template name&lt;br /&gt;
       should be a file relative to one of the &amp;quot;INCLUDE_PATH&amp;quot; directories, or&lt;br /&gt;
       an absolute or relative file name if the &amp;quot;ABSOLUTE&amp;quot;/&amp;quot;RELATIVE&amp;quot; options&lt;br /&gt;
       are appropriately enabled.  The &amp;quot;INCLUDE&amp;quot; directive automatically&lt;br /&gt;
       quotes the filename specified, as per &amp;quot;INSERT&amp;quot; described above.  When a&lt;br /&gt;
       variable contains the name of the template for the &amp;quot;INCLUDE&amp;quot; directive,&lt;br /&gt;
       it should be explicitly prefixed by &amp;quot;$&amp;quot; or double-quoted&lt;br /&gt;
&lt;br /&gt;
           [% myheader = 'my/misc/header' %]&lt;br /&gt;
           [% INCLUDE   myheader  %]           # 'myheader'&lt;br /&gt;
           [% INCLUDE  $myheader  %]           # 'my/misc/header'&lt;br /&gt;
           [% INCLUDE &amp;quot;$myheader&amp;quot; %]           # 'my/misc/header'&lt;br /&gt;
&lt;br /&gt;
       Any template directives embedded within the file will be processed&lt;br /&gt;
       accordingly.  All variables currently defined will be visible and&lt;br /&gt;
       accessible from within the included template.&lt;br /&gt;
&lt;br /&gt;
           [% title = 'Hello World' %]&lt;br /&gt;
           [% INCLUDE header %]&lt;br /&gt;
           &amp;lt;body&amp;gt;&lt;br /&gt;
           ...&lt;br /&gt;
&lt;br /&gt;
       header:&lt;br /&gt;
&lt;br /&gt;
           &amp;lt;html&amp;gt;&lt;br /&gt;
           &amp;lt;title&amp;gt;[% title %]&amp;lt;/title&amp;gt;&lt;br /&gt;
&lt;br /&gt;
       output:&lt;br /&gt;
&lt;br /&gt;
           &amp;lt;html&amp;gt;&lt;br /&gt;
           &amp;lt;title&amp;gt;Hello World&amp;lt;/title&amp;gt;&lt;br /&gt;
           &amp;lt;body&amp;gt;&lt;br /&gt;
           ...&lt;br /&gt;
&lt;br /&gt;
       Local variable definitions may be specified after the template name,&lt;br /&gt;
       temporarily masking any existing variables.  Insignificant whitespace&lt;br /&gt;
       is ignored within directives so you can add variable definitions on the&lt;br /&gt;
       same line, the next line or split across several line with comments&lt;br /&gt;
       interspersed, if you prefer.&lt;br /&gt;
&lt;br /&gt;
           [% INCLUDE table %]&lt;br /&gt;
&lt;br /&gt;
           [% INCLUDE table title=&amp;quot;Active Projects&amp;quot; %]&lt;br /&gt;
&lt;br /&gt;
           [% INCLUDE table&lt;br /&gt;
                title   = &amp;quot;Active Projects&amp;quot;&lt;br /&gt;
                bgcolor = &amp;quot;#80ff00&amp;quot;    # chartreuse&lt;br /&gt;
                border  = 2&lt;br /&gt;
           %]&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;INCLUDE&amp;quot; directive localises (i.e. copies) all variables before&lt;br /&gt;
       processing the template.  Any changes made within the included template&lt;br /&gt;
       will not affect variables in the including template.&lt;br /&gt;
&lt;br /&gt;
           [% foo = 10 %]&lt;br /&gt;
&lt;br /&gt;
           foo is originally [% foo %]&lt;br /&gt;
           [% INCLUDE bar %]&lt;br /&gt;
           foo is still [% foo %]&lt;br /&gt;
&lt;br /&gt;
           [% BLOCK bar %]&lt;br /&gt;
              foo was [% foo %]&lt;br /&gt;
              [% foo = 20 %]&lt;br /&gt;
              foo is now [% foo %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       output:&lt;br /&gt;
&lt;br /&gt;
           foo is originally 10&lt;br /&gt;
              foo was 10&lt;br /&gt;
              foo is now 20&lt;br /&gt;
           foo is still 10&lt;br /&gt;
&lt;br /&gt;
       Technical Note: the localisation of the stash (that is, the process by&lt;br /&gt;
       which variables are copied before an &amp;quot;INCLUDE&amp;quot; to prevent being&lt;br /&gt;
       overwritten) is only skin deep.  The top-level variable namespace&lt;br /&gt;
       (hash) is copied, but no attempt is made to perform a deep-copy of&lt;br /&gt;
       other structures (hashes, arrays, objects, etc.)  Therefore, a &amp;quot;foo&amp;quot;&lt;br /&gt;
       variable referencing a hash will be copied to create a new &amp;quot;foo&amp;quot;&lt;br /&gt;
       variable but which points to the same hash array.  Thus, if you update&lt;br /&gt;
       compound variables (e.g. &amp;quot;foo.bar&amp;quot;) then you will change the original&lt;br /&gt;
       copy, regardless of any stash localisation.  If you’re not worried&lt;br /&gt;
       about preserving variable values, or you trust the templates you’re&lt;br /&gt;
       including then you might prefer to use the &amp;quot;PROCESS&amp;quot; directive which is&lt;br /&gt;
       faster by virtue of not performing any localisation.&lt;br /&gt;
&lt;br /&gt;
       You can specify dotted variables as &amp;quot;local&amp;quot; variables to an &amp;quot;INCLUDE&amp;quot;&lt;br /&gt;
       directive.  However, be aware that because of the localisation issues&lt;br /&gt;
       explained above (if you skipped the previous Technical Note above then&lt;br /&gt;
       you might want to go back and read it or skip this section too), the&lt;br /&gt;
       variables might not actually be &amp;quot;local&amp;quot;. If the first element of the&lt;br /&gt;
       variable name already references a hash array then the variable update&lt;br /&gt;
       will affect the original variable.&lt;br /&gt;
&lt;br /&gt;
           [% foo = {&lt;br /&gt;
                  bar = 'Baz'&lt;br /&gt;
              }&lt;br /&gt;
           %]&lt;br /&gt;
&lt;br /&gt;
           [% INCLUDE somefile foo.bar='Boz' %]&lt;br /&gt;
&lt;br /&gt;
           [% foo.bar %]           # Boz&lt;br /&gt;
&lt;br /&gt;
       This behaviour can be a little unpredictable (and may well be improved&lt;br /&gt;
       upon in a future version).  If you know what you’re doing with it and&lt;br /&gt;
       you’re sure that the variables in question are defined (nor not) as you&lt;br /&gt;
       expect them to be, then you can rely on this feature to implement some&lt;br /&gt;
       powerful &amp;quot;global&amp;quot; data sharing techniques.  Otherwise, you might prefer&lt;br /&gt;
       to steer well clear and always pass simple (undotted) variables as&lt;br /&gt;
       parameters to &amp;quot;INCLUDE&amp;quot; and other similar directives.&lt;br /&gt;
&lt;br /&gt;
       If you want to process several templates in one go then you can specify&lt;br /&gt;
       each of their names (quoted or unquoted names only, no unquoted&lt;br /&gt;
       $variables) joined together by &amp;quot;+&amp;quot;.  The &amp;quot;INCLUDE&amp;quot; directive will then&lt;br /&gt;
       process them in order.&lt;br /&gt;
&lt;br /&gt;
           [% INCLUDE html/header + &amp;quot;site/$header&amp;quot; + site/menu&lt;br /&gt;
                title = &amp;quot;My Groovy Web Site&amp;quot;&lt;br /&gt;
           %]&lt;br /&gt;
&lt;br /&gt;
       The variable stash is localised once and then the templates specified&lt;br /&gt;
       are processed in order, all within that same variable context.  This&lt;br /&gt;
       makes it slightly faster than specifying several separate &amp;quot;INCLUDE&amp;quot;&lt;br /&gt;
       directives (because you only clone the variable stash once instead of n&lt;br /&gt;
       times), but not quite as &amp;quot;safe&amp;quot; because any variable changes in the&lt;br /&gt;
       first file will be visible in the second, third and so on.  This might&lt;br /&gt;
       be what you want, of course, but then again, it might not.&lt;br /&gt;
&lt;br /&gt;
   PROCESS&lt;br /&gt;
       The PROCESS directive is similar to &amp;quot;INCLUDE&amp;quot; but does not perform any&lt;br /&gt;
       localisation of variables before processing the template.  Any changes&lt;br /&gt;
       made to variables within the included template will be visible in the&lt;br /&gt;
       including template.&lt;br /&gt;
&lt;br /&gt;
           [% foo = 10 %]&lt;br /&gt;
&lt;br /&gt;
           foo is [% foo %]&lt;br /&gt;
           [% PROCESS bar %]&lt;br /&gt;
           foo is [% foo %]&lt;br /&gt;
&lt;br /&gt;
           [% BLOCK bar %]&lt;br /&gt;
              [% foo = 20 %]&lt;br /&gt;
              changed foo to [% foo %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       output:&lt;br /&gt;
&lt;br /&gt;
           foo is 10&lt;br /&gt;
              changed foo to 20&lt;br /&gt;
           foo is 20&lt;br /&gt;
&lt;br /&gt;
       Parameters may be specified in the &amp;quot;PROCESS&amp;quot; directive, but these too&lt;br /&gt;
       will become visible changes to current variable values.&lt;br /&gt;
&lt;br /&gt;
           [% foo = 10 %]&lt;br /&gt;
           foo is [% foo %]&lt;br /&gt;
           [% PROCESS bar&lt;br /&gt;
              foo = 20&lt;br /&gt;
           %]&lt;br /&gt;
           foo is [% foo %]&lt;br /&gt;
&lt;br /&gt;
           [% BLOCK bar %]&lt;br /&gt;
              this is bar, foo is [% foo %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       output:&lt;br /&gt;
&lt;br /&gt;
           foo is 10&lt;br /&gt;
              this is bar, foo is 20&lt;br /&gt;
           foo is 20&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;PROCESS&amp;quot; directive is slightly faster than &amp;quot;INCLUDE&amp;quot; because it&lt;br /&gt;
       avoids the need to localise (i.e. copy) the variable stash before&lt;br /&gt;
       processing the template.  As with &amp;quot;INSERT&amp;quot; and &amp;quot;INCLUDE&amp;quot;, the first&lt;br /&gt;
       parameter does not need to be quoted as long as it contains only&lt;br /&gt;
       alphanumeric characters, underscores, periods or forward slashes.  A&lt;br /&gt;
       &amp;quot;$&amp;quot; prefix can be used to explicitly indicate a variable which should&lt;br /&gt;
       be interpolated to provide the template name:&lt;br /&gt;
&lt;br /&gt;
           [% myheader = 'my/misc/header' %]&lt;br /&gt;
           [% PROCESS  myheader %]              # 'myheader'&lt;br /&gt;
           [% PROCESS $myheader %]              # 'my/misc/header'&lt;br /&gt;
&lt;br /&gt;
       As with &amp;quot;INCLUDE&amp;quot;, multiple templates can be specified, delimited by&lt;br /&gt;
       &amp;quot;+&amp;quot;, and are processed in order.&lt;br /&gt;
&lt;br /&gt;
           [% PROCESS html/header + my/header %]&lt;br /&gt;
&lt;br /&gt;
   WRAPPER&lt;br /&gt;
       It’s not unusual to find yourself adding common headers and footers to&lt;br /&gt;
       pages or sub-sections within a page.  Something like this:&lt;br /&gt;
&lt;br /&gt;
           [% INCLUDE section/header&lt;br /&gt;
              title = 'Quantum Mechanics'&lt;br /&gt;
           %]&lt;br /&gt;
              Quantum mechanics is a very interesting subject wish&lt;br /&gt;
              should prove easy for the layman to fully comprehend.&lt;br /&gt;
           [% INCLUDE section/footer %]&lt;br /&gt;
&lt;br /&gt;
           [% INCLUDE section/header&lt;br /&gt;
              title = 'Desktop Nuclear Fusion for under $50'&lt;br /&gt;
           %]&lt;br /&gt;
              This describes a simple device which generates significant&lt;br /&gt;
              sustainable electrical power from common tap water by process&lt;br /&gt;
              of nuclear fusion.&lt;br /&gt;
           [% INCLUDE section/footer %]&lt;br /&gt;
&lt;br /&gt;
       The individual template components being included might look like&lt;br /&gt;
       these:&lt;br /&gt;
&lt;br /&gt;
       section/header:&lt;br /&gt;
&lt;br /&gt;
           &amp;lt;p&amp;gt;&lt;br /&gt;
           &amp;lt;h2&amp;gt;[% title %]&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
       section/footer:&lt;br /&gt;
&lt;br /&gt;
           &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;WRAPPER&amp;quot; directive provides a way of simplifying this a little. It&lt;br /&gt;
       encloses a block up to a matching &amp;quot;END&amp;quot; directive, which is first&lt;br /&gt;
       processed to generate some output. This is then passed to the named&lt;br /&gt;
       template file or &amp;quot;BLOCK&amp;quot; as the &amp;quot;content&amp;quot; variable.&lt;br /&gt;
&lt;br /&gt;
           [% WRAPPER section&lt;br /&gt;
              title = 'Quantum Mechanics'&lt;br /&gt;
           %]&lt;br /&gt;
              Quantum mechanics is a very interesting subject wish&lt;br /&gt;
              should prove easy for the layman to fully comprehend.&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
           [% WRAPPER section&lt;br /&gt;
              title = 'Desktop Nuclear Fusion for under $50'&lt;br /&gt;
           %]&lt;br /&gt;
              This describes a simple device which generates significant&lt;br /&gt;
              sustainable electrical power from common tap water by process&lt;br /&gt;
              of nuclear fusion.&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       The single ’section’ template can then be defined as:&lt;br /&gt;
&lt;br /&gt;
           &amp;lt;h2&amp;gt;[% title %]&amp;lt;/h2&amp;gt;&lt;br /&gt;
           &amp;lt;p&amp;gt;&lt;br /&gt;
             [% content %]&lt;br /&gt;
           &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
       Like other block directives, it can be used in side-effect notation:&lt;br /&gt;
&lt;br /&gt;
           [% INSERT legalese.txt WRAPPER big_bold_table %]&lt;br /&gt;
&lt;br /&gt;
       It’s also possible to specify multiple templates to a &amp;quot;WRAPPER&amp;quot;&lt;br /&gt;
       directive.  The specification order indicates outermost to innermost&lt;br /&gt;
       wrapper templates.  For example, given the following template block&lt;br /&gt;
       definitions:&lt;br /&gt;
&lt;br /&gt;
           [% BLOCK bold   %]&amp;lt;b&amp;gt;[% content %]&amp;lt;/b&amp;gt;[% END %]&lt;br /&gt;
           [% BLOCK italic %]&amp;lt;i&amp;gt;[% content %]&amp;lt;/i&amp;gt;[% END %]&lt;br /&gt;
&lt;br /&gt;
       the directive&lt;br /&gt;
&lt;br /&gt;
           [% WRAPPER bold+italic %]Hello World[% END %]&lt;br /&gt;
&lt;br /&gt;
       would generate the following output:&lt;br /&gt;
&lt;br /&gt;
           &amp;lt;b&amp;gt;&amp;lt;i&amp;gt;Hello World&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   BLOCK&lt;br /&gt;
       The &amp;quot;BLOCK&amp;quot;...&amp;quot;END&amp;quot; construct can be used to define template component&lt;br /&gt;
       blocks which can be processed with the &amp;quot;INCLUDE&amp;quot;, &amp;quot;PROCESS&amp;quot; and&lt;br /&gt;
       &amp;quot;WRAPPER&amp;quot; directives.&lt;br /&gt;
&lt;br /&gt;
           [% BLOCK tabrow %]&lt;br /&gt;
           &amp;lt;tr&amp;gt;&lt;br /&gt;
             &amp;lt;td&amp;gt;[% name %]&amp;lt;td&amp;gt;&lt;br /&gt;
             &amp;lt;td&amp;gt;[% email %]&amp;lt;/td&amp;gt;&lt;br /&gt;
           &amp;lt;/tr&amp;gt;&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
           &amp;lt;table&amp;gt;&lt;br /&gt;
             [% PROCESS tabrow  name='Fred'  email='fred@nowhere.com' %]&lt;br /&gt;
             [% PROCESS tabrow  name='Alan'  email='alan@nowhere.com' %]&lt;br /&gt;
           &amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
       A &amp;quot;BLOCK&amp;quot; definition can be used before it is defined, as long as the&lt;br /&gt;
       definition resides in the same file.  The block definition itself does&lt;br /&gt;
       not generate any output.&lt;br /&gt;
&lt;br /&gt;
           [% PROCESS tmpblk %]&lt;br /&gt;
&lt;br /&gt;
           [% BLOCK tmpblk %] This is OK [% END %]&lt;br /&gt;
&lt;br /&gt;
       You can use an anonymous &amp;quot;BLOCK&amp;quot; to capture the output of a template&lt;br /&gt;
       fragment.&lt;br /&gt;
&lt;br /&gt;
           [% julius = BLOCK %]&lt;br /&gt;
              And Caesar's spirit, ranging for revenge,&lt;br /&gt;
              With Ate by his side come hot from hell,&lt;br /&gt;
              Shall in these confines with a monarch's voice&lt;br /&gt;
              Cry  'Havoc', and let slip the dogs of war;&lt;br /&gt;
              That this foul deed shall smell above the earth&lt;br /&gt;
              With carrion men, groaning for burial.&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       Like a named block, it can contain any other template directives which&lt;br /&gt;
       are processed when the block is defined.  The output generated by the&lt;br /&gt;
       block is then assigned to the variable &amp;quot;julius&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
       Anonymous &amp;quot;BLOCK&amp;quot;s can also be used to define block macros.  The&lt;br /&gt;
       enclosing block is processed each time the macro is called.&lt;br /&gt;
&lt;br /&gt;
           [% MACRO locate BLOCK %]&lt;br /&gt;
              The [% animal %] sat on the [% place %].&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
           [% locate(animal='cat', place='mat') %]    # The cat sat on the mat&lt;br /&gt;
           [% locate(animal='dog', place='log') %]    # The dog sat on the log&lt;br /&gt;
&lt;br /&gt;
Conditional Processing&lt;br /&gt;
   IF / UNLESS / ELSIF / ELSE&lt;br /&gt;
       The &amp;quot;IF&amp;quot; and &amp;quot;UNLESS&amp;quot; directives can be used to process or ignore a&lt;br /&gt;
       block based on some run-time condition.&lt;br /&gt;
&lt;br /&gt;
           [% IF frames %]&lt;br /&gt;
              [% INCLUDE frameset %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
           [% UNLESS text_mode %]&lt;br /&gt;
              [% INCLUDE biglogo %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       Multiple conditions may be joined with &amp;quot;ELSIF&amp;quot; and/or &amp;quot;ELSE&amp;quot; blocks.&lt;br /&gt;
&lt;br /&gt;
           [% IF age &amp;lt; 10 %]&lt;br /&gt;
              Hello [% name %], does your mother know you're&lt;br /&gt;
              using her AOL account?&lt;br /&gt;
           [% ELSIF age &amp;lt; 18 %]&lt;br /&gt;
              Sorry, you're not old enough to enter&lt;br /&gt;
              (and too dumb to lie about your age)&lt;br /&gt;
           [% ELSE %]&lt;br /&gt;
              Welcome [% name %].&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       The following conditional and boolean operators may be used:&lt;br /&gt;
&lt;br /&gt;
           == != &amp;lt; &amp;lt;= &amp;gt; &amp;gt;= &amp;amp;&amp;amp; || ! and or not&lt;br /&gt;
&lt;br /&gt;
       Conditions may be arbitrarily complex and are evaluated with the same&lt;br /&gt;
       precedence as in Perl.  Parenthesis may be used to explicitly determine&lt;br /&gt;
       evaluation order.&lt;br /&gt;
&lt;br /&gt;
           # ridiculously contrived complex example&lt;br /&gt;
           [% IF (name == 'admin' || uid &amp;lt;= 0) &amp;amp;&amp;amp; mode == 'debug' %]&lt;br /&gt;
              I'm confused.&lt;br /&gt;
           [% ELSIF more &amp;gt; less %]&lt;br /&gt;
              That's more or less correct.&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;and&amp;quot;, &amp;quot;or&amp;quot; and &amp;quot;not&amp;quot; operator are provided as aliases for &amp;quot;&amp;amp;&amp;amp;&amp;quot;,&lt;br /&gt;
       &amp;quot;||&amp;quot; and &amp;quot;!&amp;quot;, respectively.  Unlike Perl, which treats &amp;quot;and&amp;quot;, &amp;quot;or&amp;quot; and&lt;br /&gt;
       &amp;quot;not&amp;quot; as separate, lower-precedence versions of the other operators,&lt;br /&gt;
       the Template Toolkit performs a straightforward substitution of &amp;quot;and&amp;quot;&lt;br /&gt;
       for &amp;quot;&amp;amp;&amp;amp;&amp;quot;, and so on.  That means that &amp;quot;and&amp;quot;, &amp;quot;or&amp;quot; and &amp;quot;not&amp;quot; have the&lt;br /&gt;
       same operator precedence as &amp;quot;&amp;amp;&amp;amp;&amp;quot;, &amp;quot;||&amp;quot; and &amp;quot;!&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
   SWITCH / CASE&lt;br /&gt;
       The &amp;quot;SWITCH&amp;quot; / &amp;quot;CASE&amp;quot; construct can be used to perform a multi-way&lt;br /&gt;
       conditional test.  The &amp;quot;SWITCH&amp;quot; directive expects an expression which&lt;br /&gt;
       is first evaluated and then compared against each CASE statement in&lt;br /&gt;
       turn.  Each &amp;quot;CASE&amp;quot; directive should contain a single value or a list of&lt;br /&gt;
       values which should match.  &amp;quot;CASE&amp;quot; may also be left blank or written as&lt;br /&gt;
       &amp;quot;[% CASE DEFAULT %]&amp;quot; to specify a default match.  Only one &amp;quot;CASE&amp;quot;&lt;br /&gt;
       matches, there is no drop-through between &amp;quot;CASE&amp;quot; statements.&lt;br /&gt;
&lt;br /&gt;
           [% SWITCH myvar %]&lt;br /&gt;
           [%   CASE 'value1' %]&lt;br /&gt;
                  ...&lt;br /&gt;
           [%   CASE ['value2', 'value3'] %]   # multiple values&lt;br /&gt;
                  ...&lt;br /&gt;
           [%   CASE myhash.keys %]            # ditto&lt;br /&gt;
                  ...&lt;br /&gt;
           [%   CASE %]                        # default&lt;br /&gt;
                  ...&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
Loop Processing&lt;br /&gt;
   FOREACH&lt;br /&gt;
       The &amp;quot;FOREACH&amp;quot; directive will iterate through the items in a list,&lt;br /&gt;
       processing the enclosed block for each one.&lt;br /&gt;
&lt;br /&gt;
           [% foo   = 'Foo'&lt;br /&gt;
              items = [ 'one', 'two', 'three' ]&lt;br /&gt;
           %]&lt;br /&gt;
&lt;br /&gt;
           Things:&lt;br /&gt;
           [% FOREACH thing IN [ foo 'Bar' &amp;quot;$foo Baz&amp;quot; ] %]&lt;br /&gt;
              * [% thing %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
           Items:&lt;br /&gt;
           [% FOREACH i IN items %]&lt;br /&gt;
              * [% i %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
           Stuff:&lt;br /&gt;
           [% stuff = [ foo &amp;quot;$foo Bar&amp;quot; ] %]&lt;br /&gt;
           [% FOREACH s IN stuff %]&lt;br /&gt;
              * [% s %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       output:&lt;br /&gt;
&lt;br /&gt;
           Things:&lt;br /&gt;
             * Foo&lt;br /&gt;
             * Bar&lt;br /&gt;
             * Foo Baz&lt;br /&gt;
&lt;br /&gt;
           Items:&lt;br /&gt;
             * one&lt;br /&gt;
             * two&lt;br /&gt;
             * three&lt;br /&gt;
&lt;br /&gt;
           Stuff:&lt;br /&gt;
             * Foo&lt;br /&gt;
             * Foo Bar&lt;br /&gt;
&lt;br /&gt;
       You can use also use &amp;quot;=&amp;quot; instead of &amp;quot;IN&amp;quot; if you prefer.&lt;br /&gt;
&lt;br /&gt;
           [% FOREACH i = items %]&lt;br /&gt;
&lt;br /&gt;
       When the &amp;quot;FOREACH&amp;quot; directive is used without specifying a target&lt;br /&gt;
       variable, any iterated values which are hash references will be&lt;br /&gt;
       automatically imported.&lt;br /&gt;
&lt;br /&gt;
           [% userlist = [&lt;br /&gt;
               { id =&amp;gt; 'tom',   name =&amp;gt; 'Thomas'  },&lt;br /&gt;
               { id =&amp;gt; 'dick',  name =&amp;gt; 'Richard'  },&lt;br /&gt;
               { id =&amp;gt; 'larry', name =&amp;gt; 'Lawrence' },&lt;br /&gt;
              ]&lt;br /&gt;
           %]&lt;br /&gt;
&lt;br /&gt;
           [% FOREACH user IN userlist %]&lt;br /&gt;
              [% user.id %] [% user.name %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       short form:&lt;br /&gt;
&lt;br /&gt;
           [% FOREACH userlist %]&lt;br /&gt;
              [% id %] [% name %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       Note that this particular usage creates a localised variable context to&lt;br /&gt;
       prevent the imported hash keys from overwriting any existing variables.&lt;br /&gt;
       The imported definitions and any other variables defined in such a&lt;br /&gt;
       &amp;quot;FOREACH&amp;quot; loop will be lost at the end of the loop, when the previous&lt;br /&gt;
       context and variable values are restored.&lt;br /&gt;
&lt;br /&gt;
       However, under normal operation, the loop variable remains in scope&lt;br /&gt;
       after the &amp;quot;FOREACH&amp;quot; loop has ended (caveat: overwriting any variable&lt;br /&gt;
       previously in scope). This is useful as the loop variable is secretly&lt;br /&gt;
       an iterator object (see below) and can be used to analyse the last&lt;br /&gt;
       entry processed by the loop.&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;FOREACH&amp;quot; directive can also be used to iterate through the entries&lt;br /&gt;
       in a hash array.  Each entry in the hash is returned in sorted order&lt;br /&gt;
       (based on the key) as a hash array containing ’key’ and ’value’ items.&lt;br /&gt;
&lt;br /&gt;
           [% users = {&lt;br /&gt;
                tom   =&amp;gt; 'Thomas',&lt;br /&gt;
                dick  =&amp;gt; 'Richard',&lt;br /&gt;
                larry =&amp;gt; 'Lawrence',&lt;br /&gt;
              }&lt;br /&gt;
           %]&lt;br /&gt;
&lt;br /&gt;
           [% FOREACH u IN users %]&lt;br /&gt;
              * [% u.key %] : [% u.value %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       Output:&lt;br /&gt;
&lt;br /&gt;
              * dick : Richard&lt;br /&gt;
              * larry : Lawrence&lt;br /&gt;
              * tom : Thomas&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;NEXT&amp;quot; directive starts the next iteration in the &amp;quot;FOREACH&amp;quot; loop.&lt;br /&gt;
&lt;br /&gt;
           [% FOREACH user IN userlist %]&lt;br /&gt;
              [% NEXT IF user.isguest %]&lt;br /&gt;
              Name: [% user.name %]    Email: [% user.email %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;LAST&amp;quot; directive can be used to prematurely exit the loop.  &amp;quot;BREAK&amp;quot;&lt;br /&gt;
       is also provided as an alias for &amp;quot;LAST&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
           [% FOREACH match IN results.nsort('score').reverse %]&lt;br /&gt;
              [% LAST IF match.score &amp;lt; 50 %]&lt;br /&gt;
              [% match.score %] : [% match.url %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;FOREACH&amp;quot; directive is implemented using the Template::Iterator&lt;br /&gt;
       module.  A reference to the iterator object for a &amp;quot;FOREACH&amp;quot; directive&lt;br /&gt;
       is implicitly available in the &amp;quot;loop&amp;quot; variable.  The following methods&lt;br /&gt;
       can be called on the &amp;quot;loop&amp;quot; iterator.&lt;br /&gt;
&lt;br /&gt;
           size()      number of elements in the list&lt;br /&gt;
           max()       index number of last element (size - 1)&lt;br /&gt;
           index()     index of current iteration from 0 to max()&lt;br /&gt;
           count()     iteration counter from 1 to size() (i.e. index() + 1)&lt;br /&gt;
           first()     true if the current iteration is the first&lt;br /&gt;
           last()      true if the current iteration is the last&lt;br /&gt;
           prev()      return the previous item in the list&lt;br /&gt;
           next()      return the next item in the list&lt;br /&gt;
&lt;br /&gt;
       See Template::Iterator for further details.&lt;br /&gt;
&lt;br /&gt;
       Example:&lt;br /&gt;
&lt;br /&gt;
           [% FOREACH item IN [ 'foo', 'bar', 'baz' ] -%]&lt;br /&gt;
              [%- &amp;quot;&amp;lt;ul&amp;gt;\n&amp;quot; IF loop.first %]&lt;br /&gt;
              &amp;lt;li&amp;gt;[% loop.count %]/[% loop.size %]: [% item %]&lt;br /&gt;
              [%- &amp;quot;&amp;lt;/ul&amp;gt;\n&amp;quot; IF loop.last %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       Output:&lt;br /&gt;
&lt;br /&gt;
           &amp;lt;ul&amp;gt;&lt;br /&gt;
           &amp;lt;li&amp;gt;1/3: foo&lt;br /&gt;
           &amp;lt;li&amp;gt;2/3: bar&lt;br /&gt;
           &amp;lt;li&amp;gt;3/3: baz&lt;br /&gt;
           &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
       Nested loops will work as expected, with the &amp;quot;loop&amp;quot; variable correctly&lt;br /&gt;
       referencing the innermost loop and being restored to any previous value&lt;br /&gt;
       (i.e. an outer loop) at the end of the loop.&lt;br /&gt;
&lt;br /&gt;
           [% FOREACH group IN grouplist;&lt;br /&gt;
                # loop =&amp;gt; group iterator&lt;br /&gt;
                &amp;quot;Groups:\n&amp;quot; IF loop.first;&lt;br /&gt;
&lt;br /&gt;
                FOREACH user IN group.userlist;&lt;br /&gt;
                   # loop =&amp;gt; user iterator&lt;br /&gt;
                   &amp;quot;$loop.count: $user.name\n&amp;quot;;&lt;br /&gt;
                END;&lt;br /&gt;
&lt;br /&gt;
                # loop =&amp;gt; group iterator&lt;br /&gt;
                &amp;quot;End of Groups\n&amp;quot; IF loop.last;&lt;br /&gt;
              END&lt;br /&gt;
           %]&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;iterator&amp;quot; plugin can also be used to explicitly create an iterator&lt;br /&gt;
       object.  This can be useful within nested loops where you need to keep&lt;br /&gt;
       a reference to the outer iterator within the inner loop.  The iterator&lt;br /&gt;
       plugin effectively allows you to create an iterator by a name other&lt;br /&gt;
       than &amp;quot;loop&amp;quot;.  See Template::Plugin::Iterator for further details.&lt;br /&gt;
&lt;br /&gt;
           [% USE giter = iterator(grouplist) %]&lt;br /&gt;
&lt;br /&gt;
           [% FOREACH group IN giter %]&lt;br /&gt;
              [% FOREACH user IN group.userlist %]&lt;br /&gt;
                    user #[% loop.count %] in&lt;br /&gt;
                    group [% giter.count %] is&lt;br /&gt;
                    named [% user.name %]&lt;br /&gt;
              [% END %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
   WHILE&lt;br /&gt;
       The &amp;quot;WHILE&amp;quot; directive can be used to repeatedly process a template&lt;br /&gt;
       block while a conditional expression evaluates true.  The expression&lt;br /&gt;
       may be arbitrarily complex as per &amp;quot;IF&amp;quot; / &amp;quot;UNLESS&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
           [% WHILE total &amp;lt; 100 %]&lt;br /&gt;
              ...&lt;br /&gt;
              [% total = calculate_new_total %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       An assignment can be enclosed in parenthesis to evaluate the assigned&lt;br /&gt;
       value.&lt;br /&gt;
&lt;br /&gt;
           [% WHILE (user = get_next_user_record) %]&lt;br /&gt;
              [% user.name %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;NEXT&amp;quot; directive can be used to start the next iteration of a&lt;br /&gt;
       &amp;quot;WHILE&amp;quot; loop and &amp;quot;BREAK&amp;quot; can be used to exit the loop, both as per&lt;br /&gt;
       &amp;quot;FOREACH&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
       The Template Toolkit uses a failsafe counter to prevent runaway &amp;quot;WHILE&amp;quot;&lt;br /&gt;
       loops which would otherwise never terminate.  If the loop exceeds 1000&lt;br /&gt;
       iterations then an &amp;quot;undef&amp;quot; exception will be thrown, reporting the&lt;br /&gt;
       error:&lt;br /&gt;
&lt;br /&gt;
           WHILE loop terminated (&amp;gt; 1000 iterations)&lt;br /&gt;
&lt;br /&gt;
       The $Template::Directive::WHILE_MAX variable controls this behaviour&lt;br /&gt;
       and can be set to a higher value if necessary.&lt;br /&gt;
&lt;br /&gt;
Filters, Plugins, Macros and Perl&lt;br /&gt;
   FILTER&lt;br /&gt;
       The &amp;quot;FILTER&amp;quot; directive can be used to post-process the output of a&lt;br /&gt;
       block.  A number of standard filters are provided with the Template&lt;br /&gt;
       Toolkit.  The &amp;quot;html&amp;quot; filter, for example, escapes the ’&amp;lt;’, ’&amp;gt;’ and ’&amp;amp;’&lt;br /&gt;
       characters to prevent them from being interpreted as HTML tags or&lt;br /&gt;
       entity reference markers.&lt;br /&gt;
&lt;br /&gt;
           [% FILTER html %]&lt;br /&gt;
              HTML text may have &amp;lt; and &amp;gt; characters embedded&lt;br /&gt;
              which you want converted to the correct HTML entities.&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       output:&lt;br /&gt;
&lt;br /&gt;
              HTML text may have &amp;amp;lt; and &amp;amp;gt; characters embedded&lt;br /&gt;
              which you want converted to the correct HTML entities.&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;FILTER&amp;quot; directive can also follow various other non-block&lt;br /&gt;
       directives.  For example:&lt;br /&gt;
&lt;br /&gt;
           [% INCLUDE mytext FILTER html %]&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;|&amp;quot; character can also be used as an alias for &amp;quot;FILTER&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
           [% INCLUDE mytext | html %]&lt;br /&gt;
&lt;br /&gt;
       Multiple filters can be chained together and will be called in&lt;br /&gt;
       sequence.&lt;br /&gt;
&lt;br /&gt;
           [% INCLUDE mytext FILTER html FILTER html_para %]&lt;br /&gt;
&lt;br /&gt;
       or&lt;br /&gt;
&lt;br /&gt;
           [% INCLUDE mytext | html | html_para %]&lt;br /&gt;
&lt;br /&gt;
       Filters come in two flavours, known as ’static’ or ’dynamic’.  A static&lt;br /&gt;
       filter is a simple subroutine which accepts a text string as the only&lt;br /&gt;
       argument and returns the modified text.  The &amp;quot;html&amp;quot; filter is an&lt;br /&gt;
       example of a static filter, implemented as:&lt;br /&gt;
&lt;br /&gt;
           sub html_filter {&lt;br /&gt;
               my $text = shift;&lt;br /&gt;
               for ($text) {&lt;br /&gt;
                   s/&amp;amp;/&amp;amp;amp;/g;&lt;br /&gt;
                   s/&amp;lt;/&amp;amp;lt;/g;&lt;br /&gt;
                   s/&amp;gt;/&amp;amp;gt;/g;&lt;br /&gt;
               }&lt;br /&gt;
               return $text;&lt;br /&gt;
           }&lt;br /&gt;
&lt;br /&gt;
       Dynamic filters can accept arguments which are specified when the&lt;br /&gt;
       filter is called from a template.  The &amp;quot;repeat&amp;quot; filter is such an&lt;br /&gt;
       example, accepting a numerical argument which specifies the number of&lt;br /&gt;
       times that the input text should be repeated.&lt;br /&gt;
&lt;br /&gt;
           [% FILTER repeat(3) %]blah [% END %]&lt;br /&gt;
&lt;br /&gt;
       output:&lt;br /&gt;
&lt;br /&gt;
           blah blah blah&lt;br /&gt;
&lt;br /&gt;
       These are implemented as filter ’factories’.  The factory subroutine is&lt;br /&gt;
       passed a reference to the current Template::Context object along with&lt;br /&gt;
       any additional arguments specified.  It should then return a subroutine&lt;br /&gt;
       reference (e.g. a closure) which implements the filter.  The &amp;quot;repeat&amp;quot;&lt;br /&gt;
       filter factory is implemented like this:&lt;br /&gt;
&lt;br /&gt;
           sub repeat_filter_factory {&lt;br /&gt;
               my ($context, $iter) = @_;&lt;br /&gt;
               $iter = 1 unless defined $iter;&lt;br /&gt;
&lt;br /&gt;
               return sub {&lt;br /&gt;
                   my $text = shift;&lt;br /&gt;
                   $text = '' unless defined $text;&lt;br /&gt;
                   return join('\n', $text) x $iter;&lt;br /&gt;
               }&lt;br /&gt;
           }&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;FILTERS&amp;quot; option, described in Template::Manual::Config, allows&lt;br /&gt;
       custom filters to be defined when a Template object is instantiated.&lt;br /&gt;
       The define_filter() method allows further filters to be defined at any&lt;br /&gt;
       time.&lt;br /&gt;
&lt;br /&gt;
       When using a filter, it is possible to assign an alias to it for&lt;br /&gt;
       further use.  This is most useful for dynamic filters that you want to&lt;br /&gt;
       re-use with the same configuration.&lt;br /&gt;
&lt;br /&gt;
           [% FILTER echo = repeat(2) %]&lt;br /&gt;
           Is there anybody out there?&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
           [% FILTER echo %]&lt;br /&gt;
           Mother, should I build a wall?&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       Output:&lt;br /&gt;
&lt;br /&gt;
           Is there anybody out there?&lt;br /&gt;
           Is there anybody out there?&lt;br /&gt;
&lt;br /&gt;
           Mother, should I build a wall?&lt;br /&gt;
           Mother, should I build a wall?&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;FILTER&amp;quot; directive automatically quotes the name of the filter.  As&lt;br /&gt;
       with &amp;quot;INCLUDE&amp;quot; et al, you can use a variable to provide the name of the&lt;br /&gt;
       filter, prefixed by &amp;quot;$&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
           [% myfilter = 'html' %]&lt;br /&gt;
           [% FILTER $myfilter %]      # same as [% FILTER html %]&lt;br /&gt;
              ...&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       A template variable can also be used to define a static filter&lt;br /&gt;
       subroutine.  However, the Template Toolkit will automatically call any&lt;br /&gt;
       subroutine bound to a variable and use the value returned.  Thus, the&lt;br /&gt;
       above example could be implemented as:&lt;br /&gt;
&lt;br /&gt;
           my $vars = {&lt;br /&gt;
               myfilter =&amp;gt; sub { return 'html' },&lt;br /&gt;
           };&lt;br /&gt;
&lt;br /&gt;
       template:&lt;br /&gt;
&lt;br /&gt;
           [% FILTER $myfilter %]      # same as [% FILTER html %]&lt;br /&gt;
              ...&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       To define a template variable that evaluates to a subroutine reference&lt;br /&gt;
       that can be used by the &amp;quot;FILTER&amp;quot; directive, you should create a&lt;br /&gt;
       subroutine that, when called automatically by the Template Toolkit,&lt;br /&gt;
       returns another subroutine reference which can then be used to perform&lt;br /&gt;
       the filter operation.  Note that only static filters can be implemented&lt;br /&gt;
       in this way.&lt;br /&gt;
&lt;br /&gt;
           my $vars = {&lt;br /&gt;
               myfilter =&amp;gt; sub { \&amp;amp;my_filter_sub },&lt;br /&gt;
           };&lt;br /&gt;
&lt;br /&gt;
           sub my_filter_sub {&lt;br /&gt;
               my $text = shift;&lt;br /&gt;
               # do something&lt;br /&gt;
               return $text;&lt;br /&gt;
           }&lt;br /&gt;
&lt;br /&gt;
       template:&lt;br /&gt;
&lt;br /&gt;
           [% FILTER $myfilter %]&lt;br /&gt;
              ...&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       Alternately, you can bless a subroutine reference into a class (any&lt;br /&gt;
       class will do) to fool the Template Toolkit into thinking it’s an&lt;br /&gt;
       object rather than a subroutine.  This will then bypass the automatic&lt;br /&gt;
       &amp;quot;call-a-subroutine-to-return-a-value&amp;quot; magic.&lt;br /&gt;
&lt;br /&gt;
           my $vars = {&lt;br /&gt;
               myfilter =&amp;gt; bless(\&amp;amp;my_filter_sub, 'anything_you_like'),&lt;br /&gt;
           };&lt;br /&gt;
&lt;br /&gt;
       template:&lt;br /&gt;
&lt;br /&gt;
           [% FILTER $myfilter %]&lt;br /&gt;
              ...&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       Filters bound to template variables remain local to the variable&lt;br /&gt;
       context in which they are defined. That is, if you define a filter in a&lt;br /&gt;
       &amp;quot;PERL&amp;quot; block within a template that is loaded via &amp;quot;INCLUDE&amp;quot;, then the&lt;br /&gt;
       filter definition will only exist until the end of that template when&lt;br /&gt;
       the stash is delocalised, restoring the previous variable state. If you&lt;br /&gt;
       want to define a filter which persists for the lifetime of the&lt;br /&gt;
       processor, or define additional dynamic filter factories, then you can&lt;br /&gt;
       call the define_filter() method on the current Template::Context&lt;br /&gt;
       object.&lt;br /&gt;
&lt;br /&gt;
       See Template::Manual::Filters for a complete list of available filters,&lt;br /&gt;
       their descriptions and examples of use.&lt;br /&gt;
&lt;br /&gt;
   USE&lt;br /&gt;
       The &amp;quot;USE&amp;quot; directive can be used to load and initialise &amp;quot;plugin&amp;quot;&lt;br /&gt;
       extension modules.&lt;br /&gt;
&lt;br /&gt;
           [% USE myplugin %]&lt;br /&gt;
&lt;br /&gt;
       A plugin is a regular Perl module that conforms to a particular object-&lt;br /&gt;
       oriented interface, allowing it to be loaded into and used&lt;br /&gt;
       automatically by the Template Toolkit.  For details of this interface&lt;br /&gt;
       and information on writing plugins, consult Template::Plugin.&lt;br /&gt;
&lt;br /&gt;
       A number of standard plugins are included with the Template Toolkit&lt;br /&gt;
       (see below and Template::Manual::Plugins).  The names of these standard&lt;br /&gt;
       plugins are case insensitive.&lt;br /&gt;
&lt;br /&gt;
           [% USE CGI   %]        # =&amp;gt; Template::Plugin::CGI&lt;br /&gt;
           [% USE Cgi   %]        # =&amp;gt; Template::Plugin::CGI&lt;br /&gt;
           [% USE cgi   %]        # =&amp;gt; Template::Plugin::CGI&lt;br /&gt;
&lt;br /&gt;
       You can also define further plugins using the &amp;quot;PLUGINS&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
           my $tt = Template-&amp;gt;new({&lt;br /&gt;
               PLUGINS =&amp;gt; {&lt;br /&gt;
                   foo =&amp;gt; 'My::Plugin::Foo',&lt;br /&gt;
                   bar =&amp;gt; 'My::Plugin::Bar',&lt;br /&gt;
               },&lt;br /&gt;
           });&lt;br /&gt;
&lt;br /&gt;
       The recommended convention is to specify these plugin names in lower&lt;br /&gt;
       case.  The Template Toolkit first looks for an exact case-sensitive&lt;br /&gt;
       match and then tries the lower case conversion of the name specified.&lt;br /&gt;
&lt;br /&gt;
           [% USE Foo %]      # look for 'Foo' then 'foo'&lt;br /&gt;
&lt;br /&gt;
       If you define all your &amp;quot;PLUGINS&amp;quot; with lower case names then they will&lt;br /&gt;
       be located regardless of how the user specifies the name in the &amp;quot;USE&amp;quot;&lt;br /&gt;
       directive.  If, on the other hand, you define your &amp;quot;PLUGINS&amp;quot; with upper&lt;br /&gt;
       or mixed case names then the name specified in the &amp;quot;USE&amp;quot; directive must&lt;br /&gt;
       match the case exactly.&lt;br /&gt;
&lt;br /&gt;
       If the plugin isn’t defined in either the standard plugins&lt;br /&gt;
       ($Template::Plugins::STD_PLUGINS) or via the &amp;quot;PLUGINS&amp;quot; option, then the&lt;br /&gt;
       &amp;quot;PLUGIN_BASE&amp;quot; is searched.&lt;br /&gt;
&lt;br /&gt;
       In this case the plugin name is case-sensitive.  It is appended to each&lt;br /&gt;
       of the &amp;quot;PLUGIN_BASE&amp;quot; module namespaces in turn (default:&lt;br /&gt;
       &amp;quot;Template::Plugin&amp;quot;) to construct a full module name which it attempts&lt;br /&gt;
       to locate and load.  Any periods, ’&amp;quot;.&amp;quot;’, in the name will be converted&lt;br /&gt;
       to ’&amp;quot;::&amp;quot;’.&lt;br /&gt;
&lt;br /&gt;
           [% USE MyPlugin %]     #  =&amp;gt; Template::Plugin::MyPlugin&lt;br /&gt;
           [% USE Foo.Bar  %]     #  =&amp;gt; Template::Plugin::Foo::Bar&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;LOAD_PERL&amp;quot; option (disabled by default) provides a further way by&lt;br /&gt;
       which external Perl modules may be loaded.  If a regular Perl module&lt;br /&gt;
       (i.e. not a &amp;quot;Template::Plugin::*&amp;quot; or other module relative to some&lt;br /&gt;
       &amp;quot;PLUGIN_BASE&amp;quot;) supports an object-oriented interface and a &amp;quot;new()&amp;quot;&lt;br /&gt;
       constructor then it can be loaded and instantiated automatically.  The&lt;br /&gt;
       following trivial example shows how the IO::File module might be used.&lt;br /&gt;
&lt;br /&gt;
           [% USE file = IO.File('/tmp/mydata') %]&lt;br /&gt;
&lt;br /&gt;
           [% WHILE (line = file.getline) %]&lt;br /&gt;
              &amp;lt;!-- [% line %] --&amp;gt;&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       Any additional parameters supplied in parenthesis after the plugin name&lt;br /&gt;
       will be also be passed to the &amp;quot;new()&amp;quot; constructor.  A reference to the&lt;br /&gt;
       current Template::Context object is passed as the first parameter.&lt;br /&gt;
&lt;br /&gt;
           [% USE MyPlugin('foo', 123) %]&lt;br /&gt;
&lt;br /&gt;
       equivalent to:&lt;br /&gt;
&lt;br /&gt;
           Template::Plugin::MyPlugin-&amp;gt;new($context, 'foo', 123);&lt;br /&gt;
&lt;br /&gt;
       The only exception to this is when a module is loaded via the&lt;br /&gt;
       &amp;quot;LOAD_PERL&amp;quot; option.  In this case the $context reference is not passed&lt;br /&gt;
       to the &amp;quot;new()&amp;quot; constructor.  This is based on the assumption that the&lt;br /&gt;
       module is a regular Perl module rather than a Template Toolkit plugin&lt;br /&gt;
       so isn’t expecting a context reference and wouldn’t know what to do&lt;br /&gt;
       with it anyway.&lt;br /&gt;
&lt;br /&gt;
       Named parameters may also be specified.  These are collated into a hash&lt;br /&gt;
       which is passed by reference as the last parameter to the constructor,&lt;br /&gt;
       as per the general code calling interface.&lt;br /&gt;
&lt;br /&gt;
           [% USE url('/cgi-bin/foo', mode='submit', debug=1) %]&lt;br /&gt;
&lt;br /&gt;
       equivalent to:&lt;br /&gt;
&lt;br /&gt;
           Template::Plugin::URL-&amp;gt;new(&lt;br /&gt;
               $context,&lt;br /&gt;
               '/cgi-bin/foo'&lt;br /&gt;
               { mode =&amp;gt; 'submit', debug =&amp;gt; 1 }&lt;br /&gt;
           );&lt;br /&gt;
&lt;br /&gt;
       The plugin may represent any data type; a simple variable, hash, list&lt;br /&gt;
       or code reference, but in the general case it will be an object&lt;br /&gt;
       reference.  Methods can be called on the object (or the relevant&lt;br /&gt;
       members of the specific data type) in the usual way:&lt;br /&gt;
&lt;br /&gt;
           [% USE table(mydata, rows=3) %]&lt;br /&gt;
&lt;br /&gt;
           [% FOREACH row IN table.rows %]&lt;br /&gt;
              &amp;lt;tr&amp;gt;&lt;br /&gt;
              [% FOREACH item IN row %]&lt;br /&gt;
               &amp;lt;td&amp;gt;[% item %]&amp;lt;/td&amp;gt;&lt;br /&gt;
              [% END %]&lt;br /&gt;
              &amp;lt;/tr&amp;gt;&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       An alternative name may be provided for the plugin by which it can be&lt;br /&gt;
       referenced:&lt;br /&gt;
&lt;br /&gt;
           [% USE scores = table(myscores, cols=5) %]&lt;br /&gt;
&lt;br /&gt;
           [% FOREACH row IN scores.rows %]&lt;br /&gt;
              ...&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       You can use this approach to create multiple plugin objects with&lt;br /&gt;
       different configurations.  This example shows how the format plugin is&lt;br /&gt;
       used to create sub-routines bound to variables for formatting text as&lt;br /&gt;
       per &amp;quot;printf()&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
           [% USE bold = format('&amp;lt;b&amp;gt;%s&amp;lt;/b&amp;gt;') %]&lt;br /&gt;
           [% USE ital = format('&amp;lt;i&amp;gt;%s&amp;lt;/i&amp;gt;') %]&lt;br /&gt;
           [% bold('This is bold')   %]&lt;br /&gt;
           [% ital('This is italic') %]&lt;br /&gt;
&lt;br /&gt;
       Output:&lt;br /&gt;
&lt;br /&gt;
           &amp;lt;b&amp;gt;This is bold&amp;lt;/b&amp;gt;&lt;br /&gt;
           &amp;lt;i&amp;gt;This is italic&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
       This next example shows how the URL plugin can be used to build dynamic&lt;br /&gt;
       URLs from a base part and optional query parameters.&lt;br /&gt;
&lt;br /&gt;
           [% USE mycgi = URL('/cgi-bin/foo.pl', debug=1) %]&lt;br /&gt;
           &amp;lt;a href=&amp;quot;[% mycgi %]&amp;quot;&amp;gt;...&lt;br /&gt;
           &amp;lt;a href=&amp;quot;[% mycgi(mode='submit') %]&amp;quot;...&lt;br /&gt;
&lt;br /&gt;
       Output:&lt;br /&gt;
&lt;br /&gt;
           &amp;lt;a href=&amp;quot;/cgi-bin/foo.pl?debug=1&amp;quot;&amp;gt;...&lt;br /&gt;
           &amp;lt;a href=&amp;quot;/cgi-bin/foo.pl?mode=submit&amp;amp;debug=1&amp;quot;&amp;gt;...&lt;br /&gt;
&lt;br /&gt;
       The CGI plugin is an example of one which delegates to another Perl&lt;br /&gt;
       module. In this case, to Lincoln Stein’s &amp;quot;CGI&amp;quot; module.  All of the&lt;br /&gt;
       methods provided by the &amp;quot;CGI&amp;quot; module are available via the plugin.&lt;br /&gt;
&lt;br /&gt;
           [% USE CGI;&lt;br /&gt;
              CGI.start_form;&lt;br /&gt;
              CGI.checkbox_group( name   = 'colours',&lt;br /&gt;
                                  values = [ 'red' 'green' 'blue' ] );&lt;br /&gt;
              CGI.popup_menu( name   = 'items',&lt;br /&gt;
                              values = [ 'foo' 'bar' 'baz' ] );&lt;br /&gt;
              CGI.end_form&lt;br /&gt;
           %]&lt;br /&gt;
&lt;br /&gt;
       See Template::Manual::Plugins for more information on the plugins&lt;br /&gt;
       distributed with the toolkit or available from CPAN.&lt;br /&gt;
&lt;br /&gt;
   MACRO&lt;br /&gt;
       The &amp;quot;MACRO&amp;quot; directive allows you to define a directive or directive&lt;br /&gt;
       block which is then evaluated each time the macro is called.&lt;br /&gt;
&lt;br /&gt;
           [% MACRO header INCLUDE header %]&lt;br /&gt;
&lt;br /&gt;
       Calling the macro as:&lt;br /&gt;
&lt;br /&gt;
           [% header %]&lt;br /&gt;
&lt;br /&gt;
       is then equivalent to:&lt;br /&gt;
&lt;br /&gt;
           [% INCLUDE header %]&lt;br /&gt;
&lt;br /&gt;
       Macros can be passed named parameters when called.  These values remain&lt;br /&gt;
       local to the macro.&lt;br /&gt;
&lt;br /&gt;
           [% header(title='Hello World') %]&lt;br /&gt;
&lt;br /&gt;
       equivalent to:&lt;br /&gt;
&lt;br /&gt;
           [% INCLUDE header title='Hello World' %]&lt;br /&gt;
&lt;br /&gt;
       A &amp;quot;MACRO&amp;quot; definition may include parameter names.  Values passed to the&lt;br /&gt;
       macros are then mapped to these local variables.  Other named&lt;br /&gt;
       parameters may follow these.&lt;br /&gt;
&lt;br /&gt;
           [% MACRO header(title) INCLUDE header %]&lt;br /&gt;
           [% header('Hello World') %]&lt;br /&gt;
           [% header('Hello World', bgcol='#123456') %]&lt;br /&gt;
&lt;br /&gt;
       equivalent to:&lt;br /&gt;
&lt;br /&gt;
           [% INCLUDE header title='Hello World' %]&lt;br /&gt;
           [% INCLUDE header title='Hello World' bgcol='#123456' %]&lt;br /&gt;
&lt;br /&gt;
       Here’s another example, defining a macro for display numbers in comma-&lt;br /&gt;
       delimited groups of 3, using the chunk and join virtual method.&lt;br /&gt;
&lt;br /&gt;
           [% MACRO number(n) GET n.chunk(-3).join(',') %]&lt;br /&gt;
           [% number(1234567) %]    # 1,234,567&lt;br /&gt;
&lt;br /&gt;
       A &amp;quot;MACRO&amp;quot; may precede any directive and must conform to the structure&lt;br /&gt;
       of the directive.&lt;br /&gt;
&lt;br /&gt;
           [% MACRO header IF frames %]&lt;br /&gt;
              [% INCLUDE frames/header %]&lt;br /&gt;
           [% ELSE %]&lt;br /&gt;
              [% INCLUDE header %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
           [% header %]&lt;br /&gt;
&lt;br /&gt;
       A &amp;quot;MACRO&amp;quot; may also be defined as an anonymous &amp;quot;BLOCK&amp;quot;.  The block will&lt;br /&gt;
       be evaluated each time the macro is called.&lt;br /&gt;
&lt;br /&gt;
           [% MACRO header BLOCK %]&lt;br /&gt;
              ...content...&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
           [% header %]&lt;br /&gt;
&lt;br /&gt;
       If you’ve got the &amp;quot;EVAL_PERL&amp;quot; option set, then you can even define a&lt;br /&gt;
       &amp;quot;MACRO&amp;quot; as a &amp;quot;PERL&amp;quot; block (see below):&lt;br /&gt;
&lt;br /&gt;
           [% MACRO triple(n) PERL %]&lt;br /&gt;
                my $n = $stash-&amp;gt;get('n');&lt;br /&gt;
                print $n * 3;&lt;br /&gt;
           [% END -%]&lt;br /&gt;
&lt;br /&gt;
   PERL&lt;br /&gt;
       (for the advanced reader)&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;PERL&amp;quot; directive is used to mark the start of a block which&lt;br /&gt;
       contains Perl code for evaluation.  The &amp;quot;EVAL_PERL&amp;quot; option must be&lt;br /&gt;
       enabled for Perl code to be evaluated or a &amp;quot;perl&amp;quot; exception will be&lt;br /&gt;
       thrown with the message ’&amp;quot;EVAL_PERL not set&amp;quot;’.&lt;br /&gt;
&lt;br /&gt;
       Perl code is evaluated in the &amp;quot;Template::Perl&amp;quot; package.  The $context&lt;br /&gt;
       package variable contains a reference to the current Template::Context&lt;br /&gt;
       object.  This can be used to access the functionality of the Template&lt;br /&gt;
       Toolkit to process other templates, load plugins, filters, etc.  See&lt;br /&gt;
       Template::Context for further details.&lt;br /&gt;
&lt;br /&gt;
           [% PERL %]&lt;br /&gt;
              print $context-&amp;gt;include('myfile');&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       The $stash variable contains a reference to the top-level stash object&lt;br /&gt;
       which manages template variables.  Through this, variable values can be&lt;br /&gt;
       retrieved and updated.  See Template::Stash for further details.&lt;br /&gt;
&lt;br /&gt;
           [% PERL %]&lt;br /&gt;
              $stash-&amp;gt;set(foo =&amp;gt; 'bar');&lt;br /&gt;
              print &amp;quot;foo value: &amp;quot;, $stash-&amp;gt;get('foo');&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       Output:&lt;br /&gt;
&lt;br /&gt;
           foo value: bar&lt;br /&gt;
&lt;br /&gt;
       Output is generated from the &amp;quot;PERL&amp;quot; block by calling &amp;quot;print()&amp;quot;.  Note&lt;br /&gt;
       that the &amp;quot;Template::Perl::PERLOUT&amp;quot; handle is selected (tied to an&lt;br /&gt;
       output buffer) instead of &amp;quot;STDOUT&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
           [% PERL %]&lt;br /&gt;
              print &amp;quot;foo\n&amp;quot;;                           # OK&lt;br /&gt;
              print PERLOUT &amp;quot;bar\n&amp;quot;;                   # OK, same as above&lt;br /&gt;
              print Template::Perl::PERLOUT &amp;quot;baz\n&amp;quot;;   # OK, same as above&lt;br /&gt;
              print STDOUT &amp;quot;qux\n&amp;quot;;                    # WRONG!&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;PERL&amp;quot; block may contain other template directives.  These are&lt;br /&gt;
       processed before the Perl code is evaluated.&lt;br /&gt;
&lt;br /&gt;
           [% name = 'Fred Smith' %]&lt;br /&gt;
&lt;br /&gt;
           [% PERL %]&lt;br /&gt;
              print &amp;quot;[% name %]\n&amp;quot;;&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       Thus, the Perl code in the above example is evaluated as:&lt;br /&gt;
&lt;br /&gt;
           print &amp;quot;Fred Smith\n&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
       Exceptions may be thrown from within &amp;quot;PERL&amp;quot; blocks using &amp;quot;die()&amp;quot;.  They&lt;br /&gt;
       will be correctly caught by enclosing &amp;quot;TRY&amp;quot; blocks.&lt;br /&gt;
&lt;br /&gt;
           [% TRY %]&lt;br /&gt;
              [% PERL %]&lt;br /&gt;
                 die &amp;quot;nothing to live for\n&amp;quot;;&lt;br /&gt;
              [% END %]&lt;br /&gt;
           [% CATCH %]&lt;br /&gt;
              error: [% error.info %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       output:&lt;br /&gt;
              error: nothing to live for&lt;br /&gt;
&lt;br /&gt;
   RAWPERL&lt;br /&gt;
       (for the very advanced reader)&lt;br /&gt;
&lt;br /&gt;
       The Template Toolkit parser reads a source template and generates the&lt;br /&gt;
       text of a Perl subroutine as output.  It then uses &amp;quot;eval()&amp;quot; to evaluate&lt;br /&gt;
       it into a subroutine reference.  This subroutine is then called to&lt;br /&gt;
       process the template, passing a reference to the current&lt;br /&gt;
       Template::Context object through which the functionality of the&lt;br /&gt;
       Template Toolkit can be accessed.  The subroutine reference can be&lt;br /&gt;
       cached, allowing the template to be processed repeatedly without&lt;br /&gt;
       requiring any further parsing.&lt;br /&gt;
&lt;br /&gt;
       For example, a template such as:&lt;br /&gt;
&lt;br /&gt;
           [% PROCESS header %]&lt;br /&gt;
           The [% animal %] sat on the [% location %]&lt;br /&gt;
           [% PROCESS footer %]&lt;br /&gt;
&lt;br /&gt;
       is converted into the following Perl subroutine definition:&lt;br /&gt;
&lt;br /&gt;
           sub {&lt;br /&gt;
               my $context = shift;&lt;br /&gt;
               my $stash   = $context-&amp;gt;stash;&lt;br /&gt;
               my $output  = '';&lt;br /&gt;
               my $error;&lt;br /&gt;
&lt;br /&gt;
               eval { BLOCK: {&lt;br /&gt;
                   $output .=  $context-&amp;gt;process('header');&lt;br /&gt;
                   $output .=  &amp;quot;The &amp;quot;;&lt;br /&gt;
                   $output .=  $stash-&amp;gt;get('animal');&lt;br /&gt;
                   $output .=  &amp;quot; sat on the &amp;quot;;&lt;br /&gt;
                   $output .=  $stash-&amp;gt;get('location');&lt;br /&gt;
                   $output .=  $context-&amp;gt;process('footer');&lt;br /&gt;
                   $output .=  &amp;quot;\n&amp;quot;;&lt;br /&gt;
               } };&lt;br /&gt;
               if ($@) {&lt;br /&gt;
                   $error = $context-&amp;gt;catch($@, \$output);&lt;br /&gt;
                   die $error unless $error-&amp;gt;type eq 'return';&lt;br /&gt;
               }&lt;br /&gt;
&lt;br /&gt;
               return $output;&lt;br /&gt;
           }&lt;br /&gt;
&lt;br /&gt;
       To examine the Perl code generated, such as in the above example, set&lt;br /&gt;
       the $Template::Parser::DEBUG package variable to any true value.  You&lt;br /&gt;
       can also set the $Template::Directive::PRETTY variable true to have the&lt;br /&gt;
       code formatted in a readable manner for human consumption.  The source&lt;br /&gt;
       code for each generated template subroutine will be printed to &amp;quot;STDERR&amp;quot;&lt;br /&gt;
       on compilation (i.e. the first time a template is used).&lt;br /&gt;
&lt;br /&gt;
           $Template::Parser::DEBUG = 1;&lt;br /&gt;
           $Template::Directive::PRETTY = 1;&lt;br /&gt;
&lt;br /&gt;
           $template-&amp;gt;process($file, $vars)&lt;br /&gt;
               || die $template-&amp;gt;error(), &amp;quot;\n&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;PERL&amp;quot; ... &amp;quot;END&amp;quot; construct allows Perl code to be embedded into a&lt;br /&gt;
       template when the &amp;quot;EVAL_PERL&amp;quot; option is set.  It is evaluated at&lt;br /&gt;
       &amp;quot;runtime&amp;quot; using &amp;quot;eval()&amp;quot; each time the template subroutine is called.&lt;br /&gt;
       This is inherently flexible, but not as efficient as it could be,&lt;br /&gt;
       especially in a persistent server environment where a template may be&lt;br /&gt;
       processed many times.&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;RAWPERL&amp;quot; directive allows you to write Perl code that is&lt;br /&gt;
       integrated directly into the generated Perl subroutine text.  It is&lt;br /&gt;
       evaluated once at compile time and is stored in cached form as part of&lt;br /&gt;
       the compiled template subroutine.  This makes &amp;quot;RAWPERL&amp;quot; blocks more&lt;br /&gt;
       efficient than &amp;quot;PERL&amp;quot; blocks.&lt;br /&gt;
&lt;br /&gt;
       The downside is that you must code much closer to the metal. For&lt;br /&gt;
       example, in a &amp;quot;PERL&amp;quot; block you can call print() to generate some&lt;br /&gt;
       output. &amp;quot;RAWPERL&amp;quot; blocks don’t afford such luxury. The code is inserted&lt;br /&gt;
       directly into the generated subroutine text and should conform to the&lt;br /&gt;
       convention of appending to the $output variable.&lt;br /&gt;
&lt;br /&gt;
           [% PROCESS  header %]&lt;br /&gt;
&lt;br /&gt;
           [% RAWPERL %]&lt;br /&gt;
              $output .= &amp;quot;Some output\n&amp;quot;;&lt;br /&gt;
              ...&lt;br /&gt;
              $output .= &amp;quot;Some more output\n&amp;quot;;&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       The critical section of the generated subroutine for this example would&lt;br /&gt;
       then look something like:&lt;br /&gt;
&lt;br /&gt;
           ...&lt;br /&gt;
           eval { BLOCK: {&lt;br /&gt;
               $output .=  $context-&amp;gt;process('header');&lt;br /&gt;
               $output .=  &amp;quot;\n&amp;quot;;&lt;br /&gt;
               $output .= &amp;quot;Some output\n&amp;quot;;&lt;br /&gt;
               ...&lt;br /&gt;
               $output .= &amp;quot;Some more output\n&amp;quot;;&lt;br /&gt;
               $output .=  &amp;quot;\n&amp;quot;;&lt;br /&gt;
           } };&lt;br /&gt;
           ...&lt;br /&gt;
&lt;br /&gt;
       As with &amp;quot;PERL&amp;quot; blocks, the $context and $stash references are pre-&lt;br /&gt;
       defined and available for use within &amp;quot;RAWPERL&amp;quot; code.&lt;br /&gt;
&lt;br /&gt;
Exception Handling and Flow Control&lt;br /&gt;
   TRY / THROW / CATCH / FINAL&lt;br /&gt;
       (more advanced material)&lt;br /&gt;
&lt;br /&gt;
       The Template Toolkit supports fully functional, nested exception&lt;br /&gt;
       handling.  The &amp;quot;TRY&amp;quot; directive introduces an exception handling scope&lt;br /&gt;
       which continues until the matching &amp;quot;END&amp;quot; directive.  Any errors that&lt;br /&gt;
       occur within that block will be caught and can be handled by one of the&lt;br /&gt;
       &amp;quot;CATCH&amp;quot; blocks defined.&lt;br /&gt;
&lt;br /&gt;
           [% TRY %]&lt;br /&gt;
              ...blah...blah...&lt;br /&gt;
              [% CALL somecode %]&lt;br /&gt;
              ...etc...&lt;br /&gt;
              [% INCLUDE someblock %]&lt;br /&gt;
              ...and so on...&lt;br /&gt;
           [% CATCH %]&lt;br /&gt;
              An error occurred!&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       Errors are raised as exceptions (objects of the Template::Exception&lt;br /&gt;
       class) which contain two fields: &amp;quot;type&amp;quot; and &amp;quot;info&amp;quot;. The exception&lt;br /&gt;
       &amp;quot;type&amp;quot; is used to indicate the kind of error that occurred. It is a&lt;br /&gt;
       simple text string which can contain letters, numbers, ’&amp;quot;_&amp;quot;’ or ’&amp;quot;.&amp;quot;’.&lt;br /&gt;
       The &amp;quot;info&amp;quot; field contains an error message indicating what actually&lt;br /&gt;
       went wrong. Within a catch block, the exception object is aliased to&lt;br /&gt;
       the &amp;quot;error&amp;quot; variable. You can access the &amp;quot;type&amp;quot; and &amp;quot;info&amp;quot; fields&lt;br /&gt;
       directly.&lt;br /&gt;
&lt;br /&gt;
           [% mydsn = 'dbi:MySQL:foobar' %]&lt;br /&gt;
           ...&lt;br /&gt;
&lt;br /&gt;
           [% TRY %]&lt;br /&gt;
              [% USE DBI(mydsn) %]&lt;br /&gt;
           [% CATCH %]&lt;br /&gt;
              ERROR! Type: [% error.type %]&lt;br /&gt;
                     Info: [% error.info %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       output (assuming a non-existent database called ’&amp;quot;foobar&amp;quot;’):&lt;br /&gt;
&lt;br /&gt;
           ERROR!  Type: DBI&lt;br /&gt;
                   Info: Unknown database &amp;quot;foobar&amp;quot;&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;error&amp;quot; variable can also be specified by itself and will return a&lt;br /&gt;
       string of the form &amp;quot;&amp;quot;$type error - $info&amp;quot;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
           ...&lt;br /&gt;
           [% CATCH %]&lt;br /&gt;
           ERROR: [% error %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       Output:&lt;br /&gt;
&lt;br /&gt;
           ERROR: DBI error - Unknown database &amp;quot;foobar&amp;quot;&lt;br /&gt;
&lt;br /&gt;
       Each &amp;quot;CATCH&amp;quot; block may be specified with a particular exception type&lt;br /&gt;
       denoting the kind of error that it should catch.  Multiple &amp;quot;CATCH&amp;quot;&lt;br /&gt;
       blocks can be provided to handle different types of exception that may&lt;br /&gt;
       be thrown in the &amp;quot;TRY&amp;quot; block.  A &amp;quot;CATCH&amp;quot; block specified without any&lt;br /&gt;
       type, as in the previous example, is a default handler which will catch&lt;br /&gt;
       any otherwise uncaught exceptions.  This can also be specified as &amp;quot;[%&lt;br /&gt;
       CATCH DEFAULT %]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
           [% TRY %]&lt;br /&gt;
              [% INCLUDE myfile %]&lt;br /&gt;
              [% USE DBI(mydsn) %]&lt;br /&gt;
              [% CALL somecode %]&lt;br /&gt;
           [% CATCH file %]&lt;br /&gt;
              File Error! [% error.info %]&lt;br /&gt;
           [% CATCH DBI %]&lt;br /&gt;
              [% INCLUDE database/error.html %]&lt;br /&gt;
           [% CATCH %]&lt;br /&gt;
              [% error %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       Remember that you can specify multiple directives within a single tag,&lt;br /&gt;
       each delimited by ’&amp;quot;;&amp;quot;’.  So the above example can be written more&lt;br /&gt;
       concisely as:&lt;br /&gt;
&lt;br /&gt;
           [% TRY;&lt;br /&gt;
                  INCLUDE myfile;&lt;br /&gt;
                  USE DBI(mydsn);&lt;br /&gt;
                  CALL somecode;&lt;br /&gt;
              CATCH file;&lt;br /&gt;
                  &amp;quot;File Error! $error.info&amp;quot;;&lt;br /&gt;
              CATCH DBI;&lt;br /&gt;
                  INCLUDE database/error.html;&lt;br /&gt;
              CATCH;&lt;br /&gt;
                  error;&lt;br /&gt;
              END&lt;br /&gt;
           %]&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;DBI&amp;quot; plugin throws exceptions of the &amp;quot;DBI&amp;quot; type (in case that&lt;br /&gt;
       wasn’t already obvious).  The other specific exception caught here is&lt;br /&gt;
       of the &amp;quot;file&amp;quot; type.&lt;br /&gt;
&lt;br /&gt;
       A &amp;quot;file&amp;quot; exception is automatically thrown by the Template Toolkit when&lt;br /&gt;
       it can’t find a file, or fails to load, parse or process a file that&lt;br /&gt;
       has been requested by an &amp;quot;INCLUDE&amp;quot;, &amp;quot;PROCESS&amp;quot;, &amp;quot;INSERT&amp;quot; or &amp;quot;WRAPPER&amp;quot;&lt;br /&gt;
       directive.  If &amp;quot;myfile&amp;quot; can’t be found in the example above, the &amp;quot;[%&lt;br /&gt;
       INCLUDE myfile %]&amp;quot; directive will raise a &amp;quot;file&amp;quot; exception which is&lt;br /&gt;
       then caught by the &amp;quot;[% CATCH file %]&amp;quot; block.  The output generated&lt;br /&gt;
       would be:&lt;br /&gt;
&lt;br /&gt;
           File Error! myfile: not found&lt;br /&gt;
&lt;br /&gt;
       Note that the &amp;quot;DEFAULT&amp;quot; option (disabled by default) allows you to&lt;br /&gt;
       specify a default file to be used any time a template file can’t be&lt;br /&gt;
       found. This will prevent file exceptions from ever being raised when a&lt;br /&gt;
       non-existent file is requested (unless, of course, the &amp;quot;DEFAULT&amp;quot; file&lt;br /&gt;
       your specify doesn’t exist).  Errors encountered once the file has been&lt;br /&gt;
       found (i.e. read error, parse error) will be raised as file exceptions&lt;br /&gt;
       as per usual.&lt;br /&gt;
&lt;br /&gt;
       Uncaught exceptions (i.e. if the &amp;quot;TRY&amp;quot; block doesn’t have a type&lt;br /&gt;
       specific or default &amp;quot;CATCH&amp;quot; handler) may be caught by enclosing &amp;quot;TRY&amp;quot;&lt;br /&gt;
       blocks which can be nested indefinitely across multiple templates. If&lt;br /&gt;
       the error isn’t caught at any level then processing will stop and the&lt;br /&gt;
       Template process() method will return a false value to the caller. The&lt;br /&gt;
       relevant Template::Exception object can be retrieved by calling the&lt;br /&gt;
       error() method.&lt;br /&gt;
&lt;br /&gt;
           [% TRY %]&lt;br /&gt;
              ...&lt;br /&gt;
              [% TRY %]&lt;br /&gt;
                 [% INCLUDE $user.header %]&lt;br /&gt;
              [% CATCH file %]&lt;br /&gt;
                 [% INCLUDE header %]&lt;br /&gt;
              [% END %]&lt;br /&gt;
              ...&lt;br /&gt;
           [% CATCH DBI %]&lt;br /&gt;
              [% INCLUDE database/error.html %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       In this example, the inner &amp;quot;TRY&amp;quot; block is used to ensure that the first&lt;br /&gt;
       &amp;quot;INCLUDE&amp;quot; directive works as expected.  We’re using a variable to&lt;br /&gt;
       provide the name of the template we want to include, &amp;quot;user.header&amp;quot;, and&lt;br /&gt;
       it’s possible this contains the name of a non-existent template, or&lt;br /&gt;
       perhaps one containing invalid template directives.  If the &amp;quot;INCLUDE&amp;quot;&lt;br /&gt;
       fails with a &amp;quot;file&amp;quot; error then we &amp;quot;CATCH&amp;quot; it in the inner block and&lt;br /&gt;
       &amp;quot;INCLUDE&amp;quot; the default &amp;quot;header&amp;quot; file instead.  Any &amp;quot;DBI&amp;quot; errors that&lt;br /&gt;
       occur within the scope of the outer &amp;quot;TRY&amp;quot; block will be caught in the&lt;br /&gt;
       relevant &amp;quot;CATCH&amp;quot; block, causing the &amp;quot;database/error.html&amp;quot; template to&lt;br /&gt;
       be processed.  Note that included templates inherit all currently&lt;br /&gt;
       defined template variable so these error files can quite happily access&lt;br /&gt;
       the &amp;lt;error&amp;gt; variable to retrieve information about the currently caught&lt;br /&gt;
       exception.  For example, the &amp;quot;database/error.html&amp;quot; template might look&lt;br /&gt;
       like this:&lt;br /&gt;
&lt;br /&gt;
           &amp;lt;h2&amp;gt;Database Error&amp;lt;/h2&amp;gt;&lt;br /&gt;
           A database error has occurred: [% error.info %]&lt;br /&gt;
&lt;br /&gt;
       You can also specify a &amp;quot;FINAL&amp;quot; block.  This is always processed&lt;br /&gt;
       regardless of the outcome of the &amp;quot;TRY&amp;quot; and/or &amp;quot;CATCH&amp;quot; blocks.  If an&lt;br /&gt;
       exception is uncaught then the &amp;quot;FINAL&amp;quot; block is processed before&lt;br /&gt;
       jumping to the enclosing block or returning to the caller.&lt;br /&gt;
&lt;br /&gt;
           [% TRY %]&lt;br /&gt;
              ...&lt;br /&gt;
           [% CATCH this %]&lt;br /&gt;
              ...&lt;br /&gt;
           [% CATCH that %]&lt;br /&gt;
              ...&lt;br /&gt;
           [% FINAL %]&lt;br /&gt;
              All done!&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       The output from the &amp;quot;TRY&amp;quot; block is left intact up to the point where an&lt;br /&gt;
       exception occurs.  For example, this template:&lt;br /&gt;
&lt;br /&gt;
           [% TRY %]&lt;br /&gt;
              This gets printed&lt;br /&gt;
              [% THROW food 'carrots' %]&lt;br /&gt;
              This doesn't&lt;br /&gt;
           [% CATCH food %]&lt;br /&gt;
              culinary delights: [% error.info %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       generates the following output:&lt;br /&gt;
&lt;br /&gt;
           This gets printed&lt;br /&gt;
           culinary delights: carrots&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;CLEAR&amp;quot; directive can be used in a &amp;quot;CATCH&amp;quot; or &amp;quot;FINAL&amp;quot; block to&lt;br /&gt;
       clear any output created in the &amp;quot;TRY&amp;quot; block.&lt;br /&gt;
&lt;br /&gt;
           [% TRY %]&lt;br /&gt;
              This gets printed&lt;br /&gt;
              [% THROW food 'carrots' %]&lt;br /&gt;
              This doesn't&lt;br /&gt;
           [% CATCH food %]&lt;br /&gt;
              [% CLEAR %]&lt;br /&gt;
              culinary delights: [% error.info %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       Output:&lt;br /&gt;
&lt;br /&gt;
           culinary delights: carrots&lt;br /&gt;
&lt;br /&gt;
       Exception types are hierarchical, with each level being separated by&lt;br /&gt;
       the familiar dot operator.  A &amp;quot;DBI.connect&amp;quot; exception is a more&lt;br /&gt;
       specific kind of &amp;quot;DBI&amp;quot; error.  Similarly, an &amp;quot;example.error.barf&amp;quot; is a&lt;br /&gt;
       more specific kind of &amp;quot;example.error&amp;quot; type which itself is also a&lt;br /&gt;
       &amp;quot;example&amp;quot; error.&lt;br /&gt;
&lt;br /&gt;
       A &amp;quot;CATCH&amp;quot; handler that specifies a general exception type (such as&lt;br /&gt;
       &amp;quot;DBI&amp;quot; or &amp;quot;example.error&amp;quot;) will also catch more specific types that have&lt;br /&gt;
       the same prefix as long as a more specific handler isn’t defined.  Note&lt;br /&gt;
       that the order in which &amp;quot;CATCH&amp;quot; handlers are defined is irrelevant; a&lt;br /&gt;
       more specific handler will always catch an exception in preference to a&lt;br /&gt;
       more generic or default one.&lt;br /&gt;
&lt;br /&gt;
           [% TRY %]&lt;br /&gt;
              ...&lt;br /&gt;
           [% CATCH DBI ;&lt;br /&gt;
                INCLUDE database/error.html ;&lt;br /&gt;
              CATCH DBI.connect ;&lt;br /&gt;
                INCLUDE database/connect.html ;&lt;br /&gt;
              CATCH ;&lt;br /&gt;
                INCLUDE error.html ;&lt;br /&gt;
              END&lt;br /&gt;
           %]&lt;br /&gt;
&lt;br /&gt;
       In this example, a &amp;quot;DBI.connect&amp;quot; error has it’s own handler, a more&lt;br /&gt;
       general &amp;quot;DBI&amp;quot; block is used for all other &amp;quot;DBI&amp;quot; or &amp;quot;DBI.*&amp;quot; errors and a&lt;br /&gt;
       default handler catches everything else.&lt;br /&gt;
&lt;br /&gt;
       Exceptions can be raised in a template using the &amp;quot;THROW&amp;quot; directive.&lt;br /&gt;
       The first parameter is the exception type which doesn’t need to be&lt;br /&gt;
       quoted (but can be, it’s the same as &amp;quot;INCLUDE&amp;quot;) followed by the&lt;br /&gt;
       relevant error message which can be any regular value such as a quoted&lt;br /&gt;
       string, variable, etc.&lt;br /&gt;
&lt;br /&gt;
           [% THROW food &amp;quot;Missing ingredients: $recipe.error&amp;quot; %]&lt;br /&gt;
           [% THROW user.login 'no user id: please login' %]&lt;br /&gt;
           [% THROW $myerror.type &amp;quot;My Error: $myerror.info&amp;quot; %]&lt;br /&gt;
&lt;br /&gt;
       It’s also possible to specify additional positional or named parameters&lt;br /&gt;
       to the &amp;quot;THROW&amp;quot; directive if you want to pass more than just a simple&lt;br /&gt;
       message back as the error info field.&lt;br /&gt;
&lt;br /&gt;
           [% THROW food 'eggs' 'flour' msg='Missing Ingredients' %]&lt;br /&gt;
&lt;br /&gt;
       In this case, the error &amp;quot;info&amp;quot; field will be a hash array containing&lt;br /&gt;
       the named arguments and an &amp;quot;args&amp;quot; item which contains a list of the&lt;br /&gt;
       positional arguments.&lt;br /&gt;
&lt;br /&gt;
           type =&amp;gt; 'food',&lt;br /&gt;
           info =&amp;gt; {&lt;br /&gt;
               msg  =&amp;gt; 'Missing Ingredients',&lt;br /&gt;
               args =&amp;gt; ['eggs', 'flour'],&lt;br /&gt;
           }&lt;br /&gt;
&lt;br /&gt;
       In addition to specifying individual positional arguments as &amp;quot;[%&lt;br /&gt;
       error.info.args.n %]&amp;quot;, the &amp;quot;info&amp;quot; hash contains keys directly pointing&lt;br /&gt;
       to the positional arguments, as a convenient shortcut.&lt;br /&gt;
&lt;br /&gt;
           [% error.info.0 %]   # same as [% error.info.args.0 %]&lt;br /&gt;
&lt;br /&gt;
       Exceptions can also be thrown from Perl code which you’ve bound to&lt;br /&gt;
       template variables, or defined as a plugin or other extension.  To&lt;br /&gt;
       raise an exception, call &amp;quot;die()&amp;quot; passing a reference to a&lt;br /&gt;
       Template::Exception object as the argument.  This will then be caught&lt;br /&gt;
       by any enclosing &amp;quot;TRY&amp;quot; blocks from where the code was called.&lt;br /&gt;
&lt;br /&gt;
           use Template::Exception;&lt;br /&gt;
           ...&lt;br /&gt;
           my $vars = {&lt;br /&gt;
               foo =&amp;gt; sub {&lt;br /&gt;
                   # ... do something ...&lt;br /&gt;
                   die Template::Exception-&amp;gt;new('myerr.naughty',&lt;br /&gt;
                                                'Bad, bad error');&lt;br /&gt;
               },&lt;br /&gt;
           };&lt;br /&gt;
&lt;br /&gt;
       Template:&lt;br /&gt;
&lt;br /&gt;
           [% TRY %]&lt;br /&gt;
              [% foo %]&lt;br /&gt;
           [% CATCH myerr ;&lt;br /&gt;
                &amp;quot;Error: $error&amp;quot; ;&lt;br /&gt;
              END&lt;br /&gt;
           %]&lt;br /&gt;
&lt;br /&gt;
       Output:&lt;br /&gt;
&lt;br /&gt;
           Error: myerr.naughty error - Bad, bad error&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;info&amp;quot; field can also be a reference to another object or data&lt;br /&gt;
       structure, if required.&lt;br /&gt;
&lt;br /&gt;
           die Template::Exception-&amp;gt;new('myerror', {&lt;br /&gt;
               module =&amp;gt; 'foo.pl',&lt;br /&gt;
               errors =&amp;gt; [ 'bad permissions', 'naughty boy' ],&lt;br /&gt;
           });&lt;br /&gt;
&lt;br /&gt;
       Later, in a template:&lt;br /&gt;
&lt;br /&gt;
           [% TRY %]&lt;br /&gt;
              ...&lt;br /&gt;
           [% CATCH myerror %]&lt;br /&gt;
              [% error.info.errors.size or 'no';&lt;br /&gt;
                 error.info.errors.size == 1 ? ' error' : ' errors' %]&lt;br /&gt;
              in [% error.info.module %]:&lt;br /&gt;
                 [% error.info.errors.join(', ') %].&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       Generating the output:&lt;br /&gt;
&lt;br /&gt;
              2 errors in foo.pl:&lt;br /&gt;
                 bad permissions, naughty boy.&lt;br /&gt;
&lt;br /&gt;
       You can also call &amp;quot;die()&amp;quot; with a single string, as is common in much&lt;br /&gt;
       existing Perl code.  This will automatically be converted to an&lt;br /&gt;
       exception of the ’&amp;quot;undef&amp;quot;’ type (that’s the literal string ’&amp;quot;undef&amp;quot;’,&lt;br /&gt;
       not the undefined value).  If the string isn’t terminated with a&lt;br /&gt;
       newline then Perl will append the familiar &amp;quot; at $file line $line&amp;quot;&lt;br /&gt;
       message.&lt;br /&gt;
&lt;br /&gt;
           sub foo {&lt;br /&gt;
               # ... do something ...&lt;br /&gt;
               die &amp;quot;I'm sorry, Dave, I can't do that\n&amp;quot;;&lt;br /&gt;
           }&lt;br /&gt;
&lt;br /&gt;
       If you’re writing a plugin, or some extension code that has the current&lt;br /&gt;
       Template::Context in scope (you can safely skip this section if this&lt;br /&gt;
       means nothing to you) then you can also raise an exception by calling&lt;br /&gt;
       the context throw() method. You can pass it an Template::Exception&lt;br /&gt;
       object reference, a pair of &amp;quot;($type, $info)&amp;quot; parameters or just an&lt;br /&gt;
       $info string to create an exception of ’&amp;quot;undef&amp;quot;’ type.&lt;br /&gt;
&lt;br /&gt;
           $context-&amp;gt;throw($e);            # exception object&lt;br /&gt;
           $context-&amp;gt;throw('Denied');      # 'undef' type&lt;br /&gt;
           $context-&amp;gt;throw('user.passwd', 'Bad Password');&lt;br /&gt;
&lt;br /&gt;
   NEXT&lt;br /&gt;
       The &amp;quot;NEXT&amp;quot; directive can be used to start the next iteration of a&lt;br /&gt;
       &amp;quot;FOREACH&amp;quot; or &amp;quot;WHILE&amp;quot; loop.&lt;br /&gt;
&lt;br /&gt;
           [% FOREACH user IN users %]&lt;br /&gt;
              [% NEXT IF user.isguest %]&lt;br /&gt;
              Name: [% user.name %]    Email: [% user.email %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
   LAST&lt;br /&gt;
       The &amp;quot;LAST&amp;quot; directive can be used to prematurely exit a &amp;quot;FOREACH&amp;quot; or&lt;br /&gt;
       &amp;quot;WHILE&amp;quot; loop.&lt;br /&gt;
&lt;br /&gt;
           [% FOREACH user IN users %]&lt;br /&gt;
              Name: [% user.name %]    Email: [% user.email %]&lt;br /&gt;
              [% LAST IF some.condition %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       &amp;quot;BREAK&amp;quot; can also be used as an alias for &amp;quot;LAST&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
   RETURN&lt;br /&gt;
       The &amp;quot;RETURN&amp;quot; directive can be used to stop processing the current&lt;br /&gt;
       template and return to the template from which it was called, resuming&lt;br /&gt;
       processing at the point immediately after the &amp;quot;INCLUDE&amp;quot;, &amp;quot;PROCESS&amp;quot; or&lt;br /&gt;
       &amp;quot;WRAPPER&amp;quot; directive. If there is no enclosing template then the&lt;br /&gt;
       Template process() method will return to the calling code with a true&lt;br /&gt;
       value.&lt;br /&gt;
&lt;br /&gt;
           Before&lt;br /&gt;
           [% INCLUDE half_wit %]&lt;br /&gt;
           After&lt;br /&gt;
&lt;br /&gt;
           [% BLOCK half_wit %]&lt;br /&gt;
           This is just half...&lt;br /&gt;
           [% RETURN %]&lt;br /&gt;
           ...a complete block&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
       Output:&lt;br /&gt;
&lt;br /&gt;
           Before&lt;br /&gt;
           This is just half...&lt;br /&gt;
           After&lt;br /&gt;
&lt;br /&gt;
   STOP&lt;br /&gt;
       The &amp;quot;STOP&amp;quot; directive can be used to indicate that the processor should&lt;br /&gt;
       stop gracefully without processing any more of the template document.&lt;br /&gt;
       This is a planned stop and the Template process() method will return a&lt;br /&gt;
       true value to the caller. This indicates that the template was&lt;br /&gt;
       processed successfully according to the directives within it.&lt;br /&gt;
&lt;br /&gt;
           [% IF something.terrible.happened %]&lt;br /&gt;
              [% INCLUDE fatal/error.html %]&lt;br /&gt;
              [% STOP %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
           [% TRY %]&lt;br /&gt;
              [% USE DBI(mydsn) %]&lt;br /&gt;
              ...&lt;br /&gt;
           [% CATCH DBI.connect %]&lt;br /&gt;
              &amp;lt;h1&amp;gt;Cannot connect to the database: [% error.info %]&amp;lt;/h1&amp;gt;&lt;br /&gt;
              &amp;lt;p&amp;gt;&lt;br /&gt;
                We apologise for the inconvenience.&lt;br /&gt;
              &amp;lt;/p&amp;gt;&lt;br /&gt;
              [% INCLUDE footer %]&lt;br /&gt;
              [% STOP %]&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
   CLEAR&lt;br /&gt;
       The &amp;quot;CLEAR&amp;quot; directive can be used to clear the output buffer for the&lt;br /&gt;
       current enclosing block.   It is most commonly used to clear the output&lt;br /&gt;
       generated from a &amp;quot;TRY&amp;quot; block up to the point where the error occurred.&lt;br /&gt;
&lt;br /&gt;
           [% TRY %]&lt;br /&gt;
              blah blah blah            # this is normally left intact&lt;br /&gt;
              [% THROW some 'error' %]  # up to the point of error&lt;br /&gt;
              ...&lt;br /&gt;
           [% CATCH %]&lt;br /&gt;
              [% CLEAR %]               # clear the TRY output&lt;br /&gt;
              [% error %]               # print error string&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
Miscellaneous&lt;br /&gt;
   META&lt;br /&gt;
       The &amp;quot;META&amp;quot; directive allows simple metadata items to be defined within&lt;br /&gt;
       a template. These are evaluated when the template is parsed and as such&lt;br /&gt;
       may only contain simple values (e.g. it’s not possible to interpolate&lt;br /&gt;
       other variables values into &amp;quot;META&amp;quot; variables).&lt;br /&gt;
&lt;br /&gt;
           [% META&lt;br /&gt;
              title   = 'The Cat in the Hat'&lt;br /&gt;
              author  = 'Dr. Seuss'&lt;br /&gt;
              version = 1.23&lt;br /&gt;
           %]&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;template&amp;quot; variable contains a reference to the main template being&lt;br /&gt;
       processed.  These metadata items may be retrieved as attributes of the&lt;br /&gt;
       template.&lt;br /&gt;
&lt;br /&gt;
           &amp;lt;h1&amp;gt;[% template.title %]&amp;lt;/h1&amp;gt;&lt;br /&gt;
           &amp;lt;h2&amp;gt;[% template.author %]&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;name&amp;quot; and &amp;quot;modtime&amp;quot; metadata items are automatically defined for&lt;br /&gt;
       each template to contain its name and modification time in seconds&lt;br /&gt;
       since the epoch.&lt;br /&gt;
&lt;br /&gt;
           [% USE date %]              # use Date plugin to format time&lt;br /&gt;
           ...&lt;br /&gt;
           [% template.name %] last modified&lt;br /&gt;
           at [% date.format(template.modtime) %]&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;PRE_PROCESS&amp;quot; and &amp;quot;POST_PROCESS&amp;quot; options allow common headers and&lt;br /&gt;
       footers to be added to all templates.  The &amp;quot;template&amp;quot; reference is&lt;br /&gt;
       correctly defined when these templates are processed, allowing headers&lt;br /&gt;
       and footers to reference metadata items from the main template.&lt;br /&gt;
&lt;br /&gt;
           $template = Template-&amp;gt;new({&lt;br /&gt;
               PRE_PROCESS  =&amp;gt; 'header',&lt;br /&gt;
               POST_PROCESS =&amp;gt; 'footer',&lt;br /&gt;
           });&lt;br /&gt;
&lt;br /&gt;
           $template-&amp;gt;process('cat_in_hat');&lt;br /&gt;
&lt;br /&gt;
       header:&lt;br /&gt;
&lt;br /&gt;
           &amp;lt;html&amp;gt;&lt;br /&gt;
             &amp;lt;head&amp;gt;&lt;br /&gt;
               &amp;lt;title&amp;gt;[% template.title %]&amp;lt;/title&amp;gt;&lt;br /&gt;
             &amp;lt;/head&amp;gt;&lt;br /&gt;
             &amp;lt;body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
       cat_in_hat:&lt;br /&gt;
&lt;br /&gt;
           [% META&lt;br /&gt;
                title   = 'The Cat in the Hat'&lt;br /&gt;
                author  = 'Dr. Seuss'&lt;br /&gt;
                version = 1.23&lt;br /&gt;
                year    = 2000&lt;br /&gt;
           %]&lt;br /&gt;
&lt;br /&gt;
               The cat in the hat sat on the mat.&lt;br /&gt;
&lt;br /&gt;
       footer:&lt;br /&gt;
&lt;br /&gt;
               &amp;lt;hr&amp;gt;&lt;br /&gt;
               &amp;amp;copy; [% template.year %] [% template.author %]&lt;br /&gt;
             &amp;lt;/body&amp;gt;&lt;br /&gt;
           &amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
       The output generated from the above example is:&lt;br /&gt;
&lt;br /&gt;
           &amp;lt;html&amp;gt;&lt;br /&gt;
             &amp;lt;head&amp;gt;&lt;br /&gt;
               &amp;lt;title&amp;gt;The Cat in the Hat&amp;lt;/title&amp;gt;&lt;br /&gt;
             &amp;lt;/head&amp;gt;&lt;br /&gt;
             &amp;lt;body&amp;gt;&lt;br /&gt;
               The cat in the hat sat on the mat.&lt;br /&gt;
               &amp;lt;hr&amp;gt;&lt;br /&gt;
               &amp;amp;copy; 2000 Dr. Seuss&lt;br /&gt;
             &amp;lt;/body&amp;gt;&lt;br /&gt;
           &amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   TAGS&lt;br /&gt;
       The &amp;quot;TAGS&amp;quot; directive can be used to set the &amp;quot;START_TAG&amp;quot; and &amp;quot;END_TAG&amp;quot;&lt;br /&gt;
       values on a per-template file basis.&lt;br /&gt;
&lt;br /&gt;
           [% TAGS &amp;lt;+ +&amp;gt; %]&lt;br /&gt;
&lt;br /&gt;
           &amp;lt;+ INCLUDE header +&amp;gt;&lt;br /&gt;
&lt;br /&gt;
       The TAGS directive may also be used to set a named &amp;quot;TAG_STYLE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
           [% TAGS html %]&lt;br /&gt;
           &amp;lt;!-- INCLUDE header --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
       See the TAGS and TAG_STYLE configuration options for further details.&lt;br /&gt;
&lt;br /&gt;
   DEBUG&lt;br /&gt;
       The &amp;quot;DEBUG&amp;quot; directive can be used to enable or disable directive debug&lt;br /&gt;
       messages within a template.  The &amp;quot;DEBUG&amp;quot; configuration option must be&lt;br /&gt;
       set to include &amp;quot;DEBUG_DIRS&amp;quot; for the &amp;quot;DEBUG&amp;quot; directives to have any&lt;br /&gt;
       effect.  If &amp;quot;DEBUG_DIRS&amp;quot; is not set then the parser will automatically&lt;br /&gt;
       ignore and remove any &amp;quot;DEBUG&amp;quot; directives.&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;DEBUG&amp;quot; directive can be used with an &amp;quot;on&amp;quot; or &amp;quot;off&amp;quot; parameter to&lt;br /&gt;
       enable or disable directive debugging messages from that point forward.&lt;br /&gt;
       When enabled, the output of each directive in the generated output will&lt;br /&gt;
       be prefixed by a comment indicate the file, line and original directive&lt;br /&gt;
       text.&lt;br /&gt;
&lt;br /&gt;
           [% DEBUG on %]&lt;br /&gt;
           directive debugging is on (assuming DEBUG option is set true)&lt;br /&gt;
           [% DEBUG off %]&lt;br /&gt;
           directive debugging is off&lt;br /&gt;
&lt;br /&gt;
       The &amp;quot;format&amp;quot; parameter can be used to change the format of the&lt;br /&gt;
       debugging message.&lt;br /&gt;
&lt;br /&gt;
           [% DEBUG format '&amp;lt;!-- $file line $line : [% $text %] --&amp;gt;' %]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
perl v5.10.1                      2013-07-23   Template::Manual::Directives(3)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=Historic:CssWork&amp;diff=5298</id>
		<title>Historic:CssWork</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=Historic:CssWork&amp;diff=5298"/>
		<updated>2014-02-28T18:45:07Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h2&amp;gt;Related pages  &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Official docs&lt;br /&gt;
** [[InstallDoc]] - original INSTALL document&lt;br /&gt;
** [[SlashGuide]] - this is the guide (from htdocs) you are supposed to read immediately after installing slashcode&lt;br /&gt;
** [[SlashChart]] Png chart of slashcode organization&lt;br /&gt;
** [[SlashManPages]] Man pages available by typing man PAGENAME&lt;br /&gt;
** [[TemplateManPages]] Man pages for the template library used to deliver the html&lt;br /&gt;
&lt;br /&gt;
* [[SlashHelperProgramsInBin]] - provided admin helpers in slash/bin&lt;br /&gt;
* [[SlashGlossary]] Glossary of terms used in Slash code&lt;br /&gt;
* [[FileLocations]] Locations of important files on disk. Has Main Libraries called by all routines&lt;br /&gt;
* [[FileLocations2]] Locations of files on disk continued. This is the stuff in local/slash.&lt;br /&gt;
* [[FileLocations3]] Locations of files on disk continued. This is the stuff in /usr/local/share/perl5/Slash/&lt;br /&gt;
* [[FileLocationsMisc]] Has Apache, Man pages,... &lt;br /&gt;
* [[SqlSchema]] - tables used in the database&lt;br /&gt;
* [[SqlDefaults]] - defaults for those tables&lt;br /&gt;
* [[PerlModuleDisplay]] - this is what actually sends a single template out to the broswer (through Apache)&lt;br /&gt;
&lt;br /&gt;
* [[AvailableThemes]] and how they are organized &lt;br /&gt;
* [[ThemesAnatomy]] Overview - &amp;quot;A theme is a website design.&amp;quot; (includes HOWTO-THemes doc)&lt;br /&gt;
** [[TemplateAnatomy]] - All html in these. &amp;quot;parsed by Perl Template Toolkit&amp;quot; (HOWTO-Templates)&lt;br /&gt;
***  [[TemplateTutorialWeb]] - man page&lt;br /&gt;
*** [[TemplateManualDirective]] - man page, has all the keywords used by template library&lt;br /&gt;
** [[ThePartsOfTemplateLibraryActuallyUsedInSlashCode]] - knowing this can save time reading docs&lt;br /&gt;
** [[TemplateLists]] - lists of the template in our Theme, some descriptions fm src&lt;br /&gt;
**[[TasksAnatomy]] -&lt;br /&gt;
&lt;br /&gt;
* [[TagboxesAnatomy]] - I don't realy know what these are yet. But there are a lot of them ;-)&lt;br /&gt;
* [[PluginsAnatomy]] - (HOWTO-plugins)&lt;br /&gt;
&lt;br /&gt;
* [[ChangelogForCss]] - Put final finished change here &lt;br /&gt;
* [[HowSlashCssWorks]] Overview&lt;br /&gt;
* [[CssFilesUsedEachPage]] Which css files are used on different pages&lt;br /&gt;
&lt;br /&gt;
* [[http://dev.soylentnews.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=soylentnews/soylentnews.git;a=tree;f=themes;hb=refs/heads/master]] git - themes&lt;br /&gt;
&lt;br /&gt;
http://www.mediawiki.org/wiki/Help:Images&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Unanswered Questions&amp;lt;/h2&amp;gt;&lt;br /&gt;
* The templates are individually output by routine slashDisplay(), but how is the order of delivery determined, and how does one insure a new template goes to the right place on the page?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Got tired of scrolling through pages of perl code just to see what subs were in a module&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So wrote this, now in /usr/local/sbin/listsubs.sh:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[root@slashcode Slash]# listsubs.sh Admin.pm&lt;br /&gt;
Admin.pm:&lt;br /&gt;
    addSpriteForSid, ajax_authorbox, ajax_learnword, ajax_neverdisplay, &lt;br /&gt;
    ajax_perfbox, ajax_signoff, ajax_signoffbox, ajax_slashdbox, &lt;br /&gt;
    ajax_storyadminbox, ajax_sub_memory, DESTROY, extractRelatedStoriesFromForm, &lt;br /&gt;
    findTheTime, getAccesslogAbusersByID, getAccesslogMaxID, get_ispell_comments, &lt;br /&gt;
    getRecentSubs, getRecentWebheads, getRelated, getSignoffData, &lt;br /&gt;
    getStorySignoffs, getStoryThumbLargeLink, grantStoryPostingAchievements, otherLinks, &lt;br /&gt;
    relatedLinks, showAdminTodo, showAuthorActivityBox, showPerformanceBox, &lt;br /&gt;
    showSignoffBox, showSlashdBox, showStoryAdminBox, write_to_temp_file, &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also will work from a list, as in&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ls *.pm &amp;gt; list.tst&lt;br /&gt;
listsubs.sh &amp;lt; list.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Maybe someone else will find it useful as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Order css files are loaded when simple switch on user prefs page is selected viewing main page main page&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* base.css?T_2_5_0_272 The numbers are the slash verion number (from one of the docs).&lt;br /&gt;
* slashcode.css?T_2_5__0_272&lt;br /&gt;
* slashcode_lite.css?T_2_5__0_272&lt;br /&gt;
* slashcode_lite.css?T_2_5__0_272 (appears to be loading this twice,why?)&lt;br /&gt;
* print.cssT_2_5__0_272&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Follow a page link from the main page to an individual article page &amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Link: http://soylentnews.org/article.pl?sid=14/02/18/0336229&lt;br /&gt;
* article.pl is foind in slash/themes/slashcode/htdocs/article.pl So 'slashcode' is treated as a theme.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;article.pl&amp;lt;/h2&amp;gt;&lt;br /&gt;
The stuff of interest to us&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
use Slash;  -------- located in /local/lib64/perl5/slash.pm&lt;br /&gt;
use Slash::Display;     &lt;br /&gt;
use Slash::Utility;&lt;br /&gt;
&lt;br /&gt;
sub main {&lt;br /&gt;
        my $slashdb   = getCurrentDB();&lt;br /&gt;
        my $constants = getCurrentStatic();&lt;br /&gt;
        my $user      = getCurrentUser();&lt;br /&gt;
        my $form      = getCurrentForm();&lt;br /&gt;
        my $gSkin     = getCurrentSkin();&lt;br /&gt;
         &lt;br /&gt;
        my $story;&lt;br /&gt;
        my $reader = getObject('Slash::DB', { db_type =&amp;gt; 'reader' });&lt;br /&gt;
&lt;br /&gt;
                # Make sure the reader is viewing this story in the&lt;br /&gt;
                # proper skin.&lt;br /&gt;
                my $cur_skid = determineCurrentSkin();&lt;br /&gt;
                if ($story-&amp;gt;{primaryskid} != $cur_skid) {&lt;br /&gt;
                        my $cur_skin = $reader-&amp;gt;getSkin($cur_skid);&lt;br /&gt;
                        my $story_skin = $reader-&amp;gt;getSkin($story-&amp;gt;{primaryskid});&lt;br /&gt;
                        if ($story_skin &amp;amp;&amp;amp; $story_skin-&amp;gt;{rootdir}&lt;br /&gt;
                                &amp;amp;&amp;amp; $story_skin-&amp;gt;{rootdir} ne $cur_skin-&amp;gt;{rootdir})$&lt;br /&gt;
                                redirect(&amp;quot;$story_skin-&amp;gt;{rootdir}$ENV{REQUEST_URI}&amp;quot;$&lt;br /&gt;
                                return;&lt;br /&gt;
&lt;br /&gt;
               # XXXSECTIONTOPICS this needs to be updated&lt;br /&gt;
                my $SECT = $reader-&amp;gt;getSection($story-&amp;gt;{section});&lt;br /&gt;
                # This should be a getData call for title&lt;br /&gt;
                my $title = &amp;quot;$constants-&amp;gt;{sitename} | $story-&amp;gt;{title}&amp;quot;;&lt;br /&gt;
                if ($gSkin-&amp;gt;{name} &amp;amp;&amp;amp; $gSkin-&amp;gt;{name} eq &amp;quot;idle&amp;quot;) {&lt;br /&gt;
                        $title = &amp;quot;$gSkin-&amp;gt;{hostname} | $story-&amp;gt;{title}&amp;quot;;&lt;br /&gt;
                &lt;br /&gt;
if (my $pollbooth_db = getObject('Slash::PollBooth')) {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
slashDisplay('display', {&lt;br /&gt;
                        poll                    =&amp;gt; $pollbooth,&lt;br /&gt;
                        section                 =&amp;gt; $SECT,&lt;br /&gt;
                        section_block           =&amp;gt; $reader-&amp;gt;getBlock($SECT-&amp;gt;{secti$&lt;br /&gt;
                        show_poll               =&amp;gt; $pollbooth ? 1 : 0,&lt;br /&gt;
                        story                   =&amp;gt; $story,&lt;br /&gt;
                        stories                 =&amp;gt; \%stories,&lt;br /&gt;
                });&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
               my $called_pc = 0;&lt;br /&gt;
                if ($story-&amp;gt;{discussion}) {&lt;br /&gt;
                        # Still not happy with this logic -Brian&lt;br /&gt;
                        my $discussion = $reader-&amp;gt;getDiscussion($story-&amp;gt;{discussio$&lt;br /&gt;
&lt;br /&gt;
                        }&lt;br /&gt;
                        # If no comments ever have existed and commentstatus is di$&lt;br /&gt;
                        # just skip the display of the comment header bar -Brian&lt;br /&gt;
&lt;br /&gt;
                               &amp;amp;&amp;amp;  $discussion-&amp;gt;{commentstatus} eq 'disabled'&lt;br /&gt;
                        )) {&lt;br /&gt;
                                printComments($discussion);&lt;br /&gt;
                                $called_pc = 1;&lt;br /&gt;
                        }&lt;br /&gt;
                 if (!$called_pc &amp;amp;&amp;amp; $form-&amp;gt;{ssi} &amp;amp;&amp;amp; $form-&amp;gt;{ssi} eq 'yes' &amp;amp;&amp;amp; $form-$&lt;br /&gt;
                        # This is a real hack, we're kind of skipping down&lt;br /&gt;
                        # two levels of code.  But the cchp printing is an&lt;br /&gt;
                        # important optimization;  we avoid having to do&lt;br /&gt;
                        # multiple expensive comment selects.  One problem&lt;br /&gt;
                        # is that if there's no discussion with a story,&lt;br /&gt;
                        # printComments() doesn't get called, which means&lt;br /&gt;
                        # selectComments() doesn't get called, which means&lt;br /&gt;
                        # the cchp file won't be written.  If article.pl&lt;br /&gt;
                       # is being called by slashd, and we need to write&lt;br /&gt;
                        # that file, then here's where we print an empty&lt;br /&gt;
                        # file that will satisfy slashd. - Jamie&lt;br /&gt;
&lt;br /&gt;
                        Slash::Utility::Comments::_print_cchp({ stoid =&amp;gt; &amp;quot;dummy&amp;quot; }$&lt;br /&gt;
                }&lt;br /&gt;
        } else {&lt;br /&gt;
                header('Error', $form-&amp;gt;{section}) or return;&lt;br /&gt;
       &lt;br /&gt;
       my $plugins = $slashdb-&amp;gt;getDescriptions('plugins');&lt;br /&gt;
        if (!$user-&amp;gt;{is_anon} &amp;amp;&amp;amp; $plugins-&amp;gt;{Tags} &amp;amp;&amp;amp; $story) {&lt;br /&gt;
                my $tagsdb = getObject('Slash::Tags');&lt;br /&gt;
                $tagsdb-&amp;gt;markViewed($user-&amp;gt;{uid},&lt;br /&gt;
                        $reader-&amp;gt;getGlobjidCreate('stories', $story-&amp;gt;{stoid}));&lt;br /&gt;
        }&lt;br /&gt;
                        &lt;br /&gt;
        footer();&lt;br /&gt;
        if ($story) {&lt;br /&gt;
                writeLog($story-&amp;gt;{sid} || $sid);&lt;br /&gt;
        } else { &lt;br /&gt;
                writeLog($sid);&lt;br /&gt;
&lt;br /&gt;
               &lt;br /&gt;
createEnvironment();&lt;br /&gt;
main();  &lt;br /&gt;
1; &lt;br /&gt;
&lt;br /&gt;
(EOF)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Slash/DB/MySQL/MySQL.pm&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
479 sub getCSS {&lt;br /&gt;
480         my($self, $layout) = @_;&lt;br /&gt;
481         my $user = getCurrentUser();&lt;br /&gt;
482         my $page = $user-&amp;gt;{currentPage};&lt;br /&gt;
483         my $skin = getCurrentSkin('name');&lt;br /&gt;
484         my $admin = $user-&amp;gt;{is_admin};&lt;br /&gt;
485         my $theme = ($user-&amp;gt;{simpledesign} || $user-&amp;gt;{pda}) ? &amp;quot;light&amp;quot; : $user-&amp;gt;{css_theme};&lt;br /&gt;
486         my $secure = apacheConnectionSSL();&lt;br /&gt;
487         $layout ||= '';&lt;br /&gt;
488         my $constants = getCurrentStatic();&lt;br /&gt;
489&lt;br /&gt;
490         my $expire_time = $constants-&amp;gt;{css_expire} || 3600;&lt;br /&gt;
491         $expire_time += int(rand(60)) if $expire_time;&lt;br /&gt;
492         _genericCacheRefresh($self, 'css', $expire_time);&lt;br /&gt;
493         _genericCacheRefresh($self, 'css_pages', $expire_time);&lt;br /&gt;
494         _genericCacheRefresh($self, 'css_skins', $expire_time);&lt;br /&gt;
495         _genericCacheRefresh($self, 'css_themes', $expire_time);&lt;br /&gt;
496&lt;br /&gt;
497         my $css_ref             = $self-&amp;gt;{_css_cache} ||= {};&lt;br /&gt;
498         my $css_pages_ref       = $self-&amp;gt;{_css_pages_cache};&lt;br /&gt;
499         my $css_skins_ref       = $self-&amp;gt;{_css_skins_cache};&lt;br /&gt;
500         my $css_themes_ref      = $self-&amp;gt;{_css_themes_cache};&lt;br /&gt;
501         my $css_layouts_ref     = $self-&amp;gt;{_css_layouts_cache};&lt;br /&gt;
502&lt;br /&gt;
503         $css_pages_ref = $self-&amp;gt;getCSSValuesHashForCol('page') if !$css_pages_ref;&lt;br /&gt;
504         $css_skins_ref = $self-&amp;gt;getCSSValuesHashForCol('skin') if !$css_skins_ref;&lt;br /&gt;
505         $css_themes_ref = $self-&amp;gt;getCSSValuesHashForCol('theme') if !$css_themes_ref;&lt;br /&gt;
506         $css_layouts_ref = $self-&amp;gt;getCSSValuesHashForCol('layout') if !$css_layouts_ref;&lt;br /&gt;
507&lt;br /&gt;
508         my $lowbandwidth = ($user-&amp;gt;{lowbandwidth} || $user-&amp;gt;{pda}) ? &amp;quot;yes&amp;quot; : &amp;quot;no&amp;quot;;&lt;br /&gt;
509&lt;br /&gt;
510         $page   = '' if !$css_pages_ref-&amp;gt;{$page};&lt;br /&gt;
511         $skin   = '' if !$css_skins_ref-&amp;gt;{$skin};&lt;br /&gt;
512         $theme  = '' if !$css_themes_ref-&amp;gt;{$theme};&lt;br /&gt;
513         $layout = '' if !$css_layouts_ref-&amp;gt;{$layout};&lt;br /&gt;
514&lt;br /&gt;
515         return $css_ref-&amp;gt;{$skin}{$page}{$admin}{$theme}{$lowbandwidth}{$layout}{$secure}&lt;br /&gt;
516                 if exists $css_ref-&amp;gt;{$skin}{$page}{$admin}{$theme}{$lowbandwidth}{$layout}{$secure};&lt;br /&gt;
517&lt;br /&gt;
518         my @clauses;&lt;br /&gt;
519&lt;br /&gt;
520         my $page_q = $self-&amp;gt;sqlQuote($page);&lt;br /&gt;
521         my $page_in = $page ? &amp;quot;(page = '' or page = $page_q)&amp;quot; : &amp;quot;page = ''&amp;quot;;&lt;br /&gt;
522         push @clauses, $page_in;&lt;br /&gt;
523&lt;br /&gt;
524         my $skin_in = $skin ? &amp;quot;(skin = '' or skin = '$skin')&amp;quot; : &amp;quot;skin = ''&amp;quot;;&lt;br /&gt;
525         push @clauses, $skin_in;&lt;br /&gt;
526&lt;br /&gt;
527         push @clauses, &amp;quot;admin='no'&amp;quot; if !$admin;&lt;br /&gt;
528&lt;br /&gt;
529         my $theme_q  = $self-&amp;gt;sqlQuote($theme);&lt;br /&gt;
530         my $theme_in = $theme ? &amp;quot;(theme='' or theme=$theme_q)&amp;quot; : &amp;quot;theme=''&amp;quot;;&lt;br /&gt;
531         push @clauses, $theme_in;&lt;br /&gt;
532&lt;br /&gt;
533         push @clauses, &amp;quot;lowbandwidth='$lowbandwidth'&amp;quot; if $lowbandwidth eq &amp;quot;no&amp;quot;;&lt;br /&gt;
534&lt;br /&gt;
535         my $layout_q = $self-&amp;gt;sqlQuote($layout);&lt;br /&gt;
536         push @clauses, &amp;quot;layout=$layout_q&amp;quot;;&lt;br /&gt;
537&lt;br /&gt;
538         my $where = &amp;quot;css.ctid=css_type.ctid AND &amp;quot;;&lt;br /&gt;
539         $where .= join ' AND ', @clauses;&lt;br /&gt;
540&lt;br /&gt;
541         my $css = $self-&amp;gt;sqlSelectAllHashrefArray(&amp;quot;rel,type,media,file,title,ie_cond,skin&amp;quot;,&lt;br /&gt;
542                 &amp;quot;css, css_type&amp;quot;, $where, &amp;quot;ORDER BY css_type.ordernum, css.ordernum&amp;quot;);&lt;br /&gt;
543         if ($secure) {&lt;br /&gt;
544                 for my $hr (@$css) { $hr-&amp;gt;{file} =~ s/\.css/.ssl.css/ }&lt;br /&gt;
545         }&lt;br /&gt;
546         &lt;br /&gt;
547         $css_ref-&amp;gt;{$skin}{$page}{$admin}{$theme}{$lowbandwidth}{$layout}{$secure} = $css;&lt;br /&gt;
548         return $css;&lt;br /&gt;
549 }&lt;br /&gt;
550 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Slash/Apache/User/User.pm&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
548 {&lt;br /&gt;
549 my %ops_my = (&lt;br /&gt;
550         inbox           =&amp;gt; { args =&amp;gt; 'op=list', uri =&amp;gt; 'messages.pl' },&lt;br /&gt;
551         # XXX change messages to be same as /inbox, move this to /my/preferences/messages&lt;br /&gt;
552         messages        =&amp;gt; { args =&amp;gt; 'op=display_prefs', uri =&amp;gt; 'messages.pl' },&lt;br /&gt;
553         comments        =&amp;gt; { args =&amp;gt; 'op=editcomm' },&lt;br /&gt;
554         homepage        =&amp;gt; { args =&amp;gt; 'op=edithome' },&lt;br /&gt;
555         password        =&amp;gt; { args =&amp;gt; 'op=changeprefs', uri =&amp;gt; 'login.pl' },&lt;br /&gt;
556         logout          =&amp;gt; { args =&amp;gt; 'op=userclose', uri =&amp;gt; 'login.pl' },&lt;br /&gt;
557         misc            =&amp;gt; { args =&amp;gt; 'op=editmiscopts' },&lt;br /&gt;
558         amigos          =&amp;gt; { args =&amp;gt; 'op=friendview', uri =&amp;gt; 'journal.pl' },&lt;br /&gt;
559         bookmarks       =&amp;gt; { args =&amp;gt; 'op=showbookmarks' },&lt;br /&gt;
560         firehose        =&amp;gt; { args =&amp;gt; 'op=userfirehose' },&lt;br /&gt;
561         preferences     =&amp;gt; { args =&amp;gt; 'op=displayprefs', uri =&amp;gt; 'preferences.pl' },&lt;br /&gt;
562         tags            =&amp;gt; { args =&amp;gt; 'op=showtags' },&lt;br /&gt;
563         journal         =&amp;gt; { args =&amp;gt; 'op=list', uri =&amp;gt; 'journal.pl' },&lt;br /&gt;
564&lt;br /&gt;
565         friends         =&amp;gt; { args =&amp;gt; 'op=friends', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
566         fans            =&amp;gt; { args =&amp;gt; 'op=fans', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
567         freaks          =&amp;gt; { args =&amp;gt; 'op=freaks', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
568         foes            =&amp;gt; { args =&amp;gt; 'op=foes', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
569         zoo             =&amp;gt; { args =&amp;gt; 'op=all', uri  =&amp;gt; 'zoo.pl' },&lt;br /&gt;
570&lt;br /&gt;
571         default         =&amp;gt; { args =&amp;gt; 'op=edituser' }&lt;br /&gt;
572 );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;sql/mysql/defaults.sql&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 134 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','base.css','','','','no','',1,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
135 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','comments','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
136 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','article','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
137 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','print','print.css','','','','no','',5,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
138 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','admin.css','','','','yes','',1,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
139 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','pollBooth','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
140 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode_lite.css','','','','no','light',4,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
141 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','journal','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
142 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode_lite.css','','','','no','light',4,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
143 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','journal','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
144 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode.css','','','','no','',3,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
145 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','metamod','no','',2,0, &amp;quot;&amp;quot;,&amp;quot;no&amp;quot;);&lt;br /&gt;
146 INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond, lowbandwidth) VALUES ('stylesheet','text/css','screen, projection','slashcode_low_bw.css','','','','no','',4,99, &amp;quot;&amp;quot;,&amp;quot;yes&amp;quot;);&lt;br /&gt;
147&lt;br /&gt;
148 #&lt;br /&gt;
149 # Dumping data for table 'css_type'&lt;br /&gt;
150 #&lt;br /&gt;
151 INSERT INTO css_type (ctid, name, ordernum) VALUES (1,'base',1);&lt;br /&gt;
152 INSERT INTO css_type (ctid, name, ordernum) VALUES (2,'page',2);&lt;br /&gt;
153 INSERT INTO css_type (ctid, name, ordernum) VALUES (3,'theme',3);&lt;br /&gt;
154 INSERT INTO css_type (ctid, name, ordernum) VALUES (4,'user_theme',5);&lt;br /&gt;
155 INSERT INTO css_type (ctid, name, ordernum) VALUES (5,'print',6);&lt;br /&gt;
156 INSERT INTO css_type (ctid, name, ordernum) VALUES (6,'skin',4);&lt;br /&gt;
157 INSERT INTO css_type (ctid, name, ordernum) VALUES (7,'handheld',7);&lt;br /&gt;
158 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;plugins/FireHose/mysql_dump.sql &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','firehose','no','',2,0, '');&lt;br /&gt;
==&amp;gt; INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','users','no','',2,0, '');&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','calendar.css','','','firehose','no','',2,0, '');&lt;br /&gt;
==&amp;gt; INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','users','no','',2,0, '');&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','comments.css','','','firehose','no','',2,0, '');&lt;br /&gt;
    INSERT INTO css (rel, type, media, file, title, skin, page, admin, theme, ctid, ordernum, ie_cond) VALUES ('stylesheet','text/css','screen, projection','firehose.css','','','index2','no','',2,0, ''); &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;I believe that we are not using FireHose but it was needed to make the site work.  As can be seen in the db dump above, it adds the firehose.css file to any of the user pages. Need to verify and then see if we can get the db purged of these values.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Good work. The question in my mind is why the heck css for one module has any effect *at all* on any other module. Talk about lack of localization...-AG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;I think there was some firehose slashboxes that showed up in the users pages.  They needed to be wider than the default, so they patched those pages with the firehose.css. Next step is to get a current dump of the two css tables. The important part is I know what files are for what parts of the code.  Slashcode.css is the theme css file slashcode-lite.css is the style file that is called by a user pref.  This means I need to fix comments.css to remove the theme elements I inserted and put them in the theme file.  I still need to make sure that the changes that benefited the Simplified theme stay intact. -EP&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;fonts&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
This is what I usually start with:&lt;br /&gt;
   font-family: Helvetica,Geneva,Arial,Verdana,sans-serif;&lt;br /&gt;
&lt;br /&gt;
Too many can lead to a LOT of testing being required. As can the wrong order. ;-)&lt;br /&gt;
&lt;br /&gt;
Others I have used in the past:&lt;br /&gt;
font-family: Geneva,Arial,Verdana,Helvetica,Chicago,sans-serif;&lt;br /&gt;
font-family: Helvetica,Arial,Geneva,Chicago,Verdana,sans-serif;&lt;br /&gt;
font-family: Helvetica,Geneva,Arial,Verdana,sans-serif;&lt;br /&gt;
-AG&lt;br /&gt;
&lt;br /&gt;
I have used:&lt;br /&gt;
font-family: Verdana, Geneva, &amp;quot;Bitstream Vera Sans&amp;quot;, &amp;quot;DejaVu Sans&amp;quot;, sans-serif;&lt;br /&gt;
&lt;br /&gt;
Note this has Linux fonts as well to help with these users.&lt;br /&gt;
-EP&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;User Menu&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','Logout','logout','/my/logout',1,0,10);&lt;br /&gt;
124 INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','Preferences','preferences','/users.pl?op=edituser',1,0,20);&lt;br /&gt;
125 INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','Password','password','[% constants.real_rootdir %]/my/password',1,0,40);&lt;br /&gt;
126 INSERT INTO menus (menu, label, sel_label, value, seclev, showanon, menuorder) VALUES ('users','~[% user.nickname | strip_literal %] ([% user.uid %])','me','/~[% user.nickname | fixparam %]',1,0,50);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; This code sets up the upper menu on http://slashcott.org/users.pl which is linked from your userid on the home page.  The Preferences is wrong, as it needs to be all three links: Info, Homepage, Comments.  This will allow users with low-bandwidth option set to easily get to the setting to unset low-bandwidth. -EP&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Refernces to css in the man pages in /usr/local/share/man/man3&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
grep -i css *&lt;br /&gt;
&lt;br /&gt;
HTML::CalendarMonth.3pm:.IP &amp;quot;enable_css&amp;quot; 4&lt;br /&gt;
HTML::CalendarMonth.3pm:.IX Item &amp;quot;enable_css&amp;quot;&lt;br /&gt;
HTML::CalendarMonth.3pm:Set some handy \s-1CSS\s0 class attributes on elements, enabled by default.&lt;br /&gt;
HTML::CalendarMonth.3pm:.IP &amp;quot;semantic_css&amp;quot; 4&lt;br /&gt;
HTML::CalendarMonth.3pm:.IX Item &amp;quot;semantic_css&amp;quot;&lt;br /&gt;
HTML::CalendarMonth.3pm:Sets some additional \s-1CSS\s0 class attributes on elements, disabled by&lt;br /&gt;
HTML::CalendarMonth.3pm:.IP &amp;quot;\fIdefault_css()\fR&amp;quot; 4&lt;br /&gt;
HTML::CalendarMonth.3pm:.IX Item &amp;quot;default_css()&amp;quot;&lt;br /&gt;
HTML::CalendarMonth.3pm:document in conjunction with the classes assigned to elements when css&lt;br /&gt;
HTML::ElementSuper.3pm:might be when you'd like to assign multiple \s-1CSS\s0 classes to a single&lt;br /&gt;
HTML::PopupTreeSelect.3pm:.IP &amp;quot;include_css (optional)&amp;quot; 4&lt;br /&gt;
HTML::PopupTreeSelect.3pm:.IX Item &amp;quot;include_css (optional)&amp;quot;&lt;br /&gt;
HTML::PopupTreeSelect.3pm:Set this to 0 and the default \s-1CSS\s0 will not be included in the widget&lt;br /&gt;
HTML::PopupTreeSelect.3pm:output.  This allows you to include your own \s-1CSS\s0 which will be used by&lt;br /&gt;
HTML::PopupTreeSelect.3pm:your widget.  Modifying the \s-1CSS\s0 will allow you to control the fonts,&lt;br /&gt;
HTML::PopupTreeSelect.3pm:If you run the widget with include_css set to 1 then you can use that&lt;br /&gt;
HTML::Tree::Scanning.3pm:tagging, such is as useful in \s-1CSS\s0 \*(-- note the&lt;br /&gt;
Module::Build::API.3pm:.IP &amp;quot;\fIhtml_css()\fR&amp;quot; 4&lt;br /&gt;
Module::Build::API.3pm:.IX Item &amp;quot;html_css()&amp;quot;&lt;br /&gt;
TAP::Parser::YAMLish::Reader.3pm:YAML::Tiny, \s-1YAML\s0, YAML::Syck, Config::Tiny, CSS::Tiny,&lt;br /&gt;
TAP::Parser::YAMLish::Writer.3pm:YAML::Tiny, \s-1YAML\s0, YAML::Syck, Config::Tiny, CSS::Tiny,&lt;br /&gt;
Template::Iterator.3pm:You can then style the \f(CW\*(C`tr.odd\*(C'\fR and \f(CW\*(C`tr.even\*(C'\fR elements using \s-1CSS:\s0&lt;br /&gt;
Template::Toolkit.3pm:kind of text documents: \s-1HTML\s0, \s-1XML\s0, \s-1CSS\s0, Javascript, Perl code, plain text,&lt;br /&gt;
Template::Tutorial::Web.3pm:kind of content they contain.  So you can use \s-1TT\s0 to generate \s-1HTML\s0, \s-1XML\s0, \s-1CSS\s0,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;CSS commit for Feb 23&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Changes to most of the css files to set all sizes to em (some were in px and broke flow). Changed the font-family to a more friendly chain for all platforms, and remove all other font-faimily calls from the code. Changed font sizes from % to ems and adjusted size for some of the main elements. Fix a issue with the middle column size caused by firehose.css. Many small fixes to spacing over many places.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moved all of the slashcode theme items into the slashcode.cssraw file. Some were in comments.cssraw due to some previous work I did.&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On article body and comment body, made the font size a bit smaller. Also on comments body set the margins to be smaller.&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;-EP&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
	<entry>
		<id>https://wiki.soylentnews.org/index.php?title=ThePartsOfTemplateLibraryActuallyUsedInSlashCode&amp;diff=5297</id>
		<title>ThePartsOfTemplateLibraryActuallyUsedInSlashCode</title>
		<link rel="alternate" type="text/html" href="https://wiki.soylentnews.org/index.php?title=ThePartsOfTemplateLibraryActuallyUsedInSlashCode&amp;diff=5297"/>
		<updated>2014-02-28T18:42:16Z</updated>

		<summary type="html">&lt;p&gt;50.45.173.59: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[CssWork]] parent&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;The Parts Of Template Library Actually Used In Slash Code&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Knowing this can save some time reading docs.&lt;br /&gt;
&lt;br /&gt;
The template language keywords are always first and appear to be always uppercase. The normal variables all appear to be lowercase.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Most commonly used feature&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The most commonly used feature is simply using the template library to print a variables value&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;The specific template library keywords found in Slash templates&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(the numbers roughly correspond to frequency of use)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      1 ELSE&lt;br /&gt;
      1 FOR&lt;br /&gt;
      1 INCLUDE&lt;br /&gt;
      2 ELSE&lt;br /&gt;
      3 BLOCK&lt;br /&gt;
      3 FOREACH&lt;br /&gt;
      3 SWITCH&lt;br /&gt;
      4 ELSIF&lt;br /&gt;
      4 FOR&lt;br /&gt;
      6 UNLESS&lt;br /&gt;
      8 END&lt;br /&gt;
      8 PROCESS&lt;br /&gt;
     72 CASE&lt;br /&gt;
    176 IF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Most of these are common straightforward programming constructs, except:&lt;br /&gt;
&lt;br /&gt;
BLOCK - (man Template::Manual::Directives)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      The &amp;quot;BLOCK&amp;quot;...&amp;quot;END&amp;quot; construct can be used to define template component&lt;br /&gt;
       blocks which can be processed with the &amp;quot;INCLUDE&amp;quot;, &amp;quot;PROCESS&amp;quot; and &amp;quot;WRAPPER&amp;quot;&lt;br /&gt;
       directives.&lt;br /&gt;
&lt;br /&gt;
           [% BLOCK tabrow %]&lt;br /&gt;
           &amp;lt;tr&amp;gt;&lt;br /&gt;
             &amp;lt;td&amp;gt;[% name %]&amp;lt;td&amp;gt;&lt;br /&gt;
             &amp;lt;td&amp;gt;[% email %]&amp;lt;/td&amp;gt;&lt;br /&gt;
           &amp;lt;/tr&amp;gt;&lt;br /&gt;
           [% END %]&lt;br /&gt;
&lt;br /&gt;
           &amp;lt;table&amp;gt;&lt;br /&gt;
             [% PROCESS tabrow  name='Fred'  email='fred@nowhere.com' %]&lt;br /&gt;
             [% PROCESS tabrow  name='Alan'  email='alan@nowhere.com' %]&lt;br /&gt;
           &amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
       A &amp;quot;BLOCK&amp;quot; definition can be used before it is defined, as long as the&lt;br /&gt;
       definition resides in the same file.  The block definition itself does not&lt;br /&gt;
       generate any output.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
PROCESS - (man Template::Manual::Directives)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       The PROCESS directive is similar to &amp;quot;INCLUDE&amp;quot; but does not perform any&lt;br /&gt;
       localisation of variables before processing the template.  Any changes made&lt;br /&gt;
       to variables within the included template will be visible in the including&lt;br /&gt;
       template.&amp;quot; from man Template::Manual::Directives&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.45.173.59</name></author>
	</entry>
</feed>