Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2013
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.79 KB | None | 0 0
  1. function WriteOptions($Discussion, &$Sender, &$Session) {
  2.   if ($Session->IsValid() && $Sender->ShowOptions) {
  3.       echo '<div class="Options">';
  4.       // Allow plugins to add options
  5.       $Sender->FireEvent('DiscussionOptions');
  6.  
  7.       // Bookmark link
  8.       $Title = T($Discussion->Bookmarked == '1' ? 'Unbookmark' : 'Bookmark');
  9.       echo Anchor(
  10.          '<span class="Star">'
  11.             .Img('applications/dashboard/design/images/pixel.png', array('alt' => $Title))
  12.          .'</span>',
  13.          '/vanilla/discussion/bookmark/'.$Discussion->DiscussionID.'/'.$Session->TransientKey().'?Target='.urlencode($Sender->SelfUrl),
  14.          'Bookmark' . ($Discussion->Bookmarked == '1' ? ' Bookmarked' : ''),
  15.          array('title' => $Title)
  16.       );
  17.      
  18.       echo '</div>';
  19.    }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement