当前位置: 首页>>代码示例>>PHP>>正文


PHP gallery::date方法代码示例

本文整理汇总了PHP中gallery::date方法的典型用法代码示例。如果您正苦于以下问题:PHP gallery::date方法的具体用法?PHP gallery::date怎么用?PHP gallery::date使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gallery的用法示例。


在下文中一共展示了gallery::date方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: t

        ?>
              />
              <?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;
        ?>
开发者ID:estebandito,项目名称:gallery3,代码行数:31,代码来源:admin_comments.html.php

示例2: get

 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;
 }
开发者ID:webmatter,项目名称:gallery3-contrib,代码行数:81,代码来源:rwinfo_block.php

示例3: t

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");
?>
开发者ID:kstyrvoll,项目名称:gallery3,代码行数:31,代码来源:admin_users.html.php

示例4: t

 <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 ?>
开发者ID:HelixiR,项目名称:gallery3,代码行数:31,代码来源:admin_users.html.php


注:本文中的gallery::date方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。