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


PHP gallery::date_time方法代码示例

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


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

示例1: get

 static function get($block_id, $theme)
 {
     $block = "";
     switch ($block_id) {
         case "metadata":
             if ($theme->item()) {
                 $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"));
                 $block->content = new View("info_block.html");
                 if ($theme->item->title && module::get_var("info", "show_title")) {
                     $info["title"] = array("label" => t("Title:"), "value" => html::purify($theme->item->title));
                 }
                 if ($theme->item->description && module::get_var("info", "show_description")) {
                     $info["description"] = array("label" => t("Description:"), "value" => nl2br(html::purify($theme->item->description)));
                 }
                 if (!$theme->item->is_album() && module::get_var("info", "show_name")) {
                     $info["file_name"] = array("label" => t("File name:"), "value" => html::clean($theme->item->name));
                 }
                 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->owner && module::get_var("info", "show_owner")) {
                     $display_name = $theme->item->owner->display_name();
                     if ($theme->item->owner->url) {
                         $info["owner"] = array("label" => t("Owner:"), "value" => html::anchor(html::clean($theme->item->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:qboy1987,项目名称:mooiyou,代码行数:40,代码来源:info_block.php

示例2: get

 static function get($block_id, $theme)
 {
     $block = "";
     switch ($block_id) {
         case "metadata":
             if ($theme->item()) {
                 $block = new Block();
                 $block->css_id = "g-metadata";
                 $block->title = $theme->item()->is_album() ? t("Album info") : t("Photo info");
                 $block->content = new View("info_block.html");
                 if ($theme->item->title && module::get_var("info", "show_title")) {
                     $info["title"] = array("label" => t("Title:"), "value" => html::purify($theme->item->title));
                 }
                 if ($theme->item->description && module::get_var("info", "show_description")) {
                     $info["description"] = array("label" => t("Description:"), "value" => nl2br(html::purify($theme->item->description)));
                 }
                 if (!$theme->item->is_album() && module::get_var("info", "show_name")) {
                     $info["file_name"] = array("label" => t("File name:"), "value" => html::clean($theme->item->name));
                 }
                 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->owner && module::get_var("info", "show_owner")) {
                     $display_name = $theme->item->owner->display_name();
                     if ($theme->item->owner->url) {
                         $info["owner"] = array("label" => t("Owner:"), "value" => "<a href=\"{$theme->item->owner->url}\">" . html::clean($display_name) . "</a>");
                     } else {
                         $info["owner"] = array("label" => t("Owner:"), "value" => html::clean($display_name));
                     }
                 }
                 $block->content->metadata = $info;
                 module::event("info_block_get_metadata", $block, $theme->item);
             }
             break;
     }
     return $block;
 }
开发者ID:kandsten,项目名称:gallery3,代码行数:37,代码来源:info_block.php

示例3: foreach

        </tr>
        <? $i = 0; ?>
        <? foreach ($finished_tasks as $task): ?>
        <tr class="<?php 
echo $i % 2 == 0 ? "g-odd" : "g-even";
?>
 <?php 
echo $task->state == "success" ? "g-success" : "g-error";
?>
">
          <td class="<?php 
echo $task->state == "success" ? "g-success" : "g-error";
?>
">
            <?php 
echo gallery::date_time($task->updated);
?>
          </td>
          <td>
            <?php 
echo $task->name;
?>
          </td>
          <td>
            <? if ($task->state == "success"): ?>
            <?php 
echo t("Success");
?>
            <? elseif ($task->state == "error"): ?>
            <?php 
echo t("Failed");
开发者ID:ChrisRut,项目名称:gallery3,代码行数:31,代码来源:admin_maintenance.html.php

示例4: defined

<?php

defined("SYSPATH") or die("No direct script access.");
?>
<ul>
  <? foreach ($comments as $comment): ?>
  <li class="<?php 
echo text::alternate("g-even", "g-odd");
?>
">
    <img src="<?php 
echo $comment->author()->avatar_url(32, $theme->url("images/avatar.jpg", true));
?>
"
         class="g-avatar"
         alt="<?php 
echo html::clean_attribute($comment->author_name());
?>
"
         width="32"
         height="32" />
    <?php 
echo gallery::date_time($comment->created);
?>
    <?php 
echo t('<a href="#">%author_name</a> said <em>%comment_text</em>', array("author_name" => html::clean($comment->author_name()), "comment_text" => text::limit_words(nl2br(html::purify($comment->text)), 50)));
?>
  </li>
  <? endforeach ?>
</ul>
开发者ID:viosca,项目名称:gallery3,代码行数:30,代码来源:admin_block_recent_comments.html.php

示例5: foreach

<ul>
  <?php 
foreach ($comments as $comment) {
    ?>
  <div class="allcomments-comment">
   <li id="g-comment-<?php 
    echo $comment->id;
    ?>
">
    <p class="allcomments-author">
     <a href="<?php 
    echo $comment->item()->url();
    ?>
">
       <?php 
    echo t("on %date", array("date" => gallery::date_time($comment->created), "title" => $comment->item()->title));
    ?>
</a><br />
     <a href="<?php 
    echo $comment->item()->url();
    ?>
">
       <?php 
    echo $comment->item()->thumb_img(array(), 128);
    ?>
</a>
     <a href="<?php 
    echo $comment->author_url();
    ?>
">
     <?php 
开发者ID:webmatter,项目名称:gallery3-contrib,代码行数:31,代码来源:allcomments.html.php

示例6: t

        ?>
            </td>
            <td><?php 
        echo register::format_registration_state($user->state);
        ?>
</td>
            <td><?php 
        echo t($user->name);
        ?>
</td>
            <td><?php 
        echo t($user->full_name);
        ?>
</td>
            <td><?php 
        echo t(gallery::date_time($user->request_date));
        ?>
</td>
            <td><?php 
        echo t($user->email);
        ?>
</td>
          </tr>
          <?php 
    }
    ?>
        </table>
      </li>
       <li>
        <?php 
    echo form::submit(array("id" => "g-registration-activate", "name" => "activate_users", "class" => "submit", "style" => "clear:both!important"), t("Activate"));
开发者ID:ChrisRut,项目名称:gallery3-contrib,代码行数:31,代码来源:admin_register.html.php

示例7: defined

defined("SYSPATH") or die("No direct script access.");
?>
<li id="g-comment-<?php 
echo $comment->id;
?>
">
  <p class="g-author">
    <a href="#">
      <img src="<?php 
echo $comment->author()->avatar_url(40, $theme->url("images/avatar.jpg", true));
?>
"
           class="g-avatar"
           alt="<?php 
echo html::clean_attribute($comment->author_name());
?>
"
           width="40"
           height="40" />
    </a>
    <?php 
echo t("on %date_time,  <a href=\"#\">%name</a> said", array("date_time" => gallery::date_time($comment->created), "name" => html::clean($comment->author_name())));
?>
  </p>
  <div>
  <?php 
echo nl2br(html::purify($comment->text));
?>
  </div>
</li>
开发者ID:viosca,项目名称:gallery3,代码行数:30,代码来源:comment.html.php

示例8: foreach

?>
<ul>
  <?php 
foreach ($entries as $entry) {
    ?>
  <li class="<?php 
    echo log::severity_class($entry->severity);
    ?>
" style="direction: ltr">
    <a href="<?php 
    echo url::site("user/{$entry->user_id}");
    ?>
"><?php 
    echo html::clean($entry->user->name);
    ?>
</a>
    <?php 
    echo gallery::date_time($entry->timestamp);
    ?>
    <?php 
    echo $entry->message;
    ?>
    <?php 
    echo $entry->html;
    ?>
  </li>
  <?php 
}
?>
</ul>
开发者ID:Okat,项目名称:gallery3,代码行数:30,代码来源:admin_block_log_entries.html.php

示例9: t

    ?>
  <li id="g-comment-<?php 
    echo $comment->id;
    ?>
">
    <p class="g-author">
      <a href="<?php 
    echo $comment->item()->url();
    ?>
">
        <?php 
    echo $comment->item()->thumb_img(array(), 70);
    ?>
      </a>
      <?php 
    echo t("<i><strong>on</strong> %date <strong>for</strong> %title</i> ", array("date" => gallery::date_time($comment->created), "title" => $comment->item()->title));
    ?>
    </p>
    <hr />
    <div>
      <?php 
    echo nl2br(html::purify($comment->text));
    ?>
    </div>
  </li>
  <?php 
}
?>
</ul>
</div>
开发者ID:webmatter,项目名称:gallery3-contrib,代码行数:30,代码来源:user_profile_comments.html.php

示例10: defined

defined("SYSPATH") or die("No direct script access.");
?>
<li id="gComment-<?php 
echo $comment->id;
?>
">
  <p class="gAuthor">
    <a href="#">
      <img src="<?php 
echo $comment->author()->avatar_url(40, $theme->theme_url("images/avatar.jpg", true));
?>
"
           class="gAvatar"
           alt="<?php 
echo p::clean($comment->author_name());
?>
"
           width="40"
           height="40" />
    </a>
    <?php 
echo t("on %date_time, %author_name said", array("date_time" => gallery::date_time($comment->created), "author_name" => p::clean($comment->author_name())));
?>
  </p>
  <div>
  <?php 
echo nl2br(p::purify($comment->text));
?>
  </div>
</li>
开发者ID:hiwilson,项目名称:gallery3,代码行数:30,代码来源:comment.html.php

示例11: t

    ?>
  <?php 
    echo t("Automatic upgrade checking is enabled.");
    ?>
  <?php 
} else {
    ?>
  <?php 
    echo t("Automatic upgrade checking is disabled.");
    ?>
  <?php 
}
?>
  <?php 
if (!$version_info) {
    ?>
  <?php 
    echo t("No upgrade checks have been made yet.");
    ?>
  <?php 
} else {
    ?>
  <?php 
    echo t("The last upgrade check was made on %date.", array("date" => gallery::date_time($version_info->timestamp)));
    ?>
  <?php 
}
?>
</p>

开发者ID:JasonWiki,项目名称:docs,代码行数:29,代码来源:upgrade_checker_block.html.php

示例12: t

?>
"
           width="40"
           height="40" />
    </a>
    <?php 
if ($comment->author()->guest) {
    ?>
    <?php 
    echo t("on %date_time, %name said", array("date_time" => gallery::date_time($comment->created), "name" => html::clean($comment->author_name())));
    ?>
    <?php 
} else {
    ?>
    <?php 
    echo t("on %date_time,  <a href=\"%url\">%name</a> said", array("date_time" => gallery::date_time($comment->created), "url" => user_profile::url($comment->author_id), "name" => html::clean($comment->author_name())));
    ?>
    <?php 
}
?>
  </p>
  <div>
  <?php 
echo nl2br(html::purify($comment->text));
?>
  </div>
  <?php 
if ($comment->state == "unpublished") {
    ?>
  <b> <?php 
    echo t("Your comment is held for moderation. The site moderator will review and publish it.");
开发者ID:sandadze,项目名称:gallery3,代码行数:31,代码来源:comment.html.php

示例13: date

	<td>
		<a href="<?php 
        echo url::site("admin/user_info/lookupip?ip={$myData->ip_address}");
        ?>
" target="_blank"><?php 
        echo html::clean($myData->ip_address);
        ?>
 </a>	
	</td>

	<td>
		<?php 
        if ($use_default_gallery_date_format == "Yes") {
            ?>
			<?php 
            echo gallery::date_time($myData->time_stamp);
            ?>
		<?php 
        } else {
            echo date($date_format, $myData->time_stamp);
        }
        ?>
	</td>

	<td>
		<?php 
        switch ($myData->action) {
            case "Failed Login":
                echo "<font color={$color_failed_login}>";
                echo $myData->action;
                echo "</font>";
开发者ID:webmatter,项目名称:gallery3-contrib,代码行数:31,代码来源:admin_block_user_info.html.php

示例14: 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

示例15: foreach

        <th>Bestelstatus</th>
        <th>Gebeurtenis</th>
        <th>Datum/tijd</th>
      </tr>     
    <?php 
foreach ($order_logs as $i => $order_log) {
    ?>
      <tr>
        <td><?php 
    echo basket::getOrderPrefix() . $order_log->id;
    ?>
</td>
        <td><?php 
    echo $order_log->status();
    ?>
</td>
        <td><?php 
    echo $order_log->event();
    ?>
</td>
        <td><?php 
    echo gallery::date_time($order_log->timestamp);
    ?>
</td>
      </tr>     
    <?php 
}
?>
  </table>
</div>
开发者ID:rledisez,项目名称:gallery3-contrib,代码行数:30,代码来源:view_order_logs.html.php


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