本文整理匯總了PHP中phpFlickr::resetComments方法的典型用法代碼示例。如果您正苦於以下問題:PHP phpFlickr::resetComments方法的具體用法?PHP phpFlickr::resetComments怎麽用?PHP phpFlickr::resetComments使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類phpFlickr
的用法示例。
在下文中一共展示了phpFlickr::resetComments方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: urlencode
/* Admin Area */
/* Note : this plugin is not an 'admin' plugin since it requires 'normal' features to be executed from a distant website (cron jobs) */
$site_url = $cfgrow['siteurl'];
$flickr_content = "";
/* Update Auto-Update Status */
if (isset($_POST['flickr_settings_update']) && isset($_POST['state'])) {
$flickr_content .= " <b><font color='red'>" . file_get_contents($service_url . '?action=manage_subscription&state=' . $_POST['state'] . '&url=' . urlencode($site_url)) . "</font></b><br/>";
if ($_POST['state']) {
$flickr_comments_update = "all";
}
}
/* Reset */
if (isset($_POST['flickr_comments_remove'])) {
require_once "phpFlickr/phpFlickr.php";
$f = new phpFlickr($api_key);
$flickr_content .= $f->resetComments();
}
/* Retrieve comments */
if (isset($_POST['flickr_comments_update'])) {
$flickr_id = trim($_POST['f_id']);
if (!empty($flickr_id)) {
$flickr_comments_update = "unique";
} else {
$flickr_comments_update = "all";
}
require_once "phpFlickr/phpFlickr.php";
$f = new phpFlickr($api_key);
$flickr_content .= $f->grabComments($flickr_comments_update, $_POST['f_id']);
}
/* Check for plugin updates */
$last_version = file_get_contents($service_url . '?action=check_update');