當前位置: 首頁>>代碼示例>>PHP>>正文


PHP category::get_categories方法代碼示例

本文整理匯總了PHP中category::get_categories方法的典型用法代碼示例。如果您正苦於以下問題:PHP category::get_categories方法的具體用法?PHP category::get_categories怎麽用?PHP category::get_categories使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在category的用法示例。


在下文中一共展示了category::get_categories方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: _

	case "manage_waitinglist":
		$smarty_q->assign("h1", "");
		$smarty_q->assign("fake_h1", _("Quotation waitinglist"));
		$smarty_q->assign ("quotes", quote::get_from_waitinglist());
		arr(quote::get_from_waitinglist());
	break;
	// A temporary solution to activate quotations
	case "manage_not_active_quotations":
		acl();
		if (isset($_POST["manage_not_active_quotations"]))
		{
			quote::set_random_quote($_POST);
		}
		$smarty_q->assign("h1", "");
		$smarty_q->assign("fake_h1", _("Activate random quote"));
		$smarty_q->assign("categories", category::get_categories());
		$smarty_q->assign("manage_not_active_quotations", true);
		$quotes_temp = quote::get_random_quote();
		//arr($quotes_temp);
		$smarty_q->assign("id", $quotes_temp[0]["id"]);
		$smarty_q->assign("q_id", $quotes_temp[0]["q_id"]);
		$smarty_q->assign("quote", $quotes_temp[0]["quote"]);
		$smarty_q->assign("tag", $quotes_temp[0]["tag"]);
		$smarty_q->assign("author_id", $quotes_temp[0]["author_id"]);
		$smarty_q->assign("author_name", $quotes_temp[0]["author_name"]);
		$smarty_q->assign("category_id", $quotes_temp[0]["category_id"]);
		$smarty_q->assign("author_born_death", $quotes_temp[0]["author_born_death"]);
		$smarty_q->assign("source_title_original", $quotes_temp[0]["source_title_original"]);
		$smarty_q->assign("author_firstname_et", $quotes_temp[0]["author_firstname_et"]);
		$smarty_q->assign("author_firstname_en", $quotes_temp[0]["author_firstname_en"]);
		$smarty_q->assign("author_firstname_de", $quotes_temp[0]["author_firstname_de"]);
開發者ID:hkirsman,項目名稱:tsitaat_com,代碼行數:31,代碼來源:index.php

示例2: _

	//$smarty_q->assign ("for_nerds", _("For nerds :)"));
  $context["for_nerds"] = _("For nerds :)");
	//$smarty_q->assign ("lang", substr($config_q["locale"], 0, 2));
  $context["lang"] = substr($config_q["locale"], 0, 2);
	//$smarty_q->assign ("rpx_language_preference", $config_q["rpx"]["language_preference"]);
	//$smarty_q->assign ("quotes2", _("quotes"));
	//$smarty_q->assign ("authors2", _("authors"));
	//$smarty_q->assign ("sources2", _("sources"));
  //$smarty_q->assign ("tags2", _("tags"));
	//$smarty_q->assign ("about_quotebook", _("About QuoteBook24.com "));
	//$smarty_q->assign ("section", $section);
  $context["section"] = $section;
	if ($user->data["user_id"]==2)
	{
    $context["admin"] = true;
    $context["categories"] = $category->get_categories();
	}
  $context["username"] = $user->data["username"];
  $context["username_clean"] = $user->data["username_clean"];
  $context["user_id"] = $user->data["user_id"];
  //$smarty_q->assign ("user_type", $user->data["user_type"]);
  //$smarty_q->assign ("group_id", $user->data["group_id"]);
	//$smarty_q->assign ("robots_index", false);

	//$smarty_q->assign ("keywords", _("quotes, quotations, world"));
	//$smarty_q->assign ("author_index", author::get_author_index());
  $context["author_index"] = author::get_author_index();
	//$smarty_q->author_index ("tag_index", tag::get_tag_index());
  $context["tag_index"] = tag::get_tag_index();
  //$smarty_q->assign ("category_index", category::get_categories());
	//$smarty_q->assign ("a_path", $a_path);
開發者ID:hkirsman,項目名稱:tsitaat_com,代碼行數:31,代碼來源:init.php


注:本文中的category::get_categories方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。