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.

 

can metamod do the job?

can metamod do the job?

hi! stephen,

i've run into a problem with jomcomment. because of a third party extension called multicategories, which is integral to the site, jomcomment doesn't display in categories when that component is being used. i'm wondering if i can somehow add a recipe to force jomcomment to appear on those pages?

any thoughts?
 

thank much.

baituo01
Intermediate Modder
ranks
useravatar
Offline
46 Posts
Administrator has disabled public posting

Re: can metamod do the job?

Hi baituo01,

I wonder, is this because with MultiCategories the Itemids are not used?

In any case, can I ask you to switch on Advanced Debug mode in MetaMod, and post the output that you get from that on some of the pages where you're having the problem? This will give some information that can be used to write a recipe for you.

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

Re: can metamod do the job?

if i take the same article and click it from the front page vs. a multicatigories blog page, the urls look like this:

front page (jomcomment appears):
http://www.zhongwenmovies.com/index.php … =57:movies

multicategories blog view(jomcomment does NOT appear):
http://www.zhongwenmovies.com/index.php … Itemid=111

same article

front page w/advanced debug:

The PHP code below may be used to help MetaMod to identify the exact page that you are viewing. For help using this feature, please click here.
if (
$option == 'com_multicategories'
and $view == 'article'
and $id == '174:iron-and-silk'
and JRequest::getVar('catid') == '5:movies'
and $Itemid == '111'
) return XXX; /* replace XXX with the module ID or position to display */
MetaMod debug info:
Module ID: 113
$option: com_multicategories
$view: article
$id: 174:iron-and-silk
$Itemid: 111
$timezone: Etc/GMT+0
$language: en-us
$language_code: en
$language_region: us
Including modules: None

muticategories blog view w/ advanced debug:

The PHP code below may be used to help MetaMod to identify the exact page that you are viewing. For help using this feature, please click here.
if (
$option == 'com_content'
and $view == 'article'
and $id == '174:iron-and-silk'
and JRequest::getVar('catid') == '57:movies'
and $Itemid == NULL
) return XXX; /* replace XXX with the module ID or position to display */
MetaMod debug info:
Module ID: 113
$option: com_content
$view: article
$id: 174:iron-and-silk
$Itemid: 0
$timezone: Etc/GMT+0
$language: en-us
$language_code: en
$language_region: us
Including modules: 27, 93, 83, 125

basically i need jomcomment to appear on all pages in which multicategories component is used. the category ids include : 65, 66, 67....and many more. maybe it would be easier to do it based off the menu type. i don't know.

thank you very much!

baituo01
Intermediate Modder
ranks
useravatar
Offline
46 Posts
Administrator has disabled public posting

Re: can metamod do the job?

hi! stephen,

it appears that i listed the advanced debug results backwards. it should look like this:

muticategories blog view w/ advanced debug:

The PHP code below may be used to help MetaMod to identify the exact page that you are viewing. For help using this feature, please click here.
if (
$option == 'com_multicategories'
and $view == 'article'
and $id == '174:iron-and-silk'
and JRequest::getVar('catid') == '5:movies'
and $Itemid == '111'
) return XXX; /* replace XXX with the module ID or position to display */
MetaMod debug info:
Module ID: 113
$option: com_multicategories
$view: article
$id: 174:iron-and-silk
$Itemid: 111
$timezone: Etc/GMT+0
$language: en-us
$language_code: en
$language_region: us
Including modules: None

front page w/advanced debug:

The PHP code below may be used to help MetaMod to identify the exact page that you are viewing. For help using this feature, please click here.
if (
$option == 'com_content'
and $view == 'article'
and $id == '174:iron-and-silk'
and JRequest::getVar('catid') == '57:movies'
and $Itemid == NULL
) return XXX; /* replace XXX with the module ID or position to display */
MetaMod debug info:
Module ID: 113
$option: com_content
$view: article
$id: 174:iron-and-silk
$Itemid: 0
$timezone: Etc/GMT+0
$language: en-us
$language_code: en
$language_region: us
Including modules: 27, 93, 83, 125

baituo01
Intermediate Modder
ranks
useravatar
Offline
46 Posts
Administrator has disabled public posting

Re: can metamod do the job?

Ok, that's great info, thanks.

From that we can see that when you click on something from the front page, it goes to a component called com_multicategories. Now JomGenius doesn't know anything about com_multicategories, so it can't calculate the category id. However from what you have posted we see that it's easy to get the catid from JRequest.

I'm not sure how this is going to fit into your current rules (perhaps you could post them?), but here's how you could identify the category id no matter if the page was reached through multicategories or normal:

$catid = 0;
if ($option == "com_multicategories") $catid = JRequest::getInt("catid");
if ($option == "com_content") $catid = $content_genius->info("category_id");
if ($catid == 57) return "27,93,83,125";


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

Re: can metamod do the job?

hi stephen,

the other code i'm using is as follows:

if ($content_genius->check("category_id = 68")) return "27, 93, 83, 116";

if ($content_genius->check("category_id = 51")) return "27, 93, 83, 118";

if ($content_genius->check("category_id = 57")) return "27, 93, 83, 125";

is it possible to combine these so modules "27, 93, 83, 125" still display in the categories i selected and also simultaneously make jomcomment appear on multicategory blog pages?

i tried inserting the recipe you gave and nothing changed.

btw just to be thorough jomcomment does not appear when clicked on from blog view... which, in this case, because i'm using multicategories third party component, is called multicategories blog view. when i click the title from the front page jomcomment works fine. 

please advise.

thank you.

baituo01
Intermediate Modder
ranks
useravatar
Offline
46 Posts
Administrator has disabled public posting

Re: can metamod do the job?

I think this will do it:

$catid = 0;
if ($option == "com_multicategories") $catid = JRequest::getInt("catid");
if ($option == "com_content") $catid = $content_genius->info("category_id");
if ($catid == 68) return "27, 93, 83, 116";
if ($catid == 51) return "27, 93, 83, 118";
if ($catid == 57) return "27, 93, 83, 125";


I think that the jomcomment module was not appearing on the blog view because it was the multicategories component, which was/is putting "option=com_multicategories" into the URL. The code above should be able to detect that and set the $catid regardless.

Hope that helps...
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
3329 Posts
User info in posts
Administrator has disabled public posting

Re: can metamod do the job?

hi, stephen.

unfortunately that doesn't work either. the modules still appear fine, jomcomment still appears fine when items are clicked from the frontpage, but jomcomment does not appear on Multicategories » Category / Blog pages.

what about using item id? for instance, the item id for the category "movies" is 111, which is a Multicategories » Category / Blog layout page. i don't know about this though cause when i go into multicategories control panel, it gives another id for the same category. in this case, it's 5 for movies.

but i can give all the item ids for the categories that i hope to include jomcomment. not sure if this will help.

baituo01
Intermediate Modder
ranks
useravatar
Offline
46 Posts
Administrator has disabled public posting

Re: can metamod do the job?

I feel we're going back and forth on this again... it's really hard to keep track of what code you have tried and exactly what your requirements are for each page. Could you confirm if my login on your site still works, and I'll log in and take a look?

Sorry bout this,
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
3329 Posts
User info in posts
Administrator has disabled public posting

Re: can metamod do the job?

hi! stephen,

i have emailed you the updated login info.

thanks!

baituo01
Intermediate Modder
ranks
useravatar
Offline
46 Posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1698
Total Polls:
6
Total Posts:
5944
Dormant:
User Info:
 
Total Users:
5595
Newest User:
gary099231
Members Online:
0
Guests Online:
174

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