11 years ago
7
Topic

 Hi,


I try to create a comment system with Seblod like that.

To display my article's content, I create a custom position in Seb One Template with some tabs :

<?php
// No Direct Access
defined( '_JEXEC' ) or die;

$doc =& JFactory::getDocument();
$doc->addStyleSheet(juri::base()."templates/seb_one/css/tabs.css");
$doc->addScript(juri::base()."templates/seb_one/js/tabs.js");
?>

   <?php echo $cck->renderField('art_title');?>

<div class="tabs">
  <ul class="tabNavigation">
   <li><a href="#tab1">Informations</a></li>
   <li><a href="#tab2">Présentation</a></li>
   <li><a href="#tab3">Images</a></li>
  </ul>


   

   <div id="tab1">
   <?php echo $cck->renderField('chaine');?>
   <?php echo $cck->renderField('auteurs');?>
   <?php echo $cck->renderField('categorie_chaine');?>
   <?php echo $cck->renderField('date_de_creation_chaine');?>
   <?php echo $cck->renderField('site_web');?>
   <?php echo $cck->renderField('description_chaine');?>
   <?php echo $cck->renderField('note');?>
   </div>
   
   <div id="tab2">
   <?php echo $cck->renderField('texte_contenu');?>
   <?php echo $cck->renderField('commentaires_module');?>
   </div>
   
   <div id="tab3">
   <?php echo $cck->renderField('image_contenu');?>
   </div>

</div>


I would like to display my Seblod Comments in tab2. So in my article's content, I create a Joomla Module Field called 'commentaires_module'. 

In my custom template, I use :  <?php echo $cck->renderField('commentaires_module');?>

This field need to display my form comments module.

But it doesn't work. It display only the label of my Joomla Module field and not the site form to post comments.

I hope you understand my problem. Sorry for my english.




Get a VIP membership
11 years ago
0
Level 1

Hello,

how have you setup the Joomla Module field "commentaires_module" ?

Do you call the SEBLOD Module Form by name or by position ?

In which position of your general Joomla template have you put your SEBLOD Form Module ?


Best regards

Lionel

11 years ago
1
Level 1

Hi Lionel, (j'essaye en anglais :) )

I try to call the Module Form by name and by position : same issue.

I my general Joomla template, I try to use innerbottom position. I try to create new position (in general template or in seb one template) like explained in tutorial. But the comment form isn't displayed. 

11 years ago
0
Level 2

Hello,

a good thing, it's to be sure that your Joomla Module field work fine out of a custom template.

Put your field anywhere else in an other content type with a generic SEBLOD template like Seb_one.


In your module management, for the de position put this name "myposition"

In your Joomla Module Field, choose display by position, and put the same name "myposition".

For assignement of the module, assign it for "all" menu item.

Normally, with that, it must be displayed.


We are using this all day, so i can say it's working well.


Best regards.

Lionel


11 years ago
0
Level 1

Hi Lionel,

I try to use Joomla Module Field with Seb One, same issue :(

I try to use this to display module in my custom template :

  <?php
$document = &JFactory::getDocument();
$renderer = $document->loadRenderer('module');
$params = array('style'=>'xhtml');
$dbo = JFactory::getDBO();

$dbo->setQuery("SELECT * FROM #__modules WHERE id='91' ");
$module = $dbo->loadObject();

$module->user = '';
echo $renderer->render($module, $params);
?> 


11 years ago
0
Level 1

Hi,

Finally, on generic template, joomla module work fine !

Do you know how to make it work on custom template ? thanks

97 Posts
Anjo
11 years ago
0
Level 1

Hi xelory,

the easiest way to call a joomla module is using seblod module field but first you need to create a new position in your main template/templateDetails.XML

Then assign that position to your module and seblod module field.

Watch this video http://www.seblod.com/network/videos/list-and-search/23/1668-creating-a-comment-system.html

it is a long video but fast forward to about 16 minutes in and it shows how to setup Seblod module field


Regards

Anjo

11 years ago
0
Level 1

Hi, Anjo,

Thanks for your answer. I use this method to call joomla module. No problem with generic template. But when i want to call the module with custom template, it just show the label. I use this code to call the module :

 <?php echo $cck->renderField('joomla_module');?>

The only way to display it I find is to use this code :

<?php
$document = &JFactory::getDocument();
$renderer = $document->loadRenderer('module');
$params = array('style'=>'xhtml');
$dbo = JFactory::getDBO();

$dbo->setQuery("SELECT * FROM #__modules WHERE id='91' ");
$module = $dbo->loadObject();

$module->user = '';
echo $renderer->render($module, $params);
?> 

Maybe you have a solution to display the module in custom template without this code ?


Get a VIP membership