本文整理匯總了PHP中func::crossposting方法的典型用法代碼示例。如果您正苦於以下問題:PHP func::crossposting方法的具體用法?PHP func::crossposting怎麽用?PHP func::crossposting使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類func
的用法示例。
在下文中一共展示了func::crossposting方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: executeMainPageTrigger
public function executeMainPageTrigger(sfWebRequest $request)
{
sfApplicationConfiguration::getActive()->loadHelpers(array('Partial'));
$this->filename = 'error';
$post = Doctrine::getTable('Post')->find(array($this->getRequestParameter('post_id')));
$admin = sfGuardUser::getAdminUser();
if ($admin && $admin->getProfile()->getUsecrossposting() && urldecode($this->getRequestParameter('login')) == $admin->getProfile()->getLjlogin() && urldecode($this->getRequestParameter('pass')) == $admin->getProfile()->getLjpassword() && $post != null) {
if (!$post->getLj() && $post->getRating() >= sfConfig::get('app_post_mainpage_threshold')) {
func::crossposting($admin->getProfile()->getLjlogin(), $admin->getProfile()->getLjpassword(), get_partial('post/post_lj', array('post' => $post, 'showUsername' => 1)), $post->getMoodNameI18N(), $post->getMoodSmile());
$post->setLj(1);
$post->save();
$this->filename = 'ok';
}
}
return $this->renderPartial('upload', array('filename' => $this->filename));
}
示例2: postInsert
public function postInsert($event)
{
sfApplicationConfiguration::getActive()->loadHelpers('Partial');
try {
if ($this->getUser()->getProfile()->getUsecrossposting()) {
func::crossposting($this->getUser()->getProfile()->getLjlogin(), $this->getUser()->getProfile()->getLjpassword(), get_partial('post/post_lj', array('post' => $this)), $this->getMoodNameI18N(), $this->getMoodSmile());
}
} catch (Exception $e) {
echo $e->getMessage();
}
}