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 module on CB GroupJive pages

Hide module on CB GroupJive pages

I am using MetaMod Pro 2.9 on a Joomla 1.5.23 installation.  I currently have a MetaMod module which is displaying content if another module is NOT displayed.  The code currently looks like:

Code:

$moduleid = 243;


$sql = 'SELECT count(*) as c from #__modules m, #__modules_menu mm ' .
  'WHERE mm.moduleid = m.id ' .
  'and m.published = 1 ' .
  'and (mm.menuid = ' .
  (int)$Itemid . ' or mm.menuid = 0) and mm.moduleid = ' . (int)$moduleid;

$db->setQuery( $sql, 0, 1 );
$row = $db->loadObject();

$not_there = ($row == null or $row->c == 0);

if ($not_there) return 242;

I would like this module to NOT display if the site visitor accesses a CommunityBuilder GroupJive page.  An example URL would look like this:

Code:

http://www.avonlocalschools.org/index.php?option=com_comprofiler&task=pluginclass&plugin=cbgroupjive&action=groups&func=show&cat=8&grp=273&Itemid=

Is there any way this one module can do both things - display on ever page that module id 243 does not show, but NOT display on GroupJive pages?

Edited By: momentis
22-Aug-11 11:39:23

momentis
Web Developer
Beginner Modder
ranks
useravatar
Offline
12 Posts
User info in posts
Administrator has disabled public posting

Re: Hide module on CB GroupJive pages

Please ignore this post, Stephen.  I simply used the standard module assignments to restrict the Itemid of the menu item for GroupJive.

Sorry!

momentis
Web Developer
Beginner Modder
ranks
useravatar
Offline
12 Posts
User info in posts
Administrator has disabled public posting

Re: Hide module on CB GroupJive pages

Hi momentis,

the answer (as usual) is "yes" you can do what you're asking!

Just for future reference, you could change the last line of the original PHP to this:

if ($not_there or
  ($option == "com_comprofiler"
  and JRequest::getVar("task") == "pluginclass"
  and JRequest::getVar("plugin") == "cbgroupjive")
  ) return 242;

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
3313 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5913
Dormant:
User Info:
 
Total Users:
10783
Newest User:
weatti4qx
Members Online:
0
Guests Online:
146

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