diff --git a/Api/Controller/EntryController.php b/Api/Controller/EntryController.php new file mode 100644 index 0000000..9e9bc7b --- /dev/null +++ b/Api/Controller/EntryController.php @@ -0,0 +1,45 @@ +filter('user_id', 'uint'); + $count = $this->filter('count', 'uint'); + + $user = $this->assertRecordExists('XF:User', $userId); + + $user->rhpz_entry_count = $count; + $user->save(); + + $trophyRepo = $this->repository('XF:Trophy'); + $trophyRepo->updateTrophiesForUser($user); + + return $this->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/Api/Controller/MigrateController.php b/Api/Controller/MigrateController.php new file mode 100644 index 0000000..435eb2a --- /dev/null +++ b/Api/Controller/MigrateController.php @@ -0,0 +1,79 @@ +rhpz_enable_migration; + if( !$rhpz_enable_migration ){ + $this->error("Migration not enabled"); + } + + } + + public function actionPostUser(): AbstractReply + { + $input = $this->filter([ + 'username' => 'str', + 'email' => 'str', + 'profile[about]' => 'str', + 'profile[website]' => 'str', + 'register_date' => 'uint', + 'user_group_id' => 'uint', + 'xf_user_id' => 'uint', + 'avatar_path' => 'str', + 'banner_path' => 'str', + 'source_real_password' => 'str', + 'wp_password' => 'str', + 'xf_scheme_class' => 'str', + 'xf_password_data' => 'str', + ]); + + $this->assertAdminPermission('user'); + $this->assertRequiredApiInput(['username','email','user_group_id']); + + /** @var UserRepository $userRepository */ + $userRepository = \XF::repository(UserRepository::class); + $user = $userRepository->setupBaseUser(null); + + $userPlugin = $this->plugin(UserPlugin::class); + $userPlugin->userSaveProcessAdmin($user)->run(); + + /** @var UserAuth $authUser */ + $authUser = $user->getExistingRelation('Auth'); + if( $input['source_real_password'] === 'wp' ){ + $authUser->scheme_class = 'RomhackPlaza\Master:WordPress'; + $authUser->data = ['hash' => $input['wp_password']]; + $authUser->save(); + } elseif( $input['source_real_password'] === 'xf' ){ + $authUser->scheme_class = $input['xf_scheme_class']; + $authUser->data = @unserialize($input['xf_password_data']); + $authUser->save(); + } + + if( $input['avatar_path'] !== "" ){ + Migration::setAvatarFromPath($input['avatar_path'], $user); + } + if( $input['banner_path'] !== "" ){ + Migration::setBannerFromPath($input['banner_path'], $user); + } + if( $input['register_date'] != 0 ){ + $user->register_date = $input['register_date']; + $user->save(); + } + + return $this->apiSuccess(['success' => true, 'user_id' => $user->user_id, 'password_set' => true ]); + + } +} diff --git a/Api/Controller/ThreadController.php b/Api/Controller/ThreadController.php new file mode 100644 index 0000000..ecde159 --- /dev/null +++ b/Api/Controller/ThreadController.php @@ -0,0 +1,33 @@ +assertApiScope('thread:write'); + + /** @var Thread $thread */ + $thread = $this->assertRecordExists('XF:Thread', $params->thread_id, ['FirstPost'] ); + if( $thread->discussion_state !== 'deleted' ) + return $this->error("This thread is not deleted.", 'not_deleted' ); + + if(!$thread->canUndelete($error)){ + return $this->noPermission($error); + } + + $thread->discussion_state = 'visible'; + $thread->save(); + + return $this->apiSuccess([ + 'thread' => $thread->toApiResult() + ]); + + } +} \ No newline at end of file diff --git a/ApprovalQueue/Club.php b/ApprovalQueue/Club.php new file mode 100644 index 0000000..c859275 --- /dev/null +++ b/ApprovalQueue/Club.php @@ -0,0 +1,76 @@ +canActionContent($content, $error); + } + + protected function canActionContent(Entity $content, &$error = null) + { + return \XF::visitor()->hasAdminPermission('node'); + } + + public function getEntityWith() + { + return ['User']; + } + + public function actionApprove(\RomhackPlaza\Master\Entity\Club $club) + { + $club->club_state = 'visible'; + $club->save(); + + $node = \XF::em()->create('XF:Node'); + $node->node_type_id = 'Forum'; + $node->title = $club->title; + $node->description = $club->description; + $node->parent_node_id = \XF::options()->rhpz_club_node_id ?? 0; + $node->display_order = 1; + $node->save(); + + $forum = \XF::em()->create('XF:Forum'); + $forum->node_id = $node->node_id; + $forum->allow_posting = true; + $forum->save(); + + $club->node_id = $node->node_id; + $club->save(); + + $user = $club->User; + if ($user) { + + $modContent = \XF::em()->create('XF:ModeratorContent'); + $modContent->content_type = 'node'; + $modContent->content_id = $node->node_id; + $modContent->user_id = $user->user_id; + $modContent->save(); + + $permissionUpdater = \XF::app()->service('XF:UpdatePermissions'); + $permissionUpdater->setContent('node', $node->node_id); + $permissionUpdater->setUser($user); + + $permissionUpdater->updatePermissions(\RomhackPlaza\Master\Entity\Club::MOD_PERMISSIONS); + + \XF::app()->jobManager()->enqueueUnique('permissionRebuild', 'XF:PermissionRebuild'); + } + } + + public function actionDelete(\RomhackPlaza\Master\Entity\Club $club) + { + $club->club_state = 'rejected'; + $club->save(); + } + + public function getTemplateName() + { + return 'public:approval_item_club_request'; + } +} \ No newline at end of file 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/Authentication/WordPress.php b/Authentication/WordPress.php new file mode 100644 index 0000000..6616504 --- /dev/null +++ b/Authentication/WordPress.php @@ -0,0 +1,91 @@ +data) ) { + return false; + } + + return $this->verifyPassword($password, $this->data['hash']); + + } + + private function verifyPassword($password, $storedHash): bool + { + if( str_starts_with($storedHash, '$wp') ){ + $passwordToVerify = base64_encode( hash_hmac( 'sha384', $password, 'wp-sha384', true ) ); + return password_verify( $passwordToVerify, substr($storedHash, 3) ); + } + + if (str_starts_with($storedHash, '$2y$') || str_starts_with($storedHash, '$2a$') || str_starts_with($storedHash, '$2b$')) { + return password_verify($password, $storedHash); + } + + if (strlen($storedHash) === 34 && (str_starts_with($storedHash, '$P$') || str_starts_with($storedHash, '$H$'))) { + return $this->verifyPhpass($password, $storedHash); + } + + if (strlen($storedHash) <= 32) { + return hash_equals($storedHash, md5($password)); + } + + return false; + } + + private function verifyPhpass(string $password, string $storedHash): bool + { + $itoa64 = self::ITOA64; + $countLog2 = strpos($itoa64, $storedHash[3]); + if ($countLog2 < 7 || $countLog2 > 30) return false; + + $count = 1 << $countLog2; + $salt = substr($storedHash, 4, 8); + if (strlen($salt) !== 8) return false; + + $hash = md5($salt . $password, true); + do { + $hash = md5($hash . $password, true); + } while (--$count); + + $output = substr($storedHash, 0, 12) . self::encode64($hash, $itoa64); + return hash_equals($storedHash, $output); + } + + private function encode64(string $input, string $itoa64): string + { + $output = ''; + $i = 0; + $count = strlen($input); + do { + $value = ord($input[$i++]); + $output .= $itoa64[$value & 0x3f]; + if ($i < $count) $value |= ord($input[$i]) << 8; + $output .= $itoa64[($value >> 6) & 0x3f]; + if ($i++ >= $count) break; + if ($i < $count) $value |= ord($input[$i]) << 16; + $output .= $itoa64[($value >> 12) & 0x3f]; + if ($i++ >= $count) break; + $output .= $itoa64[($value >> 18) & 0x3f]; + } while ($i < $count); + return $output; + } + + public function getAuthenticationName() + { + return 'RomhackPlaza\Master:WordPress'; + } +} \ No newline at end of file diff --git a/Entity/Club.php b/Entity/Club.php new file mode 100644 index 0000000..d6a090a --- /dev/null +++ b/Entity/Club.php @@ -0,0 +1,120 @@ + [ + 'editAnyPost' => 'content_allow', + 'deleteAnyPost' => 'content_allow', + 'deleteAnyThread' => 'content_allow', + 'inlineMod' => 'content_allow', + 'lockUnlockThread' => 'content_allow', + 'stickUnstickThread' => 'content_allow' + ] + ]; + + public static function getStructure(Structure $structure): Structure + { + $structure->table = 'xf_club'; + $structure->shortName = 'RomhackPlaza\Master:Club'; + $structure->primaryKey = 'club_id'; + $structure->columns = [ + 'club_id' => ['type' => self::UINT, 'autoIncrement' => true], + 'node_id' => ['type' => self::UINT, 'default' => 0], + 'user_id' => ['type' => self::UINT, 'required' => true], + 'title' => ['type' => self::STR, 'maxLength' => 100, 'required' => true], + 'description' => ['type' => self::STR, 'required' => true], + 'club_state' => ['type' => self::STR, 'default' => 'moderated', + 'allowedValues' => ['visible', 'moderated', 'rejected'] + ], + 'club_creation_date' => ['type' => self::UINT, 'default' => \XF::$time], + 'banner_date' => ['type' => self::UINT, 'default' => 0], + ]; + $structure->relations = [ + 'User' => [ + 'entity' => 'XF:User', + 'type' => self::TO_ONE, + 'conditions' => 'user_id', + 'primary' => true + ], + 'Forum' => [ + 'entity' => 'XF:Forum', + 'type' => self::TO_ONE, + 'conditions' => 'node_id', + 'primary' => true + ] + ]; + + return $structure; + } + + public function getBannerUrl(): ?string + { + if( !$this->banner_date ) + return null; + + return \XF::app()->applyExternalDataUrl("club_banners/{$this->club_id}.jpg?{$this->banner_date}"); + } + + protected function _postSave() + { + if( $this->isInsert() && $this->club_state == 'moderated' ){ + $this->inQueue(); + } else if( $this->isUpdate() && $this->isChanged('club_state') ){ + if( $this->club_state === 'moderated' ){ + $this->inQueue(); + } else { + $this->removeQueue(); + } + } + } + + protected function _postDelete() + { + if( $this->club_state === 'moderated' ){ + $this->removeQueue(); + } + } + + protected function inQueue() + { + $queue = $this->em()->find('XF:ApprovalQueue', ['club', $this->club_id ] ); + if( !$queue ) + { + /** @var ApprovalQueue $newQueue */ + $newQueue = $this->em()->create('XF:ApprovalQueue'); + $newQueue->content_type = 'club'; + $newQueue->content_id = $this->club_id; + $newQueue->save(); + } + } + + protected function removeQueue() + { + $queue = $this->em()->find('XF:ApprovalQueue', ['club', $this->club_id ] ); + if( $queue ) + $queue->delete(); + } +} \ No newline at end of file diff --git a/Entity/Entry.php b/Entity/Entry.php new file mode 100644 index 0000000..ef1091f --- /dev/null +++ b/Entity/Entry.php @@ -0,0 +1,28 @@ +shortName = 'RomhackPlaza\Master:Entry'; + $structure->table = 'xf_romhackplaza_entry'; // 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], + 'type' => ['type' => self::STR, 'required' => true], + ]; + + return $structure; + } +} \ 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/Helper/Laravel.php b/Helper/Laravel.php new file mode 100644 index 0000000..50cab2d --- /dev/null +++ b/Helper/Laravel.php @@ -0,0 +1,24 @@ +container(); + if( !isset( $container['laravelDb'] ) ){ + $container['laravelDb'] = function(Container $c){ + $config = \XF::config('sitedb'); + if( !$config ) + return null; + + return new \XF\Db\Mysqli\Adapter($config, true); + }; + } + + return $container['laravelDb']; + } +} \ No newline at end of file diff --git a/Helper/Migration.php b/Helper/Migration.php new file mode 100644 index 0000000..f8963f1 --- /dev/null +++ b/Helper/Migration.php @@ -0,0 +1,86 @@ +container(); + if( !isset( $container['oldXfDb'] ) ){ + $container['oldXfDb'] = function(Container $c){ + $config = \XF::config('oldxfdb'); + if( !$config ) + return null; + + return new \XF\Db\Mysqli\Adapter($config, true); + }; + } + + return $container['oldXfDb']; + } + + public static function uniqueUsername(string $username): string + { + $u = $username; + $i = 1; + while(\XF::em()->findOne('XF:User', ['username' => $u])){ + $u = $username . '_' . $i++; + } + + return $u; + } + + public static function copyUserPassword(int $xf_user_id, User $user): bool + { + $oldDb = self::oldXfDb(); + if( !$oldDb ){ + return false; + } + + $row = $oldDb->fetchRow( + 'SELECT scheme_class, data FROM xf_user_authenticate WHERE user_id = ?', + [$xf_user_id] + ); + if( !$row ){ + return false; + } + + $user->Auth->scheme_class = $row['scheme_class']; + $user->Auth->data = $row['data']; + return $user->Auth->save(); + } + + public static function setAvatarFromPath(string $avatar_path, User $user): bool + { + if(!is_readable($avatar_path)) + return false; + + $avatarService = \XF::service(AvatarService::class, $user); + + if (!$avatarService->setImage($avatar_path)) + return false; + + return $avatarService->updateAvatar(); + } + + public static function setBannerFromPath(mixed $banner_path, User $user) + { + if( !is_readable($banner_path) ) + return false; + + $bannerService = \XF::service(ProfileBannerService::class, $user); + if( !$bannerService->setImage($banner_path) ) + return false; + + return $bannerService->updateBanner(); + } + + +} \ No newline at end of file diff --git a/Import/Importer/RHPZForums.php b/Import/Importer/RHPZForums.php new file mode 100644 index 0000000..f0d2282 --- /dev/null +++ b/Import/Importer/RHPZForums.php @@ -0,0 +1,97 @@ + 'XenForo', + 'source' => 'RHPZ Forums (XF)' + ]; + } + + public function stepUserGroups(StepState $state) + { + $map = $this->getMigrationSetting('old_xf_group_to_xf_group'); + foreach( $map as $oldId => $newId ){ + $this->log('user_group', $oldId, $newId); + $state->imported++; + } + + return $state->complete(); + } + + public function stepUserFields(StepState $state) + { + return $state->complete(); + } + + public function stepUsers(StepState $state, array $stepConfig, $maxTime) + { + $rows = $this->sourceDb->fetchAll("SELECT user_id FROM xf_user ORDER BY user_id" ); + + foreach ( $rows as $row ) { + $oldId = $row['user_id']; + $newId = $this->getNewUserId($oldId); + + if( $newId ){ + $this->log('user', $oldId, $newId); + $state->imported++; + } + } + + return $state->complete(); + } + + public function stepAvatars(StepState $state, array $stepConfig, $maxTime) + { + return $state->complete(); + } + + public function stepNodes(StepState $state) + { + $map = $this->getMigrationSetting('old_xf_node_to_new_xf_node'); + foreach( $map as $oldId => $newId ){ + $this->log('node', $oldId, $newId); + $state->imported++; + } + + return $state->complete(); + } + + public function stepNodePermissions(StepState $state) + { + return $state->complete(); + } + + public function stepModerators(StepState $state) + { + return $state->complete(); + } + + private function getMigrationSetting(string $key): mixed + { + $db = Laravel::db(); + if( !$db ) + return null; + + $row = $db->fetchOne("SELECT value FROM migration_settings WHERE `key` = ? ", [$key]); + return $row ? json_decode( $row, true ) : []; + } + + private function getNewUserId(int $oldId): ?int + { + $db = Laravel::db(); + if( !$db ) + return null; + + $row = $db->fetchOne("SELECT user_id FROM migration_user_plan WHERE xf_user_id = ?", [$oldId]); + return $row ? (int) $row : null; + } +} \ No newline at end of file diff --git a/Listener.php b/Listener.php index 0413895..f18a76a 100644 --- a/Listener.php +++ b/Listener.php @@ -2,8 +2,24 @@ namespace RomhackPlaza\Master; +use XF\Container; +use XF\Import\Manager; +use XF\Mvc\Renderer\AbstractRenderer; +use XF\Mvc\Reply\AbstractReply; +use XF\SubContainer\Import; + class Listener { + + public static function importImporterClasses(Import $container, Container $parentContainer, array &$importers) + { + if( \XF::isAddOnActive('XFI') ) + $importers = array_merge( + $importers, + Manager::getImporterShortNamesForType('RomhackPlaza/Master') + ); + } + public static function criteriaUser(string $rule, array $data, \XF\Entity\User $user, bool &$returnValue ){ switch( $rule ){ case 'rhpz_entry_count': @@ -20,4 +36,38 @@ class Listener break; } } + + /** + * Credits to Kirby for the guest part. + * @link https://xenforo.com/community/resources/style-variation-default.9504/ + * + * @param \XF\App $app + * @param array $params + * @param AbstractReply $reply + * @param AbstractRenderer $renderer + * + * @return void + * @throws \XF\PrintableException + */ + public static function checkStyleVariation( \XF\App $app, array &$params, AbstractReply $reply, AbstractRenderer $renderer ) + { + $user = \XF::visitor(); + if( $user->user_id !== 0 ){ // Logged in. + if( $user->style_variation !== 'default' && $user->style_variation !== 'alternate' ){ + $user->style_variation = 'default'; + $user->save(); + } + } else { + $cookie = $app->request()->getCookie('style_variation'); + if( $cookie !== 'default' && $cookie !== 'alternate' ){ + $app->response()->setCookie('style_variation', 'default', 86400 * 365); + } + if( $user->style_variation === '' ){ + $style = $app->templater()->getStyle(); + if( $style->isVariationsEnabled() ){ + $user->setAsSaved('style_variation', 'default'); + } + } + } + } } \ No newline at end of file diff --git a/Pub/Controller/Club.php b/Pub/Controller/Club.php new file mode 100644 index 0000000..44e6569 --- /dev/null +++ b/Pub/Controller/Club.php @@ -0,0 +1,182 @@ +rhpz_club_node_id; + return $this->redirect('categories/.' . $clubsForum ); + } + + public function actionSubmit(ParameterBag $params) + { + $this->assertRegistrationRequired(); + + return $this->view('RomhackPlaza\Master:Club\Request', 'club_request_form'); + } + + public function actionEdit(ParameterBag $params) + { + $this->assertRegistrationRequired(); + + if( !$params->club_id ) + $this->notFound("Club not found"); + + /** @var \RomhackPlaza\Master\Entity\Club $club */ + $club = $this->assertRecordExists( 'RomhackPlaza\Master:Club', $params->club_id ); + if( $club->user_id !== \XF::visitor()->user_id && !\XF::visitor()->hasAdminPermission('node') ){ + $this->noPermission(); + } + + $mods = []; + $modsCount = 0; + + if( $club->node_id ){ + $mods = $this->finder('XF:ModeratorContent') + ->where('content_type', 'node') + ->where('content_id', $club->node_id) + ->with('User') + ->fetch(); + foreach( $mods as $m ){ + if( $m->user_id !== $club->user_id ){ + $modsCount++; + } + } + } + + return $this->view('RomhackPlaza\Master:Club\Edit', 'club_edit_form', [ 'club' => $club, 'moderators' => $mods, 'subModCount' => $modsCount ] ); + } + + public function actionSave(ParameterBag $params) + { + $this->assertRegistrationRequired(); + $this->assertPostOnly(); + + $isEdit = (bool) $params->club_id; + if( $isEdit ){ + $club = $this->assertRecordExists('RomhackPlaza\Master:Club', $params->club_id ); + if( $club->user_id !== \XF::visitor()->user_id && !\XF::visitor()->hasAdminPermission('node') ){ + $this->noPermission(); + } + + /** @var EditorService $editor */ + $editor = $this->service('RomhackPlaza\Master:Club\Editor', $club); + $editor->setContent($this->filter('title','str'), $this->filter('description','str')); + $editor->setBannerUpload($this->request->getFile('upload_banner', false, false) ); + + if( !$editor->validate($errors) ){ + return $this->error($errors); + } + + $editor->save(); + + return $this->redirect( $this->buildLink('clubs'), "Changes saved successfully" ); + + } else { + + /** @var CreatorService $creator */ + $creator = $this->service('RomhackPlaza\Master:Club\Creator', \XF::visitor()); + $creator->setContent($this->filter('title','str'), $this->filter('description','str')); + $creator->setBannerUpload($this->request->getFile('upload_banner', false, false)); + + if( !$creator->validate($errors) ){ + return $this->error($errors); + } + $creator->save(); + return $this->redirect( $this->buildLink('clubs'), "Your club creation request has been submitted and is awaiting approval by a staff member." ); + } + } + + public function actionDelete(ParameterBag $params) + { + $this->assertRegistrationRequired(); + + /** @var \RomhackPlaza\Master\Entity\Club $club */ + $club = $this->assertRecordExists('RomhackPlaza\Master:Club', $params->club_id); + if( $club->user_id !== \XF::visitor()->user_id && !\XF::visitor()->hasAdminPermission('node') ){ + $this->noPermission(); + } + + if( $this->isPost() ){ + /** @var DeleterService $deleter */ + $deleter = $this->service('RomhackPlaza\Master:Club\Deleter', $club); + $deleter->delete(); + + return $this->redirect( $this->buildLink('clubs'), "Club deleted successfully." ); + } + + return $this->view('RomhackPlaza\Master:Club\Delete', 'club_delete_confirm', [ 'club' => $club ] ); + } + + public function actionAddModerator(ParameterBag $params) + { + $this->assertRegistrationRequired(); + $this->assertPostOnly(); + + /** @var \RomhackPlaza\Master\Entity\Club $club */ + $club = $this->assertRecordExists('RomhackPlaza\Master:Club', $params->club_id); + if( $club->user_id !== \XF::visitor()->user_id && !\XF::visitor()->hasAdminPermission('node') ){ + return $this->noPermission(); + } + + $username = $this->filter('username','str'); + $user = $this->em()->findOne('XF:User', ['username' => $username]); + + if( !$user ){ + return $this->error("This user doesn't exist"); + } + + /** @var ModeratorService $modManage */ + $modManage = \XF::app()->service('RomhackPlaza\Master:Club\Moderator', $club, $user ); + $error = ""; + $modManage->addModerator( $error ); + + if( $error && $error !== "" ){ + return $this->error($error); + } + + return $this->redirect( $this->buildLink('clubs/edit', $club), "Moderator added successfully." ); + } + + public function actionRemoveModerator(ParameterBag $params) + { + $this->assertRegistrationRequired(); + $this->assertPostOnly(); + + /** @var \RomhackPlaza\Master\Entity\Club $club */ + $club = $this->assertRecordExists('RomhackPlaza\Master:Club', $params->club_id); + if( $club->user_id !== \XF::visitor()->user_id && !\XF::visitor()->hasAdminPermission('node') ){ + $this->noPermission(); + } + + $userId = $this->filter('user_id','uint'); + $user = $this->em()->findOne('XF:User', ['user_id' => $userId]); + + if( !$user ){ + $this->error("This user doesn't exist"); + } + + /** @var ModeratorService $modManage */ + $modManage = \XF::app()->service('RomhackPlaza\Master:Club\Moderator', $club, $user ); + $error = ""; + $modManage->deleteModerator( $error ); + + if( $error && $error !== "" ){ + return $this->error($error); + } + + return $this->redirect( $this->buildLink('clubs/edit', $club), "Moderator deleted successfully." ); + } + +} \ No newline at end of file diff --git a/Pub/Controller/Entry.php b/Pub/Controller/Entry.php new file mode 100644 index 0000000..5a5139e --- /dev/null +++ b/Pub/Controller/Entry.php @@ -0,0 +1,50 @@ +id; + $laravelDb = \RomhackPlaza\Master\Helper\Laravel::db(); + if( !$laravelDb ) + return $this->notFound(); + + $entry = $laravelDb->fetchRow("SELECT id, slug, type FROM entries WHERE id = ?", $entryId); + if( !$entry ) + return $this->notFound(); + + return $this->redirect(\XF::options()->homePageUrl . '/' . $entry['type'] . '/' . $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, complete_title as title, slug, type, user_id, description FROM entries WHERE id = ?", $entryId); + if( !$entry ) + return $this->notFound(); + + $entity = $this->em()->instantiateEntity('RomhackPlaza\Master:Entry', $entry); + $entity->setReadOnly(true); + + $reportPlugin = $this->plugin('XF:Report'); + return $reportPlugin->actionReport( + 'romhackplaza_entry', $entity, + $this->buildLink('romhackplaza_entry/report', $entity), + \XF::options()->homePageUrl . '/entry/report_redirect?id=' . $entity->id + ); + + } +} \ 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/Pub/Controller/Webhook.php b/Pub/Controller/Webhook.php deleted file mode 100644 index 016968d..0000000 --- a/Pub/Controller/Webhook.php +++ /dev/null @@ -1,36 +0,0 @@ -assertPostOnly(); - - $token = $this->filter('_token', 'str'); - $secret = \XF::options()->rhpz_webhook_secret ?? ''; - - if( !$secret || !hash_equals($secret, $token) ){ - return $this->error('Unauthorized', 401); - } - - $userId = $this->filter('user_id', 'uint'); - $count = $this->filter('count', 'uint'); - - $user = \XF::em()->find('XF:User', $userId); - if( !$user ){ - return $this->error('User not found', 404); - } - - $user->rhpz_entry_count = $count; - $user->save(); - - $trophyService = \XF::service('XF:Trophy\Notify', $user); - $trophyService->checkAndAwardTrophies(); - - return $this->apiSuccess(['count' => $count]); - } -} \ No newline at end of file diff --git a/Report/Entry.php b/Report/Entry.php new file mode 100644 index 0000000..2d8e008 --- /dev/null +++ b/Report/Entry.php @@ -0,0 +1,76 @@ +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'], + 'type' => $content['type'], + '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, complete_title as title, slug, type, user_id, description FROM entries WHERE id = ?", $id); + $entity = \XF::em()->instantiateEntity('RomhackPlaza\Master:Entry', $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 . '/' . $report->content_info['type'] . '/' . $report->content_info['slug']; + } + + #[Override] + public function getContentMessage(Report $report) + { + return $report->content_info['description']; + } + + #[Override] + public function getTemplateName() + { + return "public:report_content_romhackplaza_entry"; + } +} \ No newline at end of file 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/Club/ApproverService.php b/Service/Club/ApproverService.php new file mode 100644 index 0000000..c44f5f1 --- /dev/null +++ b/Service/Club/ApproverService.php @@ -0,0 +1,64 @@ +club = $club; + } + + public function approve(): bool + { + if( $this->club->club_state !== 'moderated' ) { + return false; + } + + $this->club->club_state = 'visible'; + $this->club->save(); + + /** @var Node $node */ + $node = $this->em()->create('XF:Node'); + + $node->node_type_id = 'Forum'; + $node->title = $this->club->title; + $node->description = $this->club->description; + $node->parent_node_id = \XF::options()->rhpz_club_node_id ?? 0; + $node->display_order = 1; + $node->save(); + + /** @var Forum $forum */ + $forum = $this->em()->create('XF:Forum'); + $forum->node_id = $node->node_id; + $forum->allow_posting = true; + $forum->save(); + + $this->club->node_id = $node->node_id; + $this->club->save(); + + $user = $this->club->User; + if( $user ){ + /** @var ModeratorService $modManage */ + $modManage = \XF::app()->service('RomhackPlaza\Master:Club\Moderator', $this->club, $user ); + $modManage->addModerator( $error ); + } + + return true; + } +} \ No newline at end of file diff --git a/Service/Club/CreatorService.php b/Service/Club/CreatorService.php new file mode 100644 index 0000000..2c3e772 --- /dev/null +++ b/Service/Club/CreatorService.php @@ -0,0 +1,99 @@ +club = $this->em()->create('RomhackPlaza\Master:Club'); + $this->setUser($creator); + $this->setupDefaults(); + } + + protected function setupDefaults() + { + $this->club->club_state = 'moderated'; + } + + public function getClub() + { + return $this->club; + } + + public function getUser() + { + return $this->user; + } + + public function setUser(User $user) + { + $this->user = $user; + $this->club->user_id = $this->user->user_id; + } + + public function setContent(string $title, string $description ) + { + $this->club->title = $title; + $this->club->description = $description; + } + + public function setBannerUpload(?Upload $upload = null) + { + if ($upload) { + $upload->requireImage(); + if($upload->isValid()){ + $this->bannerUpload = $upload; + } + } + } + + protected function _validate() + { + $this->club->preSave(); + return $this->club->getErrors(); + } + + protected function _save() + { + $this->club->save(); + + if( $this->bannerUpload ){ + $path = 'data://club_banners/' . $this->club->club_id . '.jpg'; + if( File::copyFileToAbstractedPath($this->bannerUpload->getFileWrapper()->getFilePath(), $path) ){ + $this->club->banner_date = \XF::$time; + $this->club->save(); + } + } + + return $this->club; + } +} \ No newline at end of file diff --git a/Service/Club/DeleterService.php b/Service/Club/DeleterService.php new file mode 100644 index 0000000..045c668 --- /dev/null +++ b/Service/Club/DeleterService.php @@ -0,0 +1,40 @@ +club = $club; + } + + public function delete() + { + if( $this->club->Forum && $this->club->Forum->Node ){ + $this->club->Forum->Node->delete(); + } + + $path = 'data://club_banners/' . $this->club->club_id . '.jpg'; + File::deleteFromAbstractedPath($path); + + $this->club->delete(); + } +} \ No newline at end of file diff --git a/Service/Club/EditorService.php b/Service/Club/EditorService.php new file mode 100644 index 0000000..bccc35f --- /dev/null +++ b/Service/Club/EditorService.php @@ -0,0 +1,73 @@ +club = $club; + } + + public function setContent(string $title, string $description) + { + $this->club->title = $title; + $this->club->description = $description; + } + + public function setBannerUpload(?Upload $upload = null) + { + if( $upload ){ + $upload->requireImage(); + if( $upload->isValid() ){ + $path = 'data://club_banners/' . $this->club->club_id . '.jpg'; + if(File::copyFileToAbstractedPath($upload->getFileWrapper()->getFilePath(), $path)){ + $this->club->banner_date = \XF::$time; + } + } + } + } + + protected function syncForumNode() + { + if( $this->club->Forum && $this->club->Forum->Node ) + { + $node = $this->club->Forum->Node; + $node->title = $this->club->title; + $node->description = $this->club->description; + $node->save(); + } + } + + protected function _validate() + { + $this->club->preSave(); + return $this->club->getErrors(); + } + + protected function _save() + { + $this->club->save(); + $this->syncForumNode(); + + return $this->club; + } +} \ No newline at end of file diff --git a/Service/Club/ModeratorService.php b/Service/Club/ModeratorService.php new file mode 100644 index 0000000..e8be63e --- /dev/null +++ b/Service/Club/ModeratorService.php @@ -0,0 +1,106 @@ +club = $club; + $this->user = $moderator; + } + + protected function countMods( int $nodeId, int $excludeUserId = 0 ) + { + return $this->finder('XF:ModeratorContent') + ->where('content_type', 'node') + ->where('content_id', $nodeId) + ->where('user_id', '!=', $excludeUserId) + ->total(); + } + + public function addModerator( string &$error ): bool + { + if( !$this->club->Forum || !$this->club->Forum->Node ) { + $error = "No node linked to this club."; + return false; + } + + if( $this->countMods( $this->club->node_id, $this->club->user_id ) > self::MAX_MODS ) { + $error = "The limit of 5 moderators has been reached."; + return false; + } + + $existingMod = $this->em()->findOne('XF:ModeratorContent', [ + 'content_type' => 'node', + 'content_id' => $this->club->node_id, + 'user_id' => $this->user->user_id + ]); + if( $existingMod ){ + $error = "This user is already a moderator."; + return false; + } + + $modContent = $this->em()->create('XF:ModeratorContent'); + $modContent->content_type = 'node'; + $modContent->content_id = $this->club->node_id; + $modContent->user_id = $this->user->user_id; + $modContent->save(); + + $permissionUpdater = \XF::app()->service('XF:UpdatePermissions'); + $permissionUpdater->setContent('node', $this->club->node_id); + $permissionUpdater->setUser($this->user); + $permissionUpdater->updatePermissions(Club::MOD_PERMISSIONS); + + \XF::app()->jobManager()->enqueueUnique('permissionRebuild', 'XF:PermissionRebuild'); + return true; + } + + public function deleteModerator( string &$error ): bool + { + if( !$this->club->Forum || !$this->club->Forum->Node ) { + $error = "No node linked to this club."; + return false; + } + + if( $this->user->user_id === $this->club->user_id ){ + $error = "You cannot delete yourself."; + return false; + } + + $mod = $this->em()->findOne('XF:ModeratorContent', [ + 'content_type' => 'node', + 'content_id' => $this->club->node_id, + 'user_id' => $this->user->user_id + ]); + + if( $mod ){ + $mod->delete(); + + \XF::db()->delete('xf_permission_entry_content', 'content_type = ? AND content_id = ? AND user_id = ?', ['node', $this->club->node_id, $this->user->user_id]); + + \XF::app()->jobManager()->enqueueUnique('permissionRebuild', 'XF:PermissionRebuild'); + } + + return true; + } +} \ No newline at end of file diff --git a/Service/DeleteAccount/CodeService.php b/Service/DeleteAccount/CodeService.php new file mode 100644 index 0000000..86edf48 --- /dev/null +++ b/Service/DeleteAccount/CodeService.php @@ -0,0 +1,30 @@ +masterKey = \XF::options()->rhpz_delete_account_master_key; + } + + public function generateDeleteAllDataKey( User $user ) + { + $dataString = "delete_data_{$user->user_id}"; + return hash_hmac('md5', $dataString, $this->masterKey ); + } + + public function generateDeleteAccountKey( User $user ) + { + $dataString = "delete_account_{$user->user_id}"; + return hash_hmac('md5', $dataString, $this->masterKey ); + } + +} \ 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 3401385..2a80881 100644 --- a/Setup.php +++ b/Setup.php @@ -6,6 +6,7 @@ use XF\AddOn\AbstractSetup; use XF\AddOn\StepRunnerInstallTrait; use XF\AddOn\StepRunnerUninstallTrait; use XF\AddOn\StepRunnerUpgradeTrait; +use XF\Db\Schema\Create; class Setup extends AbstractSetup { @@ -20,13 +21,63 @@ class Setup extends AbstractSetup { $this->schemaManager()->alterTable('xf_user', function (\XF\Db\Schema\Alter $table) { $table->addColumn('rhpz_entry_count', 'int')->setDefault(0); + $table->addColumn('nsfw_content', 'int')->setDefault(0); }); } + /** + * Create club table. + * @return void + */ + public function installStep2(): void + { + $this->schemaManager()->createTable('xf_club', function(Create $table){ + $table->addColumn('club_id', 'int')->autoIncrement(); + $table->addColumn( 'node_id', 'int' ); + $table->addColumn('user_id', 'int'); + $table->addColumn('title', 'varchar', 100); + $table->addColumn('description', 'text'); + $table->addColumn('club_state', 'enum')->values(['visible','moderated','rejected'])->setDefault('moderated'); + $table->addColumn('club_creation_date','int'); + $table->addColumn('banner_date', 'int')->setDefault(0); + $table->addPrimaryKey('club_id'); + $table->addKey('club_state'); + }); + } + + 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 upgrade1010070Step1(): void + { + $this->schemaManager()->alterTable('xf_user', function (\XF\Db\Schema\Alter $table) { + $table->addColumn('nsfw_content', 'int')->setDefault(0); + }); + } + public function uninstallStep1(): void { $this->schemaManager()->alterTable('xf_user', function($table) { - $table->dropColumns(['rhpz_entry_count']); + $table->dropColumns(['rhpz_entry_count', 'nsfw_content']); }); } + + public function uninstallStep2(): void + { + $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/Admin/Controller/UserController.php b/XF/Admin/Controller/UserController.php new file mode 100644 index 0000000..ad947c8 --- /dev/null +++ b/XF/Admin/Controller/UserController.php @@ -0,0 +1,25 @@ +assertUserExists($params->user_id); + + /** @var CodeService $service */ + $service = \XF::service('RomhackPlaza\Master:DeleteAccount\CodeService'); + + $viewParams = [ + 'user' => $user, + 'deleteAllDataCode' => $service->generateDeleteAllDataKey( $user ), + 'deleteAccountCode' => $service->generateDeleteAccountKey( $user ), + ]; + + return $this->view('XF:User\DeleteAccountCodes', 'user_delete_account_codes', $viewParams); + } +} \ 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/Forum.php b/XF/Entity/Forum.php new file mode 100644 index 0000000..7654a5d --- /dev/null +++ b/XF/Entity/Forum.php @@ -0,0 +1,22 @@ +relations['Club'] = [ + 'entity' => 'RomhackPlaza\Master:Club', + 'type' => self::TO_ONE, + 'conditions' => 'node_id', + 'primary' => false + ]; + + return $structure; + } +} \ No newline at end of file diff --git a/XF/Entity/User.php b/XF/Entity/User.php new file mode 100644 index 0000000..ec069d1 --- /dev/null +++ b/XF/Entity/User.php @@ -0,0 +1,24 @@ +columns['rhpz_entry_count'] = [ 'type' => self::UINT, 'default' => 0 ]; + $structure->columns['nsfw_content'] = [ 'type' => self::BOOL, 'default' => 0 ]; + + return $structure; + } + + public function canCreateEntry() + { + return \XF::visitor()->hasPermission('romhackplaza', 'canSubmitEntry'); + } +} \ No newline at end of file diff --git a/XF/Pub/Controller/AccountController.php b/XF/Pub/Controller/AccountController.php new file mode 100644 index 0000000..ce6187c --- /dev/null +++ b/XF/Pub/Controller/AccountController.php @@ -0,0 +1,40 @@ + $service->generateDeleteAllDataKey( $visitor ), + 'deleteAccountCode' => $service->generateDeleteAccountKey( $visitor ), + ]; + + $view = $this->view('XF:Account\DeleteAccount', 'delete_account', $viewParams); + return $this->addAccountWrapperParams($view, 'delete_account'); + } + + protected function preferencesSaveProcess(User $visitor) + { + $form = parent::preferencesSaveProcess($visitor); + + $input = $this->filter([ + 'user' => [ + 'nsfw_content' => 'bool', + ] + ]); + + $form->basicEntitySave($visitor, $input['user'] ); + return $form; + } + +} \ 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/_data/activity_summary_definitions.xml b/_data/activity_summary_definitions.xml new file mode 100644 index 0000000..a55af11 --- /dev/null +++ b/_data/activity_summary_definitions.xml @@ -0,0 +1,2 @@ + + diff --git a/_data/admin_navigation.xml b/_data/admin_navigation.xml new file mode 100644 index 0000000..8aa506b --- /dev/null +++ b/_data/admin_navigation.xml @@ -0,0 +1,2 @@ + + diff --git a/_data/admin_permission.xml b/_data/admin_permission.xml new file mode 100644 index 0000000..67760e7 --- /dev/null +++ b/_data/admin_permission.xml @@ -0,0 +1,2 @@ + + diff --git a/_data/advertising_positions.xml b/_data/advertising_positions.xml new file mode 100644 index 0000000..32059fa --- /dev/null +++ b/_data/advertising_positions.xml @@ -0,0 +1,2 @@ + + diff --git a/_data/api_scopes.xml b/_data/api_scopes.xml new file mode 100644 index 0000000..3510b36 --- /dev/null +++ b/_data/api_scopes.xml @@ -0,0 +1,2 @@ + + diff --git a/_data/bb_code_media_sites.xml b/_data/bb_code_media_sites.xml new file mode 100644 index 0000000..bdf7d27 --- /dev/null +++ b/_data/bb_code_media_sites.xml @@ -0,0 +1,2 @@ + + diff --git a/_data/bb_codes.xml b/_data/bb_codes.xml new file mode 100644 index 0000000..8c337bf --- /dev/null +++ b/_data/bb_codes.xml @@ -0,0 +1,2 @@ + + diff --git a/_data/class_extensions.xml b/_data/class_extensions.xml new file mode 100644 index 0000000..0c507eb --- /dev/null +++ b/_data/class_extensions.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/_data/code_event_listeners.xml b/_data/code_event_listeners.xml new file mode 100644 index 0000000..c501f76 --- /dev/null +++ b/_data/code_event_listeners.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/_data/code_events.xml b/_data/code_events.xml new file mode 100644 index 0000000..7752d3e --- /dev/null +++ b/_data/code_events.xml @@ -0,0 +1,2 @@ + + diff --git a/_data/content_type_fields.xml b/_data/content_type_fields.xml new file mode 100644 index 0000000..8e94d77 --- /dev/null +++ b/_data/content_type_fields.xml @@ -0,0 +1,11 @@ + + + RomhackPlaza\Master\ApprovalQueue\Club + RomhackPlaza\Master\Entity\Club + RomhackPlaza\Master\ApprovalQueue\EntryFeaturedRequest + RomhackPlaza\Master\Entity\EntryFeaturedRequest + RomhackPlaza\Master\Entity\Entry + RomhackPlaza\Master\Report\Entry + RomhackPlaza\Master\Entity\News + RomhackPlaza\Master\Report\News + diff --git a/_data/cron.xml b/_data/cron.xml new file mode 100644 index 0000000..b45f056 --- /dev/null +++ b/_data/cron.xml @@ -0,0 +1,2 @@ + + diff --git a/_data/help_pages.xml b/_data/help_pages.xml new file mode 100644 index 0000000..31828b1 --- /dev/null +++ b/_data/help_pages.xml @@ -0,0 +1,2 @@ + + diff --git a/_data/member_stats.xml b/_data/member_stats.xml new file mode 100644 index 0000000..a80a38b --- /dev/null +++ b/_data/member_stats.xml @@ -0,0 +1,2 @@ + + diff --git a/_data/navigation.xml b/_data/navigation.xml new file mode 100644 index 0000000..7d2bc0f --- /dev/null +++ b/_data/navigation.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/_data/option_groups.xml b/_data/option_groups.xml new file mode 100644 index 0000000..58b0f88 --- /dev/null +++ b/_data/option_groups.xml @@ -0,0 +1,4 @@ + + + + diff --git a/_data/options.xml b/_data/options.xml new file mode 100644 index 0000000..726cef0 --- /dev/null +++ b/_data/options.xml @@ -0,0 +1,15 @@ + + + + + + diff --git a/_data/permission_interface_groups.xml b/_data/permission_interface_groups.xml new file mode 100644 index 0000000..8e7533e --- /dev/null +++ b/_data/permission_interface_groups.xml @@ -0,0 +1,4 @@ + + + + diff --git a/_data/permissions.xml b/_data/permissions.xml new file mode 100644 index 0000000..4f7ab5a --- /dev/null +++ b/_data/permissions.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/_data/phrases.xml b/_data/phrases.xml new file mode 100644 index 0000000..9febf13 --- /dev/null +++ b/_data/phrases.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_data/routes.xml b/_data/routes.xml new file mode 100644 index 0000000..59306d6 --- /dev/null +++ b/_data/routes.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/_data/style_properties.xml b/_data/style_properties.xml new file mode 100644 index 0000000..231b9f0 --- /dev/null +++ b/_data/style_properties.xml @@ -0,0 +1,2 @@ + + diff --git a/_data/style_property_groups.xml b/_data/style_property_groups.xml new file mode 100644 index 0000000..563c56d --- /dev/null +++ b/_data/style_property_groups.xml @@ -0,0 +1,2 @@ + + diff --git a/_data/template_modifications.xml b/_data/template_modifications.xml new file mode 100644 index 0000000..9caa38b --- /dev/null +++ b/_data/template_modifications.xml @@ -0,0 +1,111 @@ + + + + ]]> + + + + +$0]]> + + + ]]> + + {{ phrase('delete_account') }} + +$0]]> + + + ]]> + + + Request a club + + +$0]]> + + + + {{ phrase('new_posts') }} + ]]> + + {{ phrase('search') }} + ]]> + + + ]]> + +
+ + Banner {$forum.title} + +
+]]>
+
+ + ]]> + +
+
+ Edit + Delete +
+
+]]>
+
+ + ]]> + + +]]> + + + ]]> + +
{{ phrase('entries') }}
+
+ {$user.rhpz_entry_count|number} +
+]]>
+
+ + ]]> + {{ phrase('entries') }} +$0]]> + + + ]]> + + Go to this page + +$0]]> + + + ]]> + + {{ phrase('delete_account_codes') }} + +$0]]> + + + ]]> + +
  • +
    {{ phrase('loading...') }}
    +
  • + +$0]]>
    +
    +
    diff --git a/_data/templates.xml b/_data/templates.xml new file mode 100644 index 0000000..607890b --- /dev/null +++ b/_data/templates.xml @@ -0,0 +1,666 @@ + + + + + + + + + + + + diff --git a/_data/widget_definitions.xml b/_data/widget_definitions.xml new file mode 100644 index 0000000..fbdae64 --- /dev/null +++ b/_data/widget_definitions.xml @@ -0,0 +1,2 @@ + + diff --git a/_data/widget_positions.xml b/_data/widget_positions.xml new file mode 100644 index 0000000..65d80ac --- /dev/null +++ b/_data/widget_positions.xml @@ -0,0 +1,2 @@ + + diff --git a/_output/class_extensions/XF-Admin-Controller-UserController_RomhackPlaza-Master-XF-Admin-Controller-UserController.json b/_output/class_extensions/XF-Admin-Controller-UserController_RomhackPlaza-Master-XF-Admin-Controller-UserController.json new file mode 100644 index 0000000..0572061 --- /dev/null +++ b/_output/class_extensions/XF-Admin-Controller-UserController_RomhackPlaza-Master-XF-Admin-Controller-UserController.json @@ -0,0 +1,6 @@ +{ + "from_class": "XF\\Admin\\Controller\\UserController", + "to_class": "RomhackPlaza\\Master\\XF\\Admin\\Controller\\UserController", + "execute_order": 10, + "active": true +} \ 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-Entity-Forum_RomhackPlaza-Master-XF-Entity-Forum.json b/_output/class_extensions/XF-Entity-Forum_RomhackPlaza-Master-XF-Entity-Forum.json new file mode 100644 index 0000000..def4609 --- /dev/null +++ b/_output/class_extensions/XF-Entity-Forum_RomhackPlaza-Master-XF-Entity-Forum.json @@ -0,0 +1,6 @@ +{ + "from_class": "XF\\Entity\\Forum", + "to_class": "RomhackPlaza\\Master\\XF\\Entity\\Forum", + "execute_order": 10, + "active": true +} \ No newline at end of file diff --git a/_output/class_extensions/XF-Entity-User_RomhackPlaza-Master-XF-Entity-User.json b/_output/class_extensions/XF-Entity-User_RomhackPlaza-Master-XF-Entity-User.json new file mode 100644 index 0000000..dbc58f0 --- /dev/null +++ b/_output/class_extensions/XF-Entity-User_RomhackPlaza-Master-XF-Entity-User.json @@ -0,0 +1,6 @@ +{ + "from_class": "XF\\Entity\\User", + "to_class": "RomhackPlaza\\Master\\XF\\Entity\\User", + "execute_order": 10, + "active": true +} \ No newline at end of file diff --git a/_output/class_extensions/XF-Pub-Controller-AccountController_RomhackPlaza-Master-XF-Pub-Controller-AccountController.json b/_output/class_extensions/XF-Pub-Controller-AccountController_RomhackPlaza-Master-XF-Pub-Controller-AccountController.json new file mode 100644 index 0000000..547489b --- /dev/null +++ b/_output/class_extensions/XF-Pub-Controller-AccountController_RomhackPlaza-Master-XF-Pub-Controller-AccountController.json @@ -0,0 +1,6 @@ +{ + "from_class": "XF\\Pub\\Controller\\AccountController", + "to_class": "RomhackPlaza\\Master\\XF\\Pub\\Controller\\AccountController", + "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 new file mode 100644 index 0000000..87997b2 --- /dev/null +++ b/_output/class_extensions/_metadata.json @@ -0,0 +1,23 @@ +{ + "XF-Admin-Controller-UserController_RomhackPlaza-Master-XF-Admin-Controller-UserController.json": { + "hash": "542c5dd275e5e26446a9e4a19b3c47b6" + }, + "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-AccountController_RomhackPlaza-Master-XF-Pub-Controller-AccountController.json": { + "hash": "b34f519ca78e8977c98e0307125537bc" + }, + "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/code_event_listeners/_metadata.json b/_output/code_event_listeners/_metadata.json index 765d1ea..c5e6508 100644 --- a/_output/code_event_listeners/_metadata.json +++ b/_output/code_event_listeners/_metadata.json @@ -1,5 +1,11 @@ { + "app_pub_render_page_c6149e27cfdc21a20c8047e0e5cd5503.json": { + "hash": "95a8be583623f99ff47eef23a658e459" + }, "criteria_user_0cfa5d0143e6477a6bc20b11e255e850.json": { "hash": "f29b40ef7a5b420b212848744fd9b7db" + }, + "import_importer_classes_64d8f27f58ba02af52958c1d4f94f812.json": { + "hash": "2ff08f9036890eb77d7bc1c7fc02fc4c" } } \ No newline at end of file diff --git a/_output/code_event_listeners/app_pub_render_page_c6149e27cfdc21a20c8047e0e5cd5503.json b/_output/code_event_listeners/app_pub_render_page_c6149e27cfdc21a20c8047e0e5cd5503.json new file mode 100644 index 0000000..dcb2a2c --- /dev/null +++ b/_output/code_event_listeners/app_pub_render_page_c6149e27cfdc21a20c8047e0e5cd5503.json @@ -0,0 +1,9 @@ +{ + "event_id": "app_pub_render_page", + "execute_order": 10, + "callback_class": "RomhackPlaza\\Master\\Listener", + "callback_method": "checkStyleVariation", + "active": true, + "hint": "", + "description": "" +} \ No newline at end of file diff --git a/_output/code_event_listeners/import_importer_classes_64d8f27f58ba02af52958c1d4f94f812.json b/_output/code_event_listeners/import_importer_classes_64d8f27f58ba02af52958c1d4f94f812.json new file mode 100644 index 0000000..7723f3c --- /dev/null +++ b/_output/code_event_listeners/import_importer_classes_64d8f27f58ba02af52958c1d4f94f812.json @@ -0,0 +1,9 @@ +{ + "event_id": "import_importer_classes", + "execute_order": 15, + "callback_class": "RomhackPlaza\\Master\\Listener", + "callback_method": "importImporterClasses", + "active": true, + "hint": "", + "description": "" +} \ No newline at end of file diff --git a/_output/content_type_fields/_metadata.json b/_output/content_type_fields/_metadata.json new file mode 100644 index 0000000..dcab9a0 --- /dev/null +++ b/_output/content_type_fields/_metadata.json @@ -0,0 +1,26 @@ +{ + "club-approval_queue_handler_class.json": { + "hash": "468464999ab50b9de400a6eae27625ac" + }, + "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/club-approval_queue_handler_class.json b/_output/content_type_fields/club-approval_queue_handler_class.json new file mode 100644 index 0000000..fc196f3 --- /dev/null +++ b/_output/content_type_fields/club-approval_queue_handler_class.json @@ -0,0 +1,5 @@ +{ + "content_type": "club", + "field_name": "approval_queue_handler_class", + "field_value": "RomhackPlaza\\Master\\ApprovalQueue\\Club" +} \ No newline at end of file diff --git a/_output/content_type_fields/club-entity.json b/_output/content_type_fields/club-entity.json new file mode 100644 index 0000000..0fb334d --- /dev/null +++ b/_output/content_type_fields/club-entity.json @@ -0,0 +1,5 @@ +{ + "content_type": "club", + "field_name": "entity", + "field_value": "RomhackPlaza\\Master\\Entity\\Club" +} \ 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_entry-entity.json b/_output/content_type_fields/romhackplaza_entry-entity.json new file mode 100644 index 0000000..91b1c6a --- /dev/null +++ b/_output/content_type_fields/romhackplaza_entry-entity.json @@ -0,0 +1,5 @@ +{ + "content_type": "romhackplaza_entry", + "field_name": "entity", + "field_value": "RomhackPlaza\\Master\\Entity\\Entry" +} \ No newline at end of file diff --git a/_output/content_type_fields/romhackplaza_entry-report_handler_class.json b/_output/content_type_fields/romhackplaza_entry-report_handler_class.json new file mode 100644 index 0000000..fc2967f --- /dev/null +++ b/_output/content_type_fields/romhackplaza_entry-report_handler_class.json @@ -0,0 +1,5 @@ +{ + "content_type": "romhackplaza_entry", + "field_name": "report_handler_class", + "field_value": "RomhackPlaza\\Master\\Report\\Entry" +} \ 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 new file mode 100644 index 0000000..1599256 --- /dev/null +++ b/_output/extension_hint.php @@ -0,0 +1,32 @@ +/undelete", + "build_class": "", + "build_method": "", + "controller": "RomhackPlaza\\Master:Thread", + "context": "", + "action_prefix": "" +} \ No newline at end of file diff --git a/_output/routes/public_clubs_.json b/_output/routes/public_clubs_.json new file mode 100644 index 0000000..7efbdae --- /dev/null +++ b/_output/routes/public_clubs_.json @@ -0,0 +1,11 @@ +{ + "route_type": "public", + "route_prefix": "clubs", + "sub_name": "", + "format": ":int/", + "build_class": "", + "build_method": "", + "controller": "RomhackPlaza\\Master:Club", + "context": "", + "action_prefix": "" +} \ No newline at end of file diff --git a/_output/routes/public_romhackplaza_entry_.json b/_output/routes/public_romhackplaza_entry_.json new file mode 100644 index 0000000..b899b90 --- /dev/null +++ b/_output/routes/public_romhackplaza_entry_.json @@ -0,0 +1,11 @@ +{ + "route_type": "public", + "route_prefix": "romhackplaza_entry", + "sub_name": "", + "format": ":int", + "build_class": "", + "build_method": "", + "controller": "RomhackPlaza\\Master:Entry", + "context": "", + "action_prefix": "" +} \ 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 new file mode 100644 index 0000000..5d7047c --- /dev/null +++ b/_output/template_modifications/_metadata.json @@ -0,0 +1,38 @@ +{ + "admin/rhpz_helper_criteria_entry_count.json": { + "hash": "d94d8b880e79d281df49117a84ae62d7" + }, + "admin/rhpz_user_edit_delete_account_codes_tab.json": { + "hash": "16b7ae6dac8dbb6846df3e6eb9cd53b6" + }, + "admin/rhpz_user_edit_delete_account_codes_tab_panes.json": { + "hash": "d4f793cfd5ba4b6841bd819a12e596e9" + }, + "public/rhpz_above_thread_list_clubs.json": { + "hash": "c261ea6e33cf5eb7ab0a7f6fe934de7c" + }, + "public/rhpz_above_thread_list_clubs_buttons.json": { + "hash": "c783001e00f7a63389c9ae988012f5fe" + }, + "public/rhpz_account_preferences_nsfw_content.json": { + "hash": "9feae814b9fa8f40a08e1b50e2d410c5" + }, + "public/rhpz_account_wrapper_delete_account.json": { + "hash": "6594c0474a9b3e737a10dbd9c531521e" + }, + "public/rhpz_category_view_clubs_submit_button.json": { + "hash": "a24a5a4b130b6198de7ef37610aa1a7d" + }, + "public/rhpz_forum_overview_wrapper_search_button.json": { + "hash": "af109f16aca8a12c4f8496fc4431f4b8" + }, + "public/rhpz_member_macros_member_stat_pairs_entry_count.json": { + "hash": "3d744e57f81abeb7f2d8291404f1e5b3" + }, + "public/rhpz_member_view_add_entry_tab.json": { + "hash": "35151043dca0be7987a72ee8b1cffc6f" + }, + "public/rhpz_member_view_add_entry_tabpanel.json": { + "hash": "5fcc29178d06fc924bdb604734cc9c59" + } +} \ No newline at end of file diff --git a/_output/template_modifications/admin/rhpz_helper_criteria_entry_count.json b/_output/template_modifications/admin/rhpz_helper_criteria_entry_count.json new file mode 100644 index 0000000..fcc6b11 --- /dev/null +++ b/_output/template_modifications/admin/rhpz_helper_criteria_entry_count.json @@ -0,0 +1,9 @@ +{ + "template": "helper_criteria", + "description": "", + "execution_order": 10, + "enabled": true, + "action": "str_replace", + "find": "", + "replace": "\n\t\n" +} \ No newline at end of file diff --git a/_output/template_modifications/admin/rhpz_user_edit_delete_account_codes_tab.json b/_output/template_modifications/admin/rhpz_user_edit_delete_account_codes_tab.json new file mode 100644 index 0000000..a7577ce --- /dev/null +++ b/_output/template_modifications/admin/rhpz_user_edit_delete_account_codes_tab.json @@ -0,0 +1,9 @@ +{ + "template": "user_edit", + "description": "Add Tab for listing delete account codes in User edit", + "execution_order": 10, + "enabled": true, + "action": "str_replace", + "find": "", + "replace": "\n\t{{ phrase('delete_account_codes') }}\n\n$0" +} \ No newline at end of file diff --git a/_output/template_modifications/admin/rhpz_user_edit_delete_account_codes_tab_panes.json b/_output/template_modifications/admin/rhpz_user_edit_delete_account_codes_tab_panes.json new file mode 100644 index 0000000..ef7be2e --- /dev/null +++ b/_output/template_modifications/admin/rhpz_user_edit_delete_account_codes_tab_panes.json @@ -0,0 +1,9 @@ +{ + "template": "user_edit", + "description": "Add Tab panes in User edit page for account deletion codes.", + "execution_order": 10, + "enabled": true, + "action": "str_replace", + "find": "", + "replace": "\n\n\t
  • \n\t\t
    {{ phrase('loading...') }}
    \n\t
  • \n
    \n$0" +} \ No newline at end of file diff --git a/_output/template_modifications/public/rhpz_above_thread_list_clubs.json b/_output/template_modifications/public/rhpz_above_thread_list_clubs.json new file mode 100644 index 0000000..05e3bd4 --- /dev/null +++ b/_output/template_modifications/public/rhpz_above_thread_list_clubs.json @@ -0,0 +1,9 @@ +{ + "template": "forum_view", + "description": "Add the club banner above the threads list.", + "execution_order": 10, + "enabled": true, + "action": "str_replace", + "find": "", + "replace": "$0\n\n
    \n \n \"Banner\n \n
    \n
    " +} \ No newline at end of file diff --git a/_output/template_modifications/public/rhpz_above_thread_list_clubs_buttons.json b/_output/template_modifications/public/rhpz_above_thread_list_clubs_buttons.json new file mode 100644 index 0000000..b5d3caf --- /dev/null +++ b/_output/template_modifications/public/rhpz_above_thread_list_clubs_buttons.json @@ -0,0 +1,9 @@ +{ + "template": "forum_view", + "description": "Add Owner edit/delete buttons.", + "execution_order": 5, + "enabled": true, + "action": "str_replace", + "find": "", + "replace": "$0\n\n
    \n
    \n Edit\n Delete\n
    \n
    \n
    " +} \ No newline at end of file diff --git a/_output/template_modifications/public/rhpz_account_preferences_nsfw_content.json b/_output/template_modifications/public/rhpz_account_preferences_nsfw_content.json new file mode 100644 index 0000000..ebc8561 --- /dev/null +++ b/_output/template_modifications/public/rhpz_account_preferences_nsfw_content.json @@ -0,0 +1,9 @@ +{ + "template": "account_preferences", + "description": "Add NSFW Content field to the settings", + "execution_order": 10, + "enabled": true, + "action": "str_replace", + "find": "", + "replace": "\n\t\n\t\n\n$0" +} \ No newline at end of file diff --git a/_output/template_modifications/public/rhpz_account_wrapper_delete_account.json b/_output/template_modifications/public/rhpz_account_wrapper_delete_account.json new file mode 100644 index 0000000..5f8b32d --- /dev/null +++ b/_output/template_modifications/public/rhpz_account_wrapper_delete_account.json @@ -0,0 +1,9 @@ +{ + "template": "account_wrapper", + "description": "Add Delete account page URL to account details", + "execution_order": 10, + "enabled": true, + "action": "str_replace", + "find": "", + "replace": "\n\t{{ phrase('delete_account') }}\n\n$0" +} \ No newline at end of file diff --git a/_output/template_modifications/public/rhpz_category_view_clubs_submit_button.json b/_output/template_modifications/public/rhpz_category_view_clubs_submit_button.json new file mode 100644 index 0000000..2cf57ba --- /dev/null +++ b/_output/template_modifications/public/rhpz_category_view_clubs_submit_button.json @@ -0,0 +1,9 @@ +{ + "template": "category_view", + "description": "Add Club Submit button", + "execution_order": 10, + "enabled": true, + "action": "str_replace", + "find": "\t\t\t\t\t\t\t", + "replace": "\n\t\n\t\tRequest a club\n\t\n\n$0" +} \ 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/template_modifications/public/rhpz_member_macros_member_stat_pairs_entry_count.json b/_output/template_modifications/public/rhpz_member_macros_member_stat_pairs_entry_count.json new file mode 100644 index 0000000..9a5d02b --- /dev/null +++ b/_output/template_modifications/public/rhpz_member_macros_member_stat_pairs_entry_count.json @@ -0,0 +1,9 @@ +{ + "template": "member_macros", + "description": "Add RHPZ Entry count on member profile page", + "execution_order": 10, + "enabled": true, + "action": "str_replace", + "find": "", + "replace": "
    \n\t
    {{ phrase('entries') }}
    \n\t
    \n\t\t{$user.rhpz_entry_count|number}\n\t
    \n
    " +} \ No newline at end of file diff --git a/_output/template_modifications/public/rhpz_member_view_add_entry_tab.json b/_output/template_modifications/public/rhpz_member_view_add_entry_tab.json new file mode 100644 index 0000000..da13520 --- /dev/null +++ b/_output/template_modifications/public/rhpz_member_view_add_entry_tab.json @@ -0,0 +1,9 @@ +{ + "template": "member_view", + "description": "Add entry tab on members page", + "execution_order": 10, + "enabled": true, + "action": "str_replace", + "find": "", + "replace": "{{ phrase('entries') }}\n$0" +} \ No newline at end of file diff --git a/_output/template_modifications/public/rhpz_member_view_add_entry_tabpanel.json b/_output/template_modifications/public/rhpz_member_view_add_entry_tabpanel.json new file mode 100644 index 0000000..6653e31 --- /dev/null +++ b/_output/template_modifications/public/rhpz_member_view_add_entry_tabpanel.json @@ -0,0 +1,9 @@ +{ + "template": "member_view", + "description": "Add Entry tab panel", + "execution_order": 10, + "enabled": true, + "action": "str_replace", + "find": "", + "replace": "
  • \n\tGo to this page\n
  • \n$0" +} \ No newline at end of file diff --git a/_output/templates/_metadata.json b/_output/templates/_metadata.json index 82b0a23..109ed7c 100644 --- a/_output/templates/_metadata.json +++ b/_output/templates/_metadata.json @@ -2,6 +2,71 @@ "admin/helper_criteria.html": { "version_id": 1000000, "version_string": "1.0.0", - "hash": "19cd05c4ab254dbad0abfd0c6b8c3456" + "hash": "0d8327297612e3e8eeb17e204e33694d" + }, + "admin/user_delete_account_codes.html": { + "version_id": 1000000, + "version_string": "1.0.0", + "hash": "cf9c69eb1bfa0821778f60e9866626a4" + }, + "public/_help_page_about.html": { + "version_id": 1010070, + "version_string": "1.1.0", + "hash": "f8d5c77616c449f0797c9a8096d7b352" + }, + "public/_help_page_delete_my_data.html": { + "version_id": 1010070, + "version_string": "1.1.0", + "hash": "32f1a682e5729cc6e8da2c41037e604a" + }, + "public/_help_page_dmca.html": { + "version_id": 1010070, + "version_string": "1.1.0", + "hash": "2297a9fffc0824831c5799b5df438f99" + }, + "public/_help_page_how_to_become_verified.html": { + "version_id": 1010070, + "version_string": "1.1.0", + "hash": "11d6e1c5f5547919336b1d7db6cb78c6" + }, + "public/_help_page_takedown.html": { + "version_id": 1010070, + "version_string": "1.1.0", + "hash": "7af5316b4485b73d8d2de2eabb706f4c" + }, + "public/approval_item_club_request.html": { + "version_id": 1000000, + "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", + "hash": "c84c3878a0aee370e2080427405fe920" + }, + "public/club_edit_form.html": { + "version_id": 1000000, + "version_string": "1.0.0", + "hash": "d83cbfd477fc14de26b72aed00c866c3" + }, + "public/club_request_form.html": { + "version_id": 1000000, + "version_string": "1.0.0", + "hash": "443b696b5c7ae6bc4b1ef36d170ac7e7" + }, + "public/report_content_romhackplaza_entry.html": { + "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/admin/helper_criteria.html b/_output/templates/admin/helper_criteria.html index 6e8dd08..4184eab 100644 --- a/_output/templates/admin/helper_criteria.html +++ b/_output/templates/admin/helper_criteria.html @@ -187,10 +187,6 @@ - - - - diff --git a/_output/templates/admin/user_delete_account_codes.html b/_output/templates/admin/user_delete_account_codes.html new file mode 100644 index 0000000..747f2fe --- /dev/null +++ b/_output/templates/admin/user_delete_account_codes.html @@ -0,0 +1,15 @@ +{$user.username} + +
    +
    +

    {{ phrase('delete_account_code') }}

    +
    +
    {$deleteAccountCode}
    +
    + +

    {{ phrase('delete_all_data_code') }}

    +
    +
    {$deleteAllDataCode}
    +
    +
    +
    \ No newline at end of file diff --git a/_output/templates/public/_help_page_about.html b/_output/templates/public/_help_page_about.html new file mode 100644 index 0000000..2b10679 --- /dev/null +++ b/_output/templates/public/_help_page_about.html @@ -0,0 +1,19 @@ +
    +
    + + Site Purpose and Content Overview + + This website is dedicated to the preservation, modification, and enhancement of classic retro games. It provides a platform for discussing and sharing modifications known as "romhacks," which are custom alterations made to game ROMs. Our focus is solely on the creative and non-commercial aspects of game modification and does not involve the distribution or use of copyrighted ROM files. + + Clarification on ROMs and Hacking +
      +
    • Legal Compliance: The site does not host or distribute any original copyrighted ROM files. All content shared here pertains exclusively to modifications of games for which users already own the original ROMs. It is intended for educational, archival, and enhancement purposes only.
    • +
    • Non-Malicious Intent: The term "hacking" used on this site refers to the modification of game data and is not related to any form of malicious hacking or illegal activity. The modifications (romhacks) discussed and shared are created to enhance or alter the gameplay experience of retro games in a non-infringing manner.
    • +
    • User Responsibility: Visitors are encouraged to ensure that any game ROMs they use are legally obtained and that their use complies with applicable copyright laws. The site does not provide or endorse illegal downloads of copyrighted material.
    • +
    + Contact Information + + For any concerns or clarifications regarding the content of this site, please contact us directly. We are committed to complying with all legal requirements and ensuring that our platform remains a positive and creative space for retro gaming enthusiasts. + +
    +
    \ No newline at end of file diff --git a/_output/templates/public/_help_page_delete_my_data.html b/_output/templates/public/_help_page_delete_my_data.html new file mode 100644 index 0000000..41cbf18 --- /dev/null +++ b/_output/templates/public/_help_page_delete_my_data.html @@ -0,0 +1,15 @@ +"The right to erasure" (Articles 17 & 19 of the GDPR) state you have the right to have your data erased, without undue delay by the data controller, if you withdraw your consent to the processing. + +In here we explain in detail how to remove your data partially or completely from this site. +

    1. How to remove comments, threads:

    +Go to the post you want to delete and click on the delete button. If you want to delete a thread, delete the first post. If you can't delete a thread or a post, you can also send a report by clicking on the report button. + + +

    2. How to remove entries:

    +To remove entries you have to edit your entry and revert its Status to "draft". A draft means it's unpublished and only you can see it. You can also delete permanently an entry with the delete button. + + + +

    3. How to remove the entire account:

    +Removing the account will remove all the comments, but it will not remove the entries. They will be anonymized and assigned to a "Deleted User", if you want to delete your entries follow the step above "How to remove entries". +

    To delete your account go here

    \ No newline at end of file diff --git a/_output/templates/public/_help_page_dmca.html b/_output/templates/public/_help_page_dmca.html new file mode 100644 index 0000000..7bb7c50 --- /dev/null +++ b/_output/templates/public/_help_page_dmca.html @@ -0,0 +1,23 @@ +

    Introduction

    +Romhacks.org (hereafter referred to as "we", "us", or "our") respects the intellectual property rights of others and expects its users to do the same. We are committed to complying with the DMCA and other applicable laws. We adopt a policy of terminating, in appropriate circumstances, users who are repeat infringers. We may also, at our sole discretion, limit access to the Site and/or terminate the accounts of any users who infringe any intellectual property rights of others, whether or not there is any repeat infringement. +

    Copyright Infringement Notification

    +If you believe that your work has been copied in a way that constitutes copyright infringement, please submit your notification through our contact form, ensuring to indicate "DMCA" in the subject line. The notification should include the following information: +
      +
    1. A physical or electronic signature of a person authorized to act on behalf of the owner of an exclusive right that is allegedly infringed.
    2. +
    3. Identification of the copyrighted work claimed to have been infringed, or, if multiple copyrighted works at a single online site are covered by a single notification, a representative list of such works at that site.
    4. +
    5. Identification of the material that is claimed to be infringing or to be the subject of infringing activity and that is to be removed or access to which is to be disabled, and information reasonably sufficient to permit us to locate the material.
    6. +
    7. Information reasonably sufficient to permit us to contact the complaining party, such as an address, telephone number, and, if available, an electronic mail address at which the complaining party may be contacted.
    8. +
    9. A statement that the complaining party has a good faith belief that use of the material in the manner complained of is not authorized by the copyright owner, its agent, or the law.
    10. +
    11. A statement that the information in the notification is accurate, and under penalty of perjury, that the complaining party is authorized to act on behalf of the owner of an exclusive right that is allegedly infringed.
    12. +
    +

    Counter-Notification Procedures

    +If you believe that your material has been removed by mistake or misidentification, please submit a counter-notification through our contact form with "DMCA" in the subject line. The counter-notification should contain the following information: +
      +
    1. Your physical or electronic signature.
    2. +
    3. Identification of the material that has been removed or to which access has been disabled and the location at which the material appeared before it was removed or access to it was disabled.
    4. +
    5. A statement under penalty of perjury that you have a good faith belief that the material was removed or disabled as a result of mistake or misidentification of the material to be removed or disabled.
    6. +
    7. Your name, address, and telephone number, and a statement that you consent to the jurisdiction of the federal court for [judicial district where your address is located], and that you will accept service of process from the person who provided notification of the alleged infringement.
    8. +
    +If a counter-notice is received by us, we may send a copy of the counter-notice to the original complaining party informing that person that it may replace the removed material or cease disabling it in 10 business days. Unless the copyright owner files an action seeking a court order against the content provider, member, or user, the removed material may be replaced or access to it restored in 10 to 20 business days or more after receipt of the counter-notice, at our discretion. +

    Modifications to Policy

    +We reserve the right to modify the provisions of this DMCA notice and our copyright policy at any time. Such modifications will be effective immediately upon posting on the site. \ No newline at end of file diff --git a/_output/templates/public/_help_page_how_to_become_verified.html b/_output/templates/public/_help_page_how_to_become_verified.html new file mode 100644 index 0000000..0b3f24f --- /dev/null +++ b/_output/templates/public/_help_page_how_to_become_verified.html @@ -0,0 +1,7 @@ +You don't need to do anything special, simply submit something. +While checking your submission we'll research your user name and entry. +If you are the creator of your own entry you'll be immediately verified after the first submission. +That means your next submission will go straight to the site, no queues. +Same for editing your existing entries data, updating the files, etc. + +If you are not the creator of the hack you can also submit things. Since we already had trouble with vandalism, you automatically receive “Verified” status after 10 approved contributions. \ No newline at end of file diff --git a/_output/templates/public/_help_page_takedown.html b/_output/templates/public/_help_page_takedown.html new file mode 100644 index 0000000..61b2e4d --- /dev/null +++ b/_output/templates/public/_help_page_takedown.html @@ -0,0 +1,22 @@ +At Romhacks.org, we deeply respect the creative work of individuals and their rights over their creations. We understand that sometimes content may be shared on our platform that you, as the creator, would prefer to have removed. To make this process as smooth and friendly as possible, we offer an easy way to submit a takedown request. +

    How to Submit a Takedown Request

    +If you find that your content has been shared on Romhacks.org and you would like it to be removed, please follow these simple steps: +
      +
    1. Visit Our Contact Page: Go to our contact page.
    2. +
    3. Complete the Form: Fill out the necessary details in the form. In the subject dropdown menu, please select "Takedown" to ensure your request is processed correctly.
    4. +
    5. Use a Verifiable Email: Provide an email address where we can reach you. If we can't communicate with you and can't confirm who you are we will not go through with the removal.
    6. +
    7. Details of the Content: Include a link where the content appears here on romhacks.org. And any information to help us determine you created the hack.
    8. +
    +

    Verification Process

    +To prevent malicious or unjustified takedown requests, we will conduct a verification process to confirm that you are indeed the creator or rightful owner of the content in question. This may include: +
      +
    • Asking for additional proof of ownership or creation.
    • +
    • Verifying the details provided in the request against the content.
    • +
    • Contacting the author via social media profiles and asking him directly.
    • +
    +

    Our Commitment

    +We aim to process takedown requests promptly and efficiently, respecting both the rights of content creators and the integrity of our platform. We appreciate your cooperation and understanding in this process. +

    Questions or Concerns?

    +If you have any questions or need further assistance regarding the takedown process, please feel free to reach out to us through the same contact form or via Discord. + +We are here to help! \ No newline at end of file diff --git a/_output/templates/public/approval_item_club_request.html b/_output/templates/public/approval_item_club_request.html new file mode 100644 index 0000000..b2a55e9 --- /dev/null +++ b/_output/templates/public/approval_item_club_request.html @@ -0,0 +1,11 @@ + \ 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/club_delete_confirm.html b/_output/templates/public/club_delete_confirm.html new file mode 100644 index 0000000..ebe8edc --- /dev/null +++ b/_output/templates/public/club_delete_confirm.html @@ -0,0 +1,13 @@ +Delete club : {$club.title} + + +
    +
    + + Are you sure you want to delete this club ? {$club.title} ?
    + Deleting this will also delete all threads and posts. +
    +
    + +
    +
    \ No newline at end of file diff --git a/_output/templates/public/club_edit_form.html b/_output/templates/public/club_edit_form.html new file mode 100644 index 0000000..29f6538 --- /dev/null +++ b/_output/templates/public/club_edit_form.html @@ -0,0 +1,72 @@ +
    + +
    + + + + + + + + + + +
    + +
    +
    + + + +
    +
    +

    Club Moderators ({$subModCount}/5)

    +
    + +
    + +
    +
    + {$mod.User.username} + + Owner + +
    +
    + + + + Remove + + + - + +
    +
    +
    +
    + +
    No moderators for this club.
    +
    +
    +
    +
    + +
    + + +

    Add a moderator

    +
    + +
    + +
    + +
    +
    + Limit reached: You have reached the maximum number of 5 moderators for your club. You must remove one before you can add a new one. +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/_output/templates/public/club_request_form.html b/_output/templates/public/club_request_form.html new file mode 100644 index 0000000..e175484 --- /dev/null +++ b/_output/templates/public/club_request_form.html @@ -0,0 +1,12 @@ +Submit Club Request + + +
    +
    + + + +
    + +
    +
    \ No newline at end of file diff --git a/_output/templates/public/report_content_romhackplaza_entry.html b/_output/templates/public/report_content_romhackplaza_entry.html new file mode 100644 index 0000000..a3c44e4 --- /dev/null +++ b/_output/templates/public/report_content_romhackplaza_entry.html @@ -0,0 +1,4 @@ +
    + {{ phrase('content:') }} + {$report.content_info.description} +
    \ 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 diff --git a/addon.json b/addon.json index bf733c6..1f8aaba 100644 --- a/addon.json +++ b/addon.json @@ -2,8 +2,8 @@ "legacy_addon_id": "", "title": "RomhackPlaza Master Addon", "description": "", - "version_id": 1000000, - "version_string": "1.0.0", + "version_id": 1010070, + "version_string": "1.1.0", "dev": "", "dev_url": "", "faq_url": "",