/trunk/api/text/wiki_papyrus/Render/Xhtml/Redirection.php |
---|
New file |
0,0 → 1,26 |
<?php |
class Text_Wiki_Render_Xhtml_Redirection extends Text_Wiki_Render { |
/** |
* |
* Renders a token into text matching the requested format. |
* |
* @access public |
* |
* @param array $options The "options" portion of the token (second |
* element). |
* |
* @return string The text rendered from the token options. |
* |
*/ |
function token($options) |
{ |
// Initialisation des variables |
$sortie = ''; |
$url = $options['url']; |
header("Location: $url"); |
exit; |
} |
} |
?> |
/trunk/api/text/wiki_papyrus/Parse/Redirection.php |
---|
New file |
0,0 → 1,46 |
<?php |
// $Id: Redirection.php,v 1.1 2005-09-23 13:58:07 ddelon Exp $ |
/** |
* |
* This class implements a Text_Wiki_Parse to find source text marked as |
* an Interwiki link. See the regex for a detailed explanation of the |
* text matching procedure; e.g., "InterWikiName:PageName". |
* |
* @author Paul M. Jones <pmjones@ciaweb.net> |
* |
* @package Text_Wiki |
* |
*/ |
class Text_Wiki_Parse_Redirection extends Text_Wiki_Parse { |
var $regex = '/\{\{Redirection url="(.+?)"\}\}/'; |
/** |
* |
* Remplace l'action par une liste des pages contenant les mots clés choisis |
* Les options sont: |
* |
* 'mots' => les mots clés séparés par des virgules |
* |
* @access public |
* |
* @param array &$matches The array of matches from parse(). |
* |
* @return A delimited token to be used as a placeholder in |
* the source text, plus any text priot to the match. |
* |
*/ |
function process(&$matches) |
{ |
$options = array( |
'url' => $matches[1] |
); |
return $this->wiki->addToken($this->rule, $options); |
} |
} |
?> |
/trunk/api/text/wiki_papyrus/Papyrus.class.php |
---|
21,7 → 21,7 |
// | along with Foobar; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id: Papyrus.class.php,v 1.6 2005-04-18 16:41:53 jpm Exp $ |
// CVS : $Id: Papyrus.class.php,v 1.7 2005-09-23 13:58:07 ddelon Exp $ |
/** |
* Classe configurant le formatage pour Papyrus. |
* |
36,7 → 36,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.6 $ $Date: 2005-04-18 16:41:53 $ |
*@version $Revision: 1.7 $ $Date: 2005-09-23 13:58:07 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
78,6 → 78,7 |
'Nouveaute', // Action Nouveaute |
'Plan', // Action Plan |
'Syndication', // Action Syndication |
'Redirection' // Action Redirection |
); |
/** |
283,6 → 284,9 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.6 2005/04/18 16:41:53 jpm |
* Ajout des actions Plan et Syndication. |
* |
* Revision 1.5 2005/04/14 16:35:42 jpm |
* Ajout de nouvelles actions pour Papyrus XHTML. |
* |