Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Update: The below has been done. You may disregard. :-)

If you take a look at the code of each of the sections, you'll see a fairly common pattern. SoPW is the canonical case; it looks like this:

[{get_sitedoclet}] [{votehead}] [{newlistapproved:perlquestion,perlquestion approved linktype,User Que +stions,10,navbaron,showunapproved}] [{votefoot}] [{newmoderatelist:perlquestion,perlquestion approved linktype,Unapprov +ed Questions}] [{addnewform:perlquestion,Add your question,Your question:}]

Examining newlistapproved and newmoderatelist, we find that the latter is logically a part of the former, but it seems to have been split out merely in order to "jump over" a call to votefoot.

I propose merging the code of newmoderatelist back into newlistapproved, and add an option parameter which would tell newlistapproved whether to call votefoot at the appropriate point. There is already an option parameter, showunapproved, which controls whether to show the unapproved list.

In order to grasp all the ramifications across the site, I prepared the following table, which summarizes the code of each place newlistapproved is currently used (excluding test nodes and such).

Table is presented in a reply below.

Based on this data, I believe this change would be safe and straightforward to make. The only real oddball we'd have to worry about is Editor Requests, but I think we could handle that.

I think this change will make the code simpler, but perhaps more importantly, more efficient. The overhead cost of calling an htmlcode is substantial. It includes the cost of (a) retrieving the node from the database, and (b) executing a perl eval.

I reckon we are the only monastery ever to have a dungeon stuffed with 16000 zombies.

In reply to refactor newlistapproved to absorb newmoderatelist by jdporter

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others taking refuge in the Monastery: (5)
    As of 2018-01-23 20:29 GMT
    Find Nodes?
      Voting Booth?
      How did you see in the new year?

      Results (254 votes). Check out past polls.