Editing icons out of Registration page

17 years 9 months ago #16418 by hansmeiser

Please Log in to join the conversation.

17 years 9 months ago #17253 by lindquie
Replied by lindquie on topic Re:Editing icons out of Registration page
For those of you who want the required.gif (and in my case the tooltip gif) but want to get rid of the profile icons, The lines of code that need to be commented out of administrator/components/com_comprofiler/comprofiler.class.php in CB 1.0, are lines 1710-1713 from function getFieldIcons, as follows:

I have included the section of code, just in case the line numbers change in the next release.

--Code Segment--

function getFieldIcons($ui, $oReq, $oProfile, $oDescription="", $oTitle="", $showLabels=false) {
$templatePath = selectTemplate($ui);
$oReturn = "";
if($oDescription) $oReturn .= " ".cbFieldTip($ui, getLangDefinition($oDescription), getLangDefinition($oTitle) );
if ($showLabels) $oReturn .= " ".cbFieldTip($ui, _UE_FIELDDESCRIPTION, "?")." "._UE_FIELDDESCRIPTION." | ";
if($oReq) $oReturn .= " <img src='".$templatePath."required.gif' width='16' height='16' alt='*' title='"._UE_FIELDREQUIRED."' />";
if ($showLabels) $oReturn .= " "._UE_FIELDREQUIRED." | ";
// if($oProfile) $oReturn .= " <img src='".$templatePath."profiles.gif' width='16' height='16' alt='+' title='"._UE_FIELDONPROFILE."' />";
// if( $showLabels) $oReturn .= " "._UE_FIELDONPROFILE." | ";
// if((!$oProfile) or $showLabels) $oReturn .= " <img src='".$templatePath."noprofiles.gif' width='16' height='16' alt='-' title='"._UE_FIELDNOPROFILE."' />";
// if( $showLabels) $oReturn .= " "._UE_FIELDNOPROFILE;
return "<span class='cbFieldIcons".(($showLabels) ? "Labels" : "")."'>".$oReturn."</span>";
}

Please Log in to join the conversation.

17 years 9 months ago #17653 by Ulysses
Replied by Ulysses on topic Re:Editing icons out of Registration page
lindquie wrote:

For those of you who want the required.gif (and in my case the tooltip gif) but want to get rid of the profile icons, The lines of code that need to be commented out of administrator/components/com_comprofiler/comprofiler.class.php in CB 1.0, are lines 1710-1713 from function getFieldIcons, as follows:

I have included the section of code, just in case the line numbers change in the next release.

--Code Segment--

function getFieldIcons($ui, $oReq, $oProfile, $oDescription="", $oTitle="", $showLabels=false) {
$templatePath = selectTemplate($ui);
$oReturn = "";
if($oDescription) $oReturn .= " ".cbFieldTip($ui, getLangDefinition($oDescription), getLangDefinition($oTitle) );
if ($showLabels) $oReturn .= " ".cbFieldTip($ui, _UE_FIELDDESCRIPTION, "?")." "._UE_FIELDDESCRIPTION." | ";
if($oReq) $oReturn .= " <img src='".$templatePath."required.gif' width='16' height='16' alt='*' title='"._UE_FIELDREQUIRED."' />";
if ($showLabels) $oReturn .= " "._UE_FIELDREQUIRED." | ";
// if($oProfile) $oReturn .= " <img src='".$templatePath."profiles.gif' width='16' height='16' alt='+' title='"._UE_FIELDONPROFILE."' />";
// if( $showLabels) $oReturn .= " "._UE_FIELDONPROFILE." | ";
// if((!$oProfile) or $showLabels) $oReturn .= " <img src='".$templatePath."noprofiles.gif' width='16' height='16' alt='-' title='"._UE_FIELDNOPROFILE."' />";
// if( $showLabels) $oReturn .= " "._UE_FIELDNOPROFILE;
return "<span class='cbFieldIcons".(($showLabels) ? "Labels" : "")."'>".$oReturn."</span>";
}

I was hoping this would do it. But commenting out the above breaks the script, and spits out an error message:

Fatal error: Call to undefined function: getfieldicons() in /home/username/public_html/administrator/components/com_comprofiler/comprofiler.class.php on line 1799

Line 1799 in my file is:
[code:1] if ($oReturn and $displayFieldIcons) $oReturn .= getFieldIcons($ui, $oReq, $oProfile, $oDescription, $oTitle);
return $oReturn;
}

function allowAccess( $accessgroupid,$recurse, $usersgroupid) {
global $database;
if ($accessgroupid == -2 || ($accessgroupid == -1 && $usersgroupid > 0)) {[/code:1]
Is there more to removing all but the Required and Tooltip) graphics and text?

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.188 seconds

Facebook Twitter LinkedIn