Beispiel #1
0
function WriteActivityComment($Comment, &$Sender, &$Session)
{
    ?>
<li id="Activity_<?php 
    echo $Comment->ActivityID;
    ?>
" class="<?php 
    echo $Comment->ActivityType;
    ?>
"><?php 
    if ($Comment->ActivityPhoto != '') {
        if ($Comment->InsertUserID == $Session->UserID) {
            echo '<a href="' . Url('/garden/profile/' . urlencode($Comment->ActivityName)) . '">' . $Sender->Html->Image('uploads/n' . $Comment->ActivityPhoto) . '</a>';
        } else {
            echo $Sender->Html->Image('uploads/n' . $Comment->ActivityPhoto);
        }
    }
    ?>
<h3><?php 
    echo $Session->UserID == $Comment->InsertUserID || $Session->CheckPermission('Garden.Activity.Delete') ? Anchor('Delete', 'garden/activity/delete/' . $Comment->ActivityID . '/' . $Session->TransientKey() . '?Return=' . urlencode(Gdn_Url::Request()), 'Delete') : '';
    ?>
<strong><?php 
    echo Format::ActivityHeadline($Comment, $Sender->ProfileUserID);
    ?>
<em><?php 
    echo Format::Date($Comment->DateInserted);
    ?>
</em></strong></h3>
   <blockquote><?php 
    echo Format::Display($Comment->Story);
    ?>
</blockquote>
</li>
<?php 
}
Beispiel #2
0
<?php

if (!defined('APPLICATION')) {
    exit;
}
$Session = Gdn::Session();
?>
<div class="User">
   <h1><?php 
echo $this->User->Name;
?>
</h1>
   <?php 
if ($this->User->About != '') {
    echo '<div id="Status">' . Format::Display($this->User->About);
    if ($this->User->About != '' && ($Session->UserID == $this->User->UserID || $Session->CheckPermission('Garden.Users.Edit'))) {
        echo ' - ' . Anchor(T('Clear'), '/profile/clear/' . $this->User->UserID . '/' . $Session->TransientKey(), 'Change');
    }
    echo '</div>';
}
?>
</div>
Beispiel #3
0
   <ul class="PanelActivity">
      <?php 
foreach ($this->_ActivityData->Result() as $Activity) {
    echo '<li class="Activity ' . $Activity->ActivityType . '">';
    // If this was a status update or a wall comment, don't bother with activity strings
    $ActivityType = explode(' ', $Activity->ActivityType);
    // Make sure you strip out any extra css classes munged in here
    $ActivityType = $ActivityType[0];
    $Author = UserBuilder($Activity, 'Activity');
    if (in_array($ActivityType, array('WallComment', 'AboutUpdate'))) {
        echo UserAnchor($Author, 'Name');
        if ($Activity->ActivityType == 'WallComment' && $Activity->RegardingUserID > 0) {
            $Author = UserBuilder($Activity, 'Regarding');
            echo '<span>→</span>' . UserAnchor($Author, 'Name');
        }
        echo Format::Display($Activity->Story);
        echo '<em>' . Format::Date($Activity->DateInserted) . '</em>';
    } else {
        echo Format::ActivityHeadline($Activity);
        echo '<em>' . Format::Date($Activity->DateInserted) . '</em>';
        if ($Activity->Story != '') {
            echo '<div class="Story">';
            echo $Activity->Story;
            echo '</div>';
        }
    }
    echo '</li>';
}
?>
      <li class="ShowAll"><?php 
echo Anchor(T('↳ Show All'), 'activity');
Beispiel #4
0
function WriteActivityComment($Comment, &$Sender, &$Session)
{
    ?>
<li id="Activity_<?php 
    echo $Comment->ActivityID;
    ?>
" class="<?php 
    echo $Comment->ActivityType;
    if ($Comment->ActivityPhoto != '') {
        echo ' HasPhoto';
    }
    ?>
"><?php 
    if ($Comment->ActivityPhoto != '') {
        echo '<a href="' . Url('/garden/profile/' . urlencode($Comment->ActivityName)) . '" class="Photo">' . $Sender->Html->Image('uploads/n' . $Comment->ActivityPhoto) . '</a>';
    }
    echo '<div>';
    echo UserAnchor($Comment->ActivityName, 'Name');
    echo Format::Display($Comment->Story);
    echo '<div class="Meta">';
    echo Format::Date($Comment->DateInserted);
    echo $Session->UserID == $Comment->InsertUserID || $Session->CheckPermission('Garden.Activity.Delete') ? '<span>&bull;</span>' . Anchor('Delete', 'garden/activity/delete/' . $Comment->ActivityID . '/' . $Session->TransientKey() . '?Return=' . urlencode(Gdn_Url::Request())) : '';
    echo '</div>';
    echo '</div>';
    ?>
</li>
<?php 
}
Beispiel #5
0
function WriteActivityComment($Comment, &$Sender, &$Session)
{
    $Author = UserBuilder($Comment, 'Activity');
    $PhotoAnchor = UserPhoto($Author, 'Photo');
    $CssClass = 'Item ActivityComment Condensed ' . $Comment->ActivityType;
    if ($PhotoAnchor != '') {
        $CssClass .= ' HasPhoto';
    }
    ?>
<li id="Activity_<?php 
    echo $Comment->ActivityID;
    ?>
" class="<?php 
    echo $CssClass;
    ?>
">
   <?php 
    if ($PhotoAnchor != '') {
        ?>
   <div class="Photo"><?php 
        echo $PhotoAnchor;
        ?>
</div>
   <?php 
    }
    ?>
   <div class="ItemContent ActivityComment">
      <?php 
    echo UserAnchor($Author, 'Title Name');
    ?>
      <div class="Excerpt"><?php 
    echo Format::Display($Comment->Story);
    ?>
</div>
      <div class="Meta">
         <span class="DateCreated"><?php 
    echo Format::Date($Comment->DateInserted);
    ?>
</span>
         <?php 
    if ($Session->UserID == $Comment->InsertUserID || $Session->CheckPermission('Garden.Activity.Delete')) {
        echo Anchor(T('Delete'), 'garden/activity/delete/' . $Comment->ActivityID . '/' . $Session->TransientKey() . '?Return=' . urlencode(Gdn_Url::Request()), 'DeleteComment');
    }
    ?>
      </div>
   </div>
</li>
<?php 
}
Beispiel #6
0
function WriteActivityComment($Comment, &$Sender, &$Session)
{
    $Author = UserBuilder($Comment, 'Activity');
    ?>
<li id="Activity_<?php 
    echo $Comment->ActivityID;
    ?>
" class="<?php 
    echo $Comment->ActivityType;
    if ($Comment->ActivityPhoto != '') {
        echo ' HasPhoto';
    }
    ?>
"><?php 
    echo UserPhoto($Author, 'Photo');
    echo '<div>';
    echo UserAnchor($Author, 'Name');
    echo Format::Display($Comment->Story);
    echo '<div class="Meta">';
    echo Format::Date($Comment->DateInserted);
    echo $Session->UserID == $Comment->InsertUserID || $Session->CheckPermission('Garden.Activity.Delete') ? '<span>&bull;</span>' . Anchor('Delete', 'garden/activity/delete/' . $Comment->ActivityID . '/' . $Session->TransientKey() . '?Return=' . urlencode(Gdn_Url::Request())) : '';
    echo '</div>';
    echo '</div>';
    ?>
</li>
<?php 
}