Simple Modifications > Stop ignored users from posting profile comments > Invisionize.eu - IP.Board (IPB) News
Kanał Rss Kanał Rss
Kanał Atom Kanał Atom

Simple Modifications > Stop ignored users from posting profile comments

wersja drukowalna wersja Microsoft Word wersja HTML

Open admin/applications/members/modules_public/ajax/comments.php and find:

private function _addComment()
{
    /* INIT */
    $member_id = intval( $this->request['member_id'] );

Add below:

$query = $this->DB->buildAndFetch( array( 'select' => 'ignored_users', 'from' => 'members', 'where' => 'member_id = '.$member_id ) );

$array = unserialize( $query['ignored_users'] );

foreach ( $array as $k => $v )
{
    if ( $v['ignore_topics'] OR $v['ignore_messages'] )
    {
        $member = IPSMember::load( $member_id );
        $this->returnString( "You are ignored by <b>{$member['members_display_name']}</b> and you can't leave a comment!" );
    }
}

Of course it's not an IPS official solution but it works!

pią, 18 wrzesień 2009

Komentarze:

Brak komentarzy

Imię/Nick:

Adres email:

Strona WWW:

Treść Komentarza: