cvs: pearweb /public_html/pepr pepr-proposal-edit.php pepr-proposal-show.php

From: Date: Fri, 21 May 2004 09:30:09 +0000
Subject: cvs: pearweb /public_html/pepr pepr-proposal-edit.php pepr-proposal-show.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-19719@lists.php.net to get a copy of this message
toby Fri May 21 05:30:09 2004 EDT Modified files: /pearweb/public_html/pepr pepr-proposal-edit.php pepr-proposal-show.php Log: * Adding markup choose and wiki markup. http://cvs.php.net/diff.php/pearweb/public_html/pepr/pepr-proposal-edit.php?r1=1.22&r2=1.23&ty=u Index: pearweb/public_html/pepr/pepr-proposal-edit.php diff -u pearweb/public_html/pepr/pepr-proposal-edit.php:1.22 pearweb/public_html/pepr/pepr-proposal-edit.php:1.23 --- pearweb/public_html/pepr/pepr-proposal-edit.php:1.22 Wed Apr 28 02:29:00 2004 +++ pearweb/public_html/pepr/pepr-proposal-edit.php Fri May 21 05:30:08 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ | Authors: Tobias Schlitt <toby@php.net> | +----------------------------------------------------------------------+ - $Id: pepr-proposal-edit.php,v 1.22 2004/04/28 06:29:00 dufuz Exp $ + $Id: pepr-proposal-edit.php,v 1.23 2004/05/21 09:30:08 toby Exp $ */ require_once 'pepr/pepr.php'; @@ -56,7 +56,11 @@ $form->addElement('text', 'pkg_license', 'License:'); $form->addElement('textarea', 'pkg_describtion', 'Package description:', array('rows' => 20, 'cols' => '80')); - $form->addElement('link', 'help_bbcode', '', 'pepr-bbcode-help.php', 'You can use BBCode inside your description'); + $form->addElement('select', 'markup', 'Markup', array('bbcode' => 'BBCode', 'wiki' => 'Wiki')); + + $helpLinks[] =& HTML_QuickForm::createElement('link', 'help_bbcode', '_blank', 'pepr-bbcode-help.php', 'You can use BBCode inside your description', array('target' => '_blank')); + $helpLinks[] =& HTML_QuickForm::createElement('link', 'help_wiki', '_blank', 'http://wiki.ciaweb.net/yawiki/index.php?area=Text_Wiki&page=WikiRules', 'or Wiki markup', array('target' => '_blank')); + $form->addGroup($helpLinks, 'markup_help', '', ' '); $form->addElement('textarea', 'pkg_deps', 'Package dependencies <small>(list)</small>:', array('rows' => 6, 'cols' => '80')); $form->addElement('static', '', '', 'List seperated by linefeeds.'); @@ -85,7 +89,8 @@ $defaults = array('pkg_name' => $proposal->pkg_name, 'pkg_license' => $proposal->pkg_license, 'pkg_describtion' => $proposal->pkg_describtion, - 'pkg_deps' => $proposal->pkg_deps); + 'pkg_deps' => $proposal->pkg_deps, + 'markup' => $proposal->markup); if (isset($mapCategories[$proposal->pkg_category])) { $defaults['pkg_category'] = $proposal->pkg_category; } else { http://cvs.php.net/diff.php/pearweb/public_html/pepr/pepr-proposal-show.php?r1=1.29&r2=1.30&ty=u Index: pearweb/public_html/pepr/pepr-proposal-show.php diff -u pearweb/public_html/pepr/pepr-proposal-show.php:1.29 pearweb/public_html/pepr/pepr-proposal-show.php:1.30 --- pearweb/public_html/pepr/pepr-proposal-show.php:1.29 Mon May 17 02:30:33 2004 +++ pearweb/public_html/pepr/pepr-proposal-show.php Fri May 21 05:30:08 2004 @@ -16,11 +16,10 @@ +----------------------------------------------------------------------+ | Authors: Tobias Schlitt <toby@php.net> | +----------------------------------------------------------------------+ - $Id: pepr-proposal-show.php,v 1.29 2004/05/17 06:30:33 alan_k Exp $ + $Id: pepr-proposal-show.php,v 1.30 2004/05/21 09:30:08 toby Exp $ */ require_once 'pepr/pepr.php'; - require_once 'HTML/BBCodeParser.php'; require_once 'HTML/QuickForm.php'; require_once 'Damblan/Karma.php'; @@ -131,8 +130,24 @@ $bb->horizHeadRow('Dependencies:', nl2br($proposal->pkg_deps)); } $bb->horizHeadRow('Proposer:', user_link($proposal->user_handle)); - $bbparser = new HTML_BBCodeParser(array('filters' => 'Basic,Images,Links,Lists,Extended')); - $bb->fullRow($bbparser->qparse(nl2br(htmlentities($proposal->pkg_describtion)))); + + // Switching markup types + switch ($proposal->markup) { + case 'wiki': + require_once 'Text/Wiki.php'; + $wiki =& new Text_Wiki(); + $wiki->disableRule('wikilink'); + $describtion = $wiki->transform($proposal->pkg_describtion); + break; + case 'bbcode': + default: + require_once 'HTML/BBCodeParser.php'; + $bbparser = new HTML_BBCodeParser(array('filters' => 'Basic,Images,Links,Lists,Extended')); + $describtion = $bbparser->qparse(nl2br(htmlentities($proposal->pkg_describtion))); + break; + } + + $bb->fullRow($describtion); $changelog = @ppComment::getAll($proposal->id, 'package_proposal_changelog'); $changeLogRow = "";

« previous php.pear.cvs (#19719) next »