|
Revision 433, 1.2 kB
(checked in by Tatzelwurm, 5 years ago)
|
|
Kurznachrichten Plugin für das WCF Version 0.1.2
|
-
Property svn:mime-type set to
text/plain
-
Property svn:executable set to
*
|
| Line | |
|---|
| 1 | <?php |
|---|
| 2 | require_once(WCF_DIR.'lib/system/event/EventListener.class.php'); |
|---|
| 3 | |
|---|
| 4 | /** |
|---|
| 5 | * Shows the instant message link in user profiles. |
|---|
| 6 | * |
|---|
| 7 | * @author Marcel Werk / Tatzelwurm |
|---|
| 8 | * @copyright 2001-2007 WoltLab GmbH / Inside das Hörspiel |
|---|
| 9 | * @license WoltLab Burning Board License <http://www.woltlab.com/products/burning_board/license.php> |
|---|
| 10 | * @package de.inside.wcf.instantmessenger |
|---|
| 11 | */ |
|---|
| 12 | class UserPageIMLinkListener implements EventListener { |
|---|
| 13 | /** |
|---|
| 14 | * @see EventListener::execute() |
|---|
| 15 | */ |
|---|
| 16 | public function execute($eventObj, $className, $eventName) { |
|---|
| 17 | if (WCF::getUser()->userID) { |
|---|
| 18 | $user = $eventObj->user; |
|---|
| 19 | // check user otpions and permissions |
|---|
| 20 | if ( $user->getPermission('user.board.instantmessenger.canUseInstantMessenger') && |
|---|
| 21 | !$user->ignoredUser && |
|---|
| 22 | (($user->onlyBuddyCanIM && $user->buddy) || $user->userCanIM)){ |
|---|
| 23 | WCF::getTPL()->append('additionalOptions', '<li><a href="javascript:;" onclick="window.open(\'index.php?form=instantMessenger&action=new&userID='.$user->userID.SID_ARG_2ND.'\',\'InstantMessage\',\'width='.INSTANTMESSENGER_SENDWIDTH.',height='.INSTANTMESSENGER_SENDHIGHT.',toolbar=no,scrollbars=yes,left=50,top=50,resizable=yes\');return false;">'.WCF::getLanguage()->get('wcf.instantmessenger.sendIM').'</a></li>'); |
|---|
| 24 | } |
|---|
| 25 | } |
|---|
| 26 | } |
|---|
| 27 | } |
|---|
| 28 | ?> |
|---|