本文整理汇总了PHP中ajax::get_quote_for_facebook方法的典型用法代码示例。如果您正苦于以下问题:PHP ajax::get_quote_for_facebook方法的具体用法?PHP ajax::get_quote_for_facebook怎么用?PHP ajax::get_quote_for_facebook使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ajax
的用法示例。
在下文中一共展示了ajax::get_quote_for_facebook方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ajax
function ajax()
{
global $user, $tenjin, $config_q;
if ($_GET["vote_for"] == 1) {
echo quote::vote_for(array("quote_id" => $_GET["q_id"], "user_id" => $user->data["user_id"], "ip" => $_SERVER['REMOTE_ADDR']));
} else {
if ($_GET["vote_against"] == 1) {
echo quote::vote_against(array("quote_id" => $_GET["q_id"], "user_id" => $user->data["user_id"], "ip" => $_SERVER['REMOTE_ADDR']));
/*
$cv = new vote(array(
"quote_id" => $_GET["q_id"],
"user_id" => $user->data["user_id"],
"ip" => $_SERVER['REMOTE_ADDR'],
));
$cv->vote_for();
*/
}
}
if ($_GET["get_quote_for_facebook"] == 1) {
echo ajax::get_quote_for_facebook($_GET["q_id"]);
}
if ($_GET["get_quotes_for_facebook"] == 1) {
quote::get_random_quotes_for_facebook();
die;
}
/* a strange kind of acl but ok
from here on you have to have permissions
*/
if (!can_access()) {
return true;
}
if ($_GET["dialog__add_quote"] == 1) {
$tenjin_template = $config_q["template_dir"] . '/dialog__add_quote.phtml';
$output = $tenjin->render($tenjin_template, $context);
echo $output;
} elseif ($_GET["get_tags"] == 1) {
/*$this->format_tags_as_links(array(
"tags" => $_POST["tags"],
));*/
} elseif ($_GET["format_tags_as_links"] == 1) {
$tag = new tag();
echo $tag->format_tags_as_links($_POST["tags"]);
} elseif ($_GET["set_tags"] == 1) {
$this->set_tags(array("tags" => $_POST["tags"], "q_id" => $_POST["q_id"]));
} elseif ($_GET["get_quote"] == 1) {
echo "get_quote";
} elseif ($_GET["set_quote"] == 1) {
echo "set_quote";
} elseif ($_GET["get_category"] == 1) {
$this->get_category(array("category_id" => $_POST["category_id"], "q_id" => $_POST["q_id"]));
} elseif ($_GET["set_category"] == 1) {
$this->set_category(array("category_id" => $_POST["category_id"], "q_id" => $_POST["q_id"]));
}
}