Changeset 17767
- Timestamp:
- 04/29/09 17:23:15 (4 years ago)
- Files:
-
- plugins/sfBBCodeParserPlugin/trunk/README (modified) (1 diff)
- plugins/sfBBCodeParserPlugin/trunk/config/bb_code_parser_config.yml (modified) (1 diff)
- plugins/sfBBCodeParserPlugin/trunk/config/bb_code_parser_tags.yml (modified) (1 diff)
- plugins/sfBBCodeParserPlugin/trunk/lib/BBCodeParser/Filter/EmailFilter.class.php (modified) (3 diffs)
- plugins/sfBBCodeParserPlugin/trunk/lib/BBCodeParser/Filter/ImagesFilter.php (modified) (4 diffs)
- plugins/sfBBCodeParserPlugin/trunk/lib/BBCodeParser/Filter/LinksFilter.php (modified) (6 diffs)
- plugins/sfBBCodeParserPlugin/trunk/lib/BBCodeParser/Filter/ListsFilter.php (modified) (4 diffs)
- plugins/sfBBCodeParserPlugin/trunk/modules/sfBBCodeParser/templates/indexSuccess.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfBBCodeParserPlugin/trunk/README
r17745 r17767 52 52 >Check the changelog TAB to see changelogs of >= 1.0.0 versions 53 53 54 Bugs: 55 ==== 56 57 * ImageFilter does not allow to have spaces in alt or title attributes 58 54 59 ---- 55 60 plugins/sfBBCodeParserPlugin/trunk/config/bb_code_parser_config.yml
r17753 r17767 5 5 close: "]" 6 6 xmlclose: true 7 #filters: "Basic,Extended,Images,Links,Lists,Email" 8 filters: "Basic,Extended" 7 filters: "Basic,Extended,Images,Links,Lists,Email" plugins/sfBBCodeParserPlugin/trunk/config/bb_code_parser_tags.yml
r17753 r17767 94 94 allowed: "all" 95 95 attributes: { } 96 97 Images: 98 img: 99 htmlopen: "img" 100 htmlclose: "" 101 allowed: "none" 102 attributes: { src: "src=%2$s%1$s%2$s", w: "width=%2$s%1$d%2$s", h: "height=%2$s%1$d%2$s", alt: "alt=%2$s%1$s%2$s", title: "title=%2$s%1$s%2$s" } 103 104 Links: 105 url: 106 htmlopen: "a" 107 htmlclose: "a" 108 allowed: "none^img" 109 attributes: { href: "href=%2$s%1$s%2$s" } 110 111 Lists: 112 list: 113 htmlopen: "ol" 114 htmlclose: "ol" 115 allowed: "all" 116 child: "none^li" 117 attributes: { list: "style=%2$slist-style-type:%1$s;%2$s" } 118 119 ulist: 120 htmlopen: "ul" 121 htmlclose: "ul" 122 allowed: "all" 123 child: "none^li" 124 attributes: { list: "style=%2$slist-style-type:%1$s;%2$s" } 125 126 li: 127 htmlopen: "li" 128 htmlclose: "li" 129 allowed: "all" 130 parent: "none^ulist,list" 131 attributes: { } 132 133 Email: 134 email: 135 htmlopen: "a" 136 htmlclose: "a" 137 allowed: "none^img" 138 attributes: { email: href="%2$smailto:%1$s%2$s" } plugins/sfBBCodeParserPlugin/trunk/lib/BBCodeParser/Filter/EmailFilter.class.php
r17753 r17767 5 5 * @author Stijn de Reede <sjr@gmx.co.uk> 6 6 * @author COil 7 * @since 1.0.0 - 19 mar 087 * @since 1.0.0 - 29 avr 09 8 8 */ 9 9 … … 16 16 * 17 17 * @author COil 18 * @since 19 mar 0818 * @since 29 avr 09 19 19 */ 20 20 public function __construct($options = array()) … … 48 48 function _preparse() 49 49 { 50 $options = sfBBCodeParser Config::getConfig();50 $options = sfBBCodeParserPluginConfigHandler::getConfig(); 51 51 52 52 $o = $options['open']; plugins/sfBBCodeParserPlugin/trunk/lib/BBCodeParser/Filter/ImagesFilter.php
r17744 r17767 5 5 * @author Stijn de Reede <sjr@gmx.co.uk> 6 6 * @author COil 7 * @since 1.0.0 - 2 0 mar 087 * @since 1.0.0 - 29 avr 09 8 8 */ 9 9 … … 11 11 { 12 12 13 /**14 * Code name of filter.15 *16 * @author COil17 * @since 1.0.0 - 20 mar 0818 */19 public static $_filterName = 'Images';20 21 13 /** 22 14 * New constructor to retrieve the tags for the filter from … … 32 24 33 25 // Now retrieves the attributes from the config file 34 $this->_definedTags = sfBBCodeParser Config::getDefinedTagsForFilter(self::$_filterName);26 $this->_definedTags = sfBBCodeParserPluginConfigHandler::getDefinedTagsForFilter('Images'); 35 27 } 36 28 … … 56 48 function _preparse() 57 49 { 58 $options = sfBBCodeParser Config::getConfig();50 $options = sfBBCodeParserPluginConfigHandler::getConfig(); 59 51 60 52 $o = $options['open']; plugins/sfBBCodeParserPlugin/trunk/lib/BBCodeParser/Filter/LinksFilter.php
r17744 r17767 5 5 * @author Stijn de Reede <sjr@gmx.co.uk> 6 6 * @author COil 7 * @since 1.0.0 - 2 0 mar 087 * @since 1.0.0 - 29 avr 09 8 8 */ 9 9 … … 11 11 { 12 12 13 /**14 * Code name of filter.15 *16 * @author COil17 * @since 1.0.0 - 19 mar 0818 */19 public static $_filterName = 'Links';20 21 13 /** 22 14 * List of allowed schemes … … 48 40 49 41 // Now retrieves the attributes from the config file 50 $this->_definedTags = sfBBCodeParser Config::getDefinedTagsForFilter(self::$_filterName);42 $this->_definedTags = sfBBCodeParserPluginConfigHandler::getDefinedTagsForFilter('Links'); 51 43 } 52 44 … … 70 62 function _preparse() 71 63 { 72 $options = sfBBCodeParser Config::getConfig();64 $options = sfBBCodeParserPluginConfigHandler::getConfig(); 73 65 $o = $options['open']; 74 66 $c = $options['close']; … … 97 89 function smarterPPLinkExpand($matches) 98 90 { 99 $options = sfBBCodeParser Config::getConfig();91 $options = sfBBCodeParserPluginConfigHandler::getConfig(); 100 92 $o = $options['open']; 101 93 $c = $options['close']; … … 153 145 function smarterPPLink($matches) 154 146 { 155 $options = sfBBCodeParser Config::getConfig();147 $options = sfBBCodeParserPluginConfigHandler::getConfig(); 156 148 $o = $options['open']; 157 149 $c = $options['close']; plugins/sfBBCodeParserPlugin/trunk/lib/BBCodeParser/Filter/ListsFilter.php
r17744 r17767 5 5 * @author Stijn de Reede <sjr@gmx.co.uk> 6 6 * @author COil 7 * @since 1.0.0 - 2 0 mar 087 * @since 1.0.0 - 28 avr 09 8 8 */ 9 9 … … 12 12 13 13 /** 14 * Code name of filter.15 *16 * @author COil17 * @since 1.0.0 - 20 mar 0818 */19 public static $_filterName = 'Lists';20 21 /**22 14 * New constructor to retrieve the tags for the filter from 23 15 * the sf configuation. 24 16 * 25 17 * @author COil 26 * @since 2 0 mar 0818 * @since 28 avr 09 27 19 */ 28 20 public function __construct($options = array()) … … 32 24 33 25 // Now retrieves the attributes from the config file 34 $this->_definedTags = sfBBCodeParser Config::getDefinedTagsForFilter(self::$_filterName);26 $this->_definedTags = sfBBCodeParserPluginConfigHandler::getDefinedTagsForFilter('Lists'); 35 27 } 36 28 … … 56 48 function _preparse() 57 49 { 58 $options = sfBBCodeParser Config::getConfig();50 $options = sfBBCodeParserPluginConfigHandler::getConfig(); 59 51 60 52 $o = $options['open']; plugins/sfBBCodeParserPlugin/trunk/modules/sfBBCodeParser/templates/indexSuccess.php
r17753 r17767 3 3 <table> 4 4 <tr> 5 <td co span="3"><h2>Basic filter</h2></td>5 <td colspan="3"><h2>Basic filter</h2></td> 6 6 </tr> 7 7 <tr> … … 36 36 </tr> 37 37 <tr> 38 <hr/> 39 <td cospan="3"><h2>Extended filter</h2></td> 38 <td colspan="3"><hr/><h2>Extended filter</h2></td> 40 39 </tr> 41 40 <tr> … … 98 97 <td>:</td> 99 98 <td><?php echo $bb_parser->qparse('[h6]Title 6[/h6]'); ?></td> 100 </tr> 99 </tr> 100 <tr> 101 <td colspan="3"><hr/><h2>Images</h2></td> 102 </tr> 103 <tr> 104 <td> 105 [img 106 src="http://www.symfony-project.org/downloads/logos/symfony.gif" 107 alt="Symfony_logo" 108 title="Symfony_rocks!"][/img]</td> 109 <td>:</td> 110 <td><?php echo $bb_parser->qparse('[img src="http://www.symfony-project.org/downloads/logos/symfony.gif" alt="Symfony_logo" title="Symfony_rocks!"][/img]'); ?></td> 111 </tr> 112 <tr> 113 <td colspan="3"><hr/><h2>Links</h2></td> 114 </tr> 115 <tr> 116 <td> 117 [url 118 href="http://www.symfony-project.org/plugins/sfBBCodeParserPlugin"] 119 Back to plugin homepage 120 [/url] 121 </td> 122 <td>:</td> 123 <td><?php echo $bb_parser->qparse('[url href="http://www.symfony-project.org/plugins/sfBBCodeParserPlugin"]Back to plugin homepage[/url]'); ?></td> 124 </tr> 125 <tr> 126 <td colspan="3"><hr/><h2>Lists</h2></td> 127 </tr> 128 <tr> 129 <td>[list][*]Element 1 [*]Element 2[/list]</td> 130 <td>:</td> 131 <td><?php echo $bb_parser->qparse('[list][*]Element 1 [*]Element 2[/list]'); ?></td> 132 </tr> 133 <tr> 134 <td>[ulist][*]Element 1 [*]Element 2[/list]</td> 135 <td>:</td> 136 <td><?php echo $bb_parser->qparse('[ulist][*]Element 1 [*]Element 2[/ulist]'); ?></td> 137 </tr> 138 <tr> 139 <td>[li]Element 1[/li][li]Element 2[/li]</td> 140 <td>:</td> 141 <td><?php echo $bb_parser->qparse('[li]Element 3[/li][li]Element 4[/li]'); ?></td> 142 </tr> 143 <tr> 144 <td colspan="3"><hr/><h2>Email</h2></td> 145 </tr> 146 <tr> 147 <td>[email="toto@domain.com"]toto@domain.com[/email]</td> 148 <td></td> 149 <td><?php echo $bb_parser->qparse('[email="toto@domain.com"]toto@domain.com[/email]'); ?></td> 150 </tr> 101 151 </table>