MyBB Community Forums

Full Version: New reply button not working correct
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I have add a reply button on my portal page but this one isn't working correct.
The nex code I have use to put the button on my portal


<a href="newreply.php?tid={$tid}" class="button new_reply_button"><span><b>Reply</b></span></a>


Now I have insert the button on the portal_announcement and if I click on the button in one of the announcements I be send to the reply page but not to the reply page for that announcement. It make no diffrents wich announcement I click on the reply button I will be sended to reply to the same announcement..

example:

4 announcements..

announcement 1: hello Mybb
announcement 2: Not working
announcement 3: Helping me
announcement 4: howto fix


If I click on the reply button to answer announcement 1: hello Mybb he jumps to announcement 2: Not working
If I click on the reply button to answer announcement 3: Helping me he jumps to announcement 2: Not working
If I click on the reply button to answer announcement 4: howto fix he jumps to announcement 2: Not working

So wich announcement I click for reply he jumps on all announcements to the reply the same announcement and I can not reply the selected announcement.


I hope that I have explain it correct and that someone can help me to fix this so the reply button works correct and users can reply the announcement the select.

Thanks allot.
announcements do not have replying facility. if you need replies then you can use sticky topics.
(2016-01-19, 05:18 AM).m. Wrote: [ -> ]announcements do not have replying facility. if you need replies then you can use sticky topics.

On the portal it calls announcement but it shows the topics I selected. I have selected a forum called news and everythingI post in it shows on the portal. People can answer the topics so I made the button also for on the portal. So yes the can answer the posts on the portal..

So  can help me fixing the problem
Well, you can't use variables out of nowhere, {$tid} doesn't exist in that scope. It should be {$announcement['tid']} which is even used in portal_announcement_ template(s).
(2016-01-20, 12:27 AM)Destroy666 Wrote: [ -> ]Well, you can't use variables out of nowhere, {$tid} doesn't exist in that scope. It should be {$announcement['tid']} which is even used in portal_announcement_ template(s).

Thanks thats works!! I have change the code to:

<a href="newreply.php?tid={$announcement['tid']}" class="button new_reply_button"><span><b>Reply</b></span></a> 


And now all works fine, thanks for this.....