Version 1

    This applies to: 2.5.x (steps may slightly differ for 3.0.x and later)

     

    High-Level Summary: There are remnants of code in Clearspace that will allow you to expose signatures through the theme layer. To get it to work properly, you will need to alter the source code (and require some ingenius design and FTL manipulation). This document was based on this signatures?. Note: The methods called in these theme changes are not regularly tested or a part of our QA checks, so this theme customization is unsupported. If you have an issue and Support deems that this is a part of the issue, we will ask you to remove the customization.

     

    This document assumes you have a basic knowledge of themes. You can read more about themes here.

     

    Get your very own John Hancock

     

    First, you'll want to edit the /template/global/edit-profile.ftl template. The code will be very similar to how the email or name fields are implemented, with signature and showSignature as our input fields (as opposed to email and showEmail). My particular code looks like this:

     

    <tr>
        <td class="jive-table-cell-label jive-label-required">
            <label for="sig01">
                Signature:
            </label>
        </td>
        <td>
            <input type="textarea" name="signature" size="20,5" maxlength="250" id="sig01" value="${signature?default('')!?html}" />
            <br />
            <input type="radio" name="showSignature" value="true" id="sv01" <#if targetUser.properties["jiveSignatureVisible"]?exists && targetUser.properties["jiveSignatureVisible"] == "true">checked="checked"</#if> />
            <#-- Show -->
            <label for="sv01" class="jive-profile-edit-secondary"><@s.text name="global.show"/></label>
             
            <input type="radio" name="showSignature" value="false" id="sv02" <#if !(targetUser.properties["jiveSignatureVisible"]?exists) || targetUser.properties["jiveSignatureVisible"] == "false">checked="checked"</#if> />
            <#-- Hide -->
            <label for="sv02" class="jive-profile-edit-secondary"><@s.text name="global.hide"/></label>
            <@macroFieldErrors name="signature"/>
        </td>
    </tr>
    

     

    (In the case of the radio buttons, no signature variables exist in the User object, so I had to hack the FTL a little to check the user properties for the jiveSignatureVisible property...you'll see more of this below).

     

    This will result in:

     

    screen.png

     

    You'll now need to modify the /template/global/forums/thread.ftl. There are two areas where you'll need to add this code: for the opening message and in the reply:

    <#if message.user.properties["jiveSignatureVisible"]?exists && message.user.properties["jiveSignatureVisible"] == "true">
        ${message.user.properties["jiveSignature"]?html}
    </#if>
    

     

    In this case, I've escaped the HTML of the signature in case anyone tries to create a malicious signature (i.e. an open DIV tag). It will look like this:

     

    screen2.png