Reply Button In Every Post

Started by Joe N, April 08, 2009, 01:39:28 AM

Previous topic - Next topic

sombra

thanks for this great mod i think smf need more of this ;D

KahneFan

...well. I looked, and I don't know how to change that :(

I'm open to suggestions.
#eric_on_twit| (video) Creating Themes for SMF | Reset Your Forum
NOTE: No PM's for support please.

Chas Large

Quote from: KahneFan on June 17, 2009, 12:08:13 AM
...well. I looked, and I don't know how to change that :(

I'm open to suggestions.
Thanks for looking into it. I suppose the code for the ordinary REPLY button that is provided by SMF, that changes when a topic is locked, would be of help? I'll look into it myself.
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

KahneFan

I looked at that, but it's built different than the buttons on the top of each message. Let me know if you see how it can be applied though, and I'll be happy to add it in.
#eric_on_twit| (video) Creating Themes for SMF | Reset Your Forum
NOTE: No PM's for support please.

Joe N

Hey KahneFan

Very nice mod. One problem, one of my boards. I made it so the users couldn't reply. It still shows the reply button. It also shows it for guests as well and they can't post.  :(
Microsoft: "We Need to Imagine Life Without Walls."
I Say: "If There are No Walls Who needs Windows."



My Mods (6) All My Mods Updated To SMF 2.0 RC2 and SMF 1.1.10!


KahneFan

In regards to guests, if you see above, it's by design that guests can see the button. This is left so that it may push guests to register. As for locked boards, if you look a couple of posts up, I don't know how to change that.

However, per my "Want My Mod?" thread, if anyone would like to take this over, just let me know. Please see the restrictions listed in the WMM thread as to what I ask in order to take a mod over.
#eric_on_twit| (video) Creating Themes for SMF | Reset Your Forum
NOTE: No PM's for support please.

Joe N

Quote from: KahneFan on June 28, 2009, 04:34:17 PM
In regards to guests, if you see above, it's by design that guests can see the button. This is left so that it may push guests to register. As for locked boards, if you look a couple of posts up, I don't know how to change that.

However, per my "Want My Mod?" thread, if anyone would like to take this over, just let me know. Please see the restrictions listed in the WMM thread as to what I ask in order to take a mod over.

I did a topic on your over post

I would like to take over the reply button
Microsoft: "We Need to Imagine Life Without Walls."
I Say: "If There are No Walls Who needs Windows."



My Mods (6) All My Mods Updated To SMF 2.0 RC2 and SMF 1.1.10!


N3RVE

#47
As per the request here.

Code (Find) Select

// These are some cache image buttons we may want.
$respond_button = create_button('reply.gif', 146, 146, 'align="middle"');


Code (Replace with) Select

// These are some cache image buttons we may want.
if (!$context['is_locked'])
         echo
$respond_button = create_button('reply.gif', 146, 146, 'align="middle"');


-[n3rve]
Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Quote"Somewhere, something incredible is waiting to be known." - Carl Sagan

Antechinus

Are you sure that will work? Usually the buttons are called inside other code, so if the code only calls $respond_button the  conditional statement wont be called with it, unless I'm missing something.

Chas Large

Quote from: [n3rve] on July 01, 2009, 05:21:57 AM
As per the request here.

Code (Find) Select

// These are some cache image buttons we may want.
$respond_button = create_button('reply.gif', 146, 146, 'align="middle"');


Code (Replace with) Select

// These are some cache image buttons we may want.
if (!$context['is_locked'])
echo
$respond_button = create_button('reply.gif', 146, 146, 'align="middle"');


-[n3rve]
Thank you [n3rve]. Editing Display.template.php worked fine and removed the REPLY button on all locked topics in all themes as required. I have learned something new today. Thanks again.
Chas.
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Chas Large

OK Whilst the fix to remove the REPLY (RESPOND) Button in a locked topic works fine, anyone viewing a locked topic now generates the following error in the log:

8: Undefined variable: respond_button
File: /home/......./......./user/htdocs/forum/Themes/default/Display.template.php (main sub template - eval?)
Line: 394

Any way to quell this error? (Apart from removing the fix)

Chas
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Joe N

For a member?

Forum URL please

Or screenshot?

Thanks
Microsoft: "We Need to Imagine Life Without Walls."
I Say: "If There are No Walls Who needs Windows."



My Mods (6) All My Mods Updated To SMF 2.0 RC2 and SMF 1.1.10!


Chas Large

Quote from: Joe N on July 01, 2009, 10:11:46 AM
For a member?

Forum URL please

Or screenshot?

Thanks
For me?

Here's the complete error message.

Apply Filter: Only show the error messages of this member  Hal9000       Today at 11:52:56 AM
Apply Filter: Only show the error messages of this IP address ***.***.***.***      Apply Filter: Only show the error messages of this session 17e275d32a8b8f217878876f649e4fef
Apply Filter: Only show the error messages of this URL http://www.fiftyplusforum.co.uk/forum/index.php?topic=1009.0
Apply Filter: Only show the errors with the same message
8: Undefined variable: respond_button
File: /home/..../..../user/htdocs/forum/Themes/default/Display.template.php (main sub template - eval?)
Line: 394

Forum is included in the error

How does this help?
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Joe N

Microsoft: "We Need to Imagine Life Without Walls."
I Say: "If There are No Walls Who needs Windows."



My Mods (6) All My Mods Updated To SMF 2.0 RC2 and SMF 1.1.10!


Chas Large

#54
Quote from: Joe N on July 01, 2009, 10:43:29 AM
What did you edit?
As Per [Nerve]'s post http://www.simplemachines.org/community/index.php?topic=303592.msg2137888#msg2137888 I editied the display.template.php file. See above.
Chas.

PS See you registered to post. You'll have got the Joining e-mail automatically.

Have locked that post now so you can see the reply button has now gone.
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Joe N

You will have to ask [n3rve] that as he did that code

Sorry  :(
Microsoft: "We Need to Imagine Life Without Walls."
I Say: "If There are No Walls Who needs Windows."



My Mods (6) All My Mods Updated To SMF 2.0 RC2 and SMF 1.1.10!


N3RVE

Silly mistake, reverse the code changes you made and do this:

Code (Find) Select

      if ($context['can_reply'] && !empty($options['display_quick_reply']))
      echo '<a href="#quickreply">', $respond_button, '</a>';
      else
      echo '<a href="', $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . ';num_replies=' . $context['num_replies'], '">', $respond_button, '</a>';


Code (Replace) Select

      if ($context['can_reply'] && !empty($options['display_quick_reply']))
      echo '<a href="#quickreply">', $respond_button, '</a>';
      elseif ($context['can_reply'])
      echo '<a href="', $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . ';num_replies=' . $context['num_replies'], '">', $respond_button, '</a>';


-[n3rve]
Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Quote"Somewhere, something incredible is waiting to be known." - Carl Sagan

Chas Large

Quote from: [n3rve] on July 01, 2009, 12:08:01 PM
Silly mistake, reverse the code changes you made and do this:

Code (Find) Select

      if ($context['can_reply'] && !empty($options['display_quick_reply']))
      echo '<a href="#quickreply">', $respond_button, '</a>';
      else
      echo '<a href="', $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . ';num_replies=' . $context['num_replies'], '">', $respond_button, '</a>';


Code (Replace) Select

      if ($context['can_reply'] && !empty($options['display_quick_reply']))
      echo '<a href="#quickreply">', $respond_button, '</a>';
      elseif ($context['can_reply'])
      echo '<a href="', $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . ';num_replies=' . $context['num_replies'], '">', $respond_button, '</a>';


-[n3rve]
Thanks again [n3rve], that fixed the issue and no errors in the list.
Cheers
Chas
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Grinch843

Hi,

Is there anyway to force this to use the normal reply box no matter what the quick reply settings are? 

Thanks,
Grinch843.

Joe N

Quote from: Grinch843 on July 19, 2009, 02:42:34 PM
Hi,

Is there anyway to force this to use the normal reply box no matter what the quick reply settings are? 

Thanks,
Grinch843.

Just disable the quick reply
Microsoft: "We Need to Imagine Life Without Walls."
I Say: "If There are No Walls Who needs Windows."



My Mods (6) All My Mods Updated To SMF 2.0 RC2 and SMF 1.1.10!


Advertisement: