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


PHP feed_has_icon函数代码示例

本文整理汇总了PHP中feed_has_icon函数的典型用法代码示例。如果您正苦于以下问题:PHP feed_has_icon函数的具体用法?PHP feed_has_icon怎么用?PHP feed_has_icon使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: api_get_feeds

 static function api_get_feeds($cat_id, $unread_only, $limit, $offset, $include_nested = false)
 {
     $feeds = array();
     /* Labels */
     if ($cat_id == -4 || $cat_id == -2) {
         $counters = getLabelCounters(true);
         foreach (array_values($counters) as $cv) {
             $unread = $cv["counter"];
             if ($unread || !$unread_only) {
                 $row = array("id" => (int) $cv["id"], "title" => $cv["description"], "unread" => $cv["counter"], "cat_id" => -2);
                 array_push($feeds, $row);
             }
         }
     }
     /* Virtual feeds */
     if ($cat_id == -4 || $cat_id == -1) {
         foreach (array(-1, -2, -3, -4, -6, 0) as $i) {
             $unread = getFeedUnread($i);
             if ($unread || !$unread_only) {
                 $title = getFeedTitle($i);
                 $row = array("id" => $i, "title" => $title, "unread" => $unread, "cat_id" => -1);
                 array_push($feeds, $row);
             }
         }
     }
     /* Child cats */
     if ($include_nested && $cat_id) {
         $result = db_query("SELECT\n\t\t\t\t\tid, title FROM ttrss_feed_categories\n\t\t\t\t\tWHERE parent_cat = '{$cat_id}' AND owner_uid = " . $_SESSION["uid"] . " ORDER BY id, title");
         while ($line = db_fetch_assoc($result)) {
             $unread = getFeedUnread($line["id"], true) + getCategoryChildrenUnread($line["id"]);
             if ($unread || !$unread_only) {
                 $row = array("id" => (int) $line["id"], "title" => $line["title"], "unread" => $unread, "is_cat" => true);
                 array_push($feeds, $row);
             }
         }
     }
     /* Real feeds */
     if ($limit) {
         $limit_qpart = "LIMIT {$limit} OFFSET {$offset}";
     } else {
         $limit_qpart = "";
     }
     if ($cat_id == -4 || $cat_id == -3) {
         $result = db_query("SELECT\n\t\t\t\t\tid, feed_url, cat_id, title, order_id, " . SUBSTRING_FOR_DATE . "(last_updated,1,19) AS last_updated\n\t\t\t\t\t\tFROM ttrss_feeds WHERE owner_uid = " . $_SESSION["uid"] . " ORDER BY cat_id, title " . $limit_qpart);
     } else {
         if ($cat_id) {
             $cat_qpart = "cat_id = '{$cat_id}'";
         } else {
             $cat_qpart = "cat_id IS NULL";
         }
         $result = db_query("SELECT\n\t\t\t\t\tid, feed_url, cat_id, title, order_id, " . SUBSTRING_FOR_DATE . "(last_updated,1,19) AS last_updated\n\t\t\t\t\t\tFROM ttrss_feeds WHERE\n\t\t\t\t\t\t{$cat_qpart} AND owner_uid = " . $_SESSION["uid"] . " ORDER BY cat_id, title " . $limit_qpart);
     }
     while ($line = db_fetch_assoc($result)) {
         $unread = getFeedUnread($line["id"]);
         $has_icon = feed_has_icon($line['id']);
         if ($unread || !$unread_only) {
             $row = array("feed_url" => $line["feed_url"], "title" => $line["title"], "id" => (int) $line["id"], "unread" => (int) $unread, "has_icon" => $has_icon, "cat_id" => (int) $line["cat_id"], "last_updated" => (int) strtotime($line["last_updated"]), "order_id" => (int) $line["order_id"]);
             array_push($feeds, $row);
         }
     }
     return $feeds;
 }
开发者ID:Verisor,项目名称:tt-rss,代码行数:62,代码来源:api.php

示例2: getFeedCounters

function getFeedCounters($active_feed = false)
{
    $ret_arr = array();
    $query = "SELECT ttrss_feeds.id,\n\t\t\t\tttrss_feeds.title,\n\t\t\t\t" . SUBSTRING_FOR_DATE . "(ttrss_feeds.last_updated,1,19) AS last_updated,\n\t\t\t\tlast_error, value AS count\n\t\t\tFROM ttrss_feeds, ttrss_counters_cache\n\t\t\tWHERE ttrss_feeds.owner_uid = " . $_SESSION["uid"] . "\n\t\t\t\tAND ttrss_counters_cache.owner_uid = ttrss_feeds.owner_uid\n\t\t\t\tAND ttrss_counters_cache.feed_id = id";
    $result = db_query($query);
    while ($line = db_fetch_assoc($result)) {
        $id = $line["id"];
        $count = $line["count"];
        $last_error = htmlspecialchars($line["last_error"]);
        $last_updated = make_local_datetime($line['last_updated'], false);
        $has_img = feed_has_icon($id);
        if (date('Y') - date('Y', strtotime($line['last_updated'])) > 2) {
            $last_updated = '';
        }
        $cv = array("id" => $id, "updated" => $last_updated, "counter" => (int) $count, "has_img" => (int) $has_img);
        if ($last_error) {
            $cv["error"] = $last_error;
        }
        //			if (get_pref('EXTENDED_FEEDLIST'))
        //				$cv["xmsg"] = getFeedArticles($id)." ".__("total");
        if ($active_feed && $id == $active_feed) {
            $cv["title"] = truncate_string($line["title"], 30);
        }
        array_push($ret_arr, $cv);
    }
    return $ret_arr;
}
开发者ID:nota-ja,项目名称:tt-rss,代码行数:27,代码来源:functions.php

示例3: format_headlines_list


//.........这里部分代码省略.........
                 $class .= " published";
             } else {
                 $published_pic = "<img src=\"images/pub_unset.png\"\n\t\t\t\t\t\tclass=\"pubPic\"\n\t\t\t\t\t\talt=\"Publish article\" onclick='togglePub({$id})'>";
             }
             #				$content_link = "<a target=\"_blank\" href=\"".$line["link"]."\">" .
             #					$line["title"] . "</a>";
             #				$content_link = "<a
             #					href=\"" . htmlspecialchars($line["link"]) . "\"
             #					onclick=\"view($id,$feed_id);\">" .
             #					$line["title"] . "</a>";
             #				$content_link = "<a href=\"javascript:viewContentUrl('".$line["link"]."');\">" .
             #					$line["title"] . "</a>";
             $updated_fmt = make_local_datetime($line["updated"], false);
             $date_entered_fmt = T_sprintf("Imported at %s", make_local_datetime($line["date_entered"], false));
             $score = $line["score"];
             $score_pic = "images/" . get_score_pic($score);
             /*				$score_title = __("(Click to change)");
             				$score_pic = "<img class='hlScorePic' src=\"images/$score_pic\"
             					onclick=\"adjustArticleScore($id, $score)\" title=\"$score $score_title\">"; */
             $score_pic = "<img class='hlScorePic' score='{$score}' onclick='changeScore({$id}, this)' src=\"{$score_pic}\"\n\t\t\t\t\ttitle=\"{$score}\">";
             if ($score > 500) {
                 $hlc_suffix = "high";
             } else {
                 if ($score < -100) {
                     $hlc_suffix = "low";
                 } else {
                     $hlc_suffix = "";
                 }
             }
             $entry_author = $line["author"];
             if ($entry_author) {
                 $entry_author = " &mdash; {$entry_author}";
             }
             $has_feed_icon = feed_has_icon($feed_id);
             if ($has_feed_icon) {
                 $feed_icon_img = "<img class=\"tinyFeedIcon\" src=\"" . ICONS_URL . "/{$feed_id}.ico\" alt=\"\">";
             } else {
                 $feed_icon_img = "<img class=\"tinyFeedIcon\" src=\"images/pub_set.png\" alt=\"\">";
             }
             $entry_site_url = $line["site_url"];
             //setting feed headline background color, needs to change text color based on dark/light
             $fav_color = $line['favicon_avg_color'];
             require_once "colors.php";
             if ($fav_color && $fav_color != 'fail') {
                 if (!isset($rgba_cache[$feed_id])) {
                     $rgba_cache[$feed_id] = join(",", _color_unpack($fav_color));
                 }
             }
             if (!get_pref('COMBINED_DISPLAY_MODE')) {
                 if ($vfeed_group_enabled) {
                     if ($feed_id != $vgroup_last_feed && $line["feed_title"]) {
                         $cur_feed_title = $line["feed_title"];
                         $vgroup_last_feed = $feed_id;
                         $cur_feed_title = htmlspecialchars($cur_feed_title);
                         $vf_catchup_link = "<a class='catchup' onclick='catchupFeedInGroup({$feed_id});' href='#'>" . __('mark feed as read') . "</a>";
                         $reply['content'] .= "<div id='FTITLE-{$feed_id}' class='cdmFeedTitle'>" . "<div style='float : right'>{$feed_icon_img}</div>" . "<a class='title' href=\"#\" onclick=\"viewfeed({$feed_id})\">" . $line["feed_title"] . "</a>\n\t\t\t\t\t\t\t\t{$vf_catchup_link}</div>";
                     }
                 }
                 $mouseover_attrs = "onmouseover='postMouseIn(event, {$id})'\n\t\t\t\t\t\tonmouseout='postMouseOut({$id})'";
                 $reply['content'] .= "<div class='hl {$class}' orig-feed-id='{$feed_id}' id='RROW-{$id}' {$mouseover_attrs}>";
                 $reply['content'] .= "<div class='hlLeft'>";
                 $reply['content'] .= "<input dojoType=\"dijit.form.CheckBox\"\n\t\t\t\t\t\t\ttype=\"checkbox\" onclick=\"toggleSelectRow2(this)\"\n\t\t\t\t\t\t\tclass='rchk'>";
                 $reply['content'] .= "{$marked_pic}";
                 $reply['content'] .= "{$published_pic}";
                 $reply['content'] .= "</div>";
                 $reply['content'] .= "<div onclick='return hlClicked(event, {$id})'\n\t\t\t\t\t\tclass=\"hlTitle\"><span class='hlContent {$hlc_suffix}'>";
开发者ID:zamentur,项目名称:ttrss_ynh,代码行数:67,代码来源:feeds.php

示例4: format_headlines_list


//.........这里部分代码省略.........
                 $published_pic = "<img id=\"FPPIC-{$id}\" src=\"" . theme_image($this->link, 'images/pub_unset.png') . "\"\r\n\t\t\t\t\t\tclass=\"markedPic\"\r\n\t\t\t\t\t\talt=\"Publish article\" onclick='javascript:togglePub({$id})'>";
             }
             #				$content_link = "<a target=\"_blank\" href=\"".$line["link"]."\">" .
             #					$line["title"] . "</a>";
             #				$content_link = "<a
             #					href=\"" . htmlspecialchars($line["link"]) . "\"
             #					onclick=\"view($id,$feed_id);\">" .
             #					$line["title"] . "</a>";
             #				$content_link = "<a href=\"javascript:viewContentUrl('".$line["link"]."');\">" .
             #					$line["title"] . "</a>";
             $updated_fmt = make_local_datetime($this->link, $line["updated_noms"], false);
             if (get_pref($this->link, 'SHOW_CONTENT_PREVIEW')) {
                 $content_preview = truncate_string(strip_tags($line["content_preview"]), 100);
             }
             $score = $line["score"];
             $score_pic = theme_image($this->link, "images/" . get_score_pic($score));
             /*				$score_title = __("(Click to change)");
             				$score_pic = "<img class='hlScorePic' src=\"images/$score_pic\"
             					onclick=\"adjustArticleScore($id, $score)\" title=\"$score $score_title\">"; */
             $score_pic = "<img class='hlScorePic' src=\"{$score_pic}\"\r\n\t\t\t\t\ttitle=\"{$score}\">";
             if ($score > 500) {
                 $hlc_suffix = "H";
             } else {
                 if ($score < -100) {
                     $hlc_suffix = "L";
                 } else {
                     $hlc_suffix = "";
                 }
             }
             $entry_author = $line["author"];
             if ($entry_author) {
                 $entry_author = " - {$entry_author}";
             }
             $has_feed_icon = feed_has_icon($feed_id);
             if ($has_feed_icon) {
                 $feed_icon_img = "<img class=\"tinyFeedIcon\" src=\"" . ICONS_URL . "/{$feed_id}.ico\" alt=\"\">";
             } else {
                 $feed_icon_img = "<img class=\"tinyFeedIcon\" src=\"images/feed-icon-12x12.png\" alt=\"\">";
             }
             if (!get_pref($this->link, 'COMBINED_DISPLAY_MODE')) {
                 if (get_pref($this->link, 'VFEED_GROUP_BY_FEED')) {
                     if ($feed_id != $vgroup_last_feed && $line["feed_title"]) {
                         $cur_feed_title = $line["feed_title"];
                         $vgroup_last_feed = $feed_id;
                         $cur_feed_title = htmlspecialchars($cur_feed_title);
                         $vf_catchup_link = "(<a onclick='catchupFeedInGroup({$feed_id});' href='#'>" . __('mark as read') . "</a>)";
                         $reply['content'] .= "<div class='cdmFeedTitle'>" . "<div style=\"float : right\">{$feed_icon_img}</div>" . "<a href=\"#\" onclick=\"viewfeed({$feed_id})\">" . $line["feed_title"] . "</a> {$vf_catchup_link}</div>";
                     }
                 }
                 $mouseover_attrs = "onmouseover='postMouseIn({$id})'\r\n\t\t\t\t\t\tonmouseout='postMouseOut({$id})'";
                 $reply['content'] .= "<div class='{$class}' id='RROW-{$id}' {$mouseover_attrs}>";
                 $reply['content'] .= "<div class='hlUpdPic'>{$update_pic}</div>";
                 $reply['content'] .= "<div class='hlLeft'>";
                 $reply['content'] .= "<input type=\"checkbox\" onclick=\"tSR(this)\"\r\n\t\t\t\t\t\t\tid=\"RCHK-{$id}\">";
                 $reply['content'] .= "{$marked_pic}";
                 $reply['content'] .= "{$published_pic}";
                 $reply['content'] .= "</div>";
                 $reply['content'] .= "<div onclick='return hlClicked(event, {$id})'\r\n\t\t\t\t\t\tclass=\"hlTitle\"><span class='hlContent{$hlc_suffix}'>";
                 $reply['content'] .= "<a id=\"RTITLE-{$id}\"\r\n\t\t\t\t\t\thref=\"" . htmlspecialchars($line["link"]) . "\"\r\n\t\t\t\t\t\tonclick=\"\">" . truncate_string($line["title"], 200);
                 if (get_pref($this->link, 'SHOW_CONTENT_PREVIEW')) {
                     if ($content_preview) {
                         $reply['content'] .= "<span class=\"contentPreview\"> - {$content_preview}</span>";
                     }
                 }
                 $reply['content'] .= "</a></span>";
                 $reply['content'] .= $labels_str;
开发者ID:nvdnkpr,项目名称:Tiny-Tiny-RSS,代码行数:67,代码来源:feeds.php

示例5: outputHeadlinesList


//.........这里部分代码省略.........
            #					href=\"" . htmlspecialchars($line["link"]) . "\"
            #					onclick=\"view($id,$feed_id);\">" .
            #					$line["title"] . "</a>";
            #				$content_link = "<a href=\"javascript:viewContentUrl('".$line["link"]."');\">" .
            #					$line["title"] . "</a>";
            if (get_pref($link, 'HEADLINES_SMART_DATE')) {
                $updated_fmt = smart_date_time(strtotime($line["updated_noms"]));
            } else {
                $short_date = get_pref($link, 'SHORT_DATE_FORMAT');
                $updated_fmt = date($short_date, strtotime($line["updated_noms"]));
            }
            if (get_pref($link, 'SHOW_CONTENT_PREVIEW')) {
                $content_preview = truncate_string(strip_tags($line["content_preview"]), 100);
            }
            $score = $line["score"];
            $score_pic = theme_image($link, "images/" . get_score_pic($score));
            /*				$score_title = __("(Click to change)");
            				$score_pic = "<img class='hlScorePic' src=\"images/$score_pic\" 
            					onclick=\"adjustArticleScore($id, $score)\" title=\"$score $score_title\">"; */
            $score_pic = "<img class='hlScorePic' src=\"{$score_pic}\" \n\t\t\t\t\ttitle=\"{$score}\">";
            if ($score > 500) {
                $hlc_suffix = "H";
            } else {
                if ($score < -100) {
                    $hlc_suffix = "L";
                } else {
                    $hlc_suffix = "";
                }
            }
            $entry_author = $line["author"];
            if ($entry_author) {
                $entry_author = " - {$entry_author}";
            }
            $has_feed_icon = feed_has_icon($feed_id);
            if ($has_feed_icon) {
                $feed_icon_img = "<img class=\"tinyFeedIcon\" src=\"" . ICONS_URL . "/{$feed_id}.ico\" alt=\"\">";
            } else {
                //$feed_icon_img = "<img class=\"tinyFeedIcon\" src=\"images/blank_icon.gif\" alt=\"\">";
                $feed_icon_img = "";
            }
            if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) {
                if (get_pref($link, 'VFEED_GROUP_BY_FEED')) {
                    if ($feed_id != $vgroup_last_feed && $line["feed_title"]) {
                        $cur_feed_title = $line["feed_title"];
                        $vgroup_last_feed = $feed_id;
                        $cur_feed_title = htmlspecialchars($cur_feed_title);
                        $vf_catchup_link = "(<a onclick='javascript:catchupFeedInGroup({$feed_id});' href='#'>" . __('mark as read') . "</a>)";
                        print "<tr class='feedTitle'><td colspan='7'>" . "<div style=\"float : right\">{$feed_icon_img}</div>" . "<a href=\"javascript:viewfeed({$feed_id}, '', false)\">" . $line["feed_title"] . "</a> {$vf_catchup_link}</td></tr>";
                    }
                }
                $mouseover_attrs = "onmouseover='postMouseIn({$id})' \n\t\t\t\t\t\tonmouseout='postMouseOut({$id})'";
                print "<tr class='{$class}' id='RROW-{$id}' {$mouseover_attrs}>";
                print "<td class='hlUpdPic'>{$update_pic}</td>";
                print "<td class='hlSelectRow'>\n\t\t\t\t\t\t<input type=\"checkbox\" onclick=\"tSR(this)\"\n\t\t\t\t\t\t\tid=\"RCHK-{$id}\">\n\t\t\t\t\t\t</td>";
                print "<td class='hlMarkedPic'>{$marked_pic}</td>";
                print "<td class='hlMarkedPic'>{$published_pic}</td>";
                #					if ($line["feed_title"]) {
                #						print "<td class='hlContent'>$content_link</td>";
                #						print "<td class='hlFeed'>
                #							<a href=\"javascript:viewfeed($feed_id, '', false)\">".
                #								truncate_string($line["feed_title"],30)."</a>&nbsp;</td>";
                #					} else {
                print "<td onclick='view({$id})' class='hlContent{$hlc_suffix}' valign='middle' id='HLC-{$id}'>";
                print "<a id=\"RTITLE-{$id}\" \n\t\t\t\t\t\thref=\"" . htmlspecialchars($line["link"]) . "\"\n\t\t\t\t\t\tonclick=\"return false\">" . $line["title"];
                if (get_pref($link, 'SHOW_CONTENT_PREVIEW')) {
                    if ($content_preview) {
开发者ID:wangroot,项目名称:Tiny-Tiny-RSS,代码行数:67,代码来源:functions.php


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