|
@@ -43,9 +43,9 @@ if( isset( $model->dt_pub ) && strtotime( $model->dt_pub ) < strtotime('2015-01-
|
|
|
$retina = $bad;
|
|
|
};
|
|
|
*/
|
|
|
-
|
|
|
+$txt_date = date( "[Y-m-d] ", strtotime( $model->dt_pub ) );
|
|
|
Yii::$app->og->title =($model->meta_title)?$model->meta_title:$model->title;
|
|
|
-Yii::$app->og->description = ($model->lid && trim($model->lid) <> '')?str_replace( '"', """, strip_tags($model->lid) ):trim(str_replace( '"',"'",substr(strip_tags( $model->text ),0,150)))."...";
|
|
|
+Yii::$app->og->description = ($model->lid && trim($model->lid) <> '')?str_replace( '"', """, strip_tags($model->lid) ):$txt_date.trim(str_replace( '"',"'",substr(strip_tags( $model->text ),0,150)))."...";
|
|
|
|
|
|
if( $model->active == 'N' || $model->dt_pub > date("Y-m-d H:i:s") || $model->noindex == 'Y' ){
|
|
|
Yii::$app->og->noindex = 'Y';
|
|
@@ -56,7 +56,7 @@ if( $model->active == 'N' || $model->dt_pub > date("Y-m-d H:i:s") || $model->noi
|
|
|
\Yii::$app->og->og_image = $model->image->url;
|
|
|
\Yii::$app->og->og_type = "article";
|
|
|
\Yii::$app->og->og_title = htmlspecialchars(($model->meta_title)?strip_tags(str_replace( '"',""",$model->meta_title)):strip_tags(str_replace( '"',""",$model->title)));
|
|
|
- \Yii::$app->og->og_description = ($model->lid && trim($model->lid) <> '')?str_replace( '"',""",strip_tags($model->lid)):trim(str_replace( '"',""",substr(strip_tags( $model->text ),0,150)))."...";
|
|
|
+ \Yii::$app->og->og_description = ($model->lid && trim($model->lid) <> '')?str_replace( '"',""",strip_tags($model->lid)):$txt_date.trim(str_replace( '"',""",substr(strip_tags( $model->text ),0,150)))."...";
|
|
|
\Yii::$app->og->dtpub = date( "r", strtotime( $model->dt_pub ) );
|
|
|
}
|
|
|
|