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.

 

PHP Newb. Please Halp!

PHP Newb. Please Halp!

Hello!

I downloaded Meta Mod and have been messing around with it, but I am a php newbie and this is all really confusing...

What I am trying to accomplish is this:

Jreviews has a "featured listings" module, which doesn't have a lot of advanced options on where you want it to not appear.  I have included it on the site sections I want, but the module also appears on the listings themselves.  I dont want a "featured listings" module to appear on a "featured listing" page.

I turned on the advanced debugging, but I dont see anything that relates to a listing being tagged as "featured".  I did succesfully figure out how to remove it from all listings though...and I don't want to have to update the module every time I remove or add a featured listing...that has the possibility of getting really out of hand.

Does anyone have any advice that they can explain in very simple terms?

I am using a rockettheme template - crystalized, and the module position is a template specific position "maintop-a".

Thank whoever can help me with this!

Rebecca
Beginner Modder
ranks
useravatar
Offline
8 Posts
Administrator has disabled public posting

Re: PHP Newb. Please Halp!

Hi Rebecca,

I've just had a look through the jReviews demo site (frontend and backend) to try to find out the answers to your question. So far, I can see that there isn't an indicator in the URL that will show if the listing is tagged as "featured", so this is likely to require a trip to the database to get that information.

Unfortunately jReviews is not free so I can't give you a quick answer. I've written to the authors of jReviews to see if they would be willing to help out, so hopefully I'll have an answer soon.

With regard to what you are asking: I think you're saying that you want the featured listing module to disappear on (and only on) individual item pages, where that item is "featured". Is that correct?

I'll let you know as soon as I have something.
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: PHP Newb. Please Halp!

Thank you so much, that is a HUGE help! I don't know where I would begin to find that in the database, but if I can get someone to point me in the right direction, perhaps I can give you more information.

And yes, that is exactly what I wanted to have accomplished. 

Thanks again for the excellent customer service with this smile

Rebecca
Beginner Modder
ranks
useravatar
Offline
8 Posts
Administrator has disabled public posting

Re: PHP Newb. Please Halp!

Hi Rebecca,

Alejandro over at ReviewsForJoomla.com was very gracious and allowed me to use a copy of jReviews to help you out. Thanks a million Alejandro!

I've put a couple of extra recipes on this page, including the one that you wanted:

MetaMod jReviews

And since I have jReviews to work with, I'm going to put a bunch more recipes on there too.

Are there any other factors in jReviews that you would like to be able to use, in order to place modules? Just let me know.

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: PHP Newb. Please Halp!

Hi, thank you so much for taking the time to look through all that! And Ill be sure to thank Alejandro as well.  Unfortunately, it still doesn't work.  Here are the steps I have taken: (This is just a test site I am working on until I figure everything out)

Here is a link to a featured listing: http://www.theadchemist.com/component/c … lala-pasta

Here is a link to a non featured listing: http://www.theadchemist.com/component/c … usans-cafe

As you can see, the "Featured Listings" module appears on both pages.

The featured listings module ID is 89 and I disabled this from the back-end.  I created a test module for metamod, and I "auto enable included modules by module id" and chose ID 89 to include and pasted the following code in the php box:

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 89; /* replace XXX with the module id of the module to include */
}

Am I missing something? Any additional help you could provide would be greatly appreciated!

Rebecca
Beginner Modder
ranks
useravatar
Offline
8 Posts
Administrator has disabled public posting

Re: PHP Newb. Please Halp!

Hi Rebecca, can you turn on Advanced Debug mode in the MetaMod so I can see the output on those pages?
Thanks,
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: PHP Newb. Please Halp!

Ok I've enabled the advanced debugging.   Thank you again!

Rebecca
Beginner Modder
ranks
useravatar
Offline
8 Posts
Administrator has disabled public posting

Re: PHP Newb. Please Halp!

Thanks for switching that on. Now I see that module id 89 is being included (attempted, at least) twice for Susan's Cafe. This makes me think that you probably have "89" in the Quick Module ID Include box, so it's including it once from there, and once from the rule if it succeeds.

So apart from that, it should be working, shouldn't it?

Why are there no featured listings in the Susan's Cafe module? Is it looking for featured items in a certain category, and you're not in the right category, or something like that?

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: PHP Newb. Please Halp!

Ok, that's looks better. The module is only being included for the item that is not featured. The fact that the "featured" module is empty seems to be a different issue and I'll let you solve that one!

Thanks for turning on the debug mode - that served its purpose and you can turn it off now if you want.

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: PHP Newb. Please Halp!

You are correct, that module is set auto detect categories.  The reason there are no results to display within the module is because there are currently no "featured" listings in that category.

Yes I did have 89 in the Quick Module ID include box, I removed this and it appears to be working correctly.  The only side effect I can see is that the module does not show up anywhere else except on listing pages that are not "featured".   But this is something I can work around.

Rebecca
Beginner Modder
ranks
useravatar
Offline
8 Posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5913
Dormant:
User Info:
 
Total Users:
10778
Newest User:
negina4qx
Members Online:
0
Guests Online:
184

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