Skip to content

Commit 6cd5730

Browse files
authored
Merge pull request #43 from aeberhard/master
Umstellung auf FOR-Namespace
2 parents edc62fe + 22c8424 commit 6cd5730

File tree

9 files changed

+49
-7
lines changed

9 files changed

+49
-7
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# REDAXO Community Demo - Changelog
22

3+
## 4.3.0 - 31.08.2025
4+
5+
* Umstellung auf FOR-Namespace
6+
* Console-Commands in package.yml an FOR-Namespace angepasst
7+
* Copyright 2016 – 2025 in Template `09 . Footer Hilfstemplate`
8+
* Backup-Files neu mit Console-Commands erstellt
9+
310
## 4.2.0 - 19.07.2025
411

512
### Features

backups/demo_community.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,14 +274,14 @@ INSERT INTO `rex_config` VALUES
274274
('be_style/customizer','codemirror_theme','\"eclipse\"'),
275275
('be_style/customizer','labelcolor','\"#3bb594\"'),
276276
('be_style/customizer','showlink','1'),
277-
('core','package-config','{\"backup\":{\"install\":true,\"status\":true},\"be_style\":{\"install\":true,\"status\":true,\"plugins\":{\"customizer\":{\"install\":true,\"status\":false},\"redaxo\":{\"install\":true,\"status\":true}}},\"cronjob\":{\"install\":false,\"status\":false,\"plugins\":{\"article_status\":{\"install\":false,\"status\":false},\"optimize_tables\":{\"install\":false,\"status\":false}}},\"debug\":{\"install\":false,\"status\":false},\"demo_base\":{\"install\":false,\"status\":false},\"demo_community\":{\"install\":true,\"status\":true},\"demo_fullpage\":{\"install\":false,\"status\":false},\"demo_onepage\":{\"install\":false,\"status\":false},\"developer\":{\"install\":true,\"status\":true},\"install\":{\"install\":true,\"status\":true},\"markitup\":{\"install\":true,\"status\":true,\"plugins\":{\"documentation\":{\"install\":false,\"status\":false}}},\"media_manager\":{\"install\":true,\"status\":true},\"mediapool\":{\"install\":true,\"status\":true},\"metainfo\":{\"install\":true,\"status\":true},\"phpmailer\":{\"install\":true,\"status\":true},\"project\":{\"install\":true,\"status\":true},\"structure\":{\"install\":true,\"status\":true,\"plugins\":{\"content\":{\"install\":true,\"status\":true},\"history\":{\"install\":false,\"status\":false},\"version\":{\"install\":false,\"status\":false}}},\"users\":{\"install\":true,\"status\":true},\"ycom\":{\"install\":true,\"status\":true,\"plugins\":{\"auth\":{\"install\":true,\"status\":true},\"group\":{\"install\":true,\"status\":true},\"media_auth\":{\"install\":false,\"status\":false}}},\"yform\":{\"install\":true,\"status\":true,\"plugins\":{\"email\":{\"install\":true,\"status\":true},\"manager\":{\"install\":true,\"status\":true},\"rest\":{\"install\":false,\"status\":false},\"tools\":{\"install\":false,\"status\":false}}},\"yform_mediafile\":{\"install\":true,\"status\":true},\"yform_spam_protection\":{\"install\":true,\"status\":true,\"plugins\":{\"recaptcha\":{\"install\":false,\"status\":false}}},\"yrewrite\":{\"install\":true,\"status\":true}}'),
277+
('core','package-config','{\"adminer\":{\"install\":false,\"status\":false},\"backup\":{\"install\":true,\"status\":true},\"be_style\":{\"install\":true,\"status\":true,\"plugins\":{\"customizer\":{\"install\":true,\"status\":false},\"redaxo\":{\"install\":true,\"status\":true}}},\"cronjob\":{\"install\":false,\"status\":false,\"plugins\":{\"article_status\":{\"install\":false,\"status\":false},\"optimize_tables\":{\"install\":false,\"status\":false}}},\"dashboard\":{\"install\":false,\"status\":false,\"plugins\":{\"demo\":{\"install\":false,\"status\":null}}},\"debug\":{\"install\":false,\"status\":false},\"demo_base\":{\"install\":false,\"status\":false},\"demo_community\":{\"install\":true,\"status\":true},\"demo_fullpage\":{\"install\":false,\"status\":false},\"demo_onepage\":{\"install\":false,\"status\":false},\"developer\":{\"install\":true,\"status\":true},\"install\":{\"install\":true,\"status\":true},\"markitup\":{\"install\":true,\"status\":true,\"plugins\":{\"documentation\":{\"install\":false,\"status\":false}}},\"mblock\":{\"install\":false,\"status\":false},\"media_manager\":{\"install\":true,\"status\":true},\"mediapool\":{\"install\":true,\"status\":true},\"metainfo\":{\"install\":true,\"status\":true},\"phpmailer\":{\"install\":true,\"status\":true},\"project\":{\"install\":true,\"status\":true},\"redactor\":{\"install\":false,\"status\":false},\"sprog\":{\"install\":false,\"status\":false},\"structure\":{\"install\":true,\"status\":true,\"plugins\":{\"content\":{\"install\":true,\"status\":true},\"history\":{\"install\":false,\"status\":false},\"version\":{\"install\":false,\"status\":false}}},\"users\":{\"install\":true,\"status\":true},\"ycom\":{\"install\":true,\"status\":true,\"plugins\":{\"auth\":{\"install\":true,\"status\":true},\"group\":{\"install\":true,\"status\":true},\"media_auth\":{\"install\":false,\"status\":false}}},\"yform\":{\"install\":true,\"status\":true,\"plugins\":{\"email\":{\"install\":true,\"status\":true},\"manager\":{\"install\":true,\"status\":true},\"rest\":{\"install\":false,\"status\":false},\"tools\":{\"install\":false,\"status\":false}}},\"yform_mediafile\":{\"install\":true,\"status\":true},\"yform_spam_protection\":{\"install\":true,\"status\":true,\"plugins\":{\"recaptcha\":{\"install\":false,\"status\":false}}},\"yrewrite\":{\"install\":true,\"status\":true}}'),
278278
('core','package-order','[\"be_style\",\"be_style\\/redaxo\",\"users\",\"backup\",\"developer\",\"install\",\"markitup\",\"media_manager\",\"mediapool\",\"phpmailer\",\"structure\",\"metainfo\",\"structure\\/content\",\"yform\",\"yform\\/email\",\"yform\\/manager\",\"yform_mediafile\",\"yform_spam_protection\",\"yrewrite\",\"ycom\",\"demo_community\",\"ycom\\/auth\",\"ycom\\/group\",\"project\"]'),
279279
('core','utf8mb4','false'),
280280
('core','version','\"5.10.0\"'),
281281
('developer','actions','true'),
282282
('developer','delete','true'),
283283
('developer','dir_suffix','true'),
284-
('developer','items','{\"templates\":{\"1\":1582302840,\"2\":1582376110,\"3\":1582321383,\"4\":1582321346,\"5\":1694210123,\"6\":1671010308,\"7\":1,\"8\":1582400011,\"9\":1582376969,\"10\":1686912690},\"modules\":{\"1\":1582303508,\"2\":1,\"3\":1,\"4\":1,\"5\":1687118408,\"6\":1,\"7\":1,\"8\":1671010940,\"9\":1582311637,\"10\":1,\"11\":1,\"12\":1}}'),
284+
('developer','items','{\"templates\":{\"1\":1582302840,\"2\":1582376110,\"3\":1582321383,\"4\":1582321346,\"5\":1694210123,\"6\":1671010308,\"7\":1,\"8\":1582400011,\"9\":1582376969,\"10\":1756594210},\"modules\":{\"1\":1582303508,\"2\":1,\"3\":1,\"4\":1,\"5\":1687118408,\"6\":1,\"7\":1,\"8\":1671010940,\"9\":1582311637,\"10\":1,\"11\":1,\"12\":1}}'),
285285
('developer','modules','true'),
286286
('developer','prefix','false'),
287287
('developer','rename','true'),
@@ -662,7 +662,7 @@ INSERT INTO `rex_template` VALUES
662662
(7,NULL,'06 . Headerbild','<?php\r\n// Headerbild rekursiv einbinden.\r\n// Wenn der aktuelle Artikel kein Bild hat, wird das aus den Elternkategorien genommen.\r\n$header = \'\';\r\n$headerpic = $this->getValue(\'art_file\');\r\n\r\nif ($headerpic == \'\') {\r\n $category = rex_article::getCurrent()->getCategory();\r\n while ($header == \'\') {\r\n if ($category == null) {\r\n break;\r\n }\r\n $headerpic = $category->getValue(\'art_file\');\r\n $category = $category->getParent();\r\n } \r\n}\r\n\r\nif ($headerpic == \'\') {\r\n $headerpic = rex_article::getSiteStartArticle()->getValue(\'art_file\');\r\n}\r\n\r\n\r\n$header = \'\r\n<div class=\"header\" style=\"background-image: url(\'.rex_url::base(\'index.php?rex_media_type=header&rex_media_file=\'.$headerpic).\');\r\n \">\r\n <div class=\"filter\"></div>\r\n <div class=\"container text-center\">\r\n <h1>\'.$this->getValue(\'name\').\'</h1>\';\r\n if ($this->getValue(\'art_subtitle\') != \'\') {\r\n $header .= \'\r\n <h3>\'.$this->getValue(\'art_subtitle\').\'</h3>\';\r\n }\r\n $header .= \' \r\n </div>\r\n</div>\';\r\n\r\nif (SITE_TYPE == \'col1\' || SITE_TYPE == \'col2\') {\r\necho $header;\r\n}\r\n?>\r\n',0,'2020-02-21 17:42:50','admin','0000-00-00 00:00:00','','{\"ctype\":[],\"modules\":{\"1\":{\"all\":\"1\"}},\"categories\":{\"all\":\"1\"}}',0),
663663
(8,NULL,'07 . Navigation','<?php\r\n$path = explode(\"|\",$this->getValue(\"path\").$this->getValue(\"article_id\").\"|\");\r\n$path1 = ((!empty($path[1])) ? $path[1] : \'\');\r\n$path2 = ((!empty($path[2])) ? $path[2] : \'\');\r\n\r\n// Gruppen-Berechtigung eines YCom-Nutzers auslesen\r\n$ycom_user = rex_ycom_auth::getUser();\r\n$nav_main = \'\';\r\n\r\nforeach (rex_category::getRootCategories(true) as $lev1) { // wenn true, dann werden nur die Artikel mit Status online berücksichtigt\r\n\r\n if (rex_article::get($lev1->getId())->isPermitted() && $lev1->getId() != rex_article::getSiteStartArticleId()) { // Home soll nicht in der Navi auftauchen\r\n \r\n if ($lev1->getId() == 4) { // falls Profilkategorie, dann Profil-Foto\r\n $profile_pic = \'profile_default.png\';\r\n if ($ycom_user && rex_ycom_auth::getUser()->getValue(\'pic\') != \'\') $profile_pic = rex_ycom_auth::getUser()->getValue(\'pic\'); // prüfen, ob User eingeloggt ist und ob er ein Bild bhinterlegt hat\r\n $profilelink = \'\r\n <a href=\"#\" class=\"profile-photo dropdown-toggle\" data-toggle=\"dropdown\">\r\n <div class=\"profile-photo-small\">\r\n <img src=\"index.php?rex_media_type=profile&rex_media_file=\'.$profile_pic.\'\" alt=\"Profilbild\" class=\"img-circle img-responsive img-no-padding\">\r\n </div>\r\n </a>\';\r\n } else {\r\n $profilelink = \'\r\n <a class=\"dropdown-toggle\" href=\"\'.$lev1->getUrl().\'\">\'.htmlspecialchars($lev1->getValue(\'name\')).\'</a>\';\r\n }\r\n\r\n if ($lev1->getId() == $path1) {\r\n $nav_main .= \'\r\n <li class=\"dropdown active\">\'.$profilelink;\r\n } else {\r\n $nav_main .= \'\r\n <li class=\"dropdown\">\'.$profilelink;\r\n }\r\n\r\n // 1st level start\r\n $lev1Size = sizeof($lev1->getChildren(true));\r\n\r\n if ($lev1Size != \"0\") {\r\n\r\n $nav_main .= \'\r\n <ul class=\"dropdown-menu dropdown-menu-right\">\';\r\n\r\n // START 2nd level categories\r\n foreach ($lev1->getChildren(true) as $lev2):\r\n if (rex_article::get($lev2->getId())->isPermitted()) {\r\n\r\n $nav_icon = ($lev2->getValue(\'art_nav_icon\') != \'\') ? \'<span class=\"icon-simple\"><i class=\"\'.$lev2->getValue(\'art_nav_icon\').\'\"></i></span> \' : \'\';\r\n\r\n if ($lev2->getId() == $path2) {\r\n $nav_main .= \'\r\n <li class=\"dropdown-toggle active\"><a href=\"\'.$lev2->getUrl().\'\">\'.$nav_icon.htmlspecialchars($lev2->getValue(\'name\')).\'</a></li>\';\r\n } else {\r\n $nav_main .= \'\r\n <li class=\"dropdown-toggle\"><a href=\"\'.$lev2->getUrl().\'\">\'.$nav_icon.htmlspecialchars($lev2->getValue(\'name\')).\'</a></li>\';\r\n }\r\n }\r\n endforeach;\r\n\r\n $nav_main .= \'\r\n </ul>\';\r\n\r\n }\r\n\r\n $nav_main .= \'\r\n </li>\';\r\n }\r\n}\r\n\r\necho \'\r\n<ul class=\"nav navbar-nav navbar-right\">\r\n \'.$nav_main.\'\r\n</ul>\';\r\n?>\r\n',0,'2020-02-22 20:33:31','admin','2020-02-22 20:33:31','admin','{\"ctype\":[],\"modules\":{\"1\":{\"all\":\"1\"}},\"categories\":{\"all\":\"1\"}}',0),
664664
(9,NULL,'08 . Subnavigation (Seitenspalte)','<?php\r\n$path = explode(\"|\",$this->getValue(\"path\").$this->getValue(\"article_id\").\"|\");\r\n$path1 = ((!empty($path[1])) ? $path[1] : \'\');\r\n$path2 = ((!empty($path[2])) ? $path[2] : \'\');\r\n\r\n$article = rex_article::get($path1);\r\n$articleUrl = $article->getUrl();\r\n$articleName = $article->getName();\r\n\r\n$nav = rex_navigation::factory();\r\n$nav->addCallback(\'rex_ycom_auth::articleIsPermitted\');\r\n$subnav = $nav->get($path1,2,TRUE,TRUE);\r\n\r\nif ($subnav != \'\') {\r\n\r\n echo \'\r\n <h4 id=\"sidenav_title\"><a href=\"\'.$articleUrl.\'\">\'.$articleName.\'</a></h4>\';\r\n\r\n echo \'\r\n <div class=\"subnav\">\r\n \'.$subnav.\'\r\n </div\';\r\n\r\n}\r\n?>\r\n',0,'2020-02-22 14:09:29','admin','2020-02-22 14:09:29','admin','{\"ctype\":[],\"modules\":{\"1\":{\"all\":\"1\"}},\"categories\":{\"all\":\"1\"}}',0),
665-
(10,NULL,'09 . Footer Hilfstemplate','<footer class=\"section-dark\">\r\n <div class=\"container\">\r\n <nav class=\"pull-left\">\r\n REX_ARTICLE[id=6]\r\n </nav>\r\n <div class=\"copyright pull-right\">\r\n &copy; 2016 – 2023 REDAXO CMS <i class=\"fa fa-heart heart\"></i> ya all!\r\n </div>\r\n </div>\r\n</footer>',0,'2023-06-16 12:51:30','admin','2023-06-16 12:51:30','admin','{\"ctype\":[],\"modules\":{\"1\":{\"all\":\"1\"}},\"categories\":{\"all\":\"1\"}}',0);
665+
(10,NULL,'09 . Footer Hilfstemplate','<footer class=\"section-dark\">\r\n <div class=\"container\">\r\n <nav class=\"pull-left\">\r\n REX_ARTICLE[id=6]\r\n </nav>\r\n <div class=\"copyright pull-right\">\r\n &copy; 2016 – 2025 REDAXO CMS <i class=\"fa fa-heart heart\"></i> ya all!\r\n </div>\r\n </div>\r\n</footer>',0,'2025-08-31 00:50:10','admin','2025-08-31 00:50:10','admin','{\"ctype\":[],\"modules\":{\"1\":{\"all\":\"1\"}},\"categories\":{\"all\":\"1\"}}',0);
666666
/*!40000 ALTER TABLE `rex_template` ENABLE KEYS */;
667667
UNLOCK TABLES;
668668

install.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
use FriendsOfRedaxo\DemoCommunity\rex_demo_community;
4+
35
/** @var rex_addon $this */
46

57
// add success message after add-on install

lib/console/demo_community_dumpfiles.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
declare(strict_types=1);
44

5+
namespace FriendsOfRedaxo\DemoCommunity;
6+
7+
use rex_console_command;
58
use Symfony\Component\Console\Input\InputInterface;
69
use Symfony\Component\Console\Input\InputOption;
710
use Symfony\Component\Console\Output\OutputInterface;

lib/console/demo_community_dumptables.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
declare(strict_types=1);
44

5+
namespace FriendsOfRedaxo\DemoCommunity;
6+
7+
use rex_console_command;
58
use Symfony\Component\Console\Input\InputInterface;
69
use Symfony\Component\Console\Input\InputOption;
710
use Symfony\Component\Console\Output\OutputInterface;

lib/console/demo_community_install.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<?php
22

3+
namespace FriendsOfRedaxo\DemoCommunity;
4+
5+
use rex_console_command;
36
use Symfony\Component\Console\Input\InputInterface;
47
use Symfony\Component\Console\Input\InputOption;
58
use Symfony\Component\Console\Output\OutputInterface;

lib/demo_community.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
<?php
22

3+
namespace FriendsOfRedaxo\DemoCommunity;
4+
5+
use rex;
6+
use rex_addon;
7+
use rex_backup;
8+
use rex_dir;
9+
use rex_functional_exception;
10+
use rex_i18n;
11+
use rex_install_archive;
12+
use rex_install_packages;
13+
use rex_install_webservice;
14+
use rex_logger;
15+
use rex_null_package;
16+
use rex_package;
17+
use rex_package_manager;
18+
use rex_path;
19+
use rex_yrewrite;
20+
21+
use function count;
22+
23+
use const DIRECTORY_SEPARATOR;
24+
325
class rex_demo_community
426
{
527
/** @var string[] */

package.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package: demo_community
2-
version: 4.2.0
2+
version: 4.3.0
33
author: 'Friends Of REDAXO'
44
supportpage: 'https://github.com/FriendsOfREDAXO/demo_community'
55
page:
@@ -24,6 +24,6 @@ requires:
2424
php: '>=8.0'
2525

2626
console_commands:
27-
'demo_community:install': rex_command_demo_community_install
28-
'demo_community:dump_files': rex_command_demo_community_dumpfiles
29-
'demo_community:dump_tables': rex_command_demo_community_dumptables
27+
'demo_community:install': FriendsOfRedaxo\DemoCommunity\rex_command_demo_community_install
28+
'demo_community:dump_files': FriendsOfRedaxo\DemoCommunity\rex_command_demo_community_dumpfiles
29+
'demo_community:dump_tables': FriendsOfRedaxo\DemoCommunity\rex_command_demo_community_dumptables

pages/install.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
use FriendsOfRedaxo\DemoCommunity\rex_demo_community;
4+
35
/** @var rex_addon $this */
46

57
/* setup process */

0 commit comments

Comments
 (0)