|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-03-21 20:02 UTC] hubert dot roksor at gmail dot com
Description: ------------ It would be really nice if it was possible to specify multiple arguments for a BBCode. For example, we could use something like [url href="http://example.com" title="Example page"]...text...[/url] The implementation should allow arguments to be specified in any order. The user would need to indicate the name of the default argument. For instance, if the name of the default argument is "href", those should be identical: [url="http://example.com"]...[/url] [url href="http://example.com"]...[/url] Thanks for reading ;) PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 11:00:02 2025 UTC |
What will you see as replacement syntax? It would also be usefull to put a list of argument and define the default argument... What about a 'url' => array( replacement => '<a {href="{title_val%html_quote}"} {title="{title_val%html_quote}"}>{content}</a>', validation_callback => array('href'=>array('Validator','url')), arguments=> array( 'href'=> array( 'default_val'=>'{content}', 'validation'=>array('Validator','url'), 'forced'=>true ) 'title', 'default'=>'href' ) ), If you have a better Idea for declaration, i'm listening, because the current syntax is already quite complex. and my current idea for your suggestion make it even more complex. But it must be done only one time :)Oups, done an error on the replacement syntax: here is the correction: 'replacement' => '<a {href="{href_val%html_quote}"} {title="{title_val%html_quote}"}>{content}</a>',