diff --git a/Api/Controller/EntryController.php b/Api/Controller/EntryController.php index 1b60457..9e9bc7b 100644 --- a/Api/Controller/EntryController.php +++ b/Api/Controller/EntryController.php @@ -1,6 +1,7 @@ apiSuccess(['success' => true,'user_id' => $user->user_id,'count' => $count]); } + + public function actionPostFeatured(): AbstractReply + { + + $entryId = $this->filter('entry_id', 'uint'); + $userId = $this->filter('user_id', 'uint'); + $entryTitle = $this->filter('entry_title', 'string'); + + /** @var EntryFeaturedRequest $entryFeaturedRequest */ + $entryFeaturedRequest = $this->em()->create('RomhackPlaza\Master:EntryFeaturedRequest'); + $entryFeaturedRequest->entry_id = $entryId; + $entryFeaturedRequest->user_id = $userId; + $entryFeaturedRequest->entry_title = $entryTitle; + $entryFeaturedRequest->featured_request_state = 'moderated'; + $entryFeaturedRequest->save(); + + return $this->apiSuccess(['success' => true]); + + } } \ No newline at end of file diff --git a/ApprovalQueue/Club.php b/ApprovalQueue/Club.php index ba859bb..c859275 100644 --- a/ApprovalQueue/Club.php +++ b/ApprovalQueue/Club.php @@ -63,7 +63,7 @@ class Club extends AbstractHandler } } - public function actionReject(\RomhackPlaza\Master\Entity\Club $club) + public function actionDelete(\RomhackPlaza\Master\Entity\Club $club) { $club->club_state = 'rejected'; $club->save(); diff --git a/ApprovalQueue/EntryFeaturedRequest.php b/ApprovalQueue/EntryFeaturedRequest.php new file mode 100644 index 0000000..e49b63f --- /dev/null +++ b/ApprovalQueue/EntryFeaturedRequest.php @@ -0,0 +1,61 @@ +canActionContent($content, $error ); + } + + protected function canActionContent(Entity $content, &$error = null) + { + return \XF::visitor()->hasPermission('romhackplaza', 'canModerateEntries'); + } + + public function getEntityWith() + { + return ['User']; + } + + public function actionApprove(\RomhackPlaza\Master\Entity\EntryFeaturedRequest $entryFeaturedRequest) + { + + try { + + $db = Laravel::db(); + + $db->update('entries', [ + 'featured' => 1, + 'featured_at' => date('Y-m-d H:i:s', \XF::$time), + ], 'id = ?', + [$entryFeaturedRequest->entry_id] + ); + + $entryFeaturedRequest->featured_request_state = 'visible'; + $entryFeaturedRequest->save(); + + + } catch ( \Exception $e ) { + \XF::logException($e, messagePrefix: "EntryFeaturedRequest error: " ); + } + + } + + public function actionDelete(\RomhackPlaza\Master\Entity\EntryFeaturedRequest $entryFeaturedRequest) + { + $entryFeaturedRequest->featured_request_state = 'rejected'; + $entryFeaturedRequest->save(); + } + + public function getTemplateName() + { + return 'public:approval_item_entry_featured_request'; + } + +} \ No newline at end of file diff --git a/Entity/EntryFeaturedRequest.php b/Entity/EntryFeaturedRequest.php new file mode 100644 index 0000000..20191e6 --- /dev/null +++ b/Entity/EntryFeaturedRequest.php @@ -0,0 +1,91 @@ +shortName = 'RomhackPlaza\Master:EntryFeaturedRequest'; + $structure->table = 'xf_romhackplaza_entry_featured_request'; + $structure->primaryKey = 'featured_request_id'; + + $structure->columns = [ + 'featured_request_id' => ['type' => self::UINT, 'autoIncrement' => true], + 'entry_id' => ['type' => self::UINT, 'required' => true], + 'user_id' => ['type' => self::UINT], + 'entry_title' => ['type' => self::STR, 'maxLength' => 255], + 'featured_request_state' => ['type' => self::STR, 'default' => 'moderated', + 'allowedValues' => ['visible', 'moderated', 'rejected'] + ], + 'featured_request_date' => ['type' => self::UINT, 'default' => \XF::$time] + ]; + + $structure->relations = [ + 'User' => [ + 'entity' => 'XF:User', + 'type' => self::TO_ONE, + 'conditions' => 'user_id', + 'primary' => true + ], + ]; + + return $structure; + + } + + protected function _postSave() + { + if( $this->isInsert() && $this->featured_request_state === 'moderated' ) { + $this->inQueue(); + } else if( $this->isUpdate() && $this->isChanged('featured_request_state') ) { + if( $this->featured_request_state === 'moderated' ) { + $this->inQueue(); + } else { + $this->removeQueue(); + } + } + } + + protected function _postDelete() + { + if( $this->featured_request_state === 'moderated' ) { + $this->removeQueue(); + } + } + + protected function inQueue() + { + $queue = $this->em()->find('XF:ApprovalQueue', ['rhpz_entry_featurerequest', $this->featured_request_id ] ); + if( !$queue ) + { + /** @var ApprovalQueue $newQueue */ + $newQueue = $this->em()->create('XF:ApprovalQueue'); + $newQueue->content_type = 'rhpz_entry_featurerequest'; + $newQueue->content_id = $this->featured_request_id; + $newQueue->save(); + } + } + + protected function removeQueue() + { + $queue = $this->em()->find('XF:ApprovalQueue', ['rhpz_entry_featurerequest', $this->featured_request_id ] ); + if( $queue ) + $queue->delete(); + } +} \ No newline at end of file diff --git a/Entity/News.php b/Entity/News.php new file mode 100644 index 0000000..5beaadd --- /dev/null +++ b/Entity/News.php @@ -0,0 +1,26 @@ +shortName = 'RomhackPlaza\Master:News'; + $structure->table = 'xf_romhackplaza_news'; // Unused. + $structure->primaryKey = 'id'; + + $structure->columns = [ + 'id' => ['type' => self::UINT], + 'user_id' => ['type' => self::UINT, 'required' => true], + 'title' => ['type' => self::STR, 'required' => true], + 'slug' => ['type' => self::STR, 'required' => true], + ]; + + return $structure; + } +} \ No newline at end of file diff --git a/Helper/Helpers.php b/Helper/Helpers.php new file mode 100644 index 0000000..47405d6 --- /dev/null +++ b/Helper/Helpers.php @@ -0,0 +1,25 @@ + $content->title ?? '', + 'post' => $content->Thread?->title ?? '', + 'user' => $content->username ?? '', + 'profile_post' => \XF\Util\Str::substr($content->content ?? '', 0, 50), + 'profile_post_comment' => \XF\Util\Str::substr($content->content ?? '', 0, 50), + + // Custom + 'club' => $content->title ?? '', + 'rhpz_entry_featurerequest' => $content->entry_title ?? '', + + default => $content->title ?? $content->username ?? $content->content ?? "#{$content->getEntityId()}", + }; + } +} \ No newline at end of file diff --git a/Pub/Controller/News.php b/Pub/Controller/News.php new file mode 100644 index 0000000..6be0277 --- /dev/null +++ b/Pub/Controller/News.php @@ -0,0 +1,50 @@ +id; + $laravelDb = \RomhackPlaza\Master\Helper\Laravel::db(); + if( !$laravelDb ) + return $this->notFound(); + + $entry = $laravelDb->fetchRow("SELECT id, slugFROM news WHERE id = ?", $entryId); + if( !$entry ) + return $this->notFound(); + + return $this->redirect(\XF::options()->homePageUrl . '/news/' . $entry['slug']); + } + + public function actionReport(ParameterBag $params): AbstractReply + { + + $this->assertRegistrationRequired(); + + $entryId = $params->id; + $laravelDb = \RomhackPlaza\Master\Helper\Laravel::db(); + if( !$laravelDb ) + return $this->notFound(); + + $entry = $laravelDb->fetchRow("SELECT id, title, slug, user_id, description FROM news WHERE id = ?", $entryId); + if( !$entry ) + return $this->notFound(); + + $entity = $this->em()->instantiateEntity('RomhackPlaza\Master:News', $entry); + $entity->setReadOnly(true); + + $reportPlugin = $this->plugin('XF:Report'); + return $reportPlugin->actionReport( + 'romhackplaza_news', $entity, + $this->buildLink('romhackplaza_news/report', $entity), + \XF::options()->homePageUrl . '/news/report_redirect?id=' . $entity->id + ); + + } +} \ No newline at end of file diff --git a/Report/Entry.php b/Report/Entry.php index 1b45027..2d8e008 100644 --- a/Report/Entry.php +++ b/Report/Entry.php @@ -65,7 +65,7 @@ class Entry extends AbstractHandler #[Override] public function getContentMessage(Report $report) { - return $report->content_info['message']; + return $report->content_info['description']; } #[Override] diff --git a/Report/News.php b/Report/News.php new file mode 100644 index 0000000..b099bbd --- /dev/null +++ b/Report/News.php @@ -0,0 +1,75 @@ +hasPermission('romhackplaza', 'view'); + } + + #[Override] + protected function canActionContent(Report $report) + { + return \XF::visitor()->hasPermission('romhackplaza', 'canEditOthersEntries'); + } + + #[Override] + public function setupReportEntityContent(Report $report, Entity $content) + { + $report->content_user_id = $content['user_id']; + $report->content_info = [ + 'id' => $content['id'], + 'title' => $content['title'], + 'slug' => $content['slug'], + 'user_id' => $content['user_id'], + 'description' => $content['description'] ?? "", + ]; + } + + public function getContent($id) + { + $laravelDb = \RomhackPlaza\Master\Helper\Laravel::db(); + + if( $laravelDb ){ + $entry = $laravelDb->fetchRow("SELECT id, title, slug, user_id, description FROM news WHERE id = ?", $id); + $entity = \XF::em()->instantiateEntity('RomhackPlaza\Master:News', $entry); + $entity->setReadOnly(true); + return $entity; + } + + return null; + } + + #[Override] + public function getContentTitle(Report $report) + { + return $report->content_info['title'] ?? 'Unknown'; + } + + #[Override] + public function getContentLink(Report $report) + { + return \XF::options()->homePageUrl . '/news/' . $report->content_info['slug']; + } + + #[Override] + public function getContentMessage(Report $report) + { + return $report->content_info['description']; + } + + #[Override] + public function getTemplateName() + { + return "public:report_content_romhackplaza_news"; + } +} \ No newline at end of file diff --git a/Service/Discord/BotService.php b/Service/Discord/BotService.php new file mode 100644 index 0000000..b0f6a9e --- /dev/null +++ b/Service/Discord/BotService.php @@ -0,0 +1,44 @@ +dbPath = \XF::config('discord_db_path'); + } + + protected function getDb(): \PDO + { + if (!$this->pdo) { + $this->pdo = new \PDO("sqlite:" . $this->dbPath); + $this->pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); + $this->pdo->exec('PRAGMA journal_mode=WAL;'); + $this->pdo->exec('PRAGMA busy_timeout=5000;'); + } + return $this->pdo; + } + + public function createAction( string $action, array $data ): bool + { + try { + $db = $this->getDb(); + + $stmt = $db->prepare("INSERT INTO actions (action, data) VALUES (:action, :data)"); + return $stmt->execute([ + ':action' => $action, + ':data' => json_encode($data) + ]); + + } catch (\PDOException $e) { + \XF::logException($e, messagePrefix: "BotService error: "); + return false; + } + } +} \ No newline at end of file diff --git a/Setup.php b/Setup.php index 3e075ac..f38e2e7 100644 --- a/Setup.php +++ b/Setup.php @@ -44,6 +44,18 @@ class Setup extends AbstractSetup }); } + public function installStep3(): void + { + $this->schemaManager()->createTable('xf_romhackplaza_entry_featured_request', function(Create $table){ + $table->addColumn('featured_request_id', 'int')->autoIncrement(); + $table->addColumn('entry_id', 'int'); + $table->addColumn('user_id', 'int'); + $table->addColumn('entry_title', 'varchar', 255); + $table->addColumn('featured_request_state', 'enum')->values(['visible','moderated','rejected'])->setDefault('moderated'); + $table->addColumn('featured_request_date', 'int'); + }); + } + public function uninstallStep1(): void { $this->schemaManager()->alterTable('xf_user', function($table) { @@ -55,4 +67,9 @@ class Setup extends AbstractSetup { $this->schemaManager()->dropTable('xf_club'); } + + public function uninstallStep3(): void + { + $this->schemaManager()->dropTable('xf_romhackplaza_entry_featured_request'); + } } \ No newline at end of file diff --git a/XF/Entity/ApprovalQueue.php b/XF/Entity/ApprovalQueue.php new file mode 100644 index 0000000..c66bba3 --- /dev/null +++ b/XF/Entity/ApprovalQueue.php @@ -0,0 +1,41 @@ +isInsert() ){ + + $contentId = $this->content_id; + $contentType = $this->content_type; + + \XF::runLater(function () use ($contentId, $contentType) { + + $entity = \XF::app()->getContentTypeFieldValue($contentType, 'entity'); + if( !$entity ){ + return; + } + + $content = \XF::em()->find($entity, $contentId); + + $user = $contentType === 'user' ? $content : $content->User; + + $service = \XF::service('RomhackPlaza\Master:Discord\BotService'); + $service->createAction( 'approval_queue', [ + 'content_title' => Helpers::getContentTitle( $content, $contentType ), + 'approval_item_url' => \XF::app()->router('public')->buildLink('canonical:approval-queue' ), + 'approval_username' => $user?->username ?? '', + 'approval_user_url' => $user?->user_id ? \XF::app()->router('public')->buildLink('canonical:members', $user ) : '', + 'content_type' => $contentType, + ]); + + }); + } + } +} \ No newline at end of file diff --git a/XF/Entity/User.php b/XF/Entity/User.php index 4037bc6..bd4ef44 100644 --- a/XF/Entity/User.php +++ b/XF/Entity/User.php @@ -15,4 +15,9 @@ class User extends XFCP_User return $structure; } + + public function canCreateEntry() + { + return \XF::visitor()->hasPermission('romhackplaza', 'canSubmitEntry'); + } } \ No newline at end of file diff --git a/XF/Pub/Controller/MiscController.php b/XF/Pub/Controller/MiscController.php new file mode 100644 index 0000000..b08f0bc --- /dev/null +++ b/XF/Pub/Controller/MiscController.php @@ -0,0 +1,13 @@ +view('RomhackPlaza\Master:Misc\PreferencesPopup', 'misc_preferences_popup'); + } +} \ No newline at end of file diff --git a/XF/Service/Report/CreatorService.php b/XF/Service/Report/CreatorService.php new file mode 100644 index 0000000..f45a0da --- /dev/null +++ b/XF/Service/Report/CreatorService.php @@ -0,0 +1,38 @@ +repository(ReportRepository::class); + $handler = $reportRepo->getReportHandler($report->content_type, true); + $service = \XF::service('RomhackPlaza\Master:Discord\BotService'); + + $service->createAction('report_message', [ + 'content_title' => $handler->getContentTitle( $report ), + 'report_message' => $report->Comments->last()->message, + 'report_manage_url' => \XF::app()->router('public')->buildLink('canonical:reports', $report ), + 'report_username' => $report->User?->username ?? "Unknown user", + 'report_user_url' => \XF::app()->router('public')->buildLink('canonical:members', $report->User ), + 'content_type' => $report->content_type, + 'content_link' => $handler->getContentLink( $report ) + ]); + }); + + } + + return $report; + } + +} \ No newline at end of file diff --git a/_output/class_extensions/XF-Entity-ApprovalQueue_RomhackPlaza-Master-XF-Entity-ApprovalQueue.json b/_output/class_extensions/XF-Entity-ApprovalQueue_RomhackPlaza-Master-XF-Entity-ApprovalQueue.json new file mode 100644 index 0000000..a682761 --- /dev/null +++ b/_output/class_extensions/XF-Entity-ApprovalQueue_RomhackPlaza-Master-XF-Entity-ApprovalQueue.json @@ -0,0 +1,6 @@ +{ + "from_class": "XF\\Entity\\ApprovalQueue", + "to_class": "RomhackPlaza\\Master\\XF\\Entity\\ApprovalQueue", + "execute_order": 10, + "active": true +} \ No newline at end of file diff --git a/_output/class_extensions/XF-Pub-Controller-MiscController_RomhackPlaza-Master-XF-Pub-Controller-MiscController.json b/_output/class_extensions/XF-Pub-Controller-MiscController_RomhackPlaza-Master-XF-Pub-Controller-MiscController.json new file mode 100644 index 0000000..9b7309e --- /dev/null +++ b/_output/class_extensions/XF-Pub-Controller-MiscController_RomhackPlaza-Master-XF-Pub-Controller-MiscController.json @@ -0,0 +1,6 @@ +{ + "from_class": "XF\\Pub\\Controller\\MiscController", + "to_class": "RomhackPlaza\\Master\\XF\\Pub\\Controller\\MiscController", + "execute_order": 10, + "active": true +} \ No newline at end of file diff --git a/_output/class_extensions/XF-Service-Report-CreatorService_RomhackPlaza-Master-XF-Service-Report-CreatorService.json b/_output/class_extensions/XF-Service-Report-CreatorService_RomhackPlaza-Master-XF-Service-Report-CreatorService.json new file mode 100644 index 0000000..2042723 --- /dev/null +++ b/_output/class_extensions/XF-Service-Report-CreatorService_RomhackPlaza-Master-XF-Service-Report-CreatorService.json @@ -0,0 +1,6 @@ +{ + "from_class": "XF\\Service\\Report\\CreatorService", + "to_class": "RomhackPlaza\\Master\\XF\\Service\\Report\\CreatorService", + "execute_order": 10, + "active": true +} \ No newline at end of file diff --git a/_output/class_extensions/_metadata.json b/_output/class_extensions/_metadata.json index 12689a8..e4bd700 100644 --- a/_output/class_extensions/_metadata.json +++ b/_output/class_extensions/_metadata.json @@ -1,8 +1,17 @@ { + "XF-Entity-ApprovalQueue_RomhackPlaza-Master-XF-Entity-ApprovalQueue.json": { + "hash": "f4364e1ec74dfa80ff24368486e66ffb" + }, "XF-Entity-Forum_RomhackPlaza-Master-XF-Entity-Forum.json": { "hash": "c7747b6ea6bd924d2d02e82917ff0df3" }, "XF-Entity-User_RomhackPlaza-Master-XF-Entity-User.json": { "hash": "811593d6f012a53b9fa2ced871de96a9" + }, + "XF-Pub-Controller-MiscController_RomhackPlaza-Master-XF-Pub-Controller-MiscController.json": { + "hash": "1071fd498b2958031153de55eb4ca66a" + }, + "XF-Service-Report-CreatorService_RomhackPlaza-Master-XF-Service-Report-CreatorService.json": { + "hash": "2def6639766241a5f2ff3c10fc168731" } } \ No newline at end of file diff --git a/_output/content_type_fields/_metadata.json b/_output/content_type_fields/_metadata.json index 8381f54..dcab9a0 100644 --- a/_output/content_type_fields/_metadata.json +++ b/_output/content_type_fields/_metadata.json @@ -5,10 +5,22 @@ "club-entity.json": { "hash": "ed572323131987e295051165e4ec3c5e" }, + "rhpz_entry_featurerequest-approval_queue_handler_class.json": { + "hash": "0452fab1abce77fa92858ee46c615d8a" + }, + "rhpz_entry_featurerequest-entity.json": { + "hash": "62ab52f94cdc49ced9c18dd31eaf7f8c" + }, "romhackplaza_entry-entity.json": { "hash": "8686ffd261eb8c1698a3ec6e31118f02" }, "romhackplaza_entry-report_handler_class.json": { "hash": "3e3d009b1b4671a506accc2e920307b2" + }, + "romhackplaza_news-entity.json": { + "hash": "97f9641ceb338c2fdd489e2eed7fb7d1" + }, + "romhackplaza_news-report_handler_class.json": { + "hash": "8af48d739b42b8794fd802eaf72e2025" } } \ No newline at end of file diff --git a/_output/content_type_fields/rhpz_entry_featurerequest-approval_queue_handler_class.json b/_output/content_type_fields/rhpz_entry_featurerequest-approval_queue_handler_class.json new file mode 100644 index 0000000..5ffd0ef --- /dev/null +++ b/_output/content_type_fields/rhpz_entry_featurerequest-approval_queue_handler_class.json @@ -0,0 +1,5 @@ +{ + "content_type": "rhpz_entry_featurerequest", + "field_name": "approval_queue_handler_class", + "field_value": "RomhackPlaza\\Master\\ApprovalQueue\\EntryFeaturedRequest" +} \ No newline at end of file diff --git a/_output/content_type_fields/rhpz_entry_featurerequest-entity.json b/_output/content_type_fields/rhpz_entry_featurerequest-entity.json new file mode 100644 index 0000000..137e8a8 --- /dev/null +++ b/_output/content_type_fields/rhpz_entry_featurerequest-entity.json @@ -0,0 +1,5 @@ +{ + "content_type": "rhpz_entry_featurerequest", + "field_name": "entity", + "field_value": "RomhackPlaza\\Master\\Entity\\EntryFeaturedRequest" +} \ No newline at end of file diff --git a/_output/content_type_fields/romhackplaza_news-entity.json b/_output/content_type_fields/romhackplaza_news-entity.json new file mode 100644 index 0000000..ef647bb --- /dev/null +++ b/_output/content_type_fields/romhackplaza_news-entity.json @@ -0,0 +1,5 @@ +{ + "content_type": "romhackplaza_news", + "field_name": "entity", + "field_value": "RomhackPlaza\\Master\\Entity\\News" +} \ No newline at end of file diff --git a/_output/content_type_fields/romhackplaza_news-report_handler_class.json b/_output/content_type_fields/romhackplaza_news-report_handler_class.json new file mode 100644 index 0000000..f4eb744 --- /dev/null +++ b/_output/content_type_fields/romhackplaza_news-report_handler_class.json @@ -0,0 +1,5 @@ +{ + "content_type": "romhackplaza_news", + "field_name": "report_handler_class", + "field_value": "RomhackPlaza\\Master\\Report\\News" +} \ No newline at end of file diff --git a/_output/extension_hint.php b/_output/extension_hint.php index f542957..e06e77a 100644 --- a/_output/extension_hint.php +++ b/_output/extension_hint.php @@ -10,6 +10,17 @@ namespace RomhackPlaza\Master\XF\Entity { + class XFCP_ApprovalQueue extends \XF\Entity\ApprovalQueue {} class XFCP_Forum extends \XF\Entity\Forum {} class XFCP_User extends \XF\Entity\User {} } + +namespace RomhackPlaza\Master\XF\Pub\Controller +{ + class XFCP_MiscController extends \XF\Pub\Controller\MiscController {} +} + +namespace RomhackPlaza\Master\XF\Service\Report +{ + class XFCP_CreatorService extends \XF\Service\Report\CreatorService {} +} diff --git a/_output/navigation/_metadata.json b/_output/navigation/_metadata.json index 087d264..761cae1 100644 --- a/_output/navigation/_metadata.json +++ b/_output/navigation/_metadata.json @@ -35,6 +35,9 @@ "members.json": { "hash": "cad1568d161bea1a7dd1f286b8788e2d" }, + "news.json": { + "hash": "c42353e9a510b365d09f2b64af401e55" + }, "pages.json": { "hash": "8d75bf99b2fb6528f84433f4519d4da3" }, @@ -45,7 +48,7 @@ "hash": "e14613a1bd0f1e1fadc084a009801570" }, "rom_patcher.json": { - "hash": "2a2af404aa6395b02c711867a7287a6f" + "hash": "dff75392eea1fdffdaec193913d5d8a0" }, "submissions_queue.json": { "hash": "071c745afd8f28cf9505702496f72a18" diff --git a/_output/navigation/news.json b/_output/navigation/news.json new file mode 100644 index 0000000..828a4a1 --- /dev/null +++ b/_output/navigation/news.json @@ -0,0 +1,13 @@ +{ + "parent_navigation_id": "website", + "display_order": 250, + "navigation_type_id": "basic", + "type_config": { + "link": "{$xf.options.homePageUrl}/news", + "display_condition": "", + "extra_attributes": { + "icon": "newspaper" + } + }, + "enabled": true +} \ No newline at end of file diff --git a/_output/navigation/rom_patcher.json b/_output/navigation/rom_patcher.json index 680ba5d..cc02ad8 100644 --- a/_output/navigation/rom_patcher.json +++ b/_output/navigation/rom_patcher.json @@ -3,7 +3,7 @@ "display_order": 100, "navigation_type_id": "basic", "type_config": { - "link": "{$xf.options.homePageUrl}/tools/rom-patcher", + "link": "{$xf.options.homePageUrl}/patch", "display_condition": "", "extra_attributes": { "icon": "stamp" diff --git a/_output/phrases/_metadata.json b/_output/phrases/_metadata.json index 74be088..c0e887c 100644 --- a/_output/phrases/_metadata.json +++ b/_output/phrases/_metadata.json @@ -71,6 +71,12 @@ "version_string": "1.0.0", "hash": "ef53538ae41a651c7f72ab6cb1135d8c" }, + "nav.news.txt": { + "global_cache": false, + "version_id": 1000000, + "version_string": "1.0.0", + "hash": "dd1ba1872df91985ed1ca4cde2dfe669" + }, "nav.pages.txt": { "global_cache": false, "version_id": 1000000, diff --git a/_output/phrases/nav.news.txt b/_output/phrases/nav.news.txt new file mode 100644 index 0000000..da26bbe --- /dev/null +++ b/_output/phrases/nav.news.txt @@ -0,0 +1 @@ +News \ No newline at end of file diff --git a/_output/routes/_metadata.json b/_output/routes/_metadata.json index 0c6bcac..f24d27b 100644 --- a/_output/routes/_metadata.json +++ b/_output/routes/_metadata.json @@ -10,5 +10,8 @@ }, "public_romhackplaza_entry_.json": { "hash": "2c40d7266fcc22a5727830a69af2360c" + }, + "public_romhackplaza_news_.json": { + "hash": "a012e23a91029aead56b061747d0334a" } } \ No newline at end of file diff --git a/_output/routes/public_romhackplaza_news_.json b/_output/routes/public_romhackplaza_news_.json new file mode 100644 index 0000000..2fad54f --- /dev/null +++ b/_output/routes/public_romhackplaza_news_.json @@ -0,0 +1,11 @@ +{ + "route_type": "public", + "route_prefix": "romhackplaza_news", + "sub_name": "", + "format": ":int", + "build_class": "", + "build_method": "", + "controller": "RomhackPlaza\\Master:News", + "context": "", + "action_prefix": "" +} \ No newline at end of file diff --git a/_output/template_modifications/_metadata.json b/_output/template_modifications/_metadata.json index 1a3032e..879129b 100644 --- a/_output/template_modifications/_metadata.json +++ b/_output/template_modifications/_metadata.json @@ -7,5 +7,8 @@ }, "public/rhpz_category_view_clubs_submit_button.json": { "hash": "a24a5a4b130b6198de7ef37610aa1a7d" + }, + "public/rhpz_forum_overview_wrapper_search_button.json": { + "hash": "af109f16aca8a12c4f8496fc4431f4b8" } } \ No newline at end of file diff --git a/_output/template_modifications/public/rhpz_forum_overview_wrapper_search_button.json b/_output/template_modifications/public/rhpz_forum_overview_wrapper_search_button.json new file mode 100644 index 0000000..a75f7d5 --- /dev/null +++ b/_output/template_modifications/public/rhpz_forum_overview_wrapper_search_button.json @@ -0,0 +1,9 @@ +{ + "template": "forum_overview_wrapper", + "description": "Add Search button", + "execution_order": 10, + "enabled": true, + "action": "str_replace", + "find": "\t\t\n\t\t\t{{ phrase('new_posts') }}\n\t\t", + "replace": "\t\t$0\n\t\t\n\t\t\t{{ phrase('search') }}\n\t\t" +} \ No newline at end of file diff --git a/_output/templates/_metadata.json b/_output/templates/_metadata.json index 68e17fb..fd31b1b 100644 --- a/_output/templates/_metadata.json +++ b/_output/templates/_metadata.json @@ -9,6 +9,11 @@ "version_string": "1.0.0", "hash": "da1f9c78c4e33597062258c0bba3cb4d" }, + "public/approval_item_entry_featured_request.html": { + "version_id": 1000000, + "version_string": "1.0.0", + "hash": "1383f7fa1680c2da22cfc08aa1ad55f5" + }, "public/club_delete_confirm.html": { "version_id": 1000000, "version_string": "1.0.0", @@ -28,5 +33,10 @@ "version_id": 1000000, "version_string": "1.0.0", "hash": "d6c5c25a9af81a7da2bd8e2b9f74229e" + }, + "public/report_content_romhackplaza_news.html": { + "version_id": 1000000, + "version_string": "1.0.0", + "hash": "d6c5c25a9af81a7da2bd8e2b9f74229e" } } \ No newline at end of file diff --git a/_output/templates/public/approval_item_entry_featured_request.html b/_output/templates/public/approval_item_entry_featured_request.html new file mode 100644 index 0000000..bce9d13 --- /dev/null +++ b/_output/templates/public/approval_item_entry_featured_request.html @@ -0,0 +1,11 @@ + \ No newline at end of file diff --git a/_output/templates/public/report_content_romhackplaza_news.html b/_output/templates/public/report_content_romhackplaza_news.html new file mode 100644 index 0000000..a3c44e4 --- /dev/null +++ b/_output/templates/public/report_content_romhackplaza_news.html @@ -0,0 +1,4 @@ +
+ {{ phrase('content:') }} + {$report.content_info.description} +
\ No newline at end of file