Great, I’ll include that in the next update.
That’s easy and ok !
Thanks
'tvfield' => array('fieldtype'=>'input', 'fieldname'=>'tvfield')
Firstly I’d like to say this is a brilliant plugin - thank you!
I think I’ve found a bug - using the latest version (0.2.6) I am unable to hide or move any TV fields. Looking at the code I can’t see how the TVs are assigned to the mm_fields array in mm.inc.php. My quick and dirty solution is to simply add my tv fields to the end of the array manually, eg
'tvfield' => array('fieldtype'=>'input', 'fieldname'=>'tvfield')
A better solution would be to do a query to retreive the list of existing tvs and matching field type, and push them onto the mm_fields array.
Are you sure you have the latest version 0.2.6 (both in /plugins folder AND defined in manager plugin setup)? There are only 201 lines in mm.inc.php in the latest version, so unsure how there could be an error on line 231?
Hello.
I have a problem with MM last version run:
Fatal error: Cannot redeclare mm_default() (previously declared in /var/www/virtual_client/joker/www/assets/plugins/managermanager/mm.inc.php:200) in /var/www/virtual_client/joker/www/assets/plugins/managermanager/mm.inc.php on line 231
Please, help me fix it.
I used version 0.2.4.1Are you prefixing your tv name with ’tv’?
e.g. if your TV is called "myname", you should put mm_hideFields(’tvmyname’);
This works here...
// What type is this field?
if (isset($mm_fields[$field])) {
$fieldtype = $mm_fields[$field]['fieldtype'];
$fieldname = $mm_fields[$field]['fieldname'];
} else {
break;
}
Are you prefixing your tv name with ’tv’?
e.g. if your TV is called "myname", you should put mm_hideFields(’tvmyname’);
This works here...
Yes I did, but it doesn’t seem to work. I’ve tried just a single rule and no joy. My primary browser is Firefox 2.0.0.14 on a Mac. The thing is, I really can’t see in the code how this could work without adding the tv names to the mm_fields array.For example, in mm_functions.inc.php on line 213 (inside the mm_hideFields function) you have this default case defined which would seem to exclude any field not defined in the array.
// What type is this field? if (isset($mm_fields[$field])) { $fieldtype = $mm_fields[$field]['fieldtype']; $fieldname = $mm_fields[$field]['fieldname']; } else { break; }
So the question is, when do the tvs get added to the array? What am I missing?
This discussion is closed to further replies. Keep calm and carry on.