Getting mainbody_bottom to display before comments

Rate this topic: Evaluations: 2, 3.50 on the average.Evaluations: 2, 3.50 on the average.Evaluations: 2, 3.50 on the average.Evaluations: 2, 3.50 on the average.Evaluations: 2, 3.50 on the average.Evaluations: 2, 3.50 on the average.3.50 out of 6 based on 2 vote(s)
GK User
Mon Sep 22, 2014 6:19 pm
Reply with quote
Report this post
Hey everyone!

Alright, so I want my mainbody bottom position to display right under the comments.

Right now it's like this:
Image

And I want it to appear like this:
Image

I tried cutting/pasting the module position in the .php just before the comment section, but it really threw off the entire template.

Can anyone help me with this, specifically which segment I should cut and where exactly I should paste it.

Thanks!
User avatar
Fresh Boarder

teitbite
Wed Sep 24, 2014 9:56 am
Reply with quote
Report this post
Hi

please tell me the exact url to the page You've made this screen.
User avatar
Moderator

GK User
Wed Sep 24, 2014 4:49 pm
Reply with quote
Report this post
The URL is not live yet, but I'll PM you account credentials so you can check it out.

teitbite wrote:Hi

please tell me the exact url to the page You've made this screen.
User avatar
Fresh Boarder

teitbite
Thu Sep 25, 2014 9:00 am
Reply with quote
Report this post
Hi

You haven't mentioned that this is a module. I thought You meant a related articles section. This will be very hard to do and it may be considered as a customisation so I will not be able to help. Try maybe one easy solution I have in mind now. Try create a new module position inside article. Edit file /html/com_k2/template/default/item.php and add this code before part entering comments:

Code: Select all
      <?php
         $modules =& JModuleHelper::getModules('featured_articles');
         foreach ($modules as $module) {
                                echo '<div class="box"><h3 class="header">Featured Stories</h3>' . $module . '</h3><div class="content">';
            echo JModuleHelper::renderModule($module);
                                echo '</div></div>';
         }
      ?>
User avatar
Moderator

GK User
Thu Sep 25, 2014 11:22 am
Reply with quote
Report this post
How much would the custom work cost?

I tried just copy/pasting this above the comment section in the item.php:
Code: Select all
<?php if($this->API->modules('mainbody_bottom')) : ?>
                  <section id="gkMainbodyBottom">
                     <jdoc:include type="modules" name="mainbody_bottom" style="<?php echo $this->module_styles['mainbody_bottom']; ?>" />
                  </section>
                  <?php endif; ?>


But it simply won't work. Really frustrating.

teitbite wrote:Hi

You haven't mentioned that this is a module. I thought You meant a related articles section. This will be very hard to do and it may be considered as a customisation so I will not be able to help. Try maybe one easy solution I have in mind now. Try create a new module position inside article. Edit file /html/com_k2/template/default/item.php and add this code before part entering comments:

Code: Select all
      <?php
         $modules =& JModuleHelper::getModules('featured_articles');
         foreach ($modules as $module) {
                                echo '<div class="box"><h3 class="header">Featured Stories</h3>' . $module . '</h3><div class="content">';
            echo JModuleHelper::renderModule($module);
                                echo '</div></div>';
         }
      ?>
User avatar
Fresh Boarder

teitbite
Fri Sep 26, 2014 8:19 pm
Reply with quote
Report this post
Hi

You need to use the module position adding script as I presented. It's a component code already so joomla functions to use module position are not loaded yet. The code I gave You should work in the exact way I've made it, so please try copy my code and than use module position: featured_articles for this module.
User avatar
Moderator

GK User
Tue Sep 30, 2014 1:18 pm
Reply with quote
Report this post
teitbite wrote:Hi

You need to use the module position adding script as I presented. It's a component code already so joomla functions to use module position are not loaded yet. The code I gave You should work in the exact way I've made it, so please try copy my code and than use module position: featured_articles for this module.


Hey Teitbite,

I've been toying around with this for days, changed the position of the module, added the code directly above:

Code: Select all
<?php if($params->get('itemComments') && ( ($params->get('comments') == '2' && !$this->user->guest) || ($params->get('comments') == '1'))):?>
          <?php echo $this->item->event->K2CommentsBlock; ?>
          <?php endif;?>


When I follow those steps and refresh the site, the entire site is stripped of CSS and it doesn't scroll down past the area in which the code was added.

Don't think this solution is going to work, unfortunately.
User avatar
Fresh Boarder

teitbite
Wed Oct 01, 2014 9:51 am
Reply with quote
Report this post
Hi

Please revert all changes and send me ftp access and joomla panel access. I'll make it for You.
User avatar
Moderator

GK User
Fri Oct 10, 2014 1:37 am
Reply with quote
Report this post
teitbite wrote:Hi

Please revert all changes and send me ftp access and joomla panel access. I'll make it for You.


Sorry it took so long, I thought I was out of luck! The user/pass in your PM has Joomla panel access and I'll give you FTP access in your PM.
User avatar
Fresh Boarder

teitbite
Sat Oct 11, 2014 11:29 am
Reply with quote
Report this post
Hi

I've copied my code right under the fulltext. Please publish something to "featured_articles" module position to check.
User avatar
Moderator

GK User
Sun Oct 12, 2014 5:48 pm
Reply with quote
Report this post
teitbite wrote:Hi

I've copied my code right under the fulltext. Please publish something to "featured_articles" module position to check.


Hey Teitbite!

So I've placed the NSP GK5 module in the featured_articles position and the CSS breaks and it looks like the image attached. The page stops rendering exactly at the point in which the custom module position should be.
User avatar
Fresh Boarder

teitbite
Tue Oct 14, 2014 2:33 pm
Reply with quote
Report this post
Hi

There were a typo in code, sorry for that. should be working now.
User avatar
Moderator

GK User
Sat Oct 18, 2014 7:38 am
Reply with quote
Report this post
Thank you so much for your help!

teitbite wrote:Hi

There were a typo in code, sorry for that. should be working now.
User avatar
Fresh Boarder

teitbite
Sun Oct 19, 2014 2:10 pm
Reply with quote
Report this post
Hi

No problem. Glad I was able to help :)
User avatar
Moderator


cron