Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » parse error using a recipe and...
parse error using a recipe and metamod 2.6
parse error using a recipe and metamod 2.6
hi i am getting this error:
Parse error: syntax error, unexpected ',', expecting ')' in /home/dnbsa0/public_html/markethall/modules/mod_metamod/helper.php(539) : eval()'d code on line 7
when using this code:
Code:
$mappings = array(
167=>161
);
$all_modules = array();
foreach ($mappings as $iid, $mid) {
if ( $menu_genius->check( "parent_item_ids = $iid" ) ) $all_modules[] = $mid;
}
return $all_modules;
this is directly from this site. just changed the ids in the array. Joomla 1.5.22
metamod 2.6
Re: parse error using a recipe and metamod 2.6
Oops, looks like I had a typo in the example, sorry!
The problem is this line:
foreach ($mappings as $iid, $mid) {
It should be:
foreach ($mappings as $iid => $mid) {
I need to change this in the example too...
Thanks again,
Stephen
Re: parse error using a recipe and metamod 2.6
hi, Thanks for the quick response!!
i fixed it and now i get no error message, but its behaving like the second recipe example and not showing me the module on the main link, but is showing it on all the sublinks.
any ideas ??
thanks again for this wonderful module, when i get it working i am going to upgrade to the PRO version :-)
Re: parse error using a recipe and metamod 2.6
Hmmm, yes, looks like another problem in the example. Can you please try the following, and if it works I'll update the example code. I'm very sorry it was wrong.
$mappings = array(
167=>161
);
$all_modules = array();
foreach ($mappings as $iid=>$mid) {
if ( $menu_genius->check( "parent_item_ids = $iid" )
or $Itemid == $iid ) $all_modules[] = $mid;
}
return $all_modules;
Cheers,
Stephen
- Index
- » MetaMod
- » MetaMod General Support
- » parse error using a recipe and...
Board Info
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked