Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 8 Years, 4 Months ago [How To ?] Add "return to forum" link to post reply friendly redirect page
#1
Solved: 8 Years, 4 Months ago
Hi, y'all

Editing this to reflect my new vocabulary : )

After posting a reply in MyBB, one is automatically returned to the thread in which their reply is posted.

The friendly redirection page states
"Thank you, your reply has been posted.
You will now be taken to your post."

When you post a new thread, the friendly redirection page gives the option of returning to the forum

"Alternatively, return to the forum"

I'd like to have that return to the forum option on the reply redirection page as well as on the new thread page.

How can I replace the reply friendly redirect page with the new thread redirect page?

Thank you very much for your help!

I would like an option to return to the forum in which the thread is posted. This forum has that, but mine doesn't. This is a new thread option

Edit: To be clear, I want links for both options--So I can choose to go back to the thread OR to the forum.

Edit2: I want the options given after posting a new thread to also be available when posting a reply.
#2
Solved: 8 Years, 4 Months ago
Open newthread.php find:

$url = get_thread_link($tid); line 411

Replace with:

$url = get_forum_link($fid);

Haven't tested but should work Smile
#3
Solved: 8 Years, 4 Months ago
Thank you very much for responding, Marcus123.

Sadly, that did not seem to work for me. There was no change at all.

Also, I realize I wasn't entirely clear. I want links for both options--So I can choose to go back to the thread OR to the forum. I have edited the original post to reflect this.
#4
Solved: 8 Years, 4 Months ago
The php edit might work in new reply. I suggest using the patches plugin.

The redirect template is the one you would have to change; I think you would need to add a SECOND url parameter for the redirect meassage which currently only takes you to the thread.

I will have a look - unless Marcus beats me to it Big Grin
Random Fish and Sims Maniac
MY PLUGINS
Help MyBBSupport help you - remember to mark your threads as solved


#5
Solved: 8 Years, 4 Months ago
(2014-05-12, 05:14 PM)marcus123 Wrote: Open newthread.php find:

$url = get_thread_link($tid); line 411

Replace with:

$url = get_forum_link($fid);

Haven't tested but should work Smile

How come my solution ain't working?????? When you post a new thread it will redirect to the forum where the thread is posted not to the thread itself!!!!!!!!!!!!


Now that you have modified your question I see what you mean!!! @Leefish has posted the right solution!
#6
Solved: 8 Years, 4 Months ago
Huh. I didn't test it for posting a new thread. I want it for posting a reply.

EDIT: Waitasec, I just posted this and I didn't get the two options! Now I am horribly confused. Huh

EDIT 2: Okay, tested that. When I post a NEW THREAD (in this forum or in mine), I get the option "Alternatively, return to the forum" with a link.

I want this option when I post a reply as well.

How do I do that?

THANK YOU.

PS Patches looks a little scary, but I am guessing I will need that to keep any of these changes from being overwritten in an upgrade?
#7
Solved: 8 Years, 4 Months ago
Are you referring to 'friendly redirect pages ' ?????????
#8
Solved: 8 Years, 4 Months ago
I think so Marcus.

The new reply does not have the redirect to forum like it is on the new thread - he just wants that option - so it will say "click here if ...blaa and return to thread" AND "return to the forum" . Two clickable links.
Random Fish and Sims Maniac
MY PLUGINS
Help MyBBSupport help you - remember to mark your threads as solved


#9
Solved: 8 Years, 4 Months ago
Quote:Posted by marcus123 - Today 04:06 PM
Are you referring to 'friendly redirect pages ' ?????????

That could be. It is the page that appears between hitting "Post Reply" and the return to the thread in which you posted. I don't need two links--just the option to return to the forum.

In short,
I want the page that appears after you click Post Reply to be exactly the same as the one that appears after you click Post Thread.

That seems to be the easiest change. Replace page A with Page B.

I'm taking a class in a phpbb forum where the options are two links, and that was what I had in mind. But when I posted my question here, I saw the option to return to the forum. So I realized that would work fine.

I teach my own classes on a MyBB forum (I LOVE IT). I often have to do a long string of replies, usually in one forum. It's a drag to wait to go back to the thread then have to go up and click the forum link. Anything that makes the tasks faster is good.

Apologies for all the clarification. I am still pretty new at this.

Thank you very much for all your thoughtful attention. Heart

Sooo I just looked up friendly redirect pages in the forums here.

I can just turn the dang things off!?!

UGH.

DONE.

THANK YOU Leefish and Marcus123!!!!

I'd still love to know how to change it, but now that I know what it is, I maybe can figure it out.

I have installed patches, but have no idea what to do with it, lol.

Baby steps Big Grin

I tried adding

{$lang->redirect_return_forum}

to the redirect template, but clicking it it bumped me out of the forum (my forum is in a folder). This same message in the new thread friendly redirect goes straight to the post's parent forum. So something is still wrong.

I edited the top post to be more clear.
#10
Solved: 8 Years, 4 Months ago
Hi I am really bad at PHP but what you need is create a plugin. Hook it to newreply_end then create a query to fetch forum fid and then simply do this:

$query = $db->simple_select("forums", "fid");
$fid = $db->fetch_field($query, "fid");

$url_forum = get_forum_link($fid)

The you can use this in your template: {$url_forum} it should return forum URL


P.S. I really don't know how to make query!!!!


Forum Jump:


Users browsing this thread: 1 Guest(s)