[Tutorial] Postloop Users for XenForo

Discussion in 'Forum & Blog Owners' started by Jordan, Jan 17, 2015.

  1. Jordan

    Jordan That One Canadian Guy Staff Member

    So, I like to know which posts are from post loop with out having to go into postloop and seeing every user one by one and reading their posts.

    This little tutorial will allow Forum Owners to see which users are making posts from post loop. only YOU can see this edit. (Unless you make it otherwise!)

    Example:
    [​IMG]

    Every post that gets posted by a user that is from postloop, that postloop logo gets added to the background of the message. Again, only you the owner of the website can see this unless you specify otherwise.

    1) Make a new user group. This user group will be where all your post loop users get put into. Leave the "Display Styling Priority" at 0! Everything else can be left alone, or set as "Not set".

    2) Head over to your website templates in ACP > styles > {Style Name} > Templates.
    Search for the "message" template and edit it.

    Inside this template you will find this:
    HTML:
    <div class="messageInfo primaryContent">
    Replace this with the following:
    HTML:
    <div class="messageInfo primaryContent <xen:if is="{xen:helper ismemberof, $visitor, 10}"><xen:if is="{xen:helper ismemberof, $message, 9} AND !{$message.isNew}">postloop</xen:if></xen:if>">
    3) In side that code, there are two numbers you have to edit to match your user groups. The first number is 10. This is the user group ID that can SEE the postloop logo. Such as your self or admins. I created an "owner" group and set me to be the only one in that group. You can select what ever user groups you want to be able to see this. You can go to the ACP to find out what your user group ID's are.

    The second number is 9. This is the group you created previously for postloop members. You need to enter the postloop user group ID here.

    After that save the template.

    4) Go into your extra.css and add the following:
    Code:
    .message .postloop {
      background-image:url(http://i.imgur.com/uxzTFQX.png) !important;
      background-position:100% 0%  !important;
      background-repeat:no-repeat no-repeat !important;
    }
    Save the template and your done!
    Now anyone put in the postloop group will now have the postloop logo in their message to let you know :)

    Automation:
    As of right now, there is no automatic way to put users into the postloop group when they register through postloop. (That I know of) Every time I see a new user on my postloop register, I go into the ACP and add them into the group. Make sure to mark it as a secondary group.
     
    8 people like this.
  2. Ryan

    Ryan Well-Known Member

    What an awesome idea! :thumbsup:

    Kudos to you. If I actually used Postloop to receive posts, I'd set this up immediately :cool:
     
    4 people like this.
  3. Jordan

    Jordan That One Canadian Guy Staff Member

    Thanks.

    I might just make this into a real addon so users don't have to edit any templates them selves.
    I just wish there was a way to determine upon registration that the user is coming from post loop to have them automatically be put into the group.
     
  4. Ryan

    Ryan Well-Known Member

    This could be done but would require significant knowledge of code.
     
  5. Aloony

    Aloony New Member

    Is there a way we could use postloop.php to do it? I mean postloop.php checks if a member is on here and in our database...so could we use it like we do an api to do the same thing? Then we can just ask postloop.php if the user is from postloop and add them to the right group?

    (Note I'm not talking about us editing postloop.php, more you or us linking to it or something - I haven't looked at it)
     
  6. Ryan

    Ryan Well-Known Member

    Sure, that would be one of many ways to go about it. You could also monitor referring URL's and set cookies when they create an account. Or you could tie into your email alerts on subscribe/unsubscribe....Maybe IFTTT could help? If you don't know what IFTTT is, Google it. :thumbsup:
     
    3 people like this.
  7. Aloony

    Aloony New Member

    Ahh great ideas there, thanks! I was considering referring url but that's not always effective.
     
  8. Jordan

    Jordan That One Canadian Guy Staff Member

    Maybe I can get back on this and develop an actual addon for this :) Perhaps develop an addon for other forum software too!
     

Share This Page