1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Add-on PM viewer?

Discussion in 'Resource and Add-on Requests' started by DarkGizmo, Aug 31, 2012.

  1. DarkGizmo

    DarkGizmo Active Member

    Is there a PM viewer/reader for admins out there? This would be very helpful to me on my forum since I get a few spam PMs to my members from time to time...
     
  2. Chris D

    Chris D XenForo Developer Staff Member

  3. DarkGizmo

    DarkGizmo Active Member

    Cool, thanks. Is there one that allows you to search by the user? :)
     
  4. Chris D

    Chris D XenForo Developer Staff Member

    It's the only one, I think.
     
    Digital Doctor likes this.
  5. DarkGizmo

    DarkGizmo Active Member

    Aw crap. :-\
     
  6. MOZ

    MOZ Well-Known Member

    You can read them directly via DB.
     
  7. DarkGizmo

    DarkGizmo Active Member

    Yes I know this but I don't want to have to log into cpanel and into phpmyadmin every time I want to see if someone is breaking any rules via PM. It'd be just simpler to do it via admin CP.
     
  8. Chris D

    Chris D XenForo Developer Staff Member

    You should post a request in the add-on's thread. If the developer is still active then he might consider implementing it for you.
     
    simbolo likes this.
  9. Sumo

    Sumo Active Member

    I've actually modified it to search however you have to edit the php file each time. I hope the author doesn't mind me posting this.

    In /library/tikibey/model/ReadPc.php

    On line 96 replace the getConversations function with this replacing "xxx" with the users member id. (This can be found in the url of their profile).

    Code:
    public function getConversations(array $conditions = array(), array $fetchOptions = array())
    {
    $joinOptions = $this->prepareConversationFetchOptions($fetchOptions);
    $whereClause = $this->prepareConversationConditions($conditions, $fetchOptions);
     
    $limitOptions = $this->prepareLimitFetchOptions($fetchOptions);
     
    return $this->fetchAllKeyed($this->limitQueryResults(
    '
    SELECT conversation_master.*,
    conversation_user.*,
    conversation_starter.*,
    conversation_recipient.recipient_state, conversation_recipient.last_read_date
    ' . $joinOptions['selectFields'] . '
    FROM xf_conversation_user AS conversation_user
    INNER JOIN xf_conversation_master AS conversation_master ON
    (conversation_user.conversation_id = conversation_master.conversation_id)
    INNER JOIN xf_conversation_recipient AS conversation_recipient ON
    (conversation_user.conversation_id = conversation_recipient.conversation_id
    AND conversation_user.owner_user_id = conversation_recipient.user_id)
    LEFT JOIN xf_user AS conversation_starter ON
    (conversation_starter.user_id = conversation_master.user_id)
    ' . $joinOptions['joinTables'] . '
    WHERE conversation_user.owner_user_id = xxx
    ORDER BY conversation_user.last_message_date DESC
    ', $limitOptions['limit'], $limitOptions['offset']
    ), 'conversation_id');
    }
    
     

Share This Page