Bug Reports · Legacy archive

Recent Activity

Started by Chaosmark Oct 30, 2012 7 posts Locked

  1. Recent Activity

    #1
    Ahoy, S-man! The 'Recent Updates' section of the main page no longer shows when a new submission has been added. Was this intentional, or an unfortunate byproduct of the flurry of modifications attempting to make us all happy with how it functions?
  2. Re: Recent Activity

    #2
    That is the devil. Will try and get to it this weekend!
  3. Re: Recent Activity

    #3
    I lied. I never got to this I don't think...
  4. Re: Recent Activity

    #4
    I put it back the old way right now, which may show multiple edits. Trying to get the logic for that without melting my mind....which isn't that hard, just don't have the patience for it right now.
  5. Re: Recent Activity

    #5
    Matter of fact, I will just ask.

    Here is the pseudo


    if (not_admin OR submission_author = logged_in_author) {
        track submission
    }


    Not much to it.

    This tracks everything currently: new submissions, wiki, quest and all updates.
    Each type of tracking has a separate numeric identifier that could be isolated. (For instance, updates is "11")

    The not_admin is supposed to allow the collaboration edit tracking for multiple authors. There are prior checks to ensure they are actually authorized to edit the sub and this is just tracking the addition/update. I don't want most admin edits to show up but if the admin is the author then want to catch that. Kicks admins in the butt for collabs though I see now. But if we allow tracking of updates as long as they have a comment then we are in good shape...maybe? Need logic for it though.

    So where do I put the code to check if it has a comment AND is 11 to know when to go ahead and track submission. Do I just need to build another tracking if statement to make it work? Any fix for the admin collaboration?
  6. Re: Recent Activity

    #6
    I'd try to be as explicit as possible with the if-statement. Instead of 'not_admin', I'd probably have an array of "allowed editors" (being all the collaboration authors, including the main author), and if the author is within that list it tracks the update. You said you do checks beforehand to ensure they have permission, so you should be able to compile a list of collaboration authors without too much trouble. That way even admins get included, if they're a collab author and not using their admin powers.

    Does that all make sense within the context of the larger codebase?
  7. Re: Recent Activity

    #7
    True, I do have a list of collaborators. I can extend that easy enough, certainly.

    Still at an impasse about shoehorning the (updated && comment) portion. I could make the insert a function but the amount of variables to pass is just silly, easier to just duplicate the query in a different if statement if we have to go that far. Didn't have time to stare at the screen yet today, just thinking out loud.

Bug Reports · All categories · Guildhall