Field delimiter always shows on profile

16 years 9 months ago #40051 by mikeprince
Field delimiter always shows on profile was created by mikeprince
I have added a field delimiter to the registration to provide a subheading above certain fields. This works fine for registration, but it is also showing on a tab on the profile. This is with 'Show on Profile' set to 'No' in the field manager, so I presume this is a bug rather than anything to do with my config.

Any fix for this, or any suggestion how I can fix it myself (i.e. so that it does not show on the profile)?

Cheers
-- Mike --

Cheers
-- Mike --

Record, share and compare with BUBO Listing at www.bubo.org

Please Log in to join the conversation.

16 years 9 months ago #40052 by mikeprince
Replied by mikeprince on topic Re:Field delimiter always shows on profile
Well I found the code that was causing this bug, and have implemented the following fix.

In administrator/components/com_comprofiler/comprofiler.class.php, find function getEditTabs($user) and replace
[code:1] if($rowField->type=='delimiter') {
$results .= "\t\t\t<td colspan=\"".$colspan."\" class=\"delimiterCell\">". unHtmlspecialchars(getLangDefinition($rowField->title)) ."</td>\n";
if ($rowField->description) $results .= "\t\t</tr>\n\t\t<tr>\n\t\t\t<td colspan=\"".$colspan."\" class=\"descriptionCell\">". unHtmlspecialchars(getLangDefinition($rowField->description)) ."</td>\n";
}
} else {[/code:1]
with[code:1] if($rowField->type=='delimiter') {
// Mike Prince, 25 June 2007.
// Correct bug in delimiter display: only display on profile if profile flag is set.
if($rowField->profile==1) {
$results .= "\t\t\t<td colspan=\"".$colspan."\" class=\"delimiterCell\">". unHtmlspecialchars(getLangDefinition($rowField->title)) ."</td>\n";
if ($rowField->description) $results .= "\t\t</tr>\n\t\t<tr>\n\t\t\t<td colspan=\"".$colspan."\" class=\"descriptionCell\">". unHtmlspecialchars(getLangDefinition($rowField->description)) ."</td>\n";
}
} else {
[/code:1]Cheers
-- Mike --

Cheers
-- Mike --

Record, share and compare with BUBO Listing at www.bubo.org

Please Log in to join the conversation.

15 years 5 months ago #77697 by mikeprince
Replied by mikeprince on topic Re:Field delimiter always shows on profile
Disappointingly I've discovered that this bug still exists in 1.2 RC3. Unfortunately the code has been rewritten so my earlier fix no longer applies. :(

Cheers
-- Mike --

Record, share and compare with BUBO Listing at www.bubo.org

Please Log in to join the conversation.

15 years 5 months ago #77750 by mikeprince
Replied by mikeprince on topic Re:Field delimiter always shows on profile
Ok I have a fix for 1.2 RC3 although I'm not convinced this is the right way (or place) to do it.

In administrator/components/com_comprofiler/plugin.class.php, find function getFieldRow and replace

[code:1]$results .= "\n\t\t\t\t\t<td" . $colspan . ' class="fieldCell" id="cbfv_' . $field->fieldid . '">' . $oValue . '</td>';
[/code:1]
with the text in the attached file.

(For some reason I cannot post this code: I keep getting "Method Not Implemented POST to /component/option,com_joomlaboard/Itemid,38/catid,27/func,post/ not supported.")

Cheers
-- Mike -

Post edited by: mikeprince, at: 2008/10/19 09:51

Attachment codefix.txt not found



Post edited by: mikeprince, at: 2008/10/19 09:54

Cheers
-- Mike --

Record, share and compare with BUBO Listing at www.bubo.org
Attachments:

Please Log in to join the conversation.

15 years 5 months ago #77859 by beat
Thanks for reporting back. Added as item to check for CB 1.2 Stable (#74).

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

15 years 4 months ago #81105 by beat
I tested this with latest CB 1.2 RC 3 dev version and it works fine. If "on profile" is checked to NO in backend field edit, the field isn't displayed on the profile, but only on profile edits.

So it works as expected in CB 1.2 RC 3, imho.

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.169 seconds

Facebook Twitter LinkedIn