Hi
can you explain to these adress fields are supposed to work with comment_form and register_user ?
there are adress_fields options (omit, show, require), for the two plugins.
but on register_user plugin options, there is this note
Address fields are handled by the comment_form plugin.
but even if adress_fields are required on the two plugin, adress fields are not displayed on register page...
the only way to have adress fields on register page, is to enable another plugin : userAddressFields.
but even if, this plugin is not allowed, adress fields are displayed on comment form.
it is completely incomprehensible...
Comments
It is quite common for us to use plugins even if not enabled. This is an effective way to share code. For instance, the admin pages use the `tagg_suggest` plugin (enabled or not) for suggesting tags on the back end. No need to implement a parallel structure to do this when it already exists. In the above case, the address handling has been removed to the new `userAddressField` plugin.
`Note: Address fields are handled by the comment_form plugin.`
what does-it mean ? Of course I agree to sharing some code.
But in my case, what option is supposed to be used to display adress fields ? it's realy not clear for users of zenphoto, don't you think ?
there is two different behaviors :
- comment_form plugin:
if you check 'show' or 'require' for adress_fields options, adress fields are displayed in comment form, even if userAddressField plugin is not enabled.
- register_user plugin:
if you check 'show' or 'require' for adress_fields options, you have to enable userAddressField plugin to see them in register page.
according to me, it should be a common behavior (maybe the 2nd one).
with this 2nd behavior, it should a notice in admin>options>plugins mentionning something like: Finally, I do not understand the usefulness of this code in zp-core/zp-extentions/register_user/register_user_form.php, lines 91 to 113 :
`
$html = zp_apply_filter('register_user_form', '');
if (!empty($html)) {
$rows = explode('', $html);
foreach ($rows as $row) {
if (!empty($row)) {
$row = str_replace('', '', $row);
$elements = explode('', $row);
$col1 = trim(str_replace(array('', ':'), '', $elements[0]));
if (count($elements) == 1) { // new style form
echo $col1;
} else { // old table style form
$col2 = str_replace('size="40"', 'size="' . TEXT_INPUT_SIZE . '"', $elements[1]);
$col2 = str_replace('class="inputbox"', '', $input);
?>
<?php<?php echo trim(str_replace('<td>', '', $col2)); ?>
}
}
}
}
`
I will test it as soon as possible.