1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Check Posters Permissions in message

Discussion in 'Styling and Customization Questions' started by Mutt, Feb 22, 2012.

  1. Mutt

    Mutt Well-Known Member

    I would like to hide signatures for people who do not have permission to edit their signatures. Basically in the message template I'm trying do insert {$message.editSignature} something like this.

            <xen:if is="{$visitor.content_show_signature} && {$message.signature} && {$message.editSignature}">
                <div class="baseHtml signature ugc{xen:if $message.isIgnored, ' ignored'}"><aside>{xen:raw $message.signatureHtml}</aside></div>
    but of course that doesn't work. I know I can check the viewers permissions but can I check the posters?

    If you are wondering why, I'm trying to make it easy for the staff to kill a bad signature & remove signature permission for a user. I'm feeling that if I could get the edit to work I'd be able to setup a warning that added a person to a new usergroup "no signature" which removed the permission to edit signatures. then when the staff sees a violating sig, they be able to just make a warning.

    I would wind up doing the same w/ avatars.
  2. Syndol

    Syndol Guest

    You will have to edit/extend one of the post functions (such as 'preparePost') to fetch the poster's permissions.
    While doing this, you could simply remove the signature from the post there rather than in the template.
    However, grabbing the poster's info for every post is not ideal.
    Would be much easier for you to simply delete the user's signature when giving the warning and the user is moved to the new user group.
    Jake Bunce likes this.
  3. Mutt

    Mutt Well-Known Member

    thanks, the mods don't have the ability to delete a sig. only the admins do. I was looking for a non-addon solution but perhaps that's what's needed.

Share This Page