Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated

Remove or hide the Main Content area in Frontpage

10 years 11 months ago
  • sonia's Avatar
    Topic Author
  • sonia
  • Offline
  • Fresh Boarder
  • Posts: 12
  • Thank you received: 0
Licenses:
JomSocial Active Socialize Expired

Hello There!

I need your help as i want to customize the Socialize Template and I am not sure about the proper way to do so.
I use the custom.css already to change css, and it works just fine.
Also i have change the frontage.guests.php

But now, i do not need the Main Content Area, and i just try to overlap that with the modules. (So, it looks like this image attached).
Is it a good way to do so?
Is is OK if I just says display:none; to this area?

Many Many thanks for your help!

Sonia

Attachment Capturedcran2014-06-0312.08.50.png not found

Attachments:
10 years 11 months ago
Licenses:

Hi, Sonia.

No, display: none; will hide main content area for good... and probably you want to display it for logged in users, right.

Well, you can modify template sho this area is shown only for registered users... but this is a core hack.
(WARNING! Core file hack! Please, make safe copy of edited file. It means also that this file will be overwritten during upgrade, so please make a safe copy of customized file as well)

Edit this file: ROOT/templates/socialize/tpls/blocks/mainbody-js.php

in line 11 change this:

defined('_JEXEC') or die;

with this:
defined('_JEXEC') or die;
$user = JFactory::getUser();

and in line 63 change this:
<div id="t3-content" class="t3-content <?php echo $this->getClass($layout, $col) ?>" <?php echo $this->getData ($layout, $col++) ?>>
      <div class="t3-content-inner">
        <jdoc:include type="message" />
        <jdoc:include type="component" />
      </div>
    </div>

with this:
<div id="t3-content" class="t3-content <?php echo $this->getClass($layout, $col) ?>" <?php echo $this->getData ($layout, $col++) ?>>
    <?php if ($user->id != 0) { ?>
      <div class="t3-content-inner">
        <jdoc:include type="message" />
        <jdoc:include type="component" />
      </div>
      <?php } ?>
    </div>

Now, main content should be not loaded for guests. And will appear only for logged in users.


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
The following user(s) said Thank You: sonia
Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW