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

Creating a post (public control) button that behaves like reporting

Discussion in 'XenForo Development Discussions' started by Phatcows, Mar 23, 2015.

  1. Phatcows

    Phatcows Active Member

    Hello, I'm having a bit of trouble modifying the behaviour of a button in the post box, next to the report button. I want to button when clicked, to open an overlay like the report button does but when it is submitted, it gets submitted to another static thread.

    I am currently having problem with the following:

    a) getting the report overlay to appear like it would if submitting a report (blank but with a reference to the reported post), and
    b) getting the xen links right for the report overlay to send to the static thread.

    If I can fix b), I am fairly sure it will fix a)

    I read this guide on Xen links: https://xenforo.com/community/threads/xen-link-guide.15615/
    but for the life of me, I couldn't get xen links to find the relevant thread properly (it either tells me it couldn't find the thread or it reverts back to the index page)

    Any pointers in the right direction would be great :)
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    I'm not quite sure I understand what's going on - is it the source or destination thread which the code can't find the thread data for?

    Using xen:link with a thread requires passing the $thread param with the relevant data, e.g.

    Code:
    <a href="{xen:link 'route', $thread}" class="yourClass">{xen:phrase example}</a>
     
    Phatcows likes this.
  3. Phatcows

    Phatcows Active Member

    Hmm I think I am going about this the wrong way. How would I replicate how reporting works but for it to post to a specific thread?
     

Share This Page