|
@@ 425-444 (lines=20) @@
|
| 422 |
|
* @param array $data |
| 423 |
|
* @return bool |
| 424 |
|
*/ |
| 425 |
|
public static function _buildGalleryCategoryMeta($data) { |
| 426 |
|
|
| 427 |
|
$local = MY_Controller::getCurrentLocale(); |
| 428 |
|
$settings = CI::$APP->seoexpert_model->getSettings($local); |
| 429 |
|
|
| 430 |
|
if ($settings['useGalleryCategoryPattern'] != 1) { |
| 431 |
|
return FALSE; |
| 432 |
|
} |
| 433 |
|
|
| 434 |
|
$metaStorage = new MetaStorage(); |
| 435 |
|
$metaStorage->setTitleTemplate($settings['galleryCategoryTemplate']); |
| 436 |
|
$metaStorage->setDescriptionTemplate($settings['galleryCategoryTemplateDesc']); |
| 437 |
|
$metaStorage->setKeywordsTemplate($settings['galleryCategoryTemplateKey']); |
| 438 |
|
|
| 439 |
|
$metaManipulator = new GalleryMetaManipulator($data['current_category'], $metaStorage); |
| 440 |
|
$metaManipulator->setDescLength($settings['galleryCategoryTemplateDescCount']); |
| 441 |
|
$meta = $metaManipulator->render(); |
| 442 |
|
|
| 443 |
|
self::setMetaTags($meta['metaTitle'], $meta['metaKeywords'], $meta['metaDescription']); |
| 444 |
|
} |
| 445 |
|
|
| 446 |
|
/** |
| 447 |
|
* @param array $data |
|
@@ 478-498 (lines=21) @@
|
| 475 |
|
* @param array $data |
| 476 |
|
* @return bool |
| 477 |
|
*/ |
| 478 |
|
public static function _buildActionSearchMeta($data) { |
| 479 |
|
|
| 480 |
|
$local = MY_Controller::getCurrentLocale(); |
| 481 |
|
$settings = CI::$APP->seoexpert_model->getSettings($local); |
| 482 |
|
|
| 483 |
|
$new_setting = CI::$APP->seoexpert_model->Actions_settings($settings, $data['type']); |
| 484 |
|
|
| 485 |
|
if ($new_setting['usePattern'] != 1) { |
| 486 |
|
return FALSE; |
| 487 |
|
} |
| 488 |
|
|
| 489 |
|
$metaStorage = new MetaStorage(); |
| 490 |
|
$metaStorage->setTitleTemplate($new_setting['TitleTemplate']); |
| 491 |
|
$metaStorage->setDescriptionTemplate($new_setting['TemplateDesc']); |
| 492 |
|
$metaStorage->setKeywordsTemplate($new_setting['KeywordsTemplate']); |
| 493 |
|
|
| 494 |
|
$metaManipulator = new MetaManipulator([], $metaStorage); |
| 495 |
|
$meta = $metaManipulator->render(); |
| 496 |
|
|
| 497 |
|
self::setMetaTags($meta['metaTitle'], $meta['metaKeywords'], $meta['metaDescription']); |
| 498 |
|
} |
| 499 |
|
|
| 500 |
|
public function _deinstall() { |
| 501 |
|
|