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