Skip to content
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.

Commit

Permalink
Revert 6b2f7c0..89ab723
Browse files Browse the repository at this point in the history
This rolls back to commit 6b2f7c0.
  • Loading branch information
Friso Speulman committed Feb 11, 2014
1 parent 89ab723 commit f3f8bdb
Show file tree
Hide file tree
Showing 10 changed files with 4 additions and 184 deletions.
13 changes: 1 addition & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@

Author: Wieger Sloot at Sterc.nl <[email protected]>
Support: Friso Speulman at Sterc.nl <[email protected]>
<<<<<<< HEAD
Version: 1.0.2
=======
>>>>>>> d130a3b592bd720e7fdeddcfc94223b0350e938b

### Description
MODX SEO Pro is a MODX package that helps you when performing Search Engine Optimization (SEO) in MODX. It enables you to:
Expand All @@ -17,21 +14,13 @@ MODX SEO Pro is a MODX package that helps you when performing Search Engine Opti
Install the package

### Placeholders
<<<<<<< HEAD
`[[+seoPro.title]]` Sets the ultimate seo page title.
`[[+seoPro.keywords]]` Add your keywords to the page.
=======
[[+seoPro.title]] Sets the ultimate seo page title.
[[+seoPro.keywords]] Add your keywords to the page.
>>>>>>> d130a3b592bd720e7fdeddcfc94223b0350e938b


### Using a TV for the keywords?
Use this gist to convert the TV values to seoPro https://gist.github.com/hometownlegends/7751607

<<<<<<< HEAD

=======
>>>>>>> d130a3b592bd720e7fdeddcfc94223b0350e938b
### Bugs and Features:
https://github.com/Sterc/SEOPro
https://github.com/Sterc/SEOPro
4 changes: 0 additions & 4 deletions _build/build.transport.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@
define('PKG_NAME_LOWER',strtolower(PKG_NAME));
define('PKG_NAMESPACE',strtolower(PKG_NAME));

<<<<<<< HEAD
define('PKG_VERSION','1.0.2');
=======
define('PKG_VERSION','1.0.0');
>>>>>>> d130a3b592bd720e7fdeddcfc94223b0350e938b
define('PKG_RELEASE','pl');

/* define sources */
Expand Down
6 changes: 0 additions & 6 deletions _build/data/transport.plugin.events.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,5 @@
'priority' => 0,
'propertyset' => 0,
),'',true,true);
$events['OnLoadWebDocument']= $modx->newObject('modPluginEvent');
$events['OnLoadWebDocument']->fromArray(array(
'event' => 'OnLoadWebDocument',
'priority' => 0,
'propertyset' => 0,
),'',true,true);

return $events;
24 changes: 0 additions & 24 deletions _build/data/transport.settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,6 @@
*/
$settings = array();

<<<<<<< HEAD
=======
// $settings['seopro_help']= $modx->newObject('modSystemSetting');
// $settings['seopro_help']->fromArray(array(
// 'key' => 'seopro_help',
// 'value' => false,
// 'xtype' => 'combo-boolean',
// 'namespace' => 'seopro',
// 'area' => 'general',
// ),'',true,true);

// $settings['seopro_helpurl']= $modx->newObject('modSystemSetting');
// $settings['seopro_helpurl']->fromArray(array(
// 'key' => 'seopro_helpurl',
// 'value' => 'http://docs.sterc.nl/packages/seopro/help.html',
// 'xtype' => 'textfield',
// 'namespace' => 'seopro',
// 'area' => 'general',
// ),'',true,true);

>>>>>>> d130a3b592bd720e7fdeddcfc94223b0350e938b
$settings['seopro.delimiter']= $modx->newObject('modSystemSetting');
$settings['seopro.delimiter']->fromArray(array(
'key' => 'seopro.delimiter',
Expand All @@ -50,7 +29,6 @@
'namespace' => 'seopro',
'area' => 'general',
),'',true,true);
<<<<<<< HEAD
$settings['seopro.usesitename']= $modx->newObject('modSystemSetting');
$settings['seopro.usesitename']->fromArray(array(
'key' => 'seopro.usesitename',
Expand All @@ -67,6 +45,4 @@
'namespace' => 'seopro',
'area' => 'general',
),'',true,true);
=======
>>>>>>> d130a3b592bd720e7fdeddcfc94223b0350e938b
return $settings;
13 changes: 0 additions & 13 deletions assets/components/seopro/js/mgr/seopro.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,31 +157,22 @@ Ext.extend(seoPro, Ext.Component, {
switch (field) {
case 'pagetitle':
case 'longtitle':
<<<<<<< HEAD
var title,siteName;
var delimiter = MODx.isEmpty(MODx.config['seopro.delimiter']) ? '|' : MODx.config['seopro.delimiter'];
var siteNameToggle = MODx.isEmpty(MODx.config['seopro.delimiter']) ? '|' : MODx.config['seopro.delimiter'];
var siteNameShow = MODx.isEmpty(MODx.config['seopro.usesitename']) ? false : true;
=======
var title;
var delimiter = MODx.isEmpty(MODx.config['seopro.delimiter']) ? '|' : MODx.config['seopro.delimiter'];
>>>>>>> d130a3b592bd720e7fdeddcfc94223b0350e938b
if (MODx.isEmpty(seoPro.config.values['longtitle'])) {
title = seoPro.config.values['pagetitle'];
} else {
title = seoPro.config.values['longtitle'];
}
<<<<<<< HEAD

if(siteNameShow){
siteName = ' ' + delimiter + ' ' + MODx.config.site_name;
}else{
siteName = ' ';
}
Ext.get('seopro-google-title').dom.innerHTML = title + siteName;
=======
Ext.get('seopro-google-title').dom.innerHTML = title + ' ' + delimiter + ' ' + MODx.config.site_name;
>>>>>>> d130a3b592bd720e7fdeddcfc94223b0350e938b
break;
case 'description':
case 'introtext':
Expand All @@ -206,14 +197,10 @@ Ext.extend(seoPro, Ext.Component, {
});
Ext.reg('seopro', seoPro);

<<<<<<< HEAD
seoPro = new seoPro();

Ext.onReady(function() {
if (!seoPro.config.loaded) {
seoPro.initialize();
}
});
=======
seoPro = new seoPro();
>>>>>>> d130a3b592bd720e7fdeddcfc94223b0350e938b
8 changes: 0 additions & 8 deletions core/components/seopro/docs/readme.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
--------------------
seoPro
--------------------
<<<<<<< HEAD
Version: 1.0.2 PL
=======
Version: 1.0.0 PL
>>>>>>> d130a3b592bd720e7fdeddcfc94223b0350e938b
Author: Wieger Sloot <[email protected]>
Support: Friso Speulman <[email protected]>
--------------------
Expand All @@ -18,11 +14,7 @@ MODX SEO Pro is a MODX package that helps you when performing Search Engine Opti


Using a TV for the keywords?
<<<<<<< HEAD
Use this gist to convert the TV values to seoPro https://gist.github.com/frisospeulman/7751607
=======
Use this gist to convert the TV values to seoPro https://gist.github.com/hometownlegends/7751607
>>>>>>> d130a3b592bd720e7fdeddcfc94223b0350e938b

Bugs and Features:
https://github.com/Sterc/SEOPro
101 changes: 1 addition & 100 deletions core/components/seopro/elements/plugins/seopro.plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
$seoPro = $modx->getService('seopro', 'seoPro', $modx->getOption('seopro.core_path', null, $modx->getOption('core_path') . 'components/seopro/') . 'model/seopro/', $scriptProperties);
if (!($seoPro instanceof seoPro))
return '';
<<<<<<< HEAD

switch ($modx->event->name) {
case 'OnDocFormRender':
Expand Down Expand Up @@ -86,85 +85,6 @@
$newSeoKeywords->save();
break;

=======

switch ($modx->event->name) {
case 'OnDocFormRender':
$currClassKey = $resource->get('class_key');
$strFields = $modx->getOption('seopro.fields', null, 'pagetitle:70,longtitle:70,description:155,alias:2023,menutitle:2023');
$arrFields = array();
if (is_array(explode(',', $strFields))) {
foreach (explode(',', $strFields) as $field) {
list($fieldName, $fieldCount) = explode(':', $field);
$arrFields[$fieldName] = $fieldCount;
}
} else {
return '';
}

$keywords = '';
$modx->controller->addLexiconTopic('seopro:default');
if ($_REQUEST['id'] && $_REQUEST['a'] == 30) {
$url = $modx->makeUrl($resource->get('id'), '', '', 'full');
$url = str_replace($resource->get('alias'), '<span id=\"seopro-replace-alias\">' . $resource->get('alias') . '</span>', $url);
$seoKeywords = $modx->getObject('seoKeywords', array('resource' => $resource->get('id')));
if ($seoKeywords) {
$keywords = $seoKeywords->get('keywords');
}
} elseif ($_REQUEST['a'] == 55) {
if ($_REQUEST['id']) {
$url = $modx->makeUrl($_REQUEST['id'], '', '', 'full');
$url .= '/<span id=\"seopro-replace-alias\"></span>';
} else {
$url = $modx->getOption('site_url') . '<span id=\"seopro-replace-alias\"></span>';
}
}

if ($_REQUEST['id'] == $modx->getOption('site_start')) {
unset($arrFields['alias']);
unset($arrFields['menutitle']);
}


$config = $seoPro->config;
unset($config['resource']);
$modx->regClientStartupHTMLBlock('<script type="text/javascript">
Ext.onReady(function() {
seoPro.config = ' . $modx->toJSON($config) . ';
seoPro.config.record = "' . $keywords . '";
seoPro.config.values = {};
seoPro.config.fields = "' . implode(",", array_keys($arrFields)) . '";
seoPro.config.chars = ' . $modx->toJSON($arrFields) . '
seoPro.config.url = "' . $url . '";
});
</script>');
$modx->regClientCSS($seoPro->config['assetsUrl'] . 'css/mgr.css');
$modx->regClientStartupScript($seoPro->config['assetsUrl'] . 'js/mgr/seopro.js??v=' . $modx->getOption('seopro.version',null,'v1.0.0'));
$modx->regClientStartupScript($seoPro->config['assetsUrl'] . 'js/mgr/resource.js?v=' . $modx->getOption('seopro.version',null,'v1.0.0'));

break;

case 'OnDocFormSave':
$seoKeywords = $modx->getObject('seoKeywords', array('resource' => $_POST['id']));
if (!$seoKeywords) {
$seoKeywords = $modx->newObject('seoKeywords', array('resource' => $_POST['id']));
}
$seoKeywords->set('keywords', trim($_POST['keywords'], ','));
$seoKeywords->save();
break;

case 'onResourceDuplicate':
$seoKeywords = $modx->getObject('seoKeywords', array('resource' => $resource->get('id')));
if (!$seoKeywords) {
$seoKeywords = $modx->newObject('seoKeywords', array('resource' => $resource->get('id')));
}
$newSeoKeywords = $modx->newObject('seoKeywords');
$newSeoKeywords->fromArray($seoKeywords->toArray());
$newSeoKeywords->set('resource', $newResource->get('id'));
$newSeoKeywords->save();
break;

>>>>>>> d130a3b592bd720e7fdeddcfc94223b0350e938b
case 'OnLoadWebDocument':
if ($modx->context->get('key') == "mgr") {
break;
Expand All @@ -174,23 +94,15 @@
$keyWords = $seoKeywords->get('keywords');
$modx->setPlaceholder('seoPro.keywords', $keyWords);
}
<<<<<<< HEAD
$siteBranding = (boolean) $modx->getOption('seopro.allowbranding', null, true);
$siteDelimiter = $modx->getOption('seopro.delimiter', null, '/');
$siteUseSitename = (boolean) $modx->getOption('seopro.usesitename', null, true);
$siteID = $modx->resource->get('id');
$siteName = $modx->getOption('site_name');
=======
$siteBranding = (boolean) $modx->getOption('allowbranding', null, true);
$siteID = $modx->resource->get('id');
$siteName = $modx->getOption('site_name');
$siteDelimiter = $modx->getOption('seopro.delimiter', null, '/');
>>>>>>> d130a3b592bd720e7fdeddcfc94223b0350e938b
$longtitle = $modx->resource->get('longtitle');
$pagetitle = $modx->resource->get('pagetitle');
$seoProTitle = array();
if ($siteID == $modx->getOption('site_start')) {
<<<<<<< HEAD
$seoProTitle['pagetitle'] = !empty($longtitle) ? $longtitle : $siteName;
} else {
$seoProTitle['pagetitle'] = !empty($longtitle) ? $longtitle : $pagetitle;
Expand All @@ -202,17 +114,6 @@
$modx->setPlaceholder('seoPro.title', implode(" ", $seoProTitle));
if ($siteBranding) {
$modx->regClientStartupHTMLBlock('<!-- This site is optimized with the Sterc seoPro plugin ' . $modx->getOption('seopro.version', null, 'v1.0.0') . ' - http://www.sterc.nl/modx/seopro -->');
=======
$seoProTitle['pagetitle'] = !empty($longtitle)? $longtitle:$siteName;
} else {
$seoProTitle['pagetitle'] = !empty($longtitle)? $longtitle:$pagetitle;
$seoProTitle['delimiter'] = $siteDelimiter;
$seoProTitle['sitename'] = $siteName;
}
$modx->setPlaceholder('seoPro.title', implode(" ", $seoProTitle));
if ($siteBranding) {
$modx->regClientStartupHTMLBlock('<!-- This site is optimized with the Sterc seoPro plugin '.$modx->getOption('seopro.version',null,'v1.0.0').' - http://www.sterc.nl/modx/seopro -->');
>>>>>>> d130a3b592bd720e7fdeddcfc94223b0350e938b
}
break;
}
}
5 changes: 1 addition & 4 deletions core/components/seopro/lexicon/en/default.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,5 @@
$_lang['setting_seopro.version_desc']= 'Current '.$_lang['setting_seopro.version'];
$_lang['setting_seopro.allowbranding'] =' Allow Sterc branding in head.';
$_lang['setting_seopro.allowbranding_desc']= 'Give us some love...';
<<<<<<< HEAD
$_lang['setting_seopro.usesitename'] ='Show sitename in the Google Preview and place in the sitename [[+seoPro.title]]?';
$_lang['setting_seopro.usesitename_desc']= 'If the value is NO the delimiter and sitename setting will be removed from the preview en seo title placeholder';
=======
>>>>>>> d130a3b592bd720e7fdeddcfc94223b0350e938b
$_lang['setting_seopro.usesitename_desc']= 'If the value is NO the delimiter and sitename setting will be removed from the preview en seo title placeholder';
10 changes: 1 addition & 9 deletions core/components/seopro/lexicon/nl/default.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,13 @@
$_lang['seopro.prevbox'] = 'Voorbeeld in Google';
$_lang['seopro.emptymetadescription']='<i>Vul een omschrijving in zodat een preview gemaakt kan worden.</i>';

<<<<<<< HEAD
$_lang['setting_seopro.delimiter'] = 'Scheidingsteken in Google preview.';
$_lang['setting_seopro.delimiter_desc'] = 'Scheidingsteken tussen Titel en sitenaam';
=======
$_lang['setting_seopro.delimiter'] = 'Delimiter in Google preview.';
$_lang['setting_seopro.delimiter_desc'] = 'Delimiter tussen Titel en sitenaam';
>>>>>>> d130a3b592bd720e7fdeddcfc94223b0350e938b
$_lang['setting_seopro.fields'] = 'Velden waarop SEO pro zal werken ';
$_lang['setting_seopro.fields_desc'] = 'Verander deze gegevens alleen als je weet wat je doet. Standaard waarde :pagetitle,longtitle,description,alias,menutitle. SEO Pro werkt niet op het content veld';
$_lang['setting_seopro.version'] ='Versie nummer';
$_lang['setting_seopro.version_desc']= 'Huidige '.$_lang['setting_seopro.version'];
$_lang['setting_seopro.allowbranding'] ='Toestaan van Sterc Branding in de head';
$_lang['setting_seopro.allowbranding_desc']= 'Give us some love...';
<<<<<<< HEAD
$_lang['setting_seopro.usesitename'] ='Site naam tonen in preview en [[+seoPro.title]]?';
$_lang['setting_seopro.usesitename_desc']= 'Als deze op nee staat worden het scheidingsteken en sitenaam niet getoond.';
=======
>>>>>>> d130a3b592bd720e7fdeddcfc94223b0350e938b
$_lang['setting_seopro.usesitename_desc']= 'Als deze op nee staat worden het scheidingsteken en sitenaam niet getoond.';
4 changes: 0 additions & 4 deletions core/components/seopro/lexicon/ru/default.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
$_lang['seopro.tips'] = 'SEO-PRO Советы!';
$_lang['seopro.focuskeywords'] = 'Фокусные фразы';
$_lang['seopro.focuskeywords_desc'] = 'Разделённые запятой';
<<<<<<< HEAD
$_lang['seopro.prevbox'] = 'Как это будет выглядеть в Google?';
=======
$_lang['seopro.prevbox'] = 'Как эта страница будет выглядеть в поисковой выдаче Google:';
>>>>>>> d130a3b592bd720e7fdeddcfc94223b0350e938b
$_lang['seopro.emptymetadescription']='<i>Для предварительного просмотра заполните поле Описание</i>';

$_lang['setting_seopro.delimiter'] = 'Разделитель в сниппете Google';
Expand Down

0 comments on commit f3f8bdb

Please sign in to comment.