The visitors all went home, the construction work in the garden came to a satisfactory conclusion, and the autumn conference season got under way. With the result that I had numerous chunks of spare time in places with little in the way of engrossing entertainment, and the following happened:

1. Drafts

One nifty feature of the Drafts system is that drafts can have their status set to 'review,' whereupon the editors are notified that a user has requested review of the draft. Editors who have given feedback on a review draft are expected to record the fact in a node note. But if no editor looked at a draft, there was no facility to remind editors that it had been neglected. Similarly, if feedback was given and the author then didn't publish their draft or change its status, it could just sit around clogging up the Drafts for review list for ever. Enter the Neglected Drafts nodelet.

Nodelets include code to generate output and a field to store that output in. For some nodelets the code is run every time they are displayed, for others the code is run at regular intervals, and the output is stored, saving processor time. This provides an easy way of having some code run at regular intervals. The new Neglected Drafts nodelet is run once a day to provide lists of drafts for review that have been neglected by the editors or by their authors, based on the presence and timing of node notes. This is a useful list to have, of course. But the nodelet doesn't just create the list:

  • Every two days until an editor leaves a nodenote on a review draft, the notification that the user has asked for review is repeated, with an indication of how long ago they did so. The draft for review notification had to be amended to record and display this additional information.
  • Ten days after an editor last left a node note, a message from Virgil reminds the author that their draft is still up for review, and they are encouraged to publish it or change its subject.
  • Twenty-five days after the last note was left, the draft's status is automatically changed to 'findable,' taking it off the list of drafts for review. The author is notified by message from Virgil.

To simplify things for editors displaywriteupinfo provides editors with a checkbox to copy a message from the footer of a draft directly to a node note. The htmlcode writeupmessage, which is responsible for actually sending messages, inserts the node notes as required.

Occasionally, misguided users have thought they had problems with the display of their private or shared drafts. Admins trying to see the problem would be unable to do so, because private is private. This made it difficult to deal with such problems. There is now an admin option on the Nothing Found page which appears only when nothing has been found when trying to display a specific writeup/draft with a specific title by a specific user, which makes it possible for the admin to see if the draft exists and what its page looks like when it is displayed. The actual text of the draft is not shown, because private is private. This function required a patch to display draft to work at all, while voteit was patched to flag the fact that the godly tin-opener is being used in the footer display of the draft's status.

As a result of a change to setwriteuptype, drafts created from previously nuked writeups default to 'hidden' when republished.

Node Tracker notes 'removal' of writeups, not 'nuking'. It still uses a montrous glob of text to record its data, but the maximum size of this glob has been increased so that even our most productive authors will no longer break it by having too many writeups.

The Drafts page now displays your drafts across more than one page, if you have more than fifty. You can choose to have 'nuked' drafts sorted last. So now there is no reason not to convert your enormous Node Heaven to drafts.

2. Editor powers

As stated elsewhere by Our Leader, Content Editors are intended to be able to do most of the interesting things previously reserved for site admins. This meant that more tools had to be provided for them on e2node pages. To make the code in zen e2node display page easier to read and avoid having to compile the admin tool code every time a page was loaded, I put the admin tools in a separate htmlcode, imaginitively named 'e2nodetools,' and then added renaming and deleting tools to them. The new htmlcode is called right at the beginning of the page code, so that any manipulation that it carries out is done before anything is displayed, and its output is saved up to be placed in the page output later on.

The e2node edit page was more or less redundant at this stage, since all you could do with it was rename the node, but it was no great chore to have it call e2nodetools to provide the full range of e2node manipulation tools. So it's still pointless going to the e2node 'edit' view, but if do, then at least you can do something useful while you're there. If you're an editor.

Editors could create node forwards, but could not yet edit them. To fix that, node_forward maintenance create now makes the Content Editor usergoup the owner (author_user) of the node_forward, so any of them can edit it. Which editor created the forward is recorded in a node note, that sinister feature used by your oppressors to record information behind your back.

It was possible to create a node forward by giving the title of the node to forward to. This was dealt with by code in node_forward maintenance create that found a node id on the basis of a title. When editing a node forward, the node id had to be given. Moving the look-up code to a new node_forward maintenance update maintenance function fixed that annoying anomaly, and node_forward edit page now advertises the fact.

3. Messaging

The sendPrivateMessage htmlcode predated the changes to ecore that made it possible to pass any kind of argument to an htmlcode. Its parameters were therefore passed by being put in a hashref and assigned to a value of the global variable %HTMLVARS. In addition, it was able to process two different structures of parameters, the 'old way' and the new one. It turned out that the 'old' way was no longer used anywhere, so that that code was no longer necessary. It is now possible to pass the parameter hashref to the htmlcode as an argument, and the old 'new' way is now the new 'old' way.

At various points in the code, the unmaintained and presumably formerly experimental htmlcode sendPrivateMessageTest was used to send messages. Create a New User, bookmark and socialBookmark now use the standard maintained htmlcode to send messages.

voteit no longer sets an arbitrary limit on the length of the messages admins send when removing your writeups. There was a 200 character limit because only the first 200 characters of the message fit in the security log. Since the message is now automatically recorded in a node note, nothing is lost.

4. Pagination

I mentioned the pagination of the Drafts page above. The paginated display and the links for navigating from one page to another are provided by a new htmlcode, show paged content, which is essentially a wrapper for show content with some generalised database access functionality built into it. There are various pages on the site that provide a paginated display, some of them using quite creatively hairy ways of establishing how may pages need to be dealt with. The intention is that (nearly) all pagination can be dealt with with this htmlcode, so that it can be maintained in one place and have a uniform appearance across the site. Everything User Search also now uses the new code.

The pagination links and the 'p' element they are contained in have useful class names so that stylesheet authors can adjust their appearance. Kernel Blue, the current default stylesheet has been patched to center the pagination on the page.

5. Polls

Everything2 user polls: love them, hate them, ignore them, or none of the above? Votes on polls were stored in the same database table as votes on writeups, making it difficult to extract useful statistics from it (should one want to), much to the displeasure of the Management. So I created a new 'pollvote' table, and adjusted the 'pollvote code to use it. A also Current User Poll, Everything User Poll and Handy Links, even if isn't used much. THen copied the poll votes to pollvote and deleted them from vote. A whole world of statistical opportunities opens up behind us...

6. None of the above

While I was adjusting the update period for Neglected Drafts it occurred to me that it would be useful to have admin options on the page to do this. So nodelet display page now provides them.

Sam512 pointed out that the 'Useful links' below the writeup and draft text edit box got in the way of hitting the tab key to move to the submit button. So editwriteup now puts the links after the button.

Various users noted that writeups of type 'lede', given their nature, should be shown before the other writeups on a page. So repair e2node, publishwriteup and writeup maintenance update now all put ledes first in the nodegroup.

Log in or register to write something here or to contact authors.