Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

hide mod_newsflash

hide mod_newsflash

I have Metamod Pro and am having way too much trouble with this.  I am not a PHP programmer, so this is likely the problem.

I have a basic website that shows a mod_newsflash on the right side of all pages. 

I have a registered user section of my website where I don't want this mod_newsflash to show up.  How do I get rid of it?

I tried resolving with other forum posts, etc. but I'm not finding anything that is working for me.  I have been trying different receipes in the mod_metamod I created, but with no luck.  Please point me in the right direction.  Thank you.

lizdavis
Beginner Modder
ranks
useravatar
Offline
3 Posts
Administrator has disabled public posting

Re: hide mod_newsflash

forgot to mention that I am on joomla 1.5 and the most recent version of metamod, I have many other modules I want to show up when users are logged in, just want this 1 module to disappear..... the module I want to disappear when users are logged in is module #25

I have set up a metamod module with the following code:
if ($user->usertype == "Public Front-end" || $user->usertype == "Public Front-End") return 25;

lizdavis
Beginner Modder
ranks
useravatar
Offline
3 Posts
Administrator has disabled public posting

Re: hide mod_newsflash

Hi Liz,

here's a real simple way that you can get rid of that module for logged-in users. It only works with MetaMod Pro, which you have.

1 - keep the mod_newsflash module set up completely normal, i.e. don't disable it (which is what you normally do with MetaMod). You should see it on the page as normal whether logged in or not.
2 - set up a MetaMod to show on all pages (the default) and ensure that its title is turned OFF
3 - use the following recipe:

Code:

if (MM_LOGGED_IN) {

  $changes->mod(25)->disable();
}

That's all there is to it.

Cheers,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3312 Posts
User info in posts
Administrator has disabled public posting

Re: hide mod_newsflash

It worked!!!!!!!  I couldn't be happier!  YAHOOOOOO!  thank you soooo much!

lizdavis
Beginner Modder
ranks
useravatar
Offline
3 Posts
Administrator has disabled public posting

Re: hide mod_newsflash

You're welcome smile

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3312 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1666
Total Polls:
6
Total Posts:
5909
Dormant:
User Info:
 
Total Users:
10093
Newest User:
lamanaudio
Members Online:
0
Guests Online:
189

Online: 
There are no members online

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked