Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • hbf1000 Friend
    #180703

    Hello everybody !!!

    I am using Joomla 1.5 with JA Edenite

    I have and Adsense module displaying for everyone (Public Access).

    But, If the user logs in, I want that this modules does not show up at all.

    Is this possible? How?

    Tks

    Sherlock Friend
    #467195

    Hi hbf1000,

    Normally your module will be loaded via a snap of code like this
    [PHP]<?php if ($this->countModules(‘user4’)) { ?>
    <div id=”ja-search”>
    <jdoc:include type=”modules” name=”user4″ style=”raw” />
    </div>
    <?php } ?>[/PHP]

    This is just an example for loading modules at the user4 position, here if you don’t want to load modules once users login you can change the above to this

    [PHP]<?php
    $user = & JFactory::getUser();
    if ($this->countModules(‘user4’) && $user->get(‘guest’)) { ?>
    <div id=”ja-search”>
    <jdoc:include type=”modules” name=”user4″ style=”raw” />
    </div>
    <?php } ?>[/PHP]

    Notice here about the change [PHP]<?php
    $user = & JFactory::getUser();
    if ($this->countModules(‘user4’) && $user->get(‘guest’)) { ?>[/PHP]

    It check to see if the user is a guest.
    I hope you got this and would be able to apply this for your own module

    hbf1000 Friend
    #467429

    Thank you.

    I will try this and get back to you.

Viewing 3 posts - 1 through 3 (of 3 total)

This topic contains 3 replies, has 2 voices, and was last updated by  hbf1000 12 years, 2 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum