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.

 

Metamod for specific component

Metamod for specific component

Hello,

I have added the component Ja Jobboard and I need php lines for showing modules with jobs. Because I do not want to show the modules all the time it would be great if I can make sure that a module is show when a job is show, a resume edit or something like that. How can I do this.

For example, this is the url for a job: /nl/component/jajobboard/jajobs/jaview/33-vrijwilligerswerk-werken-met-zeeschildpadden

Because everytime a new job will be added I can't do it with the job id.

Anyone who can help me with this.

Thanks
Tim

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

Re: Metamod for specific component

Hi Tim,

install MetaMod (free), create a new MetaMod module, and assign it to all pages. Then turn on MetaMod's "advanced debug" mode, and view some of the pages where you want the modules and where you don't want the modules.

Some output will appear in the MetaMod with some example PHP code to use. If you already know some PHP you shouldn't have any trouble using this to identify the exact page – but if not, feel free to paste that code from several different types of pages, into the forum here and I can advise. Just make sure you also state which page each snippet of PHP is from.

All the best,
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: Metamod for specific component

Hello Stephen,

I have no php skills so if you can help me that would be great.

I added a metamod module on all pages but I see nothing. I do probably something wrong here.

This is an example url where different modules have to appear on the right. http://www.seizoenwerk.nl/nl/component/ … hildpadden

Keep inmind that every job has a new id and I still want to show the module with every job.

Thanks
Tim

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

Re: Metamod for specific component

Hi Tim,

sorry for the delayed replay.

To be able to help you with this component, you need to provide the info I asked for in my 1st reply. That is, you need to create a MetaMod, assign it to "all" pages, and switch on the MetaMod Advanced Debug option. Then paste the output from that into the forum.

Thanks in advance,
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: Metamod for specific component

Hi Stephen,

Thanks, after I did the debug I saw what had to happen. Here is the info:

if (
$option == 'com_jbjobs'
and $view == 'guest'
and $Itemid == NULL
and $jinput->get('lang') == 'nl' /*!*/
and $jinput->get('layout') == 'joblist' /*!*/
and $jinput->get('language') == 'nl-NL' /*!*/
) return 177; /* replace XXX with the module ID or position to display */

I want this module only be shown when the following url is shown.
http://www.seizoenwerk.nl/nl/component/ … st/joblist

Thanks for your help.

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

Re: Metamod for specific component

Hi,

the language lines are probably unnecessary, so you should be able to do it with:

if (
  $option == 'com_jbjobs'
  and $view == 'guest'
  and $Itemid == NULL
  and $jinput->get('layout') == 'joblist'
) return 177;


Now, it's possible that this might catch some other pages as well, which is why I originally suggested that you do some other pages too (e.g. the page you get when you click on one of the job ads in the list). But give this a go and there's a good chance it won't need further modification.

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: Metamod for specific component

Thanks, it is working for and I will look into the other urls.

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

Re: Metamod for specific component

Sorry still a question, something is not right. I have to assign the module somewhere otherwise it will nog be shown. The problem is when I assign it to all pages, I get a white module position at the right. How can not assign to a page andd still show the module. I can't send a picture with the post so I hope it is clear.

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

Re: Metamod for specific component

Hi Tim,

please see FAQs:

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

Easiest way to fix the situation is with MetaMod Pro, but see the FAQs for some other possible solutions.

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

Re: Metamod for specific component

Hi Stephen,

Thank you. I have bought the pro module, the easiest way. But I have a problem, I am trying to show a custom html module on all page when a registered user is logged in but nothing happens. I have checked it different times but nothing is showing. Any idea why?

I use this string:
if ( $user->usertype == "Registered" ) return 228;
// shows menu jobseeker

I have tried to use the debug function but when I do that I only get the code for that current position and that is not what I need.

Thanks
Tim

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

Board Info

Board Stats:
 
Total Topics:
1667
Total Polls:
6
Total Posts:
5909
Posts this week:
1
User Info:
 
Total Users:
10117
Newest User:
prediksibolajitu
Members Online:
1
Guests Online:
120

Online: 
prediksibolajitu

Forum Legend:

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