?>
              />
              <?php 
    } else {
        ?>
              <?php 
        echo t("No thumbnail");
        ?>
              <?php 
    }
    ?>
            </a>
          </div>
        </div>
        <p><?php 
    echo gallery::date($comment->created);
    ?>
</p>
           <?php 
    echo nl2br(html::purify($comment->text));
    ?>
      </td>
      <td>
        <ul class="g-buttonset-vertical">
        <?php 
    if ($comment->state != "unpublished") {
        ?>
          <li>
            <a href="javascript:set_state('unpublished',<?php 
        echo $comment->id;
        ?>
 static function get($block_id, $theme)
 {
     $block = "";
     switch ($block_id) {
         case "rwinfo":
             if ($theme->item()) {
                 // rWatcher Edit: Don't display on root album.
                 if ($theme->item->id == 1) {
                     return "";
                 }
                 // End rWatcher Edit
                 $block = new Block();
                 $block->css_id = "g-metadata";
                 $block->title = $theme->item()->is_album() ? t("Album info") : ($theme->item()->is_movie() ? t("Movie info") : t("Photo info"));
                 // rWatcher Edit:  File Name change.
                 $block->content = new View("rwinfo_block.html");
                 if ($theme->item->title && module::get_var("rwinfo", "show_title")) {
                     //rWatcher Edit:  rwinfo
                     $info["title"] = array("label" => t("Title:"), "value" => html::purify($theme->item->title));
                 }
                 if ($theme->item->description && module::get_var("rwinfo", "show_description")) {
                     //rWatcher Edit:  rwinfo
                     $info["description"] = array("label" => t("Description:"), "value" => nl2br(html::purify($theme->item->description)));
                 }
                 if (!$theme->item->is_album() && module::get_var("rwinfo", "show_name")) {
                     //rWatcher Edit:  rwinfo
                     $info["file_name"] = array("label" => t("File name:"), "value" => html::clean($theme->item->name));
                 }
                 // rWatcher Edit:  Display file size
                 if (!$theme->item->is_album()) {
                     // Calculate file size.
                     $filesize_unit = array("B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB");
                     $item_filesize = filesize($theme->item->file_path());
                     $unit_counter = 0;
                     while ($item_filesize >= 1024) {
                         $item_filesize = $item_filesize / 1024;
                         $unit_counter++;
                     }
                     $item_filesize = number_format($item_filesize, 2) . " " . $filesize_unit[$unit_counter];
                     $info["file_size"] = array("label" => t("File size:"), "value" => $item_filesize);
                 }
                 // End rWatcher Edit
                 // rWatcher Edit:  Remove Show Captured for everything -- Show created DATE for album, captured DATE/TIME for everything else.
                 //if ($theme->item->captured && module::get_var("info", "show_captured")) {
                 //  $info["captured"] = array(
                 //    "label" => t("Captured:"),
                 //    "value" => gallery::date_time($theme->item->captured)
                 //  );
                 //}
                 if ($theme->item->is_album() && $theme->item->created && module::get_var("rwinfo", "show_captured")) {
                     $info["captured"] = array("label" => t("Date:"), "value" => gallery::date($theme->item->created));
                 }
                 if (!$theme->item->is_album() && $theme->item->created && module::get_var("rwinfo", "show_captured")) {
                     $info["captured"] = array("label" => t("Date:"), "value" => gallery::date_time($theme->item->captured));
                 }
                 // End rWatcher Edit
                 if ($theme->item->owner && module::get_var("info", "show_owner")) {
                     $display_name = $theme->item->owner->display_name();
                     // rWatcher Edit:  Display profile instead of web site, if viewable.
                     $str_owner_url = $theme->item->owner->url;
                     if (rwinfo_block_Core::_can_view_profile_pages(identity::lookup_user($theme->item->owner->id))) {
                         $str_owner_url = user_profile::url($theme->item->owner->id);
                     }
                     // rWatcher End Edit
                     if ($str_owner_url) {
                         //rW Edit $str_owner_url.
                         $info["owner"] = array("label" => t("Owner:"), "value" => html::anchor(html::clean($str_owner_url), html::clean($display_name)));
                     } else {
                         $info["owner"] = array("label" => t("Owner:"), "value" => html::clean($display_name));
                     }
                 }
                 if ($theme->item->width && $theme->item->height && module::get_var("info", "show_dimensions")) {
                     $info["size"] = array("label" => t("Dimensions:"), "value" => t("%width x %height px", array("width" => $theme->item->width, "height" => $theme->item->height)));
                 }
                 $block->content->metadata = $info;
                 module::event("info_block_get_metadata", $block, $theme->item);
             }
             break;
     }
     return $block;
 }
Example #3
0
echo p::clean($user->name);
?>
        </td>
        <td>
          <?php 
echo p::clean($user->full_name);
?>
        </td>
        <td>
          <?php 
echo p::clean($user->email);
?>
        </td>
        <td>
          <?php 
echo $user->last_login == 0 ? "" : gallery::date($user->last_login);
?>
        </td>
        <td class="gActions">
          <a href="<?php 
echo url::site("admin/users/edit_user_form/{$user->id}");
?>
"
              open_text="<?php 
echo t("close");
?>
"
              class="gPanelLink gButtonLink ui-state-default ui-corner-all ui-icon-left">
            <span class="ui-icon ui-icon-pencil"></span><span class="gButtonText"><?php 
echo t("edit");
?>
Example #4
0
 <td id="user-<?= $user->id ?>" class="core-info gDraggable">
   <img src="<?= $user->avatar_url(20, $theme->url("images/avatar.jpg", true)) ?>"
        title="<?= t("Drag user onto group below to add as a new member") ?>"
        alt="<?= p::clean($user->name) ?>"
        width="20"
        height="20" />
   <?= p::clean($user->name) ?>
 </td>
 <td>
   <?= p::clean($user->full_name) ?>
 </td>
 <td>
   <?= p::clean($user->email) ?>
 </td>
 <td>
   <?= ($user->last_login == 0) ? "" : gallery::date($user->last_login) ?>
 </td>
 <td class="gActions">
   <a href="<?= url::site("admin/users/edit_user_form/$user->id") ?>"
       open_text="<?= t("close") ?>"
       class="gPanelLink gButtonLink ui-state-default ui-corner-all ui-icon-left">
     <span class="ui-icon ui-icon-pencil"></span><span class="gButtonText"><?= t("edit") ?></span></a>
   <? if (user::active()->id != $user->id && !$user->guest): ?>
   <a href="<?= url::site("admin/users/delete_user_form/$user->id") ?>"
       class="gDialogLink gButtonLink ui-state-default ui-corner-all ui-icon-left">
     <span class="ui-icon ui-icon-trash"></span><?= t("delete") ?></a>
   <? else: ?>
   <span title="<?= t("This user cannot be deleted") ?>"
       class="gButtonLink ui-state-disabled ui-corner-all ui-icon-left">
     <span class="ui-icon ui-icon-trash"></span><?= t("delete") ?></span>
   <? endif ?>