TinyPortal

Development => Support => Topic started by: en_shua on August 02, 2009, 06:13:50 PM

Title: "Mark All Messagea As Read" redirect
Post by: en_shua on August 02, 2009, 06:13:50 PM
On my forum, when we click on "Mark All Messages As Read, it takes up back to the forum index (index.php?action=forum).  Does anyone know where or how I can change it so that it redirects to "index.php" instead?

Thanks.
Title: Re: "Mark All Messagea As Read" redirect
Post by: ZarPrime on August 02, 2009, 06:48:23 PM
You could try the fix in this post by Bloc ...
http://www.tinyportal.net/index.php/topic,23213.msg188221.html#msg188221

Use the code at the bottom for the /Sources/Subs.php

That will also redirect you back to the Front Page on login and logout.

ZarPrime
Title: Re: "Mark All Messagea As Read" redirect
Post by: FragaCampos on August 24, 2009, 01:25:21 AM
Curious, i wish my forum did exactly that  ::)
I mean, when i Mark All Messagea As Read it redirects me to the frontpage, but i wish it redirects to the forum's index.
Any clue on how to do this?
Title: Re: "Mark All Messagea As Read" redirect
Post by: IchBin on August 24, 2009, 03:03:02 AM
Did you try the fix in the link posted by Zarprime?
Title: Re: "Mark All Messagea As Read" redirect
Post by: FragaCampos on August 24, 2009, 08:32:11 PM
I may have understood wrong, but the fix that exists on that topic does exactly the opposite of what i would like to see.
The redirections are all ok in my forum, they all go to TP frontpage, but i would like to avoid that only if i mark all messages as read, i.e., when i do that, i want to go to SFM index (forum), and not TP frontpage.
Hope i made some sense :P
Title: Re: "Mark All Messagea As Read" redirect
Post by: ZarPrime on August 25, 2009, 12:25:26 AM
FragaCampos,

I wish you has started a new topic on your issue instead of using someone else's topic because your issue is a different issue.  However, since you didn't, I'll deal with it.

So, am I to understand that you have already made the change to the Subs.php that Bloc mentioned in his post?  If you are redirecting to the FrontPage on login and logout, then this would seem to be the case.

It's likely that this is the reason why the redirect is happening as it is when you mark messages read.  At this time, I don't have any way to test this.  If you would like to test to see what happens when you revert the code that Bloc mentioned to the way it comes out of the box, I would be interested in knowing what happens.  However, I doubt that it will work both ways for you.  It's probably either going to redirect either to the Frontpage or to the Forum for both the Login/logout redirect and the mark as read issue.  I don't know of a way to make it redirect differently depending on what your action is.

ZarPrime
Title: Re: "Mark All Messagea As Read" redirect
Post by: FragaCampos on August 25, 2009, 01:40:27 AM
Thanks for answering ZarPrime.
I just "took" this topic because it's the same issue, only the reverse  :P I did it to avoid opening another topic. It was with the best of intentions.

Unfortunately, what you say is true, i.e., it's either 80 or 8 on this. If i change the subs.php file again, it redirects everything to the SMF's index, including login/logout etc.
The solution would be, as you mentioned, to change redirection depending on the action.

Hope someone can help on this, cause i surely can´t  ::)
Title: Re: "Mark All Messagea As Read" redirect
Post by: ZarPrime on August 26, 2009, 12:14:17 AM
FragaCampos,

I just did a little bit of checking on this.  I have a Forum setup with TP 1.0 beta 1, that I had earlier edited with Bloc's fix, and it correctly redirects to the Frontpage on login and logout as it should.  The SMF version on that site is 1.1.7, but that should make no difference between that version and 1.1.10.  I tried to mark a couple of topics unread, and when I did so, the redirect went to the index of the board that those messages were in, which I believe is what you wanted to happen.

There is no particular reason that I can think of why it wouldn't happen this way on your site as well even though you aren't using the same version of TP.

ZarPrime
Title: Re: "Mark All Messagea As Read" redirect
Post by: IchBin on August 26, 2009, 12:52:57 AM
Did you try marking a board as read Zarprime? That is different than marking a topic read.
Title: Re: "Mark All Messagea As Read" redirect
Post by: ZarPrime on August 26, 2009, 05:56:22 AM
Ah, no I didn't try that.  Let me try that and I'll report back.

ZP

Edit:  Hmmm, marking a board as read that had a couple of unread topics in it just kept me on the same board index but marked all topics as read.  It didn't redirect me to either the Frontpage or to the Forum main index.  I think that's what he was trying to do but I'm not sure.  I guess maybe I need to get a clarification from FragaCampos and perhaps even try editing the subs.php on my TP beta 4 test site.
Title: Re: "Mark All Messagea As Read" redirect
Post by: FragaCampos on August 28, 2009, 11:29:06 PM
No, ZarPrime, you got it right on the first one. In my case, i believe i didnÃ,´t do anything besides Bloc's fix.
What i really wanted is when in the forum's index, you click "Mark Messages as read" (not "topics" or "boards") and are redirected to forum's index, not TP's frontpage..
Title: Re: "Mark All Messagea As Read" redirect
Post by: bloc on August 29, 2009, 12:47:13 PM
Thats how it should perform, but there might be a bug there.
Title: Re: "Mark All Messagea As Read" redirect
Post by: ZarPrime on August 29, 2009, 05:02:00 PM
Let me see if I can answer this once and for all.  I have done a few more tests.

It seems that if you have done Bloc's fix, to redirect to the FrontPage on login/logout, and you are on the Forum main index, the action "mark all messages as read" at the bottom of the main Forum index will redirect you to the FrontPage.

On the other hand, if you have not made The edit Bloc mentioned, you will not be redirected to the FrontPage but will stay on the Forum index instead.

ZarPrime
Title: Re: "Mark All Messagea As Read" redirect
Post by: FragaCampos on September 01, 2009, 03:19:50 AM
Thank you guys for your help but i solved the problem in a easier way... i installed the most recent Tp version and now everything is ok.

Thanks for your patience.
Title: Re: "Mark All Messagea As Read" redirect
Post by: ZarPrime on September 01, 2009, 01:24:40 PM
Since the original poster has not responded for awhile to the original fix, I must assume that this topic is solved for them as well, and will mark the topic accordingly.

ZarPrime