|
@@ 407-426 (lines=20) @@
|
| 404 |
|
* @param array $data |
| 405 |
|
* @return bool |
| 406 |
|
*/ |
| 407 |
|
public static function _buildGalleryCategoryMeta($data) { |
| 408 |
|
|
| 409 |
|
$local = MY_Controller::getCurrentLocale(); |
| 410 |
|
$settings = CI::$APP->seoexpert_model->getSettings($local); |
| 411 |
|
|
| 412 |
|
if ($settings['useGalleryCategoryPattern'] != 1) { |
| 413 |
|
return FALSE; |
| 414 |
|
} |
| 415 |
|
|
| 416 |
|
$metaStorage = new MetaStorage(); |
| 417 |
|
$metaStorage->setTitleTemplate($settings['galleryCategoryTemplate']); |
| 418 |
|
$metaStorage->setDescriptionTemplate($settings['galleryCategoryTemplateDesc']); |
| 419 |
|
$metaStorage->setKeywordsTemplate($settings['galleryCategoryTemplateKey']); |
| 420 |
|
|
| 421 |
|
$metaManipulator = new GalleryMetaManipulator($data['current_category'], $metaStorage); |
| 422 |
|
$metaManipulator->setDescLength($settings['galleryCategoryTemplateDescCount']); |
| 423 |
|
$meta = $metaManipulator->render(); |
| 424 |
|
|
| 425 |
|
self::setMetaTags($meta['metaTitle'], $meta['metaKeywords'], $meta['metaDescription']); |
| 426 |
|
} |
| 427 |
|
|
| 428 |
|
/** |
| 429 |
|
* @param array $data |
|
@@ 460-480 (lines=21) @@
|
| 457 |
|
* @param array $data |
| 458 |
|
* @return bool |
| 459 |
|
*/ |
| 460 |
|
public static function _buildActionSearchMeta($data) { |
| 461 |
|
|
| 462 |
|
$local = MY_Controller::getCurrentLocale(); |
| 463 |
|
$settings = CI::$APP->seoexpert_model->getSettings($local); |
| 464 |
|
|
| 465 |
|
$new_setting = CI::$APP->seoexpert_model->Actions_settings($settings, $data['type']); |
| 466 |
|
|
| 467 |
|
if ($new_setting['usePattern'] != 1) { |
| 468 |
|
return FALSE; |
| 469 |
|
} |
| 470 |
|
|
| 471 |
|
$metaStorage = new MetaStorage(); |
| 472 |
|
$metaStorage->setTitleTemplate($new_setting['TitleTemplate']); |
| 473 |
|
$metaStorage->setDescriptionTemplate($new_setting['TemplateDesc']); |
| 474 |
|
$metaStorage->setKeywordsTemplate($new_setting['KeywordsTemplate']); |
| 475 |
|
|
| 476 |
|
$metaManipulator = new MetaManipulator([], $metaStorage); |
| 477 |
|
$meta = $metaManipulator->render(); |
| 478 |
|
|
| 479 |
|
self::setMetaTags($meta['metaTitle'], $meta['metaKeywords'], $meta['metaDescription']); |
| 480 |
|
} |
| 481 |
|
|
| 482 |
|
public function _deinstall() { |
| 483 |
|
|