[wp-hackers] possible permanent post and edit page modifications
Shelley Powers
shelleyp at burningbird.net
Fri Jul 23 13:34:21 UTC 2004
In my current installation, I've made two modifications that seem to
interest people the most. I'll be making them to 1.3 -- I have a test
site up and running -- but instead of continuing to add modifications to
each release, I thought I would package these up as program modifications.
The first is by-post moderation. This allows users to turn moderation on
per post rather than for the whole site. To support this change, I need
to add a 'moderated' enumerated value for comment_status, convert the
checkboxes for comments to reflect multiple statuses, and add some code
-- not much -- to the wp-comments.php and wp-comments-post.php files.
(I've also added code that tests the date of a post and if it's over 20
days old and receives a comment, it automatically sets the
comment_status of the post to moderated, and puts the comment into the
moderated queue. This has kept out every bit of spam I've had lately. )
The amount of code is quite small -- just hard for non-coders to add on
their own, which is why it would be nice to see this as part of the
regular installation.
Is there interest in the per-post moderation?
The second modification was for full page preview. Now my current
installation isn't the most efficient, but suits me. What I have is a
link to a preview page, which is a copy of the index.php page but
modified for individual page viewing. The weblog header file for this
page is altered to only access posts that are 'draft' rather than
'publish'. (Well actually it allows other statuses, too, but that's
because I'm doing some other stuff.)
A better approach would be to include a button in the edit page to
preview the page, call the index.php page, and add a parameter to the
call that has the blog header switch between 'publish' and 'draft'. This
is an approach others are using.
I've also removed the in-page preview -- it plays havoc with larger
postings or posts with lots of photos.
Again, the code change is quite small, but hard for non-coders to make.
And this is probably the most popular mod I've made.
Interest?
Shelley
More information about the hackers
mailing list