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.

 

Modification of your recipe

Modification of your recipe

Hi,

I'm using jReviews. There I created a checkbox: "Events"

Now I wanted to pick this recipe: http://www.metamodpro.com/metamod/recip … view-pages

Code:

if ($option == 'com_content' and $view == 'article' ) {

  $intid = (int)$id;
  $query = "select jrc.featured from #__jreviews_content jrc where jrc.contentid = $intid";
  $db->setQuery( $query, 0, 1 );
  $featured = $db->loadResult();
  if ($featured) return XXX; /* replace XXX with the module id of the module to display */
}

How do I have to modify it to pick the checkbox instead of the "featured"? I attached to screenshots from phpmyadmin to show which values should be used. I tried something like this:

Code:

if ($option == 'com_content' and $view == 'article' ) {

  $intid = (int)$id;
  $query = "select jrc.besonderheiten from #__jreviews_content jrc where jrc.contentid = $intid and jrc.besonderheiten like '%events%' ";
  $db->setQuery( $query, 0, 1 );
  $featured = $db->loadResult();
  if ($featured) return XXX; /* replace XXX with the module id of the module to display */
}

But that doesn't work. Could anyone help me?
Thanks in advance for any help!

Screenshots:

http://kesselfieber/1.jpg (for the 1st codeblock)
http://kesselfieber/2.jpg (for the 2nd codeblock)

getimo

Edited By: getimo
21-Jun-10 00:01:52

getimo
Beginner Modder
ranks
useravatar
Offline
17 Posts
Administrator has disabled public posting

Re: Modification of your recipe

Hi Getimo,

I notice in the screenshot that the column name is jrc.jr_besonderheiten but you are referring to it as jrc.besonderheiten.

Could that be the problem?

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

Re: Modification of your recipe

Oh man, thank you very much! I must be blind smile Now it does work smile

getimo

getimo
Beginner Modder
ranks
useravatar
Offline
17 Posts
Administrator has disabled public posting

Re: Modification of your recipe

Glad to help out. Have a great day!

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

Board Info

Board Stats:
 
Total Topics:
1675
Total Polls:
6
Total Posts:
5917
Posts this week:
6
User Info:
 
Total Users:
11570
Newest User:
moises1247
Members Online:
1
Guests Online:
138

Online: 
moises1247

Forum Legend:

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