I'm trying to build a plugin and I would like to use something similar to WP's shortcode syntax.
My plugin is going to be a media viewer (it will add http://praveenvijayan.github.com/media-space/ to the theme), so I would like to search the post/page for: [mediaspace width=200 height=400 src=whatever.flv] and replace it with what is needed for the jQuery plugin to work. I am having a problem trying to write the regex that will find this 'shortcode' tag in the midst of the rest of the post text. If possible, I would like the attributes to be interchangable. So, they can write 'width=200 height=400' or 'height=400 width=200' and it will still pick it up. I would like it to accept the following: width:500, /*width of the video or image*/ height:400, /*height of the video or image*/ autoplay: false, /*Automatically start videos: True/False */ fit:false, /*Fit image to container width and height. if set to false it will retain orginal width & height*/ title:false, /*if need to add title, set it to true*/ closetitle:false, /*Allows to close caption/title*/ firstitem:true /*Playes first item when loads */ I appreciate any and all help. Thanks -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/habari-dev
