• The above returns the name of the perosn who created the post.
    How do I find out who last updated it ?
    Thanks
    Dave

Viewing 15 replies - 1 through 15 (of 17 total)
  • That data is not recorded by WordPress. The original author stays the same, and the only thing that changes is the “modified date.”
    This could be an interesting feature… perhaps one that a plugin could address.

    Thread Starter daveprout

    (@daveprout)

    I guess this would mean adding a column to the wp_posts column. Is this something that could be done with a plugin ?
    Dave

    This could be done with a plugin. Correct, it’d mean adding a column to wp_posts, and then on post modification, checking to see who the current use is who is modifying it, and writing it to the DB. Not too complicated… I might give it a go if I have time.

    What if more than one person edits it? Would only the last person get recorded? Would they then be responsible for changes made by the ones before?
    Just something to think about.
    TG

    Thread Starter daveprout

    (@daveprout)

    So how does the plugin add a column to a table ? I suppose I need to look at an example of a plugin. My boss wants another change. He likes the concept of ‘Information Owner’. This could be implemented by adding a column to the wp_categories table, and capturing the name or id on Add Category.
    Do you think we are mis-using WordPress. We are tying to use it as a Content Manager for a website. Not sure if I should tweak WordPress or give it up and get some Content Management software. But I do like WordPress. Hmm.
    Dave

    Thread Starter daveprout

    (@daveprout)

    TG, I agree. We’re probably a bit backward. Does anybody have such things as ‘Last Updated by’ at the bottom of a Web Page any more ?
    I’ll try arguing this at work tomorrow.
    Dave

    Here’s something to get you started… this plugin updates the post with the id of the last user who modified the post. It does not address TechGnome’s concern, as it is overwritten by the last person who modified the entry.
    Who Last Modified? Plugin
    The plugin also includes a function to echo or return the Nickname of the person who last edited the entry (but only if the person is not the original author).
    It takes a $text parameter, and a true/false echo parameter (defaults to true).
    For the following examples, assume that the post was written by “User 1” and modified by “Admin.”
    Here’s how you’d use it:
    wp_last_modified_by(“This post was edited by “);
    This would produce:
    This post was edited by Admin
    If the last person to modify it was the original author, or if it has never been modified, it echoes out nothing.
    Nothing too fancy, but maybe you can make it work for you.
    Let me know if you have any problems with it… I don’t have a WordPress 1.2 install at the moment, so it’s only been tested on the latest CVS.

    Thread Starter daveprout

    (@daveprout)

    Thanks Mark. I’ll try your plugin as soon as possible.
    Currently I’m having massive problems as I ‘upgraded’ to PHP 5.0.1.
    My home page was fine,but as soon as I call any WordPress routines I get failures.
    With ISAPI I get HTTP 500 Internal Error
    With CGI I get
    CGI Error
    The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:
    I’m using Windows XP Pro, IIS 5.1, has anyone got WP working with PHP5 in this config ?
    Dave

    Thread Starter daveprout

    (@daveprout)

    OK, so now I’ve gone back to PHP 4.3.3
    Copied mark’s plugin into wp-content/plugins
    Went into plugins screen and activated it
    Now, when I try to log in I get
    Warning: Cannot modify header information – headers already sent by (output started at D:\wsi\wp-content\plugins\who-last-modified.php:76) in D:\wsi\wp-login.php on line 123
    Warning: Cannot modify header information – headers already sent by (output started at D:\wsi\wp-content\plugins\who-last-modified.php:76) in D:\wsi\wp-login.php on line 124
    Warning: Cannot modify header information – headers already sent by (output started at D:\wsi\wp-content\plugins\who-last-modified.php:76) in D:\wsi\wp-login.php on line 126
    Warning: Cannot modify header information – headers already sent by (output started at D:\wsi\wp-content\plugins\who-last-modified.php:76) in D:\wsi\wp-login.php on line 127
    Warning: Cannot modify header information – headers already sent by (output started at D:\wsi\wp-content\plugins\who-last-modified.php:76) in D:\wsi\wp-login.php on line 128
    Warning: Cannot modify header information – headers already sent by (output started at D:\wsi\wp-content\plugins\who-last-modified.php:76) in D:\wsi\wp-login.php on line 129
    Warning: Cannot modify header information – headers already sent by (output started at D:\wsi\wp-content\plugins\who-last-modified.php:76) in D:\wsi\wp-login.php on line 147
    How do I fix this
    Thanks
    Dave
    P.S. Please help me out, today I persuaded my boss that we really should go with WordPress.

    this error message usually means you have a white space somewhere (end of the file?)

    Thread Starter daveprout

    (@daveprout)

    Excellent ! That fixed it, thanks.
    Now I’ll try the plugin !

    Thread Starter daveprout

    (@daveprout)

    Well, the plugin works ! Thanks Mark.
    So, now I think I’ll try writing my own plugin to capture an ID against the category. This is for my boss’s requirement of ‘Information Owner’.
    Does any such plugin already exist ?
    Cheers from the UK
    Dave

    What do you mean by “capture an ID against the category”? I think you’re trying to say that you want the user’s ID married to that category when they create it. I don’t think there is a plugin hook for “add_category” so this would have to be a hack.
    You might want to figure out exactly what your boss wants, because it’d be a shame if you went through all this trouble, only to have him give you a whole other list of things he wants it to do, things that may be beyond WordPress’s scope. WP is a great tool, and with some knowhow, it can be modified for some specialized use, but it is still not a full-featured commercial CMS.

    Thread Starter daveprout

    (@daveprout)

    Yes, a user’s ID married to a category. BUT, as the Information Owner might not be creating the category (they call this donkey work), there would have to be a drop down list to select the Information Owner to attach to the category.
    I’ll have to ‘manage his requirements’. There are only seven of us in the team, so if someone wants to ask about a detail on a page, they can just ring any of us and we’ll know who ‘owns’ the relevant info.
    The company policy is to use Obtree for Content Management (We have 100,000 employees). But for our team of hackers, I don’t think Obtree will give us the flexibility we need.
    I’m starting to believe in WordPress, not only as a tool, but as a Philosophy !
    Dave

    Hm, this doesn’t sound too hard to do. It’d require some change of WP code.
    One alternative that doesn’t require any change in code is to use the Category Description field to store the name of the “Information Owner.”
    Would that work? It woudln’t be a dropdown list, of course.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘the_author’ is closed to new replies.