Example #1
0
<?php

$this->pageTitle = Yii::app()->name . ' - ' . $model->title;
$sub_data = SiteHelper::subject_content($model, 'array');
$this->ogtags = SiteHelper::get_ogtags($this->pageTitle, $model->content_type_id == 2 ? SiteHelper::subject_content($model) : $model->user_comment, $sub_data['image'], Yii::app()->params['weburl'] . '/sub/' . $model->urn, $sub_data['url']);
/*
 $(document).ready(function() {
});*/
$code = JsHelper::comments_voting();
Yii::app()->clientScript->registerScript('commentsvoting', $code);
$code2 = JsHelper::subject_voting();
Yii::app()->clientScript->registerScript('subjectvoting', $code2);
$code3 = 'var updateSubReadyCheck=setInterval(function(){
if( typeof window.getallData !== "undefined" ) {
	if( typeof window.getallData.session_username !== "undefined" ) {
		if( window.getallData.session_userid == ' . $model->user_id . ') {
			$("#sub_info_column").prepend(\'<div class="detail_section"><h3 class="detail_header">Settings</h3><div style="float:left;">' . CHtml::link(Yii::t('subject', 'updateSubject'), array('subject/update/' . $model->id)) . '</div><div style="float:left; padding-left:10px"><br></div><div class="clear_both"></div></div>\');
		}
	}
	clearInterval(updateSubReadyCheck);
}
},1000);
';
Yii::app()->clientScript->registerScript('updatesub', $code3);
?>

<h1><?php 
echo CHtml::encode($model->title);
?>
</h1>