[(#REM) /********************************************************************************** * @Subject pgn.html skeleton template to manage .pgn file attached to the SPIP article * @package pgn4spip: Embed pgn4web Chessboard plugin for SPIP 2.x or 3.x * @version 2.61.0 * @copyright copyright (c) 2012 Matt Chesstale * @license GNU General Public License version 3 * @language SPIP loop embedding PHP * * @history * 2.61.0: Initial version for SPIP 2.1 * @reference: Using models: https://www.spip.net/en_article3512.html * Utiliser les modèles : https://www.spip.net/fr_article3454.html * @Usage * If is the document of number 1 associated to the downloaded .pgn file, * use in the article the syntax: * * @Example In a SPIP article: * Example 1: * Example 2: * Example 3: * with md = movesDisplay and p = puzzle * @Caution the options eo = extendedoptions and pd = pgnData are not allowed * @Return HTML code of the iframe to run board.html with the indicated .pgn document **********************************************************************************/ ] 1) && ($UrlPgn[0] == '.')) $UrlPgn = substr($UrlPgn, 1); // Remove relative dot if ($UrlPgn[0] != '/') $UrlPgn = '/' . $UrlPgn; $option = '[(#ENV{option})]'; // Get the options after "|" in the template $lenOpt = strlen($option); if ($lenOpt > LenQuote * 2) { if (substr($option, 0, LenQuote) == QUOTE_HTML) $option = substr($option, LenQuote); // Remove first double quote coded in HTML $lenOpt = $lenOpt - LenQuote; if (($lenOpt > LenQuote) && (substr($option, $lenOpt- LenQuote, LenQuote) == QUOTE_HTML)) { $lenOpt = $lenOpt - LenQuote; $option = substr($option, 0, $lenOpt); // Remove last double quote } } if ($lenOpt > 0) $option .= ' '; // Separator with the two last options $option .= 'eo=true pd=' . $UrlRoot . $UrlPgn; // eo = extendedoptions; pd = pgnData echo pgn4spip_prepropre('[pgn ' . $option . '][/pgn]'); ?>