Merge branch '1.1' of https://github.com/merdiano/orient-site into 1.1
This commit is contained in:
commit
52d12b3f15
|
|
@ -37,7 +37,7 @@ class Post extends Model
|
|||
'powerseo_title' => 'required',
|
||||
'powerseo_description' => 'required',
|
||||
'powerseo_keywords' => 'required',
|
||||
'excerpt' => ''
|
||||
'excerpt' => 'required'
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ class CmsPage extends ComponentBase
|
|||
$this->ogFbAppId = $settings->og_fb_appid;
|
||||
}
|
||||
|
||||
} else {
|
||||
} else { //todo els if has category component
|
||||
$this->hasBlog = $this->page["hasBlog"] = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,4 +29,7 @@
|
|||
{{ ''|otherMetaTags|raw }}
|
||||
|
||||
{{ post|generateOgTags }}
|
||||
{% if post.featured_image %}
|
||||
<meta property="og:image" content="{{post.featured_image|media}}">
|
||||
{% endif %}
|
||||
{% endput %}
|
||||
|
|
|
|||
|
|
@ -1,272 +0,0 @@
|
|||
<?php namespace AnandPatel\SeoExtension;
|
||||
|
||||
use System\Classes\PluginBase;
|
||||
use Cms\Classes\Page;
|
||||
use Cms\Classes\Theme;
|
||||
use System\Classes\PluginManager;
|
||||
use System\Classes\SettingsManager;
|
||||
use AnandPatel\SeoExtension\classes\Helper;
|
||||
|
||||
/**
|
||||
* SeoExtension Plugin Information File
|
||||
*/
|
||||
class Plugin extends PluginBase
|
||||
{
|
||||
|
||||
/**
|
||||
* Returns information about this plugin.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function pluginDetails()
|
||||
{
|
||||
return [
|
||||
'name' => 'anandpatel.seoextension::lang.plugin.name',
|
||||
'description' => 'anandpatel.seoextension::lang.plugin.description',
|
||||
'author' => 'AnandPatel',
|
||||
'icon' => 'icon-search'
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
public function registerComponents()
|
||||
{
|
||||
return [
|
||||
'AnandPatel\SeoExtension\Components\BlogPost' => 'SeoBlogPost',
|
||||
'AnandPatel\SeoExtension\Components\StaticPage' => 'SeoStaticPage',
|
||||
'AnandPatel\SeoExtension\Components\CmsPage' => 'SeoCmsPage',
|
||||
];
|
||||
}
|
||||
|
||||
public function registerSettings()
|
||||
{
|
||||
return [
|
||||
'settings' => [
|
||||
'label' => 'anandpatel.seoextension::lang.settings.label',
|
||||
'description' => 'anandpatel.seoextension::lang.settings.description',
|
||||
'icon' => 'icon-search',
|
||||
'category' => SettingsManager::CATEGORY_MYSETTINGS,
|
||||
'class' => 'AnandPatel\SeoExtension\Models\Settings',
|
||||
'order' => 100
|
||||
]
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
public function registerMarkupTags()
|
||||
{
|
||||
return [
|
||||
'filters' => [
|
||||
'generateTitle' => [$this, 'generateTitle'],
|
||||
'generateCanonicalUrl' => [$this, 'generateCanonicalUrl'],
|
||||
'otherMetaTags' => [$this ,'otherMetaTags'],
|
||||
'generateOgTags' => [$this,'generateOgTags']
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
public function generateOgTags($post)
|
||||
{
|
||||
$helper = new Helper();
|
||||
|
||||
$ogMetaTags = $helper->generateOgMetaTags($post);
|
||||
return $ogMetaTags;
|
||||
}
|
||||
|
||||
public function otherMetaTags()
|
||||
{
|
||||
$helper = new Helper();
|
||||
|
||||
$otherMetaTags = $helper->otherMetaTags();
|
||||
return $otherMetaTags;
|
||||
}
|
||||
|
||||
public function generateTitle($title)
|
||||
{
|
||||
$helper = new Helper();
|
||||
$title = $helper->generateTitle($title);
|
||||
return $title;
|
||||
}
|
||||
|
||||
public function generateCanonicalUrl($url)
|
||||
{
|
||||
$helper = new Helper();
|
||||
$canonicalUrl = $helper->generateCanonicalUrl();
|
||||
return $canonicalUrl;
|
||||
}
|
||||
|
||||
|
||||
public function register()
|
||||
{
|
||||
|
||||
\Event::listen('backend.form.extendFields', function($widget)
|
||||
{
|
||||
|
||||
if(PluginManager::instance()->hasPlugin('RainLab.Pages') && $widget->model instanceof \RainLab\Pages\Classes\Page)
|
||||
{
|
||||
$widget->addFields([
|
||||
'viewBag[seo_title]' => [
|
||||
'label' => 'Meta Title',
|
||||
'type' => 'text',
|
||||
'tab' => 'cms::lang.editor.meta'
|
||||
],
|
||||
'viewBag[seo_description]' => [
|
||||
'label' => 'Meta Description',
|
||||
'type' => 'textarea',
|
||||
'size' => 'tiny',
|
||||
'tab' => 'cms::lang.editor.meta'
|
||||
],
|
||||
'viewBag[seo_keywords]' => [
|
||||
'label' => 'Meta Keywords',
|
||||
'type' => 'textarea',
|
||||
'size' => 'tiny',
|
||||
'tab' => 'cms::lang.editor.meta'
|
||||
],
|
||||
'viewBag[canonical_url]' => [
|
||||
'label' => 'Canonical URL',
|
||||
'type' => 'text',
|
||||
'tab' => 'cms::lang.editor.meta',
|
||||
'span' => 'left'
|
||||
],
|
||||
'viewBag[redirect_url]' => [
|
||||
'label' => 'Redirect URL',
|
||||
'type' => 'text',
|
||||
'tab' => 'cms::lang.editor.meta',
|
||||
'span' => 'right'
|
||||
|
||||
],
|
||||
'viewBag[robot_index]' => [
|
||||
'label' => 'Robot Index',
|
||||
'type' => 'dropdown',
|
||||
'tab' => 'cms::lang.editor.meta',
|
||||
'options' => $this->getIndexOptions(),
|
||||
'default' => 'index',
|
||||
'span' => 'left'
|
||||
],
|
||||
'viewBag[robot_follow]' => [
|
||||
'label' => 'Robot Follow',
|
||||
'type' => 'dropdown',
|
||||
'tab' => 'cms::lang.editor.meta',
|
||||
'options' => $this->getFollowOptions(),
|
||||
'default' => 'follow',
|
||||
'span' => 'right'
|
||||
],
|
||||
],
|
||||
'primary');
|
||||
}
|
||||
|
||||
if(PluginManager::instance()->hasPlugin('RainLab.Blog') && $widget->model instanceof \RainLab\Blog\Models\Post)
|
||||
{
|
||||
$widget->addFields([
|
||||
'seo_title' => [
|
||||
'label' => 'Meta Title',
|
||||
'type' => 'text',
|
||||
'tab' => 'SEO'
|
||||
],
|
||||
'seo_description' => [
|
||||
'label' => 'Meta Description',
|
||||
'type' => 'textarea',
|
||||
'size' => 'tiny',
|
||||
'tab' => 'SEO'
|
||||
],
|
||||
'seo_keywords' => [
|
||||
'label' => 'Meta Keywords',
|
||||
'type' => 'textarea',
|
||||
'size' => 'tiny',
|
||||
'tab' => 'SEO'
|
||||
],
|
||||
'canonical_url' => [
|
||||
'label' => 'Canonical URL',
|
||||
'type' => 'text',
|
||||
'tab' => 'SEO',
|
||||
'span' => 'left'
|
||||
],
|
||||
'redirect_url' => [
|
||||
'label' => 'Redirect URL',
|
||||
'type' => 'text',
|
||||
'tab' => 'SEO',
|
||||
'span' => 'right'
|
||||
|
||||
],
|
||||
'robot_index' => [
|
||||
'label' => 'Robot Index',
|
||||
'type' => 'dropdown',
|
||||
'tab' => 'SEO',
|
||||
'options' => $this->getIndexOptions(),
|
||||
'default' => 'index',
|
||||
'span' => 'left'
|
||||
],
|
||||
'robot_follow' => [
|
||||
'label' => 'Robot Follow',
|
||||
'type' => 'dropdown',
|
||||
'tab' => 'SEO',
|
||||
'options' => $this->getFollowOptions(),
|
||||
'default' => 'follow',
|
||||
'span' => 'right'
|
||||
],
|
||||
],
|
||||
'secondary');
|
||||
}
|
||||
|
||||
if (!$widget->model instanceof \Cms\Classes\Page) return;
|
||||
|
||||
if (!($theme = Theme::getEditTheme())) {
|
||||
throw new ApplicationException(Lang::get('cms::lang.theme.edit.not_found'));
|
||||
}
|
||||
|
||||
$widget->addFields(
|
||||
[
|
||||
'settings[seo_keywords]' => [
|
||||
'label' => 'Meta Keywords',
|
||||
'type' => 'textarea',
|
||||
'tab' => 'cms::lang.editor.meta',
|
||||
'size' => 'tiny',
|
||||
'placeholder' => "hello"
|
||||
],
|
||||
'settings[canonical_url]' => [
|
||||
'label' => 'Canonical URL',
|
||||
'type' => 'text',
|
||||
'tab' => 'cms::lang.editor.meta',
|
||||
'span' => 'left'
|
||||
],
|
||||
'settings[redirect_url]' => [
|
||||
'label' => 'Redirect URL',
|
||||
'type' => 'text',
|
||||
'tab' => 'cms::lang.editor.meta',
|
||||
'span' => 'right'
|
||||
|
||||
],
|
||||
'settings[robot_index]' => [
|
||||
'label' => 'Robot Index',
|
||||
'type' => 'dropdown',
|
||||
'tab' => 'cms::lang.editor.meta',
|
||||
'options' => $this->getIndexOptions(),
|
||||
'default' => 'index',
|
||||
'span' => 'left'
|
||||
],
|
||||
'settings[robot_follow]' => [
|
||||
'label' => 'Robot Follow',
|
||||
'type' => 'dropdown',
|
||||
'tab' => 'cms::lang.editor.meta',
|
||||
'options' => $this->getFollowOptions(),
|
||||
'default' => 'follow',
|
||||
'span' => 'right'
|
||||
],
|
||||
],
|
||||
'primary'
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private function getIndexOptions()
|
||||
{
|
||||
return ["index"=>"index","noindex"=>"noindex"];
|
||||
}
|
||||
|
||||
private function getFollowOptions()
|
||||
{
|
||||
return ["follow"=>"follow","nofollow"=>"nofollow"];
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,92 +0,0 @@
|
|||
SEO-Extension
|
||||
=============
|
||||
|
||||
###Inject SEO fields to CMS Pages, Static Pages and Blog.
|
||||
|
||||
This plugin add SEO fields to CMS Pages, Static Pages and Blog, and for using it you simply need to drop component on layout/page.
|
||||
|
||||
currently included fields:
|
||||
* Meta Title
|
||||
* Meta Description
|
||||
* Meta Keywords
|
||||
* Canonical URL
|
||||
* Meta Redirect to other URL
|
||||
* Robot Index & Follow
|
||||
|
||||
__*more fields will be added on request__
|
||||
|
||||
####Features
|
||||
* *__New__* Open Graph(og) Tags added for better sharing on social networking sites like Facebook
|
||||
* *__New__* Settings added in backend to configure meta and Open Graph tags
|
||||
|
||||
|
||||
####Future
|
||||
* Add more fields on request.
|
||||
* Integration of SEO optimizer to optimize page(if possible).
|
||||
|
||||
####Like this plugin?
|
||||
If you like this plugin, give this plugin a Like or Make donation with PayPal.
|
||||
|
||||
|
||||
#Documentation
|
||||
|
||||
#####**Installation**
|
||||
To install this plugin you have to click on __add to project__ or need to type __AnandPatel.SeoExtension__ in Backend *System > updates > intall plugin*
|
||||
|
||||
|
||||
The plugin currently includes three components:
|
||||
* SEO CMS Page
|
||||
* SEO Blog Post
|
||||
* SEO Static Page
|
||||
|
||||
#####**SEO CMS Page**
|
||||
Drop this component in layout`s head section
|
||||
|
||||
code of layout look like this
|
||||
|
||||
``````````````````
|
||||
<html>
|
||||
<head>
|
||||
{% component 'SeoCmsPage' %}
|
||||
</head>
|
||||
<body>
|
||||
{% page %}
|
||||
</body>
|
||||
</html>
|
||||
``````````````````
|
||||
|
||||
|
||||
#####**SEO Blog Post**
|
||||
Drop this component on CMS Page on which you have dropped blogPost Component(i.e you want to show blog post).
|
||||
|
||||
pass parameter __data = post__
|
||||
|
||||
here is code of CMS page for Blog Post Page.
|
||||
|
||||
``````````````````
|
||||
{% component 'blogPost' %}
|
||||
{% component 'SeoBlogPost' data=post %}
|
||||
``````````````````
|
||||
|
||||
> for using this component you must place SeoCMSPage component on layout.
|
||||
|
||||
#####**SEO Static Page**
|
||||
Drop this component on Static Pages layout`s head section
|
||||
|
||||
code of static page layout look like this
|
||||
|
||||
``````````````````
|
||||
<html>
|
||||
<head>
|
||||
{% component 'SeoStaticPage' %}
|
||||
</head>
|
||||
<body>
|
||||
{% component 'staticMenu' %}
|
||||
{% component 'staticBreadcrumbs' %}
|
||||
{% page %}
|
||||
</body>
|
||||
</html>
|
||||
``````````````````
|
||||
|
||||
####Configuration
|
||||
To configure this Plugin goto Backend *System* then find *My Settings* in left side bar, then click on *SEO Extension* , you will get Configuration options.(refer screenshots)
|
||||
|
|
@ -1,94 +0,0 @@
|
|||
<?php namespace AnandPatel\SeoExtension\classes;
|
||||
|
||||
use AnandPatel\SeoExtension\Models\Settings;
|
||||
use Request;
|
||||
class Helper {
|
||||
|
||||
public $settings;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->settings = Settings::instance();
|
||||
}
|
||||
|
||||
|
||||
public function generateTitle($title)
|
||||
{
|
||||
$settings = $this->settings;
|
||||
$new_title = "";
|
||||
|
||||
if($settings->enable_title)
|
||||
{
|
||||
$position = $settings->title_position;
|
||||
$site_title = $settings->title;
|
||||
|
||||
if($position == 'prefix')
|
||||
{
|
||||
$new_title = $site_title . " " . $title;
|
||||
}
|
||||
else
|
||||
{
|
||||
$new_title = $title . " " . $site_title;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$new_title = $title;
|
||||
}
|
||||
return $new_title;
|
||||
}
|
||||
|
||||
function generateCanonicalUrl()
|
||||
{
|
||||
$settings = $this->settings;
|
||||
|
||||
if($settings->enable_canonical_url)
|
||||
{
|
||||
return '<link rel="canonical" href="'. Request::url().'"/>';
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
public function otherMetaTags()
|
||||
{
|
||||
$settings = $this->settings;
|
||||
|
||||
if($settings->other_tags)
|
||||
{
|
||||
return $settings->other_tags;
|
||||
}
|
||||
|
||||
return "";
|
||||
|
||||
}
|
||||
|
||||
public function generateOgMetaTags($post)
|
||||
{
|
||||
$settings = $this->settings;
|
||||
|
||||
if($settings->enable_og_tags)
|
||||
{
|
||||
$ogTags = "";
|
||||
if($settings->og_fb_appid)
|
||||
$ogTags .= '<meta property="fb:app_id" content="'.$settings->og_fb_appid.'" />' ."\n" ;
|
||||
|
||||
if($settings->og_sitename)
|
||||
$ogTags .= '<meta property="og:site_name" content="'.$settings->og_sitename .'" />'."\n" ;
|
||||
|
||||
if($post->seo_description)
|
||||
$ogTags .= '<meta property="og:description" content="'.$post->seo_description.'" />'."\n" ;
|
||||
|
||||
$ogTitle = empty($post->meta_title) ? $post->title : $post->meta_title;
|
||||
$ogUrl = empty($post->canonical_url) ? Request::url() : $this->page->canonical_url ;
|
||||
|
||||
$ogTags .= '<meta property="og:title" content="'. $ogTitle .'" />'."\n" ;
|
||||
|
||||
$ogTags .= '<meta property="og:url" content="'. $ogUrl .'" />';
|
||||
|
||||
return $ogTags;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
<?php namespace AnandPatel\SeoExtension\Components;
|
||||
|
||||
use Cms\Classes\ComponentBase;
|
||||
use Event;
|
||||
|
||||
class BlogPost extends ComponentBase
|
||||
{
|
||||
|
||||
public $page;
|
||||
public $seo_title;
|
||||
public $seo_description;
|
||||
public $seo_keywords;
|
||||
public $canonical_url;
|
||||
public $redirect_url;
|
||||
public $robot_index;
|
||||
public $robot_follow;
|
||||
|
||||
public function componentDetails()
|
||||
{
|
||||
return [
|
||||
'name' => 'anandpatel.seoextension::lang.component.blog.name',
|
||||
'description' => 'anandpatel.seoextension::lang.component.blog.description'
|
||||
];
|
||||
}
|
||||
|
||||
public function defineProperties()
|
||||
{
|
||||
return [
|
||||
"post" => [
|
||||
"title" => "data",
|
||||
"default" => "post"
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,77 +0,0 @@
|
|||
<?php namespace AnandPatel\SeoExtension\Components;
|
||||
|
||||
use Cms\Classes\ComponentBase;
|
||||
use Cms\Classes\Page;
|
||||
use Cms\Classes\Theme;
|
||||
use Request;
|
||||
use AnandPatel\SeoExtension\models\Settings;
|
||||
use URL;
|
||||
|
||||
class CmsPage extends ComponentBase
|
||||
{
|
||||
public $page;
|
||||
public $seo_title;
|
||||
public $seo_description;
|
||||
public $seo_keywords;
|
||||
public $canonical_url;
|
||||
public $redirect_url;
|
||||
public $robot_index;
|
||||
public $robot_follow;
|
||||
public $hasBlog;
|
||||
|
||||
public $ogTitle;
|
||||
public $ogUrl;
|
||||
public $ogDescription;
|
||||
public $ogSiteName;
|
||||
public $ogFbAppId;
|
||||
public $ogLocale;
|
||||
public $ogImage;
|
||||
|
||||
|
||||
public function componentDetails()
|
||||
{
|
||||
return [
|
||||
'name' => 'anandpatel.seoextension::lang.component.cms.name',
|
||||
'description' => 'anandpatel.seoextension::lang.component.cms.description'
|
||||
];
|
||||
}
|
||||
|
||||
public function defineProperties()
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
public function onRun()
|
||||
{
|
||||
$theme = Theme::getActiveTheme();
|
||||
$page = Page::load($theme,$this->page->baseFileName);
|
||||
$this->page["hasBlog"] = false;
|
||||
|
||||
if(!$page->hasComponent("blogPost"))
|
||||
{
|
||||
$this->seo_title = $this->page["seo_title"] = empty($this->page->meta_title) ? $this->page->title : $this->page->meta_title;
|
||||
$this->seo_description = $this->page["seo_description"] = $this->page->meta_description;
|
||||
$this->seo_keywords = $this->page["seo_keywords"] = $this->page->seo_keywords;
|
||||
$this->canonical_url = $this->page["canonical_url"] = $this->page->canonical_url;
|
||||
$this->redirect_url = $this->page["redirect_url"] = $this->page->redirect_url;
|
||||
$this->robot_follow = $this->page["robot_follow"] = $this->page->robot_follow;
|
||||
$this->robot_index = $this->page["robot_index"] = $this->page->robot_index;
|
||||
|
||||
$settings = Settings::instance();
|
||||
|
||||
if($settings->enable_og_tags)
|
||||
{
|
||||
$this->ogTitle = empty($this->page->meta_title) ? $this->page->title : $this->page->meta_title;
|
||||
$this->ogDescription = $this->page->meta_description;
|
||||
$this->ogUrl = empty($this->page->canonical_url) ? Request::url() : $this->page->canonical_url ;
|
||||
$this->ogSiteName = $settings->og_sitename;
|
||||
$this->ogFbAppId = $settings->og_fb_appid;
|
||||
}
|
||||
|
||||
}
|
||||
else{
|
||||
$this->hasBlog = $this->page["hasBlog"] = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,81 +0,0 @@
|
|||
<?php namespace AnandPatel\SeoExtension\Components;
|
||||
|
||||
use Cms\Classes\ComponentBase;
|
||||
use RainLab\Pages\Classes\Router;
|
||||
use Cms\Classes\Theme;
|
||||
use AnandPatel\SeoExtension\models\Settings;
|
||||
use Request;
|
||||
|
||||
class StaticPage extends ComponentBase
|
||||
{
|
||||
public $page;
|
||||
public $seo_title;
|
||||
public $seo_description;
|
||||
public $seo_keywords;
|
||||
public $canonical_url;
|
||||
public $redirect_url;
|
||||
public $robot_index;
|
||||
public $robot_follow;
|
||||
public $title;
|
||||
|
||||
public $ogTitle;
|
||||
public $ogUrl;
|
||||
public $ogDescription;
|
||||
public $ogSiteName;
|
||||
public $ogFbAppId;
|
||||
public $ogLocale;
|
||||
public $ogImage;
|
||||
|
||||
|
||||
public function componentDetails()
|
||||
{
|
||||
return [
|
||||
'name' => 'anandpatel.seoextension::lang.component.static.name',
|
||||
'description' => 'anandpatel.seoextension::lang.component.static.description'
|
||||
];
|
||||
}
|
||||
|
||||
public function defineProperties()
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
public function onRun()
|
||||
{
|
||||
$url = Request::path();
|
||||
|
||||
// Remove language prefix in case it exists (e.g. from "/en/my-page" to "/my-page")
|
||||
if (class_exists('RainLab\Translate\Behaviors\TranslatableModel'))
|
||||
$url = substr($url, 3);
|
||||
|
||||
if (!strlen($url))
|
||||
$url = '/';
|
||||
|
||||
$router = new Router(Theme::getActiveTheme());
|
||||
$this->page = $this->page['page'] = $router->findByUrl($url);
|
||||
|
||||
if ($this->page) {
|
||||
$this->seo_title = $this->page['seo_title'] = $this->page->getViewBag()->property('seo_title');
|
||||
$this->title = $this->page['title'] = $this->page->getViewBag()->property('title');
|
||||
$this->seo_description = $this->page['seo_description'] = $this->page->getViewBag()->property('seo_description');
|
||||
$this->seo_keywords = $this->page['seo_keywords'] = $this->page->getViewBag()->property('seo_keywords');
|
||||
$this->canonical_url = $this->page['canonical_url'] = $this->page->getViewBag()->property('canonical_url');
|
||||
$this->redirect_url = $this->page['redirect_url'] = $this->page->getViewBag()->property('redirect_url');
|
||||
$this->robot_index = $this->page['robot_index'] = $this->page->getViewBag()->property('robot_index');
|
||||
$this->robot_follow = $this->page['robot_follow'] = $this->page->getViewBag()->property('robot_follow');
|
||||
|
||||
$settings = Settings::instance();
|
||||
|
||||
if($settings->enable_og_tags)
|
||||
{
|
||||
$this->ogTitle = empty($this->page->meta_title) ? $this->page->title : $this->page->meta_title;
|
||||
$this->ogDescription = $this->page->meta_description;
|
||||
$this->ogUrl = empty($this->page->canonical_url) ? Request::url() : $this->page->canonical_url ;
|
||||
$this->ogSiteName = $settings->og_sitename;
|
||||
$this->ogFbAppId = $settings->og_fb_appid;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
{% put meta %}
|
||||
{% default %}
|
||||
{% if post.redirect_url %}
|
||||
<meta http-equiv="refresh" content="0; url={{post.redirect_url}}" />
|
||||
{% endif %}
|
||||
|
||||
{% if post.seo_title %}
|
||||
<title>{{ post.seo_title | generateTitle}}</title>
|
||||
{% else %}
|
||||
<title>{{ post.title | generateTitle }}</title>
|
||||
{% endif %}
|
||||
|
||||
{% if post.seo_description %}
|
||||
<meta name="description" content="{{post.seo_description}}">
|
||||
{% endif %}
|
||||
|
||||
{% if post.seo_keywords %}
|
||||
<meta name="keywords" content="{{post.seo_keywords}}">
|
||||
{% endif %}
|
||||
|
||||
{% if post.canonical_url %}
|
||||
<link rel="canonical" href="{{post.canonical_url}}" />
|
||||
{% else %}
|
||||
{{ '' | generateCanonicalUrl}}
|
||||
{% endif %}
|
||||
|
||||
<meta name="robots" content="{{post.robot_index}},{{post.robot_follow}}">
|
||||
|
||||
{{ ''|otherMetaTags|raw }}
|
||||
|
||||
{{ post|generateOgTags }}
|
||||
{% endput %}
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
{% if hasBlog %}
|
||||
{% placeholder meta default %}
|
||||
|
||||
{% endplaceholder %}
|
||||
|
||||
{% else %}
|
||||
|
||||
{% if __SELF__.redirect_url %}
|
||||
<meta http-equiv="refresh" content="0; url={{__SELF__.redirect_url}}" />
|
||||
{% endif %}
|
||||
|
||||
{% if __SELF__.seo_title %}
|
||||
<title>{{__SELF__.seo_title | generateTitle}}</title>
|
||||
{% endif %}
|
||||
|
||||
{% if __SELF__.seo_description %}
|
||||
<meta name="description" content="{{__SELF__.seo_description}}">
|
||||
|
||||
{% endif %}
|
||||
{% if __SELF__.seo_keywords %}
|
||||
<meta name="keywords" content="{{__SELF__.seo_keywords}}">
|
||||
{% endif %}
|
||||
|
||||
{% if __SELF__.canonical_url %}
|
||||
<link rel="canonical" href="{{__SELF__.canonical_url}}" />
|
||||
{% else %}
|
||||
{{ '' | generateCanonicalUrl}}
|
||||
{% endif %}
|
||||
|
||||
<meta name="robots" content="{{__SELF__.robot_index}},{{__SELF__.robot_follow}}">
|
||||
|
||||
{{ ''|otherMetaTags|raw }}
|
||||
|
||||
{% if __SELF__.ogTitle %}
|
||||
<meta property="og:title" content="{{ __SELF__.ogTitle }}" />
|
||||
{% endif %}
|
||||
|
||||
{% if __SELF__.ogUrl %}
|
||||
<meta property="og:url" content="{{ __SELF__.ogUrl }}" />
|
||||
{% endif %}
|
||||
|
||||
{% if __SELF__.ogSiteName %}
|
||||
<meta property="og:site_name" content="{{ __SELF__.ogSiteName }}" />
|
||||
{% endif %}
|
||||
|
||||
{% if __SELF__.ogDescription %}
|
||||
<meta property="og:description" content="{{ __SELF__.ogDescription }}" />
|
||||
{% endif %}
|
||||
|
||||
{% if __SELF__.ogFbAppId %}
|
||||
<meta property="fb:app_id" content="{{ __SELF__.ogFbAppId }}" />
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
{% if __SELF__.redirect_url %}
|
||||
<meta http-equiv="refresh" content="0; url={{__SELF__.redirect_url}}" />
|
||||
{% endif %}
|
||||
|
||||
{% if __SELF__.seo_title %}
|
||||
<title>{{__SELF__.seo_title | generateTitle }}</title>
|
||||
{% else %}
|
||||
<title>{{ __SELF__.title | generateTitle }}</title>
|
||||
{% endif %}
|
||||
|
||||
{% if __SELF__.seo_description %}
|
||||
<meta name="description" content="{{__SELF__.seo_description}}">
|
||||
{% endif %}
|
||||
|
||||
{% if __SELF__.seo_keywords %}
|
||||
<meta name="keywords" content="{{__SELF__.seo_keywords}}">
|
||||
{% endif %}
|
||||
|
||||
{% if __SELF__.canonical_url %}
|
||||
<link rel="canonical" href="{{__SELF__.canonical_url}}" />
|
||||
{% else %}
|
||||
{{ '' | generateCanonicalUrl}}
|
||||
{% endif %}
|
||||
|
||||
<meta name="robots" content="{{__SELF__.robot_index}},{{__SELF__.robot_follow}}">
|
||||
|
||||
{{ ''|otherMetaTags|raw }}
|
||||
|
||||
{% if __SELF__.ogTitle %}
|
||||
<meta property="og:title" content="{{ __SELF__.ogTitle }}" />
|
||||
{% endif %}
|
||||
|
||||
{% if __SELF__.ogUrl %}
|
||||
<meta property="og:url" content="{{ __SELF__.ogUrl }}" />
|
||||
{% endif %}
|
||||
|
||||
{% if __SELF__.ogSiteName %}
|
||||
<meta property="og:site_name" content="{{ __SELF__.ogSiteName }}" />
|
||||
{% endif %}
|
||||
|
||||
{% if __SELF__.ogDescription %}
|
||||
<meta property="og:description" content="{{ __SELF__.ogDescription }}" />
|
||||
{% endif %}
|
||||
|
||||
{% if __SELF__.ogFbAppId %}
|
||||
<meta property="fb:app_id" content="{{ __SELF__.ogFbAppId }}" />
|
||||
{% endif %}
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'plugin' => [
|
||||
'name' => 'SEO Rozšíření',
|
||||
'description' => 'Poskytuje SEO rozšíření pro CMS stránky, statické stránky a blogové články',
|
||||
],
|
||||
'settings' => [
|
||||
'label' => 'SEO Rozšíření',
|
||||
'description' => 'Konfigurace SEO Rozšíření',
|
||||
'tab_settings' => [
|
||||
'label' => 'Nastavení',
|
||||
'site' => 'Použít název stránku v titulku stránky',
|
||||
'site_comment' => 'Aktivujte pokud chcete použít název stránek v tagu <title>',
|
||||
'sitename' => 'Název stránek',
|
||||
'canonical' => 'Použít výchozí URL jako kanonickou URL',
|
||||
'canonical_comment' => 'Pokud není kanonická URL zadána, poté se použije výchozí URL jako kanonická',
|
||||
'sitename_comment_above' => 'Předpona nebo přípona názvu stránek v tagu <title>',
|
||||
'sitename_comment' => 'Název stránek | <nadpis seo/stránky/blogu>',
|
||||
'sitename_placeholder' => 'Název stránek |',
|
||||
'title_position' => 'Název stránek se ukáže',
|
||||
'title_position_comment' => 'Vyberte kde se má název stránek zobrazovat, jestli na začátku, nebo na konci',
|
||||
'title_position_prefix' => 'Předpona (na začátku)',
|
||||
'title_position_suffix' => 'Přípona (na konci)',
|
||||
'other_tags' => 'Ostatní meta tagy',
|
||||
'other_tags_comment_above' => 'Zadejte tagy které chcete přidat na všech stránkách',
|
||||
'other_tags_comment' => 'Zadejte meta tagy jako například meta author, meta viewport a další',
|
||||
],
|
||||
'tab_og' => [
|
||||
'label' => 'Open Graph',
|
||||
'og' => 'Použít Open Graph (og)',
|
||||
'og_comment' => 'Aktivovat Open Graph (og) tagy',
|
||||
'sitename' => 'Název stránek pro Open Graph',
|
||||
'sitename_comment' => 'Název stránek. Ne URL. Například "SEO Extension" ne "seoextension.com".',
|
||||
'fb' => 'ID Facebook Aplikace',
|
||||
'fb_comment' => 'Unikátní ID podle kterých dokáže Facebook identifikovat vaše stránky.',
|
||||
],
|
||||
],
|
||||
'component' => [
|
||||
'blog' => [
|
||||
'name' => 'SEO Blogového článku',
|
||||
'description' => 'Přidá SEO pole k blogovému článku',
|
||||
],
|
||||
'cms' => [
|
||||
'name' => 'SEO CMS stránky',
|
||||
'description' => 'Přidá SEO pole k CMS stránce',
|
||||
],
|
||||
'static' => [
|
||||
'name' => 'SEO Statiké stránky',
|
||||
'description' => 'Přidá SEO pole k statické stránce',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'plugin' => [
|
||||
'name' => 'SEO Extension',
|
||||
'description' => 'Provide SEO Extension to October CMS Pages, Static Pages, Blog post'
|
||||
],
|
||||
'settings' => [
|
||||
'label' => 'SEO Extension',
|
||||
'description' => 'Configure SEO Extension',
|
||||
'tab_settings' => [
|
||||
'label' => 'Settings',
|
||||
'site' => 'Use site name in title',
|
||||
'site_comment' => 'Enable if you want to use site name in title tag',
|
||||
'sitename' => 'Site name',
|
||||
'canonical' => 'Use default URL as canonical URL',
|
||||
'canonical_comment' => 'if canonical URL is not provided then use default URL as canonical URL',
|
||||
'sitename_comment_above' => 'Prefix or suffix site name in title tag',
|
||||
'sitename_comment' => 'Site name | <seo/page/blog title>',
|
||||
'sitename_placeholder' => 'Sitename |',
|
||||
'title_position' => 'Site name appear at',
|
||||
'title_position_comment' => 'select where site name should appear i.e. at start or at end',
|
||||
'title_position_prefix' => 'Prefix (at start)',
|
||||
'title_position_suffix' => 'Suffix (at end)',
|
||||
'other_tags' => 'Other meta tags',
|
||||
'other_tags_comment_above' => 'Insert tags that you want to insert in all pages',
|
||||
'other_tags_comment' => 'Insert other meta tags like meta author, meta viewport etc',
|
||||
],
|
||||
'tab_og' => [
|
||||
'label' => 'Open Graph',
|
||||
'og' => 'Use Open Graph(og)',
|
||||
'og_comment' => 'Enable Open Graph(og) Tags',
|
||||
'sitename' => 'Site name for Open Graph',
|
||||
'sitename_comment' => 'The name of your website. Not the URL, but the name. (i.e. "SEO Extension" not "seoextension.com".)',
|
||||
'fb' => 'Facebook App Id',
|
||||
'fb_comment' => 'The unique ID that lets Facebook know the identity of your site.'
|
||||
],
|
||||
],
|
||||
'component' => [
|
||||
'blog' => [
|
||||
'name' => 'SEO Blog Post',
|
||||
'description' => 'Inject SEO Fields of blog post'
|
||||
],
|
||||
'cms' => [
|
||||
'name' => 'SEO CMS Page',
|
||||
'description' => 'Inject SEO Fields of CMS pages'
|
||||
],
|
||||
'static' => [
|
||||
'name' => 'SEO Static Page',
|
||||
'description' => 'Inject SEO fields of Static Pages'
|
||||
]
|
||||
]
|
||||
];
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'plugin' => [
|
||||
'name' => 'Поисковая оптимизация',
|
||||
'description' => 'Управление SEO информацией для CMS страниц, статических страниц и постов блога'
|
||||
],
|
||||
'settings' => [
|
||||
'label' => 'Поисковая оптимизация',
|
||||
'description' => 'Настройки поисковой оптимизации',
|
||||
'tab_settings' => [
|
||||
'label' => 'Настройки',
|
||||
'site' => 'Использовать название сайта в <title>',
|
||||
'site_comment' => 'Включите, если вы хотите использовать название сайта в <title>',
|
||||
'sitename' => 'Название сайта',
|
||||
'canonical' => 'Использовать URL-адрес по умолчанию, как канонический',
|
||||
'canonical_comment' => 'Если канонический URL-адрес не предоставляется, то использовать URL-адрес по умолчанию, как канонический',
|
||||
'sitename_comment_above' => 'Префикс или суффикс название сайта в <title>',
|
||||
'sitename_comment' => 'Название сайта | <seo/page/blog title>',
|
||||
'sitename_placeholder' => 'Название |',
|
||||
'title_position' => 'Название сайта представлено как',
|
||||
'title_position_comment' => 'Выберите место, где название сайта должно отображаться, т.е. в начале или в конце',
|
||||
'title_position_prefix' => 'Префикс (в начале)',
|
||||
'title_position_suffix' => 'Суффикс (в конце)',
|
||||
'other_tags' => 'Другие Мета-теги',
|
||||
'other_tags_comment_above' => 'Введите теги, которые вы хотите вставить на все страницы',
|
||||
'other_tags_comment' => 'Например,такие теги как author, viewport и т.д.',
|
||||
],
|
||||
'tab_og' => [
|
||||
'label' => 'Open Graph',
|
||||
'og' => 'Использовать Open Graph(og)',
|
||||
'og_comment' => 'Включить Open Graph(og) теги',
|
||||
'sitename' => 'Название сайта для Open Graph',
|
||||
'sitename_comment' => 'Название вашего сайта. Не используйте URL сайта (например, не "seoextension.com", а "SEO Extension").',
|
||||
'fb' => 'Facebook App Id',
|
||||
'fb_comment' => 'Уникальный идентификатор, что позволяет Facebook идентифицировать ваш сайт.'
|
||||
],
|
||||
],
|
||||
'component' => [
|
||||
'blog' => [
|
||||
'name' => 'SEO блога',
|
||||
'description' => 'Инъекция SEO полей для блога'
|
||||
],
|
||||
'cms' => [
|
||||
'name' => 'SEO CMS страниц',
|
||||
'description' => 'Инъекция SEO полей для CMS страниц'
|
||||
],
|
||||
'static' => [
|
||||
'name' => 'SEO статических страниц',
|
||||
'description' => 'Инъекция SEO полей для статических страниц'
|
||||
]
|
||||
]
|
||||
];
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'plugin' => [
|
||||
'name' => 'SEO Eklentisi',
|
||||
'description' => 'Sayfalar, Sabit Sayfalar ve Blog yazıları için SEO işlemleri yapar.'
|
||||
],
|
||||
'settings' => [
|
||||
'label' => 'SEO Eklentisi',
|
||||
'description' => 'SEO Eklentisi Ayarları',
|
||||
'tab_settings' => [
|
||||
'label' => 'Ayarlar',
|
||||
'site' => 'Başlık site adı kullan',
|
||||
'site_comment' => 'Başlık tag\'ında site adı kullanmak istiyorsanız aktifleştirin',
|
||||
'sitename' => 'Site adı',
|
||||
'canonical' => 'Varsayılan URL\'leri Kanonik URL olarak kullan',
|
||||
'canonical_comment' => 'Kanonik URL belirtilmemişse, varsayılan URL\'yi kanonik URL olarak kullan',
|
||||
'sitename_comment_above' => 'Başlık etiketi site adına önek veya sonek',
|
||||
'sitename_comment' => 'Site adı | <seo/sayfa/blog başlık>',
|
||||
'sitename_placeholder' => 'Site adı |',
|
||||
'title_position' => 'Site adını şurada görünecek',
|
||||
'title_position_comment' => 'site adının nerede görüneceğini seçin örneğin başta veya sonda',
|
||||
'title_position_prefix' => 'Önek (başında)',
|
||||
'title_position_suffix' => 'Sonek (sonunda)',
|
||||
'other_tags' => 'Diğer meta taglar',
|
||||
'other_tags_comment_above' => 'Tüm sayfalarda görünmesini istediğiniz etiketleri ekleyin',
|
||||
'other_tags_comment' => 'Meta author, meta viewport gibi diğer meta etiketleri ekleyin',
|
||||
],
|
||||
'tab_og' => [
|
||||
'label' => 'Open Graph',
|
||||
'og' => 'Open Graph(og) Kullan',
|
||||
'og_comment' => 'Open Graph(og) Taglarını Aktifleştir',
|
||||
'sitename' => 'Open Graph İçin Site Adı',
|
||||
'sitename_comment' => 'Websitenizin adı. URL girmeyin, site adını girin. (örneğin "seoeklentisi.com" yazmayın, "SEO Eklentisi" yazın.)',
|
||||
'fb' => 'Facebook App Id\'si',
|
||||
'fb_comment' => 'Facebook\'un sitenizi tanımasını sağlayan benzersiz kimlik.'
|
||||
],
|
||||
],
|
||||
'component' => [
|
||||
'blog' => [
|
||||
'name' => 'SEO Blog Gönderisi',
|
||||
'description' => 'Blog yazısına SEO alanlarını enjekte et'
|
||||
],
|
||||
'cms' => [
|
||||
'name' => 'SEO CMS Sayfası',
|
||||
'description' => 'CMS Sayfasına SEO alanlarını enjekte et'
|
||||
],
|
||||
'static' => [
|
||||
'name' => 'SEO Sabit Sayfa',
|
||||
'description' => 'Sabit Sayfaya SEO alanlarını enjekte et'
|
||||
]
|
||||
]
|
||||
];
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
<?php namespace AnandPatel\SeoExtension\Models;
|
||||
|
||||
use Model;
|
||||
|
||||
/**
|
||||
* BlogPost Model
|
||||
*/
|
||||
class BlogPost extends Model
|
||||
{
|
||||
|
||||
/**
|
||||
* @var string The database table used by the model.
|
||||
*/
|
||||
public $table = 'anandpatel_seoextension_blog_posts';
|
||||
|
||||
/**
|
||||
* @var array Guarded fields
|
||||
*/
|
||||
protected $guarded = ['*'];
|
||||
|
||||
/**
|
||||
* @var array Fillable fields
|
||||
*/
|
||||
protected $fillable = [];
|
||||
|
||||
/**
|
||||
* @var array Relations
|
||||
*/
|
||||
public $hasOne = [];
|
||||
public $hasMany = [];
|
||||
public $belongsTo = [];
|
||||
public $belongsToMany = [];
|
||||
public $morphTo = [];
|
||||
public $morphOne = [];
|
||||
public $morphMany = [];
|
||||
public $attachOne = [];
|
||||
public $attachMany = [];
|
||||
|
||||
}
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace AnandPatel\SeoExtension\models;
|
||||
|
||||
use Model;
|
||||
|
||||
class Settings extends Model{
|
||||
|
||||
public $implement = ['System.Behaviors.SettingsModel'];
|
||||
|
||||
// A unique code
|
||||
public $settingsCode = 'anandpatel_seoextension_settings';
|
||||
|
||||
// Reference to field configuration
|
||||
public $settingsFields = 'fields.yaml';
|
||||
|
||||
protected $cache = [];
|
||||
|
||||
public $attachOne = [
|
||||
'og_image' => ['System\Models\File']
|
||||
];
|
||||
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
# ===================================
|
||||
# List Column Definitions
|
||||
# ===================================
|
||||
|
||||
columns:
|
||||
id:
|
||||
label: ID
|
||||
searchable: true
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
# ===================================
|
||||
# Form Field Definitions
|
||||
# ===================================
|
||||
|
||||
fields:
|
||||
id:
|
||||
label: ID
|
||||
disabled: true
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
<b>What is Open Graph?</b>
|
||||
<br/>
|
||||
The Open Graph protocol enables any web page to become a rich object in a social graph.
|
||||
<br/>
|
||||
<br/>
|
||||
Currently included Open Graph tags are(other tags will be added soon):
|
||||
<ul>
|
||||
<li>fb:app_id</li>
|
||||
<li>og:site_name</li>
|
||||
<li>og:title</li>
|
||||
<li>og:url</li>
|
||||
<li>og:description</li>
|
||||
</ul>
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
In other meta tags you can insert meta tags that is comman to all pages.
|
||||
<br>you can insert meta tags like meta author, meta view port or any tag that you want to place in head section.
|
||||
|
|
@ -1,76 +0,0 @@
|
|||
tabs:
|
||||
fields:
|
||||
enable_title:
|
||||
label: anandpatel.seoextension::lang.settings.tab_settings.site
|
||||
comment: anandpatel.seoextension::lang.settings.tab_settings.site_comment
|
||||
type: switch
|
||||
span: left
|
||||
tab: anandpatel.seoextension::lang.settings.tab_settings.label
|
||||
|
||||
enable_canonical_url:
|
||||
label: anandpatel.seoextension::lang.settings.tab_settings.canonical
|
||||
type: switch
|
||||
comment: anandpatel.seoextension::lang.settings.tab_settings.canonical_comment
|
||||
tab: anandpatel.seoextension::lang.settings.tab_settings.label
|
||||
span: right
|
||||
|
||||
title:
|
||||
label: anandpatel.seoextension::lang.settings.tab_settings.sitename
|
||||
commentAbove: anandpatel.seoextension::lang.settings.tab_settings.sitename_comment_above
|
||||
span: left
|
||||
comment: anandpatel.seoextension::lang.settings.tab_settings.sitename_comment
|
||||
tab: anandpatel.seoextension::lang.settings.tab_settings.label
|
||||
placeholder: anandpatel.seoextension::lang.settings.tab_settings.sitename_placeholder
|
||||
|
||||
title_position:
|
||||
label: anandpatel.seoextension::lang.settings.tab_settings.title_position
|
||||
type: radio
|
||||
span: right
|
||||
tab: anandpatel.seoextension::lang.settings.tab_settings.label
|
||||
comment: anandpatel.seoextension::lang.settings.tab_settings.title_position_comment
|
||||
options:
|
||||
prefix: anandpatel.seoextension::lang.settings.tab_settings.title_position_prefix
|
||||
suffix: anandpatel.seoextension::lang.settings.tab_settings.title_position_suffix
|
||||
|
||||
content:
|
||||
type: hint
|
||||
path: $/anandpatel/seoextension/models/settings/_other_tags_hint.htm
|
||||
tab: anandpatel.seoextension::lang.settings.tab_settings.label
|
||||
|
||||
other_tags:
|
||||
label: anandpatel.seoextension::lang.settings.tab_settings.other_tags
|
||||
type: codeeditor
|
||||
tab: anandpatel.seoextension::lang.settings.tab_settings.label
|
||||
commentAbove: anandpatel.seoextension::lang.settings.tab_settings.other_tags_comment_above
|
||||
comment: anandpatel.seoextension::lang.settings.tab_settings.other_tags_comment
|
||||
|
||||
og_tags_description:
|
||||
type: hint
|
||||
path: $/anandpatel/seoextension/models/settings/_og_tags_description.htm
|
||||
tab: anandpatel.seoextension::lang.settings.tab_og.label
|
||||
|
||||
enable_og_tags:
|
||||
label: anandpatel.seoextension::lang.settings.tab_og.og
|
||||
type: switch
|
||||
comment: anandpatel.seoextension::lang.settings.tab_og.og_comment
|
||||
tab: anandpatel.seoextension::lang.settings.tab_og.label
|
||||
|
||||
og_sitename:
|
||||
label: anandpatel.seoextension::lang.settings.tab_og.sitename
|
||||
type: text
|
||||
comment: anandpatel.seoextension::lang.settings.tab_og.sitename_comment
|
||||
tab: anandpatel.seoextension::lang.settings.tab_og.label
|
||||
|
||||
og_fb_appid:
|
||||
label: anandpatel.seoextension::lang.settings.tab_og.fb
|
||||
comment: anandpatel.seoextension::lang.settings.tab_og.fb_comment
|
||||
type: text
|
||||
span: left
|
||||
tab: anandpatel.seoextension::lang.settings.tab_og.label
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
<?php namespace AnandPatel\SeoExtension\Updates;
|
||||
|
||||
use Schema;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
use System\Classes\PluginManager;
|
||||
class CreateBlogPostsTable extends Migration
|
||||
{
|
||||
|
||||
public function up()
|
||||
{
|
||||
if(PluginManager::instance()->hasPlugin('RainLab.Blog'))
|
||||
{
|
||||
Schema::table('rainlab_blog_posts', function($table)
|
||||
{
|
||||
$table->string('seo_title')->nullable();
|
||||
$table->string('seo_description')->nullable();
|
||||
$table->string('seo_keywords')->nullable();
|
||||
$table->string('canonical_url')->nullable();
|
||||
$table->string('redirect_url')->nullable();
|
||||
$table->string('robot_index')->nullable();
|
||||
$table->string('robot_follow')->nullable();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
if(PluginManager::instance()->hasPlugin('RainLab.Blog'))
|
||||
{
|
||||
Schema::table('rainlab_blog_posts', function($table)
|
||||
{
|
||||
$table->dropColumn('seo_title');
|
||||
$table->dropColumn('seo_description');
|
||||
$table->dropColumn('seo_keywords');
|
||||
$table->dropColumn('canonical_url');
|
||||
$table->dropColumn('redirect_url');
|
||||
$table->dropColumn('robot_index');
|
||||
$table->dropColumn('robot_follow');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
1.0.1:
|
||||
- First version of Seo Extension
|
||||
- create_blog_posts_table.php
|
||||
1.0.2:
|
||||
- Bug fixes
|
||||
1.0.3:
|
||||
- Backend Settings added to configure meta tags & Open Graph tags added
|
||||
1.0.4:
|
||||
- Code clean up and change path naming in settings model
|
||||
1.0.5:
|
||||
- Add Turkish, Russian, cs_CZ locale
|
||||
1.0.6:
|
||||
- Fix issue of SEO Settings Errors
|
||||
Loading…
Reference in New Issue