TinyPortal

Development => Support => Topic started by: ColdCoffee on April 09, 2008, 10:47:16 PM

Title: Shouts and Login going to Forums.
Post by: ColdCoffee on April 09, 2008, 10:47:16 PM
Ok I just recently reinstalled TP with the new beta build.
When I hit shout or login it brings me to forums instead of the frontpage.
Is there a setting I forgot to click ?
Title: Re: Shouts and Login going to Forums.
Post by: bloc on April 10, 2008, 12:57:27 AM
No, its supposed to do that. Its simply a fix for SMF. Since SMF expects a empty redirect would go to the forum index(thats the "frontpage" of SMF) TP changed that to go to TP frontpage. But by adding a "action=forum" into an empty redirect this problem in SMF is solved. However..shouting should redirect you to whatever page you are on, if not its a bug.

Login should ALWAYS redirect you to SMF "frontpage", so thats correct.
Title: Re: Shouts and Login going to Forums.
Post by: ColdCoffee on April 10, 2008, 03:20:54 PM
In .9 it would take you to the TP frontpage using the userbox to login and I liked that. I could create HTML blocks set them only for members to view and post important items into them. I'm afraid new members will miss them now if it goes directly to the forum index. Could I change something in 1.0.5 to make that work like the old one ?

Thank you for you response.
Title: Re: Shouts and Login going to Forums.
Post by: wmiles on April 10, 2008, 03:39:25 PM
If you post on the shoutbox, it takes you to the forum, even when you post from the portal, i reported this in another topic here and was told it was a bug we have to "live with" for now :)
Title: Re: Shouts and Login going to Forums.
Post by: mr juntao on April 10, 2008, 03:43:01 PM
One option for you is to get something along the lines of yshout and use that in place of the shoutbox in a block, if I remember it was only a small bit of code to change in order to integrate it.
Title: Re: Shouts and Login going to Forums.
Post by: bloc on April 10, 2008, 04:21:12 PM
Its already fixed in the next beta, for shoutbox at least, so shouts made from portal frontpage doesn't redirect to forum index:

Open up tp-files/tp-modules/tp-shoutbox/Sources/TPShout.php and find:
redirectexit($_POST['tp-shout-url']);
Replace it with:
redirectexit($_POST['tp-shout-url'], false, true);



If you want to change it for all though, you can do that too. Open up Sources/Subs.php and find:
function redirectexit($setLocation = '', $refresh = false, $tp_not = false)

replace with:
function redirectexit($setLocation = '', $refresh = false, $tp_not = true)
Title: Re: Shouts and Login going to Forums.
Post by: TimUSA on April 10, 2008, 04:40:21 PM
any word on how to do this with the adv shoutbox?
Title: Re: Shouts and Login going to Forums.
Post by: bloc on April 10, 2008, 04:49:41 PM
Well, Stormlrd have been working on a fix for that one, so it will be out soon enough. I think he may have did it slightly different. :) The trouble is really that the update fucntion of TP modules isn't 100% yet otherwise you could just update the module with a click. We hope in beta 2 to have those in place and allow for easy updates of modules through TP admin. Much like SMF updates itself through package manager.
Title: Re: Shouts and Login going to Forums.
Post by: Jpg on April 10, 2008, 05:00:25 PM
@Bloc, you could have patches that edit pre-existing code using mod packages.

Use a url base like-
http://yourdomain.com/forum/index.php?action=pgdownload;auto;package=http://tinyportal.co.uk/downloads/patch.zip;sesc=#


It'll be a 1-click patch download.
Title: Re: Shouts and Login going to Forums.
Post by: wmiles on April 10, 2008, 05:07:49 PM
That code fixed both the shoutbox problem and my login problems

Shoutbox isnt picking up group colors tho bloc, dont know if you will fix this in the next release

Cheers for the update tho :)
Title: Re: Shouts and Login going to Forums.
Post by: bloc on April 10, 2008, 06:14:24 PM
I will :)

And yes, it might done so Jpg, but I like to do it properly with an interface etc.
Title: Re: Shouts and Login going to Forums.
Post by: spurry on April 18, 2008, 05:56:48 PM
thanks for this
Title: Re: Shouts and Login going to Forums.
Post by: Phil Serna on May 08, 2008, 05:44:35 AM
Why did I get this?

Parse error: parse error, unexpected T_IF in /home/content/d/j/f/djfs3/html/tp-files/tp-modules/TPShout/Sources/TPShout.php on line 1
Title: Re: Shouts and Login going to Forums.
Post by: G6Cad on May 08, 2008, 06:24:05 AM
Probably because you edit the code wrongly.
Check the code and make sure you added it correctly, if you still have issues, we need to see the codelines  the error generates from to help you any further with this.
Title: Re: Shouts and Login going to Forums.
Post by: Phil Serna on May 08, 2008, 06:19:34 PM
It's been fixed. Thanks for the reply.
Title: Re: Shouts and Login going to Forums.
Post by: massyboy on May 27, 2008, 10:54:13 AM
When I do the fix, instead of redirecting me to the page I was on, it just goes straight to the frontpage.  Although this is better than being redirected to the forum frontpage, how do I change it so it goes back to where I was?
Title: Re: Shouts and Login going to Forums.
Post by: FragaCampos on June 29, 2008, 11:13:03 PM
Quote from: ColdCoffee on April 10, 2008, 03:20:54 PM
In .9 it would take you to the TP frontpage using the userbox to login and I liked that. I could create HTML blocks set them only for members to view and post important items into them. I'm afraid new members will miss them now if it goes directly to the forum index. Could I change something in 1.0.5 to make that work like the old one ?

Thank you for you response.

Any word on this? I would like very much to know how to go directly to TP frontpage first... help?
Title: Re: Shouts and Login going to Forums.
Post by: IchBin on June 29, 2008, 11:16:02 PM
FragaCampos, a quick search here you will find that this has been asked an answered many times. Search for redirect or login redirect or something along those lines.
Title: Re: Shouts and Login going to Forums.
Post by: nutcase82 on June 30, 2008, 05:11:03 PM
Quote from: Phil Serna on May 08, 2008, 05:44:35 AM
Why did I get this?

Parse error: parse error, unexpected T_IF in /home/content/d/j/f/djfs3/html/tp-files/tp-modules/TPShout/Sources/TPShout.php on line 1

I got this error how did it get fixed?  Seeing as there is only one line in the entire file that matches the required text I know I replaced the right one. 
Title: Re: Shouts and Login going to Forums.
Post by: IchBin on June 30, 2008, 08:31:57 PM
Please start your own topic following the guidelines.
http://www.tinyportal.net/index.php?topic=581.0

Thanks.