1. Мы продолжаем публиковать интересные статьи на тему SocialEngine 4. Одна из статей посвящена правильному выбору сервера для вашей социальной сети, а другая содержит советы по увеличению производительности платформы. Также мы добавили большую статью о пользовательских уровнях. Ознакомиться со статьями вы можете в разделе Вопросы и Ответы SocialEngine 4.
  2. Вам кажется, что ваша версия SocialEngine 4, работает медленно?

    Голосуйте. Пишите свою версию системы, железо на чем работает и количество пользователей. Будем увеличивать производительность :-) Подробнее

  3. В связи с участившимися случаями попыток продажи пользователями форума различных "сборок" коммерческих социальных платформ, обычно основанных на SocialEngine 3, вводится новое правило для форума. Запрещается создание тем или размещение в уже созданных предложений о продаже или размещение ссылок на сайты, где происходит продажа "сборок". Пользователи, которые продолжат свою коммерческую деятельность в данном направлении, будут заблокированы. Подробнее.

Problem Проблема с плагином "Подарки"

Discussion in 'Прочая Поддержка - Help Requests' started by Alpert108, Aug 20, 2012.

  1. Alpert108 Thread starter User


    Offline
    Message Count:
    132
    Likes Received:
    14
    My version of SE:
    3.20
    Всем привет! Вот такая проблема у меня, все видно на скрине.
    Вместо "Подарок для Иван Иванов" выводит вон что....

    Вот mf_gifts_send.tpl
    Code:
    {* INCLUDE HEADER CODE *}
    {include file="header.tpl"}
     
    <table cellpadding='0' cellspacing='0' border="0">
    <tr>
    <td style="width: 100%;text-align: left;vertical-align: middle;">
      <img src='images/icons/gifts48.gif' border='0' class='icon_big'>
      <div class='page_header'>{if $flag == 0}Отправка подарка другу{else}{lang_print id=80000017} $user->user_info['user_displayname']{/if}</div>
    <br>
    </td>
    <td>
      <table cellpadding='0' cellspacing='0'>
      <tr><td nowrap='nowrap'>
       
      {if $type_a == 0}
      <b>{lang_print id=1021}</b>
      {else}
      <a href="mf_gifts_send.php?type=0{$to}">{lang_print id=1021}</a>
      {/if}
      {foreach from=$type key=type_id item=type_val}
      {if $type_a == $type_id}
      &nbsp;&nbsp;&nbsp;&nbsp;<b>{lang_print id=$type_val}</b>
      {else}
     
      &nbsp;&nbsp;&nbsp;&nbsp;<a href="mf_gifts_send.php?type={$type_id}{$to}">{lang_print id=$type_val}</a>
       
      {/if}
      {/foreach} </div>
     
     
        </td></tr></table>
    </td>
    </tr>
    </table>
     
     
    {* JAVASCRIPT FOR CREATING SUGGESTION BOX *}
      {literal}
    <script type="text/javascript">
      <!--
        // THIS FUNCTION SHOWS THE ERROR OR SUCCESS MESSAGE
      function messageSent(is_error, error_message, balance) {
        if(is_error != 0) {
          $('success_div').style.display = 'none';
          $('form_div').style.display = 'block';
          $('error_div').style.display = 'block';
          $('error_message').innerHTML = error_message;
        } else {
          $('form_div').style.display = 'none';
          $('success_div').style.display = 'block';
          $('balance').innerHTML = balance;
          setTimeout("window.parent.TB_remove();", "1000");
        }
      }
      //-->
      </script>
     
     
     
    {/literal}
    <div id='success_div' style='display: none;'>
        <table cellpadding='0' cellspacing='0'>
          <tr>
            <td style="    font-weight: bold;
        color: #00CC00;
        text-align: center;
        padding: 7px 8px 7px 7px;
        background: #E6FFE6;"><img src='./images/success.gif' border='0' class='icon'><b>{lang_print id=80000021}</b></td>
          </tr>
        </table>
      </div>
    <div id='form_div'> {* SHOW ERRORS *}
      <div id='error_div' style='display: none;'> <br>
        <table cellpadding='0' cellspacing='0'>
          <tr>
            <td class='error'><img src='./images/error.gif' border='0' class='icon'> <span id='error_message'></span> </td>
          </tr>
        </table>
      </div>
    </div>
     
       
      {* DISPLAY PAGINATION MENU IF APPLICABLE *}
      {if $maxpage > 1}
        <div align='center'>
          {if $p != 1}<a href='mf_gifts_send.php?p={math equation='p-1' p=$p}{$tl}{$to}'>&#171; {lang_print id=182}</a>{else}<font class='disabled'>&#171; {lang_print id=182}</font>{/if}
          {if $p_start == $p_end}
            &nbsp;|&nbsp; {lang_sprintf id=184 1=$p_start 2=$total_vars} &nbsp;|&nbsp;
          {else}
            &nbsp;|&nbsp; {lang_sprintf id=185 1=$p_start 2=$p_end 3=$total_vars} &nbsp;|&nbsp;
          {/if}
          {if $p != $maxpage}<a href='mf_gifts_send.php?p={math equation='p+1' p=$p}{$tl}{$to}'>{lang_print id=183} &#187;</a>{else}<font class='disabled'>{lang_print id=183} &#187;</font>{/if}
          </div>
        </div>
      {/if}
     
     
    <form action='mf_gifts_send.php' method='POST' target="ajaxframe">
      <table align="center" width="90%" border="0" cellpadding="15">
        {foreach key=cid item=con from=$gift_vars}
        {cycle name="startrow3" values="
        <tr align=center>,,,,"}
          <td><img src="mf_gifts/{$con.id}_thumb.{$con.filetype}" onclick="document.getElementById('gift_id_{$con.id}').checked=true;"><br>
            <input type="radio" id="gift_id_{$con.id}" name="gift_id" value="{$con.id}" >
            <br />{lang_print id=$con.lang}<br />({$con.cost}{if $con.cost == 1} Поинт {/if}
    {if $con.cost == 2} Поинта {/if}
    {if $con.cost == 3} Поинта {/if}
    {if $con.cost == 4} Поинта {/if}
    {if $con.cost == 5} Поинтов {/if}
    {if $con.cost == 10} Поинтов {/if}
    {if $con.cost == 20} Поинтов {/if}
    {if $con.cost == 25} Поинта {/if}
    {if $con.cost == 30} Поинтов {/if}
    {if $con.cost == 50} Поинтов {/if}
    {if $con.cost == 100} Поинтов {/if}
    {if $con.cost == 150} Поинтов {/if})</a><br />
          </td>
          {cycle name="endrow3" values=",,,,</tr>
        "}
        {/foreach}
      </table>
     
      <div align="center" style = "font-size: 16px;"><b> {lang_print id=80000001} <span id = "balance">{$userpoints} поинтов </span> {lang_print id=80000002}</b></div>
     
      {* DISPLAY PAGINATION MENU IF APPLICABLE *}
      {if $maxpage > 1}
        <div align='center'>
          {if $p != 1}<a href='mf_gifts_send.php?p={math equation='p-1' p=$p}{$tl}{$to}'>&#171; {lang_print id=182}</a>{else}<font class='disabled'>&#171; {lang_print id=182}</font>{/if}
          {if $p_start == $p_end}
            &nbsp;|&nbsp; {lang_sprintf id=184 1=$p_start 2=$total_vars} &nbsp;|&nbsp;
          {else}
            &nbsp;|&nbsp; {lang_sprintf id=185 1=$p_start 2=$p_end 3=$total_vars} &nbsp;|&nbsp;
          {/if}
          {if $p != $maxpage}<a href='mf_gifts_send.php?p={math equation='p+1' p=$p}{$tl}{$to}'>{lang_print id=183} &#187;</a>{else}<font class='disabled'>{lang_print id=183} &#187;</font>{/if}
          </div>
        </div>
      {/if}
     
     
     
     
     
     
     
     
     
      <table cellpadding='0' cellspacing='0'>
    {if $flag == 0}
      <tr>
          <td class='form1' valign='top'>{lang_print id=790}</td>
          <td class='form2' valign='top' align='left' style='position: relative;'>
         
          <select name="to">
              <option value="0">{lang_print id=80000033}</option>
      {section name=friend_loop loop=$friends}
              <option value="{$friends[friend_loop]->user_info.user_id}">{$friends[friend_loop]->user_displayname}</option>
      {/section}
    </select>
     
          </td>
        </tr>
        {else}
    <input type="hidden" name="to" value={$to_id}>{/if}
        <tr>
          <td class='form1'>{lang_print id=726}</td>
          <td class='form2' align='left'><textarea rows='5' cols='20' style='width:350px;' name='message'>{$message}</textarea></td>
        </tr>
        <tr>
          <td class='form1'>{lang_print id=80000018}</td>
          <td class='form2' align='left'><label>
            <input type="radio" name="private" value="0" checked="1">
            {lang_print id=80000019}</label>
            <br>
            <label>
            <input type="radio" name="private" value="1">
            {lang_print id=80000020}</label>
            <br>
          </td>
        </tr>
        <tr>
          <td class='form1'>&nbsp;</td>
          <td class='form2' align='left'><table cellpadding='0' cellspacing='0'>
              <tr>
                <td><input type='submit' class='button' value='{lang_print id=80000022}'>
                  &nbsp;</td>
                <input type='hidden' name='task' value='send'>
                <td><input type='button' class='button' value='{lang_print id=39}'></td>
              </tr>
            </table></td>
        </tr>
      </table>
    </form>
    </div>
    </body></html>
     
    {include file='footer.tpl'}

    Attached Files:

  2. djpower User


    Offline
    Message Count:
    93
    Likes Received:
    8
    $user->user_info['user_displayname'] замени на {$user->user_info.user_displayname}
  3. tmb User


    Offline
    Message Count:
    151
    Likes Received:
    49
    My version of SE:
    3.20
    My version of phpFox:
    3.3.0
    попробуй так...
    Code:
    {* INCLUDE HEADER CODE *}
    {include file="header.tpl"}
     
    <table cellpadding='0' cellspacing='0' border="0">
    <tr>
    <td style="width: 100%;text-align: left;vertical-align: middle;">
      <img src='images/icons/gifts48.gif' border='0' class='icon_big'>
      <div class='page_header'>{if $flag == 0}{lang_print id=80000026}{else}{lang_print id=80000017} {$to_username}{/if}</div>
    <br>
    </td>
    <td>
      <table cellpadding='0' cellspacing='0'>
      <tr><td nowrap='nowrap'>
       
      {if $type_a == 0}
      <b>{lang_print id=1021}</b>
      {else}
      <a href="mf_gifts_send.php?type=0{$to}">{lang_print id=1021}</a>
      {/if}
      {foreach from=$type key=type_id item=type_val}
      {if $type_a == $type_id}
      &nbsp;&nbsp;&nbsp;&nbsp;<b>{lang_print id=$type_val}</b>
      {else}
     
      &nbsp;&nbsp;&nbsp;&nbsp;<a href="mf_gifts_send.php?type={$type_id}{$to}">{lang_print id=$type_val}</a>
       
      {/if}
      {/foreach} </div>
     
     
        </td></tr></table>
    </td>
    </tr>
    </table>
     
     
    {* JAVASCRIPT FOR CREATING SUGGESTION BOX *}
      {literal}
    <script type="text/javascript">
      <!--
        // THIS FUNCTION SHOWS THE ERROR OR SUCCESS MESSAGE
      function messageSent(is_error, error_message, balance) {
        if(is_error != 0) {
          $('success_div').style.display = 'none';
          $('form_div').style.display = 'block';
          $('error_div').style.display = 'block';
          $('error_message').innerHTML = error_message;
        } else {
          $('form_div').style.display = 'none';
          $('success_div').style.display = 'block';
          $('balance').innerHTML = balance;
          setTimeout("window.parent.TB_remove();", "1000");
        }
      }
      //-->
      </script>
     
     
     
    {/literal}
    <div id='success_div' style='display: none;'>
        <table cellpadding='0' cellspacing='0'>
          <tr>
            <td style="    font-weight: bold;
        color: #00CC00;
        text-align: center;
        padding: 7px 8px 7px 7px;
        background: #E6FFE6;"><img src='./images/success.gif' border='0' class='icon'><b>{lang_print id=80000021}</b></td>
          </tr>
        </table>
      </div>
    <div id='form_div'> {* SHOW ERRORS *}
      <div id='error_div' style='display: none;'> <br>
        <table cellpadding='0' cellspacing='0'>
          <tr>
            <td class='error'><img src='./images/error.gif' border='0' class='icon'> <span id='error_message'></span> </td>
          </tr>
        </table>
      </div>
    </div>
     
       
      {* DISPLAY PAGINATION MENU IF APPLICABLE *}
      {if $maxpage > 1}
        <div align='center'>
          {if $p != 1}<a href='mf_gifts_send.php?p={math equation='p-1' p=$p}{$tl}{$to}'>&#171; {lang_print id=182}</a>{else}<font class='disabled'>&#171; {lang_print id=182}</font>{/if}
          {if $p_start == $p_end}
            &nbsp;|&nbsp; {lang_sprintf id=184 1=$p_start 2=$total_vars} &nbsp;|&nbsp;
          {else}
            &nbsp;|&nbsp; {lang_sprintf id=185 1=$p_start 2=$p_end 3=$total_vars} &nbsp;|&nbsp;
          {/if}
          {if $p != $maxpage}<a href='mf_gifts_send.php?p={math equation='p+1' p=$p}{$tl}{$to}'>{lang_print id=183} &#187;</a>{else}<font class='disabled'>{lang_print id=183} &#187;</font>{/if}
          </div>
        </div>
      {/if}
     
     
    <form action='mf_gifts_send.php' method='POST' target="ajaxframe">
      <table align="center" width="90%" border="0" cellpadding="15">
        {foreach key=cid item=con from=$gift_vars}
        {cycle name="startrow3" values="
        <tr align=center>,,,,"}
          <td><img src="mf_gifts/{$con.id}_thumb.{$con.filetype}" onclick="document.getElementById('gift_id_{$con.id}').checked=true;"><br>
            <input type="radio" id="gift_id_{$con.id}" name="gift_id" value="{$con.id}" >
            <br />{lang_print id=$con.lang}<br />({$con.cost} SO.y.e)</a><br />
          </td>
          {cycle name="endrow3" values=",,,,</tr>
        "}
        {/foreach}
      </table>
     
      <div align="center" style = "font-size: 16px;"><b>На вашем счету <span id = "balance">{$userpoints}</span> y.e</b></div>
     
      {* DISPLAY PAGINATION MENU IF APPLICABLE *}
      {if $maxpage > 1}
        <div align='center'>
          {if $p != 1}<a href='mf_gifts_send.php?p={math equation='p-1' p=$p}{$tl}{$to}'>&#171; {lang_print id=182}</a>{else}<font class='disabled'>&#171; {lang_print id=182}</font>{/if}
          {if $p_start == $p_end}
            &nbsp;|&nbsp; {lang_sprintf id=184 1=$p_start 2=$total_vars} &nbsp;|&nbsp;
          {else}
            &nbsp;|&nbsp; {lang_sprintf id=185 1=$p_start 2=$p_end 3=$total_vars} &nbsp;|&nbsp;
          {/if}
          {if $p != $maxpage}<a href='mf_gifts_send.php?p={math equation='p+1' p=$p}{$tl}{$to}'>{lang_print id=183} &#187;</a>{else}<font class='disabled'>{lang_print id=183} &#187;</font>{/if}
          </div>
        </div>
      {/if}
     
     
     
     
     
     
     
     
     
      <table cellpadding='0' cellspacing='0'>
    {if $flag == 0}
      <tr>
          <td class='form1' valign='top'>{lang_print id=790}</td>
          <td class='form2' valign='top' align='left' style='position: relative;'>
         
          <select name="to">
              <option value="0">{lang_print id=80000033}</option>
      {section name=friend_loop loop=$friends}
              <option value="{$friends[friend_loop]->user_info.user_id}">{$friends[friend_loop]->user_displayname}</option>
      {/section}
    </select>
     
          </td>
        </tr>
        {else}
    <input type="hidden" name="to" value={$to_id}>{/if}
        <tr>
          <td class='form1'>{lang_print id=726}</td>
          <td class='form2' align='left'><textarea rows='5' cols='20' style='width:350px;' name='message'>{$message}</textarea></td>
        </tr>
        <tr>
          <td class='form1'>{lang_print id=80000018}</td>
          <td class='form2' align='left'><label>
            <input type="radio" name="private" value="0" checked="1">
            {lang_print id=80000019}</label>
            <br>
            <label>
            <input type="radio" name="private" value="1">
            {lang_print id=80000020}</label>
            <br>
          </td>
        </tr>
        <tr>
          <td class='form1'>&nbsp;</td>
          <td class='form2' align='left'><table cellpadding='0' cellspacing='0'>
              <tr>
                <td><input type='submit' class='button' value='{lang_print id=80000022}'>
                  &nbsp;</td>
                <input type='hidden' name='task' value='send'>
                <td><input type='button' class='button' value='{lang_print id=39}'></td>
              </tr>
            </table></td>
        </tr>
      </table>
    </form>
    </div>
    </body></html>
  4. Gooos абырвалГ


    Offline
    • Admin
    Message Count:
    2,435
    Likes Received:
    645
    My version of SE:
    3.20
    "Патамушта" написано как текст, а надо
    PHP:
    ...{lang_print id=80000017} {$user->user_info['user_displayname']}{/if}
  5. zqz User


    Offline
    Message Count:
    230
    Likes Received:
    9
    My version of SE:
    3.16
    я зделал так сраничку не открывает белый экран
    Code:
    <div class='page_header'>{if $flag == 0}{lang_print id=80000026}{else}{lang_print id=80000017}
     
     
     
    {$user->user_info['user_displayname']}
     
     
     
     
    {/if}</div>
  6. Gooos абырвалГ


    Offline
    • Admin
    Message Count:
    2,435
    Likes Received:
    645
    My version of SE:
    3.20
    попробуй так, я всего лишь показал, что переменные должны быть в { }
  7. zqz User


    Offline
    Message Count:
    230
    Likes Received:
    9
    My version of SE:
    3.16
    так всё норм ток пишит своё имя и фамилия)))) а надо чтоб "Отправить подарок (тут имя и фамилия пользователя которому даришь подарок "
  8. setidoma User


    Offline
    Message Count:
    43
    Likes Received:
    6
    My version of SE:
    3.20
    {$user->user_info.user_displayname}
    Поставь просто скобки
    Так попробуй
    ({$user->user_info.user_displayname})
  9. Alpert108 Thread starter User


    Offline
    Message Count:
    132
    Likes Received:
    14
    My version of SE:
    3.20
    Такая же проблема как и у zqz.
  10. Alpert108 Thread starter User


    Offline
    Message Count:
    132
    Likes Received:
    14
    My version of SE:
    3.20
    По твоему варианту получается "
    Подарок для ivanov
    ", а нужно "
    Подарок для Иванова Ивана
    "
    xuligannnn likes this.

Share This Page

All rights reserved SocEngine.ru ©