本文整理汇总了PHP中tag::get_tags方法的典型用法代码示例。如果您正苦于以下问题:PHP tag::get_tags方法的具体用法?PHP tag::get_tags怎么用?PHP tag::get_tags使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tag
的用法示例。
在下文中一共展示了tag::get_tags方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _generate_tags
private static function _generate_tags()
{
$tags = tag::get_tags();
$robotstxt = "";
foreach ($tags as $key => $var) {
if (strlen($var["tag_for_url"]) > 0) {
$robotstxt .= "Allow: /" . _("quotes") . "/" . _("tags") . "/" . $var["tag_for_url"] . "\n";
}
}
$tags_index = tag::get_tag_index();
foreach ($tags_index as $key => $var) {
$robotstxt .= "Disallow: /" . _("quotes") . "/" . _("tags") . "/" . $var . "/\n";
}
return $robotstxt;
}
示例2: _generate_tags
function _generate_tags()
{
global $config_q;
$out = "";
$ca = new tag();
$tags = tag::get_tags();
foreach ($tags as $key => $var) {
$out .= "<url>" . "\n";
$out .= " <loc>" . $config_q["baseurl"] . "/" . _("quotes") . "/" . _("tags") . "/" . $var["tag_for_url"] . "</loc>\n";
$out .= " <priority>0.80</priority>\n";
$out .= " <lastmod>" . date("Y-m-d\\T07:28:24+00:00", time()) . "</lastmod>\n";
$out .= " <changefreq>daily</changefreq>\n";
$out .= "</url>\n";
}
return $out;
}
示例3: item_index_data
static function item_index_data($item)
{
return join(" ", tag::get_tags($item));
}
示例4: _
*/
case "quotes-tags":
$smarty_q->assign("h1", "Quotations by " . _("tags"));
$smarty_q->assign("fake_h1", "Quotations by " . _("tags"));
break;
case "quotes-tags-%tag_index%":
$context["h1"] = "";
$context["fake_h1"] = _("Tag category") . ": " . utf8_strtoupper($a_path[2]);
if($a_path[2]=="-") {
$quotes_temp = quote::get_quotes(array(
"tag" => ""
));
$context["quotes"] = $quotes_temp;
} else {
$context["taglist"] = tag::get_tags(array(
"char" => $a_path[2],
));
}
break;
case "quotes-tags-%tag%":
$context["robots_index"] = true;
$context["h1"] = str_replace("_", " ", $a_path[2]) . " - " . _("quotes");
$context["fake_h1"] = _("Tag category") . ": " . str_replace("_", " ",$a_path[2]);
$context["description"] = str_replace("_", " ", $a_path[2]) . " - " . _("quotations");
$context["title"] = str_replace("_", " ", $a_path[2]) . " - " . _("quotes");
$quotes_temp = quote::get_quotes(array(
"start" => (navi::get_current_page()-1)*$config_q["quotes_on_page"],
"length" => $config_q["quotes_on_page"],
"order_by" => "created_time asc",
"tag" => $a_path[2],
));
示例5: photo_edit_form
static function photo_edit_form($photo, $form)
{
$tag_value = implode('; ', tag::get_tags($photo));
$form->edit_photo->input("tags")->label(t("Tags ( seperate by , or ; )"))->value($tag_value);
}