Fabrice

[Solved 9r] BT Tabs is able to encapsulate plugins ?

10 posts in this topic

Hi

I tried to add gmapfp module to BT Tabs, but that not work. (gmaspfp work in article)

I asked to gmapfp creator why, and he ask me if I know BT Tabs is able to encapsulate plugins ?

Can you answer me ?

Share this post


Link to post
Share on other sites

Hi Fabrice

As i see you use a short code in your article to show a map, right?

What plugin or module do you use to do that?

Why you add this module to tab item directly instead of a article?

Share this post


Link to post
Share on other sites

Hi tronghm

Yes that's right, it's short code

It's a component and plugin.

You can see here.

I chose to put it in a tab to see further information and to ensure that the article is not too long

Share this post


Link to post
Share on other sites

Hi.

Please try to this solution

Open layout file default.php or accordion.php in tmpl folder.

Search this line (it appears 2 times)


$aticle = BTTagsHelper::loadArticle($tab->tabValue);

Add right below this line

$aticle->introtext = JHtml::_('content.prepare', $aticle->introtext);

Same with K2 items, find this line (2 times too)

$k2Article =  BTTagsHelper::loadK2Article($tab->tabValue);?>

Add this line right below



<?php $k2Article->introtext = JHtml::_('content.prepare', $k2Article->introtext); ?>

You only need to change one in 2 case, it belongs to your article that you choose to create tab item.

I hope it work correctly.

Fabrice likes this

Share this post


Link to post
Share on other sites

Hi

I don't find $aticle = BTTagsHelper::loadArticle($tab->tabValue); in default.php and I find once on accordion.php

I did changement but that's not work

Share this post


Link to post
Share on other sites

Do you find this line

case "Article":

please give me few lines right below it

Example

case "Article":    
$aticle = BTTagsHelper::loadArticle($tab->tabValue);
//$atricle_params = new JParameter($aticle->attribs) ;
$atricle_params = new JRegistry() ;
$atricle_params->loadString($aticle->attribs);
$show_title_article = $atricle_params->get('show_title');
if($show_title_article ==''){
$global_config_article = JComponentHelper::getParams('com_content');
$show_title_article = $global_config_article->get('show_title');
}
?>
<?php if($show_title_article== '1'){?><h3 class="btTab-article-title"><?php echo $aticle->title ;?></h3><?php }?>
<div><?php echo $aticle->introtext;?></div>
<?php break;

Share this post


Link to post
Share on other sites

Hi tronghm

Sorry, I did not understand your first answer with my poor english.

Rereading I preview of my mistake.

I did what you wrote and it works.

A big thank you

Share this post


Link to post
Share on other sites