joomlaworks Tabs & Slides Mambots" for Mambo/Joomla. Tabs and Slides (in content items) Plugin gives you the ability to easily add content tabs and/or content slides. The tabs emulate a multi-page structure, while the slides emulate an accordion-like structure, inside a single page! Version: 1.4 Author: Abdul Ibad Author URI: http://ibad.bebasbelanja.com This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ // The Activation function wp_tabsSlides_activation(){ $options['slide-speed'] = 10; $options['optimized'] = on; add_option("wp_tabs_slides",$options); } // Custom Head function wp_tabsSlides_customhead(){ /* Get all Options */ $dir = str_replace('\\','/',dirname(__FILE__)); $home = get_option('siteurl'); $start = strpos($dir,'/wp-content/'); $end = strlen($dir); $plugin_url = $home.substr($dir,$start,$end); $options = get_option('wp_tabs_slides'); $slidespeed = $options['slide-speed']; $optimized = $options['optimized']; /* End get options */ ?> '; } else { $header = ''; } echo $header; } // the content filter function wp_tabsSlides( $content ){ global $post; // if post empty (check from the title) then return false if(empty($post->post_title)){ return $content; } $b=1; if (preg_match_all("/{tab=.+?}{tab=.+?}|{tab=.+?}|{\/tabs}/", $content, $matches, PREG_PATTERN_ORDER) > 0) { foreach ($matches[0] as $match) { if($b==1 && $match!="{/tabs}") { $tabs[] = 1; $b=2; } elseif($match=="{/tabs}"){ $tabs[]=3; $b=1; } elseif(preg_match("/{tab=.+?}{tab=.+?}/", $match)){ $tabs[]=2; $tabs[]=1; $b=2; } else { $tabs[]=2; } } } @reset($tabs); $tabscount = 0; if (preg_match_all("/{tab=.+?}|{\/tabs}/", $content, $matches, PREG_PATTERN_ORDER) > 0) { foreach ($matches[0] as $match) { if($tabs[$tabscount]==1) { $match = str_replace("{tab=", "", $match); $match = str_replace("}", "", $match); $content = str_replace( "{tab=".$match."}", "
'.$message.'