IP.Board, Use of variable in signature_separator



  • How in Global Templates vent signature_separator (in signature) sign the name of the signature user?

    {$post['members_display_name']}
    

    or

    {$member['members_display_name']}
    

    or

    {$author['members_display_name']}
    

    and so forth, nothing gets out.

    $this->memberData['members_display_name']}
    

    Turns out the name of the man who watches the signature. What am I doing wrong with using the variables correctly and how do you put the name of the master's signature?

    IP.Board 3.4.x



  • You can't take it out, it's only the author's signature, his id and his signature can be concealed. I'm sure I can offer you a crutch, but there's gonna be a +1 request for each post, and it's probably not an option to fix the originals either. ♪ ♪

    Although.

    The suite (no more use - +1 post request)

    First, add to this template:

    <php>
        $author = $author_id ? IPSMember::load($author_id, 'all') : null;
    </php>
    

    Then you can use it.

    <if test="$author">{$author['members_display_name']}</if>
    

    We're right.

    We're in the file. admin/applications/forums/sources/classes/topics.php line ~2134:

    $post['signature'] = $this->registry->output->getTemplate( 'global' )->signature_separator( $poster['signature'], $poster['author_id'], IPSMember::isIgnorable( $poster['member_group_id'], $poster['mgroup_others'] ) );
    

    We'

    $post['signature'] = $this->registry->output->getTemplate( 'global' )->signature_separator( $poster['signature'], $poster['author_id'], IPSMember::isIgnorable( $poster['member_group_id'], $poster['mgroup_others'] ), $poster );
    

    Then we go to hell and change the parameters of this template to:

    $sig="", $author_id=0, $can_ignore=true, $author=null
    

    And then you can use it,

    <if test="$author">{$author['members_display_name']}</if>
    

Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2