×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Help! Help! Putting Module with {loadposition}

Help! Help! Putting Module with {loadposition} 15 years 5 months ago #1453

  • Jatin
  • Jatin's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 20
  • Thank you received: 0
I was wondering if you can help me out with this.

I am using custom template option in Joomla Comment. I am customising akostyle template. Modifying html file so that I can layout the comment form and comments different way. Don't know PHP.

Now, I want to put advts next to the comment form. For this I need to put some module in column next to the form.

I tried using {loadposition left} joomla plugin in column next to it. But this does not work.

See if you can help me out.

Thank you.

Jatin

Help! Help! Putting Module with {loadposition} 15 years 5 months ago #1457

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Can you try to add the code for the add in the template of !jocomment?

Help! Help! Putting Module with {loadposition} 15 years 5 months ago #1470

  • Jatin
  • Jatin's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 20
  • Thank you received: 0
Hi,

Thank you for your reply.

Yes tried this. No luck.

I also tried to add following code so that it can create a module position but only Joomla Comment code gets processed.

Below code in html file of the template of Joomla Comment and corresponnding module position in XML file of my website template (custom made template).
<div id="commentmod"><?php mosLoadModules ( 'commentmod', -2 ); ?>  </div>

After doing this I published a module in module position commentmod.

But it seems that Jommla Comment does not process code out side the component.

This is where I am confused. Don't know how to make this work.

Please help me.

Thank you.

Help! Help! Putting Module with {loadposition} 15 years 5 months ago #1471

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
what I ment is to add the banner code (what is it adsense?) to the template, not the module.

Help! Help! Putting Module with {loadposition} 15 years 5 months ago #1489

  • Jatin
  • Jatin's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 20
  • Thank you received: 0
Hi,
Thank you.

Tried but no luck..
:( :( :( :(

Help! Help! Putting Module with {loadposition} 15 years 5 months ago #1491

  • Jatin
  • Jatin's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 20
  • Thank you received: 0
By the way, I want to use banner module to display custom banners. Want to get advts from locals.

Thanks.

Help! Help! Putting Module with {loadposition} 15 years 5 months ago #1494

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Ok, here we are. The code is for 1.5 ( I have no idea how it must look under 1.0, but I believe you can find that out)
The function you need is in components/com_comment/joscomment/comment.class.php
function form_htmlCode() at around 2902.
So go the end of the function right before the return html and add:
$module = &JModuleHelper::getModules('left');
$attribs = array('style' => 'xhtml');
    foreach ($module as $mod) {
       $html .= JModuleHelper::renderModule($mod,$attribs);
}

this will load all modules in the left menu(for 1.5) and will show them after the !jocomment post form.
If you want to place the module on a nother place, just go up in the function.
Have fun!
Daniel

Help! Help! Putting Module with {loadposition} 15 years 5 months ago #1500

  • Jatin
  • Jatin's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 20
  • Thank you received: 0
Hi Daniel,

Thank you very much for all your support.

Will try it and let you know the outcome.

Did found out about JModuleHelper thing from Joomla Developer Forum yesterday but didn't know what to do exactly.

You saved my days of work.

Thank you very much.

Jatin

Help! Help! Putting Module with {loadposition} 15 years 5 months ago #1628

  • Jatin
  • Jatin's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 20
  • Thank you received: 0
Hi Daniel,

Thank you. The code worked. Now I can load any modules below form.

Just one thing.

I have changed the place.

the place you suggested was showing module while you are not logged in.

I moved the code some lines below (Don't remember exact place - am at work so can't look at it).

This shows the module only while logged in (This is what I wanted to do). It shows module below comment form.

Now, the problem is I want it to be displayed betn comments and comment form.

When I click on pagination links it shows exactly where I wanted to (betn comments and comment form) but this doesn't work while the page is first loaded (module appears below the form).

I tried to mess but no luck.

Can you please show me exact location where to put the code so that it is displayed to logged in users and betn comments and comment form??

Sorry for too much hassel.

Thank you for your cooperation.

Jatin
  • Page:
  • 1
Time to create page: 0.143 seconds