Файловый менеджер - Редактировать - /var/www/html/Contribute.zip
Ðазад
PK ! )kO�� � $ Templates/SpecialContribute.mustachenu �Iw�� <div class="mw-contribute-wrapper"> <div id="mw-contribute-tabs-content" class="mw-contribute-tabs-content"> <div id="mw-contribute-cards" class="mw-contribute-content-area"> {{#cards}} {{#action}} <a href="{{action}}" class="mw-contribute-card"> {{/action}} <div class="mw-contribute-card-content"> <div class="mw-contribute-card-title"><span class="mw-contribute-card-icon mw-contribute-card-icon--{{icon}}"></span>{{title}}</div> <div class="mw-contribute-card-description">{{description}}</div> <div class="mw-link mw-contribute-card-action"> {{#action}} {{actionText}} {{/action}} </div> </div> </a> {{/cards}} </div> </div> </div> PK ! �%�� ! Card/ContributeCardActionLink.phpnu �Iw�� <?php /** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * http://www.gnu.org/copyleft/gpl.html * * @file */ namespace MediaWiki\Specials\Contribute\Card; class ContributeCardActionLink extends ContributeCardAction { /** * @inheritDoc */ public function __construct( string $action, string $actionText ) { parent::__construct( $action, $actionText, 'link' ); } } PK ! �ʜ�| | Card/ContributeCardAction.phpnu �Iw�� <?php /** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * http://www.gnu.org/copyleft/gpl.html * * @file */ namespace MediaWiki\Specials\Contribute\Card; class ContributeCardAction { private string $action; private string $actionText; private string $actionType; /** * @param string $action the action's url or command to be attached to card element * @param string $actionText the action's text to be shown on the bottom of the card element * @param string $actionType the action's type, specifying if it is a url or a function, ... */ public function __construct( string $action, string $actionText, string $actionType ) { $this->action = $action; $this->actionText = $actionText; $this->actionType = $actionType; } /** * @return string */ public function getActionType(): string { return $this->actionType; } /** * @return string */ public function getAction(): string { return $this->action; } /** * @return string */ public function getActionText(): string { return $this->actionText; } /** * @param string $action */ public function setAction( string $action ): void { $this->action = $action; } /** * @param string $actionText */ public function setActionText( string $actionText ): void { $this->actionText = $actionText; } /** * @return array */ public function toArray(): array { return [ 'action' => $this->action, 'actionText' => $this->actionText, 'actionType' => $this->actionType, ]; } } PK ! Q�X�1 1 Card/ContributeCard.phpnu �Iw�� <?php /** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * http://www.gnu.org/copyleft/gpl.html * * @file */ namespace MediaWiki\Specials\Contribute\Card; class ContributeCard { private string $title; private string $icon; private string $description; private ContributeCardAction $action; public function __construct( string $title, string $description, string $icon, ContributeCardAction $action ) { $this->title = $title; $this->icon = $icon; $this->description = $description; $this->action = $action; } /** * @return string */ public function getTitle(): string { return $this->title; } /** * @param string $title */ public function setTitle( string $title ): void { $this->title = $title; } /** * @return string */ public function getIcon(): string { return $this->icon; } /** * @param string $icon */ public function setIcon( string $icon ): void { $this->icon = $icon; } /** * @return string */ public function getDescription(): string { return $this->description; } /** * @param string $description */ public function setDescription( string $description ): void { $this->description = $description; } /** * @return ContributeCardAction */ public function getAction(): ContributeCardAction { return $this->action; } /** * @param ContributeCardAction $action */ public function setAction( ContributeCardAction $action ): void { $this->action = $action; } /** * @return array */ public function toArray(): array { return [ 'title' => $this->title, 'icon' => $this->icon, 'description' => $this->description, 'action' => $this->action->toArray() ]; } } PK ! �4�oh h Hook/ContributeCardsHook.phpnu �Iw�� <?php /** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * http://www.gnu.org/copyleft/gpl.html * * @file */ namespace MediaWiki\Specials\Contribute\Hook; interface ContributeCardsHook { /** * This hook is called before processing the list of cards * to display on the contribute page * * @since 1.40 * * @param array &$cards List of contribute cards data * @return void */ public function onContributeCards( array &$cards ): void; } PK ! `�{ta a ContributeFactory.phpnu �Iw�� <?php /** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * http://www.gnu.org/copyleft/gpl.html * * @file */ namespace MediaWiki\Specials\Contribute; use MediaWiki\HookContainer\HookRunner; use MediaWiki\SpecialPage\SpecialPage; use MediaWiki\Specials\Contribute\Card\ContributeCard; use MediaWiki\Specials\Contribute\Card\ContributeCardActionLink; use MediaWiki\User\UserIdentity; use MessageLocalizer; use Skin; class ContributeFactory { private MessageLocalizer $localizer; private HookRunner $hookRunner; /** * @param MessageLocalizer $localizer * @param HookRunner $hookRunner */ public function __construct( MessageLocalizer $localizer, HookRunner $hookRunner ) { $this->localizer = $localizer; $this->hookRunner = $hookRunner; } /** * @return array */ public function getCards(): array { $cards = []; $this->hookRunner->onContributeCards( $cards ); $cards[] = ( new ContributeCard( $this->localizer->msg( 'newpage' )->text(), $this->localizer->msg( 'newpage-desc' )->text(), 'article', new ContributeCardActionLink( SpecialPage::getTitleFor( 'Wantedpages' )->getLocalURL(), $this->localizer->msg( 'view-missing-pages' )->text() ) ) )->toArray(); return $cards; } /** * Check if the Special:Contribute page is enabled for the current skin * This can be removed when T323083 is resolved ie. the Special:Contribute feature * has been shipped by the WMF Language Team. * * @param Skin $skin * @param array $specialContributeSkinsEnabled * * @return bool */ public static function isEnabledOnCurrentSkin( Skin $skin, array $specialContributeSkinsEnabled = [] ): bool { return in_array( $skin->getSkinName(), $specialContributeSkinsEnabled ); } /** * @param UserIdentity $viewingUser * @param ?UserIdentity $targetUser * * @return array */ public static function getAssociatedNavigationLinks( UserIdentity $viewingUser, ?UserIdentity $targetUser ): array { if ( $targetUser === null || !$viewingUser->equals( $targetUser ) ) { return []; } return [ SpecialPage::getTitleFor( 'Contribute' )->getFullText(), SpecialPage::getTitleFor( 'Contributions', $targetUser->getName() )->getFullText(), ]; } } PK ! )kO�� � $ Templates/SpecialContribute.mustachenu �Iw�� PK ! �%�� ! Card/ContributeCardActionLink.phpnu �Iw�� PK ! �ʜ�| | Card/ContributeCardAction.phpnu �Iw�� PK ! Q�X�1 1 H Card/ContributeCard.phpnu �Iw�� PK ! �4�oh h � Hook/ContributeCardsHook.phpnu �Iw�� PK ! `�{ta a t ContributeFactory.phpnu �Iw�� PK * *
| ver. 1.1 | |
.
| PHP 8.4.18 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка