This section is used by the Cabal in plotting improvements to the inner workings of the Monastery's raw sewage macerator, boiler room, nuclear reactor, and cold fusion pump. Cabal only may post root nodes to this section. But fresh thought often spawns progress, so any Perl Monk may add comments to existing discussion threads within this section.

Please remember that Monastery related discussions of global interest to the general PerlMonks population should be entertained in the Perl Monks Discussion section. gods can and will remove off-topic content from the Inner Scriptorium.

Inner Scriptorium
Patches vs. 'new*' code
1 direct reply — Read more / Contribute
by castaway
on Oct 07, 2004 at 09:48
    Allo again,
    This following on from my previous post. In doing the recent Moderation stuff, I've also fallen into the trap of 'lets make a "newXXX" version of an htmlcode', so as not to disturb the status quo while fiddling with things. However, I intend to replace current versions of things, once testing is done. (ie newcachedlistapproved will disappear, and its code will replace cachedlistapproved), except of course it won't disappear, it'll just lie around being unused..

    Hmm, some way of 'recycling' node_ids would be useful, but that sounds like a huge project.

    Anyway, Any thoughts, objections, notes on this?

    C.

New Moderation/Approval code (testers wanted)
3 direct replies — Read more / Contribute
by castaway
on Oct 07, 2004 at 09:30
    Hi all,
    Time to get some of this approval/moderation stuff tested by people other than me..

    In case you don't have a clue what I'm on about, tye started some changes to the Approval system a while back, which mostly involve internal changes, namely getting rid of using the link table to 'link' nodes to sections and/or the frontpage. (tye, feel free to add anything/correct me). I've picked this up and have been adjusting/adding to/improving it (hopefully) to a point where we can start using it in production.

    I'm inviting anyone with a login on the test server to have a look, and test out the functionality. In theory, the overall result should work as before, on the surface. What needs testing:

    • Moderation Nodelet - replaces the Approval Nodelet, also the 'removelinks' part of the editors nodelet
    • Node Status - nodelet, check that it reflects the correct status
    • The Monastery Gates - should show nodes frontpages by the moderation nodelet
    • Seekers of Perl Wisdom - and other sections, show approved nodes (or all if showunapproved is on), approve nodes if level > 5
    Changes in detail:
    • moderation nodelet - make work, mostly
    • node status - nodelet, use isapprove
    • newapprove - make work, adapt
    • isapprove - ..
    • approvalhistory - table that holds the history of all approval actions
    • approvalstatus - table that holds the current/last status of each approved/fp'd node (no entry means unapproved)
    • newcachedlistapproved - complete rewrite of cachedlistapproved, to use new tables etc
    • Monastery Gates/Section pages - use newcachedlistapproved
    • moderatelist default outer container - use newapprove opcode
    • cachedinfo table - made key unique
    • listapproved settings - added daysOnFrontPage, updateInterval
    Some of the section pages are not yet converted, and the approve code is still producing entries in the link table. These will be fixed soon.

    I'd appreciate if people would point out any other areas that are using the 'listapproved'/'approval' type code, that I've otherwise missed. (I've already noted that several section-similar pages, such as Editor Requests, SQL Query list, need another htmlcode, which doesnt use approval (since their entries arent/cant be approved.)

    Many thanks to tye for starting this in the first place.

    C.

    PS: Note that this is by no means the end of the changes coming, once this has proven itself, I'll get on to the showing of history, and similar for considerations..

Nodelet CSS/Format changes
2 direct replies — Read more / Contribute
by BigLug
on Oct 07, 2004 at 01:40
    I'd like to suggest an update to all nodelets that contain lists. The PMDev and SiteDocClan nodelets have all their links bunched up whereas other nodlets (like Find Nodes) have one link per line. I'd like to make that adjustable on a user's style sheet.

FullPage Chat Lite
3 direct replies — Read more / Contribute
by BigLug
on Oct 07, 2004 at 00:16
    I've been on pmdev a while ... haven't contributed much. However I've now got a fair feeling for how it all works (kinda).

    I'd like to create a FullPage Chat Lite and want some feed back. It's an easy thing as I can quickly duplicate and modify existing node code. The difference between Lite and the normal one is that we don't need the other monks or the private messages.

    The look I'm imagining for it can be seen on my scratchpad (Some browsers are too smart to override the servers text/plain so you'll just see the source). The top frame should just contain the ad and the bottom should just have the talk bar.

    It seems though that I need a few new nodes and I'm not sure how to go about getting them created:

    • I need a superdoc that will just load basichead .. that gives the ad at the top of the page.
    • I need a superdoc that will just load talkbar .. that gives the text input area at the bottom of the page
    • And finally I need a fullpage to put the frameset HTML in.
    I'll work this on the development server (of course) ..

    The Everything Bible says that I need to be a God, then I go to the non existant node. The search results come up and I can click on something to create a node. Does PM have anything for non-gods? Or do I need to convince a god of the need for such a page? (Hey, it's less work for the database as there's no need to reload the ad, users or PM frames!)


    Cheers!
    Rick
    If this is a root node: Before responding, please ensure your clue bit is set.
    If this is a reply: This is a discussion group, not a helpdesk ... If the discussion happens to answer a question you've asked, that's incidental.
what is the "node namenew" stuff in editvars?
No replies — Read more | Post response
by ysth
on Oct 05, 2004 at 15:50
    There's a section of editvars that uses a CGI parameter "node namenew" that I don't see set anywhere; does anyone know what this code is supposed to do? It seems pretty well broken (see notes in comments in editvars - (patch)).
Soliciting a Patch: User Configurable Color Blends.
No replies — Read more | Post response
by demerphq
on Sep 24, 2004 at 14:21

    Hi guys. I think it would be nice to have a patch for colorblend and User Settings so that the user can specify the start/end colors themselves and override the theme specifc ones I configured. Shouldnt be a big deal to do, but I've got my hands full with other features and would really appreciate it if someone felt like helping out with this.


    ---
    demerphq

      First they ignore you, then they laugh at you, then they fight you, then you win.
      -- Gandhi

      Flux8


how soon before we abandon the pmdev wiki?
1 direct reply — Read more / Contribute
by crazyinsomniac
on Sep 15, 2004 at 22:40
virus scanning uploaded images
2 direct replies — Read more / Contribute
by crazyinsomniac
on Sep 15, 2004 at 22:36
patchable settings
6 direct replies — Read more / Contribute
by ysth
on Sep 13, 2004 at 19:00
    I'm looking into making settings patchable; it's not that difficult except that getVars/setVars in Everything.pm is hardcoded to use the "vars" field (while patches have the data in a "code" field). Solutions:

    1. copy the ?etVars code into patch display/edit pages, adjusted to use code instead of vars
    2. make settings patches a new nodetype that uses the setting table instead of (or in addition to) htmlcode.
    3. Change Everything.pm something like: (Updated to factor out packVars/unpackVars:)(Updated to de-indent:)
    --- Everything.pm.orig 2004-09-13 15:29:13.318740800 -0700 +++ Everything.pm 2004-09-14 09:23:15.763673600 -0700 @@ -258,16 +258,13 @@ ##################################################################### +######## -sub getVars +sub unpackVars { - my ($NODE) = @_; - getRef $NODE; - - return if ($NODE == -1); + my ($vars) = @_; - return {} unless $NODE->{vars}; + return {} unless $vars; - my %vars = map { split /=/ } split (/&/, $$NODE{vars}); + my %vars = map { split /=/ } split (/&/, $vars); foreach (keys %vars) { unescape $vars{$_}; if ($vars{$_} eq ' ') { $vars{$_} = ""; } @@ -277,46 +274,69 @@ } ##################################################################### +######## +sub getVars +{ + my ($NODE, $field) = @_; + getRef $NODE; + + return if ($NODE == -1); + + $field ||= "vars"; + + return unpackVars( $NODE->{$field} ); +} + +##################################################################### +######## +sub packVars +{ + my ($varsref) = @_; + + # Clean out the keys that have do not have a value. + foreach (sort keys %$varsref) { + $$varsref{$_} = " " unless $$varsref{$_}; + } + + return join("&", map( $_."=".escape($$varsref{$_}), keys %$varsre +f) ); +} + +##################################################################### +######## # Sub # setVars # # Purpose -# This takes a hash of variables and assigns it to the 'vars' o +f the -# given node. If the new vars are different, we will update th +e -# node. +# This takes a hash of variables and assigns it to a field of t +he +# given node. If the field is changed, we will update the node +. # # Parameters -# $NODE - a node id or hash of a node that joins on the +# $NODE - a node id or hash of a node, usually one that joins o +n the # "settings" table which has a "vars" field to assign the vars +to. # $varsref - the hashref to get the vars from +# $field - the field in which to put the vars; defaults to "var +s" # # Returns # Nothing # sub setVars { - my ($NODE, $varsref) = @_; - my $str; + my ($NODE, $varsref, $field) = @_; + $field ||= "vars"; getRef($NODE); - unless (exists $$NODE{vars}) { - warn ("setVars:\t'vars' field does not exist for node ".getId +($NODE)." - perhaps it doesn't join on the settings table?\n"); - } - - # Clean out the keys that have do not have a value. - foreach (keys %$varsref) { - $$varsref{$_} = " " unless $$varsref{$_}; + unless (exists $$NODE{$field}) { + warn ("setVars:\t'$field' field does not exist for node " + . getId($NODE) . "\n"); + warn ("\t\tperhaps it doesn't join on the settings table?\n") + if $field eq "vars"; } - $str = join("&", map( $_."=".escape($$varsref{$_}), keys %$varsre +f) ); + my $str = packVars( $varsref ); - return unless ($str ne $$NODE{vars}); #we don't need to update... + return unless ($str ne $$NODE{$field}); #we don't need to update. +.. # The new vars are different from what this user node contains, f +orce # an update on the user info. - $$NODE{vars} = $str; + $$NODE{$field} = $str; my $superuser = -1; $DB->updateNode($NODE, $superuser); }
    I'm inclined toward number 3.

    Once that's resolved, the rest is pretty easy; it will work differently from other patches in a couple of ways. First, there will be just a "Create Patch" button on the setting display page, not a form (since I don't see an easy way to feed op=new an editvars form). Second, it will just display the new settings, not a diff, at least until I figure out diff_strings enough to hack it to the purpose.

The Scriptorium impact on the Titlebar and the Front page
4 direct replies — Read more / Contribute
by dfaure
on Sep 12, 2004 at 23:21

    IMO, with the arrival of this new section (Scriptorium), some management must be done to the Monastery title bar and/or the front page to help Monks comenting there.

    Thanks to demerphq, all has been (well) done for the cabalists to get here through their dedicated nodelet. But, as stated by the specific policy of the section, every monks should be able to comments. This will certainly be difficult with the lack of more "generalistic" entry points.

    This is perhaps also the time for the man with a q to exhaust his Titlebar Settings bunch of patches, to handle this gracefully, no ?

    Subsidiary question: should a writeup here be taken into account as the ones in other sections or not (as it seems for now) ?

    ____
    HTH, Dominique
    My two favorites:
    If the only tool you have is a hammer, you will see every problem as a nail. --Abraham Maslow
    Bien faire, et le faire savoir...