本文整理汇总了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');