Building a "printable" member page in admin

Discussion in 'Customization & add-ons' started by dpcubed, Sep 9, 2011.

  1. dpcubed

    dpcubed New Member

    Joined:
    Aug 31, 2011
    Messages:
    9
    Ok, so I am trying to create a printable style member page, IE not using form fields. So I went in and hacked up a second users.php file that points to the right template. Set all the fields to hidden and then copied the {} variable out of the input so it displays. The problem comes when I get to custom fields. I cannot nail down the variable output name I need.


    The field info from custom fields is:

    Product : 1 Individual (ASA member)
    Name(internal) : driverslicense
    Title (for display) :Your Drivers License Number
    Field Type: SQL field (DECIMAL(12,2))
    Display Type :text



    The block Im trying to replace (normally in user_form.html, although in this case in a new template user_view.html).

    {$addme}
    {/if}
    {*
    {$additional_fields_html}
    *}
    {$mysql_fields}


    Replaced with (taken from rendered page source code)

    <tr ><th><b>Your Drivers License Number</b><br/><span style="font-weight:normal">The last six numbers of your own drivers license number</span></th><td>{$u.driverslicense|escape}{$u.field29|escape}<input type="hidden" name="field29" value="665282"/></td></tr>



    As you can see in the above code block I have tried several variable declarations to snag the correct data.


    I appreciate any assistance on this.
  2. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    Try these to show the field data instead
    {$user.driverslicense}
    {$user.data.driverslicense}
    {$member.driverslicense}
    {$member.data.driverslicense}

    David
  3. dpcubed

    dpcubed New Member

    Joined:
    Aug 31, 2011
    Messages:
    9
    Updates of lack of success.

    David, none of those variables displayed the extra fields

    So I turned to trying to modify add_field.inc.html.

    So anyone know how to puzzle out this, the first bit is trying to detect the template so I can do an if for if Im on user_view.html, then in front of the first input Ive got the value seperated out, which doesnt display anything. Anyone know for that matter where the loop is that runs over add_field.inc.php?


    {php}
    $pageURLzer .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
    echo $pageURLzer;
    global $stringTest=$tplObj->getTemplate();
    echo $tplObj->getTemplate();
    {/php}

    {if $f.type eq "text"}

    {$value} <input type="text" id="f_{$f.name|escape}" name="{$f.name|escape}" size="{$f.size|default:20}"
    {if $f.validate_func ne ""}class="required"{/if}
    {if $f.maxlength}maxlength={$f.maxlength}{/if} value="{$value|escape}" />

Share This Page