News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Is what my posters are asking for even possible? (Return)

Started by gbsothere, March 01, 2009, 10:43:51 AM

Previous topic - Next topic

gbsothere

My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

tyty1234

My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.

gbsothere

No, not yet.  Kays is having a look at how to get the quote to behave as the reply does.

:)
My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

Kays

I think so now.  8)

Here's the changes to be made.

In Display.template.php replace from the start of the reply button down to:


// Can the user modify the contents of this post?


With

  // Simple Reply Button
  if ($context['can_reply'])
echo '<a href="', $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . ';num_replies=' . $context['num_replies'], ';m=', $message['id'], ';poster=', $message['member']['name'], '">', $respond_button, '</a>';
               
// So... quick reply is off, but they *can* reply?
if ($context['can_reply'])
echo '
<a href="', $scripturl, '?action=post;quote=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';num_replies=', $context['num_replies'], ';sesc=', $context['session_id'], '">', $reply_button, '</a>';



In Post.php above:



// Returning to the topic?


Add:

// Custom redirection
if (isset($_REQUEST['m']))
redirectexit('topic=' . $_REQUEST['topic'] . '.msg' . $_REQUEST['m'] . '#msg' . $_REQUEST['m']);


In Post.template.php above ;


// Assuming this isn't a new topic pass across the number of replies when the topic was created.


Add this:


if (isset($_REQUEST['m']))
echo '
<input type="hidden" name="m" value="', $_REQUEST['m'], '" />';

if (isset($_REQUEST['quote']))
echo '
<input type="hidden" name="m" value="', $_REQUEST['quote'], '" />';




Also find


// Finally the most important bit - the actual text box to write in!


And above it add:


if(isset($_REQUEST['m']))
$message = 'Reply to message # [url=?topic=' . $_REQUEST['topic'] . '.msg' . $_REQUEST['m'] . '#msg' . $_REQUEST['m'] . ']' . $_REQUEST['m'] . '[/url] by ' . stripslashes($_REQUEST['poster']) . '[hr]' . "\n";


Edited to add all corrections so that it's a bit more comprehensible.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

gbsothere

I'm looking for a hole to crawl in before I tell you that it's now working beautifully for quoting but that straight replies aren't returning me, now.   :D
My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

Kays

Strange, it's working for me.

In Post.template, do you have


if (isset($_REQUEST['m']))
echo '
<input type="hidden" name="m" value="', $_REQUEST['m'], '" />';

if (isset($_REQUEST['quote']))
echo '
<input type="hidden" name="m" value="', $_REQUEST['quote'], '" />';



Above:


// Assuming this isn't a new topic pass across the number of replies when the topic was created.


Both statements need to be there.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

gbsothere

Ah!   I replaced, rather than added this code:

   if (isset($_REQUEST['quote']))
      echo '
         <input type="hidden" name="m" value="', $_REQUEST['quote'], '" />';



Yes, it's working great, now!    :D


There was some weird sequential thing happening in the URLs.  For instance, on my test site, there are only 29 posts in the entire thread I'm using to test this but it had me replying to "post 61", etc.  The last 2 haven't done that, however, so this may have fixed that as well! 


Thank you so much for your extreme patience!  This should actually be a mod, because many forums have that one "home base" thread where everyone "meets and greets" and gets caught up:  a thread about "nothing".  And being able to catch up, comment along the way and continue to read is important to many. 

Thank you again!  I can put the "Solved" check back.   :)





EDIT:  It didn't fix the "over-numbering" of the posts, but seriously, I'm so happy with this, I don't even care.  It's great!
My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

Kays

I'm glad it's finally working now.

I agree that maybe it should be a mod because it's sometimes nice to return to the post you are replying to even if it's on the same page. However it should be done by using quick reply which is a quicker than loading the post page. But it's beyond me how that worls.

One thing I forgot, to show the name of the poster in a reply

In Post.template above


// Finally the most important bit - the actual text box to write in!


Replace what you have added with:


if(isset($_REQUEST['m']))
$message = 'Reply to message # [url=?topic=' . $_REQUEST['topic'] . '.msg' . $_REQUEST['m'] . '#msg' . $_REQUEST['m'] . ']' . $_REQUEST['m'] . '[/url] by ' . stripslashes($_REQUEST['poster']) . '[hr]' . "\n";

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

gbsothere

Adding the names is even nicer!  It did just call post #5 "post $46" in the URL but, as I said, I'm so happy with the way it functions, that I can even remove this portion, rather than have you keep chipping away at it. 

You've been more than patient!   :)
My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

Kays

It was intersting and I'm thinking of maybe ading it to my boards.

That message you can configure it as you want. maybe something like "In reply to this post by PosterName"


$message = 'In reply to [url=?topic=' . $_REQUEST['topic'] . '.msg' . $_REQUEST['m'] . '#msg' . $_REQUEST['m'] . ']this post[/url] by ' . stripslashes($_REQUEST['poster']) . '[hr]' . "\n";


If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

gbsothere

I'm going to try doing that in the morning but if you hear a loud noise and smell smoke, please come running.   :D 

Right now, I'm staring at it and thinking that I wouldn't even know how to begin configuring it but I'm willing to try. 

Kays, you've been outstanding!  Seriously.  I can't thank you enough. 

I don't know what part of the world you're in but it's after midnight in Tennessee so I'm going to "go horizontal" for a while, but again....   you've just been so helpful.  I really appreciate it. 

I'll try my hand at configuring that portion of code in the morning... after much coffee. 
My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

Kays

I'm up north from you some what so it's late here also.

The code in my previous post does have the alterations, so give that a try.

Good night. :)

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Advertisement: