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


PHP Blog::getBlogLink方法代码示例

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


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

示例1: Blog

 if ($result2->rows()) {
     $headerPrinted = false;
     for ($j = 0; list($blogId) = $result2->fetchrow_array(); $j++) {
         $blogIndex = new Blog($blogId);
         if ($blogIndex->hasReadPermission()) {
             if (!$headerPrinted) {
                 if (!empty($category)) {
                     printSubsectionHeader($category);
                 }
                 $headerPrinted = true;
                 echo "<table width=\"100%\">";
             }
             echo "<tr>";
             echo "<td height=\"60\" valign=\"top\" width=\"50\">";
             if (file_exists(scriptPath . "/" . folderUploadedFiles . "/blog_" . $blogIndex->id . ".jpg")) {
                 echo "<a href=\"" . $blogIndex->getBlogLink() . "\"><img src=\"" . scriptUrl . "/" . folderUploadedFiles . "/blog_" . $blogIndex->id . ".jpg\" height=\"50\" width=\"50\" border=\"0\" alt=\"" . $blogIndex->title . "\" title=\"" . $blogIndex->title . "\" class=\"border\" /></a>";
             } else {
                 echo "<a href=\"" . $blogIndex->getBlogLink() . "\"><img src=\"" . iconUrl . "/picture5050.gif\" height=\"50\" width=\"50\" border=\"0\" alt=\"" . $blogIndex->title . "\" title=\"" . $blogIndex->title . "\" class=\"border\" /></a>";
             }
             echo "</td>";
             echo "<td valign=\"top\" height=\"35\" width=\"100%\">";
             echo "<a href=\"" . $blogIndex->getBlogLink() . "\"><b>" . (!empty($blogIndex->title) ? $blogIndex->title : "&nbsp;") . "</b> (" . $blogIndex->getNumberOfPosts() . ")</a><br />";
             echo !empty($blogIndex->description) ? $blogIndex->description : $lBlogIndex["NoDescription"];
             if ($blogIndex->hasEditPermission()) {
                 echo " <span class=\"small1\">";
                 if ($result2->rows() > 1) {
                     echo " <a href=\"" . scriptUrl . "/" . folderBlog . "/index.php?blogId=" . $blogIndex->id . "&amp;up=1\">" . $lBlogIndex["MoveUp"] . "</a>";
                     echo " <a href=\"" . scriptUrl . "/" . folderBlog . "/index.php?blogId=" . $blogIndex->id . "&amp;down=1\">" . $lBlogIndex["MoveDown"] . "</a>";
                 }
                 echo " <a href=\"" . scriptUrl . "/" . folderBlog . "/" . fileBlogEdit . "?blogId=" . $blogIndex->id . "&amp;return=1\">" . $lBlogIndex["EditBlog"] . "</a>";
                 echo "</span>";
开发者ID:gkathir15,项目名称:catmis,代码行数:31,代码来源:index.php

示例2: Blog

if (!empty($post->id)) {
    $blog = $post->blog;
} else {
    if (!empty($_GET["blogId"])) {
        $blog = new Blog($_GET["blogId"]);
    }
}
if (!empty($blog->id)) {
    // Include language
    include scriptPath . "/" . folderBlog . "/include/language/" . $blog->language . "/general.php";
    // Get the post list
    $items = array();
    $result = $dbi->query("SELECT id,moduleContentId FROM " . commentTableName . " WHERE moduleId=" . $dbi->quote(blogModuleId) . " AND moduleContentTypeId=" . $dbi->quote(blogPostContentId) . " AND spam='0' AND " . (!empty($post->id) ? "moduleContentId=" . $dbi->quote($post->id) : "moduleContentId IN(SELECT Id FROM " . blogPostTableName . " WHERE blogId=" . $dbi->quote($blog->id) . " AND draft=0)") . " ORDER BY posted DESC LIMIT 15");
    for ($i = 0; list($id, $postId) = $result->fetchrow_array(); $i++) {
        $comment = new Comment($id);
        // Get name of user
        $name = "";
        if (!empty($comment->userId)) {
            $user = new User($comment->userId);
            $name = $user->name;
        } else {
            $name = $comment->name;
        }
        // Create new item
        $item = new RSSItem($comment->id, $name, array(), "", "", scriptUrl . "/" . folderBlog . "/" . fileBlogPost . "?postId=" . $postId . "#comments", $comment->message, "", $comment->posted, $comment->subject);
        $items[] = $item;
    }
    // Print feed
    $rss = new RSS($blog->title . " - " . $lComment["Header"], $blog->description, $blog->getBlogLink(), scriptUrl . "/" . folderBlog . "/" . fileBlogCommentRSS . "?blogId=" . $blog->id, $items);
    $rss->printRSSFeed();
}
开发者ID:gkathir15,项目名称:catmis,代码行数:31,代码来源:comments.php

示例3: getLink

 /**
  * Get link to given blog.
  * @param	$id	Identifier of blog.
  * @return	Link to given blog.
  */
 function getLink($id = "")
 {
     if (!empty($id)) {
         $blog = new Blog($id);
         return $blog->getBlogLink();
     }
     return scriptUrl . "/" . folderBlog;
 }
开发者ID:gkathir15,项目名称:catmis,代码行数:13,代码来源:Blog.class.php

示例4: Blog

// Include common functions and declarations
require_once "../../include/common.php";
require_once "../include/config.php";
// Create blog object
$blog = new Blog(!empty($_GET["blogId"]) ? $_GET["blogId"] : 0);
if (!empty($blog->id)) {
    // Include language
    include scriptPath . "/" . folderBlog . "/include/language/" . $blog->language . "/general.php";
    // Protect page
    if (!empty($blog->userlevel)) {
        protectPage($blog->userlevel);
    }
    // Get the post list
    $items = array();
    $result = $dbi->query("SELECT id FROM " . blogPostTableName . " WHERE blogId=" . $blog->id . " AND draft=0 ORDER BY posted DESC LIMIT 15");
    for ($i = 0; list($id) = $result->fetchrow_array(); $i++) {
        $post = new Post($id);
        // Get categories
        $categories = array();
        for ($i = 0; $i < sizeof($post->categories); $i++) {
            $categories[] = $post->categories[$i][1];
        }
        // Create new item
        $item = new RSSItem($post->id, $post->user->name, $categories, $post->getPostLink() . "#comments", scriptUrl . "/" . folderBlog . "/" . fileBlogCommentRSS . "?postId=" . $post->id, $post->getPostLink(), stripHtml(!empty($post->text) ? $post->text : $post->summary), $post->printRSSPostSummary(), $post->posted, $post->subject);
        $items[] = $item;
    }
    // Print feed
    $rss = new RSS($blog->title, $blog->description, $blog->getBlogLink(), scriptUrl . "/" . folderBlog . "/" . fileBlogPostRSS . "?blogId=" . $blog->id, $items);
    $rss->printRSSFeed();
}
开发者ID:gkathir15,项目名称:catmis,代码行数:30,代码来源:posts.php


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