Announcement

Collapse
No announcement yet.

can anyone help me with this code please?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • can anyone help me with this code please?

    Hi,

    I am trying to add this code so that it shows users Gamertag on there profile.

    Now the code is this:

    <!-- Gamercard code -->
    <if condition="$userinfo['field5']"><div class="panel"
    style="min-height: 160px; height: auto !important; height: 160px"><else
    /><div class="panel"></if><!-- Gamercard --><if
    condition="$userinfo['field5']"><div style="float: right; width:
    220px;"><fieldset class="fieldset"><legend>Xbox Live Gamercard</legend><a
    href="http://profile.mygamercard.net/$userinfo[field5]"
    target="_blank"><img
    src="http://card.mygamercard.net/$userinfo[field5].png"
    alt="$userinfo[username]'s Gamercard" style="border: 0px"
    /></a></fieldset></div></if><!-- End Gamercard -->
    <!-- End Gamercard code -->

    Now the guy who has the code has this working, now when I add the code like this, (this is the same as how he has done it, except I have changed the field numder to my own)

    <td>$userinfo[skypeicon]</td>
    <td><a href="#" dir="ltr" onclick="imwindow('skype',
    '$userinfo[userid]', 400, 285); return false;">$userinfo[skype]</a></td>
    </tr>
    </if>
    </if>
    $template_hook[memberinfo_iminfo]
    </table>
    </fieldset>
    </if>

    $template_hook[memberinfo_contactinfo]
    </div>
    </div>
    </td>

    </tr>
    <tr>
    <td class="tcat" width="50%">$vbphrase[additional_information]</td>
    <td class="tcat" width="50%">$vbphrase[group_memberships]</td>
    </tr>
    <tr valign="top">

    <td class="panelsurround" align="center">
    <!-- Gamercard code -->
    <if condition="$userinfo['field5']"><div class="panel"
    style="min-height: 160px; height: auto !important; height: 160px"><else
    /><div class="panel"></if><!-- Gamercard --><if
    condition="$userinfo['field5']"><div style="float: right; width:
    220px;"><fieldset class="fieldset"><legend>Xbox Live Gamercard</legend><a
    href="http://profile.mygamercard.net/$userinfo[field5]"
    target="_blank"><img
    src="http://card.mygamercard.net/$userinfo[field5].png"
    alt="$userinfo[username]'s Gamercard" style="border: 0px"
    /></a></fieldset></div></if><!-- End Gamercard -->
    <!-- End Gamercard code -->
    <div align="$stylevar[left]">
    <if condition="$show['extrainfo']">
    <dl id="additionalinfo_list">
    <if condition="$show['birthday']">
    <dt class="smallfont"><strong>$vbphrase[birth_date]</strong>:</dt>
    <dd class="smallfont">$userinfo[birthday]</dd>
    </if>
    <if condition="$show['age']">
    <dt class="smallfont"><strong>$vbphrase[age]</strong>:</dt>
    <dd class="smallfont">$userinfo[age]</dd>
    </if>
    $customfields
    </dl>
    <else />
    <em>$vbphrase[n_a]</em>
    </if>

    I get this error?

    The following error occurred when attempting to evaluate this template:

    Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/XXXXXXXX/XXXXXXXX/forums/includes/adminfunctions_template.php(3596) : eval()'d code on line 160

    This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

    Can anyone help please?

    Thanks
    Dan

  • #2
    I'm not familiar with what this is for but there are 3 if conditions close tags and they have no if conditions to close so maybe that could be it.

    Replace

    HTML Code:
     <td>$userinfo[skypeicon]</td>
    <td><a href="#" dir="ltr"  onclick="imwindow('skype',  
    '$userinfo[userid]', 400, 285); return  false;">$userinfo[skype]</a></td>
    </tr>
    </if>
    </if>
    $template_hook[memberinfo_iminfo]
    </table>
    </fieldset>
    </if>
    
    $template_hook[memberinfo_contactinfo]
    </div>
    </div>
    </td>
    with

    HTML Code:
     <td>$userinfo[skypeicon]</td>
    <td><a href="#" dir="ltr"  onclick="imwindow('skype',  
    '$userinfo[userid]', 400, 285); return  false;">$userinfo[skype]</a></td>
    </tr>
    $template_hook[memberinfo_iminfo]
    </table>
    </fieldset>
    
    
    $template_hook[memberinfo_contactinfo]
    </div>
    </div>
    </td>
    If that doesn't work then I'm stumped.

    Comment


    • #3
      thanks m8

      I have just tried it and I got this error now

      The following error occurred when attempting to evaluate this template:
      The conditional on line 274 appears to be missing its end tag (</if>). The template will not function properly unless this is fixed.

      This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

      Any ideas

      Thanks
      Dan

      Comment


      • #4
        Yeah undo what I told you to replace, the start of those conditions must be stated somewhere else. *shrug* I'm stumped then, sorry.

        Have you tried asking the person who coded this hack/mod your using?

        Comment


        • #5
          OK thanks for your help anyway m8
          Danny

          Comment

          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
          Working...
          X