/** * Load and print the plugin administration page named `$adminPageName`. * * @param string $adminPageName */ private static function printAdminPage($adminPageName) { // Load the model. $model = RPBChessboardHelperLoader::loadModel('AdminPage/' . $adminPageName); // Process the post-action, if any. switch ($model->getPostAction()) { case 'update-options': self::executeAction($model, 'SaveOptions', 'updateOptions'); break; case 'reset-general': self::executeAction($model, 'ResetOptions', 'resetGeneral'); break; case 'reset-compatibility': self::executeAction($model, 'ResetOptions', 'resetCompatibility'); break; case 'reset-smallscreens': self::executeAction($model, 'ResetOptions', 'resetSmallScreens'); break; default: break; } // Print the template. RPBChessboardHelperLoader::printTemplate('AdminPage/Main', $model); }
public static function callbackInlinedScripts() { $model = RPBChessboardHelperLoader::loadModel('Common/Compatibility'); RPBChessboardHelperLoader::printTemplate('Localization', $model); }
* * * 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 3 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, see <http://www.gnu.org/licenses/>. * * * ******************************************************************************/ ?> <?php RPBChessboardHelperLoader::printTemplate($model->getSubPageTemplateName(), $model); ?> <script type="text/javascript"> jQuery(document).ready(function($) { $('.rpbchessboard-outline a').click(function(e) { e.preventDefault(); var target = $(this).attr('href'); $('html').animate({ scrollTop: $(target).offset().top - 50 }, 500); }); }); </script>
?> </p> <ol class="rpbchessboard-outline"> <li><a href="#rpbchessboard-fenAttributeFlip"><?php _e('Board flipping', 'rpbchessboard'); ?> </a></li> <li><a href="#rpbchessboard-fenAttributeSquareSize"><?php _e('Square size', 'rpbchessboard'); ?> </a></li> <li><a href="#rpbchessboard-fenAttributeShowCoordinates"><?php _e('Show coordinates', 'rpbchessboard'); ?> </a></li> <li><a href="#rpbchessboard-fenAttributeMarkers"><?php _e('Square and arrow markers', 'rpbchessboard'); ?> </a></li> </ol> <?php RPBChessboardHelperLoader::printTemplate('AdminPage/Help/FENAttributes/Flip', $model); RPBChessboardHelperLoader::printTemplate('AdminPage/Help/FENAttributes/SquareSize', $model); RPBChessboardHelperLoader::printTemplate('AdminPage/Help/FENAttributes/ShowCoordinates', $model); RPBChessboardHelperLoader::printTemplate('AdminPage/Help/FENAttributes/Markers', $model); ?> </div>
<li><a href="#rpbchessboard-pgnDiagram"><?php _e('Diagrams', 'rpbchessboard'); ?> </a></li> <li><a href="#rpbchessboard-pgnMarker"><?php _e('Square and arrow markers', 'rpbchessboard'); ?> </a></li> <li><a href="#rpbchessboard-pgnCustomStartingPosition"><?php _e('Custom starting position', 'rpbchessboard'); ?> </a></li> <li><a href="#rpbchessboard-pgnNullMove"><?php _e('Null moves', 'rpbchessboard'); ?> </a></li> </ol> <?php RPBChessboardHelperLoader::printTemplate('AdminPage/Help/PGNSyntax/Example', $model); RPBChessboardHelperLoader::printTemplate('AdminPage/Help/PGNSyntax/NAG', $model); RPBChessboardHelperLoader::printTemplate('AdminPage/Help/PGNSyntax/Comment', $model); RPBChessboardHelperLoader::printTemplate('AdminPage/Help/PGNSyntax/Variation', $model); RPBChessboardHelperLoader::printTemplate('AdminPage/Help/PGNSyntax/Diagram', $model); RPBChessboardHelperLoader::printTemplate('AdminPage/Help/PGNSyntax/Marker', $model); RPBChessboardHelperLoader::printTemplate('AdminPage/Help/PGNSyntax/CustomStartingPosition', $model); RPBChessboardHelperLoader::printTemplate('AdminPage/Help/PGNSyntax/NullMove', $model); ?> </div>
* 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 3 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, see <http://www.gnu.org/licenses/>. * * * ******************************************************************************/ ?> <div id="rpbchessboard-memoPage"> <p> <?php _e('This short reminder presents through examples the features provided by the RPB Chessboard plugin, ' . 'namely the insertion of chess diagrams and games in WordPress websites. ' . 'On the left is the code written in posts and pages, while the right column shows the corresponding rendering.', 'rpbchessboard'); ?> </p> <?php RPBChessboardHelperLoader::printTemplate('AdminPage/Memo/FEN', $model); RPBChessboardHelperLoader::printTemplate('AdminPage/Memo/PGN', $model); ?> </div>
?> </p> <ol class="rpbchessboard-outline"> <li><a href="#rpbchessboard-pgnAttributePieceSymbols"><?php _e('Piece symbols', 'rpbchessboard'); ?> </a></li> <li><a href="#rpbchessboard-pgnAttributeNavigationBoard"><?php _e('Navigation board', 'rpbchessboard'); ?> </a></li> <li><a href="#rpbchessboard-pgnAttributeMoveAnimation"><?php _e('Move animation', 'rpbchessboard'); ?> </a></li> <li><a href="#rpbchessboard-pgnAttributeBoardAspect"><?php _e('Chessboard aspect', 'rpbchessboard'); ?> </a></li> </ol> <?php RPBChessboardHelperLoader::printTemplate('AdminPage/Help/PGNAttributes/PieceSymbols', $model); RPBChessboardHelperLoader::printTemplate('AdminPage/Help/PGNAttributes/NavigationBoard', $model); RPBChessboardHelperLoader::printTemplate('AdminPage/Help/PGNAttributes/MoveAnimation', $model); RPBChessboardHelperLoader::printTemplate('AdminPage/Help/PGNAttributes/BoardAspect', $model); ?> </div>
* This file is part of RPB Chessboard, a WordPress plugin. * * Copyright (C) 2013-2016 Yoann Le Montagner <yo35 -at- melix.net> * * * * 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 3 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, see <http://www.gnu.org/licenses/>. * * * ******************************************************************************/ ?> <p> <?php echo sprintf(__('These settings control the default aspect and behavior of the chess diagrams and games ' . 'inserted in posts and pages with the %1$s[%3$s][/%3$s]%2$s and %1$s[%4$s][/%4$s]%2$s tags. ' . 'They can be overridden at each tag by passing appropriate tag attributes: ' . 'see %5$shelp on FEN diagram attributes%7$s and %6$shelp on PGN game attributes%7$s for more details.', 'rpbchessboard'), '<span class="rpbchessboard-sourceCode">', '</span>', htmlspecialchars($model->getFENShortcode()), htmlspecialchars($model->getPGNShortcode()), '<a href="' . htmlspecialchars($model->getHelpOnFENAttributesURL()) . '">', '<a href="' . htmlspecialchars($model->getHelpOnPGNAttributesURL()) . '">', '</a>'); ?> </p> <?php RPBChessboardHelperLoader::printTemplate('AdminPage/Options/General/BoardAspect', $model); RPBChessboardHelperLoader::printTemplate('AdminPage/Options/General/PieceSymbols', $model); RPBChessboardHelperLoader::printTemplate('AdminPage/Options/General/NavigationBoard', $model); RPBChessboardHelperLoader::printTemplate('AdminPage/Options/General/MoveAnimation', $model);