php - how to create a content plugin on joomla -


i want create content plugin on joomla.

i want put [picasa id="5551971516356491729"] , album show.

i create php function return html album.

i need had js code light-box.

i have content plugin create light-box can applay content plugin on one?

i meen plugin create code [lightbox link="www.example.com/image1.jpg"] , light-box plugin generate html?

start here http://docs.joomla.org/creating_a_content_plugin

your primary function along lines of...

function onpreparecontent( &$article, &$params, $limitstart ) {     $pattern = '/(\w)[picasa id="([0-9_]+)"](\w)/';     $replacement = '$1<a href="http://www.example.com/image1.jpg/$2">@$2</a>$3';     $article->text = preg_replace($pattern, $replacement, $article->text);      return true; } 

you need format new html in way lightbox plugin detect , it's magic.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -