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.

 

need recipe for NOT showing module at specific url

need recipe for NOT showing module at specific url

Hi there

I`m using joomla 1.5.21 and the game component puarcade

I need to show modules when browsing folders and category`s, but NO modules when playing a game

When browsing folders and category`s this is the url:

http://www.ivita.dk/index.php/spillehal … ?fid=10007

And when playing a game the "gid" gets added like this.

http://www.ivita.dk/index.php/spillehal … mp;gid=152

Can anybody help!

Best regards

Bison

bison
Beginner Modder
ranks
useravatar
Offline
5 Posts
Administrator has disabled public posting

Re: need recipe for NOT showing module at specific url

Ok, that shouldn't be too hard. Try this:

if ( JRequest::getVar( 'gid' ) == null ) return XXX;
// replace XXX with the module id of the module you want to show on the non-playing pages.

It might be interesting to turn on advanced debug mode to see what that comes up with. But the line above will probably work ok.

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

Re: need recipe for NOT showing module at specific url

Hi Stehen.

The code works, but it does NOT free the right side space

See image:

[img src="http://www.ivita.dk/right_side_module_s … .jpg" [/img]

bison
Beginner Modder
ranks
useravatar
Offline
5 Posts
Administrator has disabled public posting

Re: need recipe for NOT showing module at specific url

FAQ: http://www.metamodpro.com/metamod/faq/2 … etamod-was

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

Re: need recipe for NOT showing module at specific url

hello Stephen, i know this thread is quit old but i got a similar problem. how could i show a module (quick-ID) on a Itemid but hide the same module ID on SEF Urls wich contain the word: /hide/

i tried the following: if ( JRequest::getVar( 'hide' ) == null ) return ID; but it does not work for me.

thanks in advance

testcouch
Beginner Modder
ranks
useravatar
Offline
13 Posts
Administrator has disabled public posting

Re: need recipe for NOT showing module at specific url

If you want to detect the exact text in SEF URLs then it may not be possible to do it using JRequest::getVar().

Instead I would use this:

if ($core_genius->check("uri contains hide")) return 530;

If you also need to detect the "/" characters you can include those too:

if ($core_genius->check("uri contains /hide/")) return 530;

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

Re: need recipe for NOT showing module at specific url

many thanks stepehn it works perfect smile

i'v added:

Code:

if ($core_genius->check("uri contains /hide/")) return 530; else return 375;

is it possible to define here also the respective com_component or should i do this job with module assign?

testcouch
Beginner Modder
ranks
useravatar
Offline
13 Posts
Administrator has disabled public posting

Re: need recipe for NOT showing module at specific url

hmm i faced now a other problem:

i've created two metamodule with:

a. if ($core_genius->check("uri contains /aegypten/")) return 530; else return 375;

and

b. if ($core_genius->check("uri contains /kenia/")) return 534; else return 375;

but  now i see the ID 375 double on all pages without /aegypten/ or /kenia/ 

and on

/aegypten/ i get ID 375 + ID 530
/kenia/  i get ID 534 + ID 375

Edited By: testcouch
07-Jul-14 16:17:47

testcouch
Beginner Modder
ranks
useravatar
Offline
13 Posts
Administrator has disabled public posting

Re: need recipe for NOT showing module at specific url

testcouch wrote:

hmm i faced now a other problem:

i've created two metamodule with:

a. if ($core_genius->check("uri contains /aegypten/")) return 530; else return 375;

and

b. if ($core_genius->check("uri contains /kenia/")) return 534; else return 375;

but  now i see the ID 375 double on all pages without /aegypten/ or /kenia/ 

and on

/aegypten/ i get ID 375 + ID 530
/kenia/  i get ID 534 + ID 375

ok after a while i fgured out a working solution:

Code:


if ($core_genius->check("uri contains /aegypten/")) return 530;
elseif ($core_genius->check("uri contains /kenia/")) return 534;
else return 375;

that code above works perfect now smile

testcouch
Beginner Modder
ranks
useravatar
Offline
13 Posts
Administrator has disabled public posting

Re: need recipe for NOT showing module at specific url

is it possible to define here also the respective com_component or should i do this job with module assign?

You can include a check for the component here as well if you want to, e.g.:

Code:

if ($core_genius->check("uri contains /hide/") and $option="com_whatever") return 530; else return 375;

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:
10789
Newest User:
parus6
Members Online:
1
Guests Online:
159

Online: 
parus6

Forum Legend:

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