From fb5d4105e6f00cf1e1f4269ded8317186873ddea Mon Sep 17 00:00:00 2001 From: Mathias Arzberger Date: Fri, 21 Mar 2025 04:36:40 +0100 Subject: [PATCH] add ai usage feature --- CHANGELOG.md | 4 ++++ README.md | 3 ++- contao/dca/tl_content.php | 30 +++++++++++++++++++++++++++++ contao/languages/de/tl_content.php | 31 ++++++++++++++++++++++++++++++ contao/languages/en/tl_content.php | 31 ++++++++++++++++++++++++++++++ 5 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 contao/dca/tl_content.php create mode 100644 contao/languages/de/tl_content.php create mode 100644 contao/languages/en/tl_content.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 4797d07..c0d07ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ Types of changes Security in case of vulnerabilities. ) +## [1.1.0](https://github.com/pdir/contao-seo-plugin/tree/1.1.0) - 2025-03-21 + +- [Added] Specify the percentage of content created with artificial intelligence (AI) + ## [1.0.3](https://github.com/pdir/contao-seo-plugin/tree/1.0.3) - 2024-11-09 - [Fixed] do not use global namespace in OutputFrontendTemplateListener diff --git a/README.md b/README.md index 19a20d3..92abcb0 100644 --- a/README.md +++ b/README.md @@ -5,12 +5,13 @@ We help website owners and editorial teams to get more traffic from search engin helps users to optimize their content and make it easy to find for both users and search engines. With the Contao SEO plugin, you have the most important on-page factors directly in view. -### Current range of functions of version 1.0.0 +### Current range of functions of version 1.1.0 - SEO analysis of 8 typical on-page problems - IndexNow function for all known providers [indexnow.org](https://www.indexnow.org/faq) - Possibility to activate a 404 error log - Monitoring of alias changes (experimental, must be activated in user profile) - Display existing URL redirects in the alias view +- Specify the percentage of content created with artificial intelligence (AI) ### An outlook on further functions - At least 30 additional tests for on-page recommendations diff --git a/contao/dca/tl_content.php b/contao/dca/tl_content.php new file mode 100644 index 0000000..9162b68 --- /dev/null +++ b/contao/dca/tl_content.php @@ -0,0 +1,30 @@ +addField('pdirSeoAiUsage', 'text') + ->addField('pdirSeoAiSource', 'text') + + // now the field is registered in the PaletteManipulator + // but it still has to be registered in the globals array: + ->applyToPalette('text', 'tl_content') + ->applyToPalette('html', 'tl_content') +; + +$GLOBALS['TL_DCA']['tl_content']['fields']['pdirSeoAiUsage'] = [ + 'filter' => true, + 'inputType' => 'select', + 'options' => ['100%', '75%', '50%', '25%', '0%'], + 'eval' => ['chosen'=>true, 'tl_class'=>'w25'], + 'sql' => ['type' => 'string', 'length' => 64, 'default' => '0%'] +]; + +$GLOBALS['TL_DCA']['tl_content']['fields']['pdirSeoAiSource'] = [ + 'filter' => true, + 'inputType' => 'select', + 'options' => &$GLOBALS['TL_LANG']['tl_content']['pdirSeoAiSources'], + 'eval' => ['chosen'=>true, 'tl_class'=>'w25', 'includeBlankOption'=>true], + 'sql' => ['type' => 'string', 'length' => 128, 'default' => ''] +]; diff --git a/contao/languages/de/tl_content.php b/contao/languages/de/tl_content.php new file mode 100644 index 0000000..b2b93a0 --- /dev/null +++ b/contao/languages/de/tl_content.php @@ -0,0 +1,31 @@ + [ + 'ChatGPT 4o', + 'ChatGPT 4o mini', + 'GPT-4', + 'GPT-3.5', + 'o1-mini', + 'o1-preview', + 'ChatGPT 4o with canvas', + ], + 'llm' => [ + 'meta-llama-3.1-8b-instruct' + ], + 'google' => [ + 'Gemini with 1.5 Flash', + 'Gemini Advanced with 1.5 Pro' + ], + 'microsoft' => [ + 'Copilot' + ], + 'other' => [ + 'Perplexity AI Inc' + ] +]; diff --git a/contao/languages/en/tl_content.php b/contao/languages/en/tl_content.php new file mode 100644 index 0000000..1f9eee8 --- /dev/null +++ b/contao/languages/en/tl_content.php @@ -0,0 +1,31 @@ + [ + 'ChatGPT 4o', + 'ChatGPT 4o mini', + 'GPT-4', + 'GPT-3.5', + 'o1-mini', + 'o1-preview', + 'ChatGPT 4o with canvas', + ], + 'llm' => [ + 'meta-llama-3.1-8b-instruct' + ], + 'google' => [ + 'Gemini with 1.5 Flash', + 'Gemini Advanced with 1.5 Pro' + ], + 'microsoft' => [ + 'Copilot' + ], + 'other' => [ + 'Perplexity AI Inc' + ] +];