Hello there.
I know this as been answered here (http://www.tinyportal.net/index.php/topic,23213.0.html), but when someone makes a shout in shoutbox, it redirects to the forum's index.
I checked and my tp-files/tp-modules/TPShout/Sources/TPShout.php shows
redirectexit(strip_tags($_POST['tp-shout-url']),false,true);
And my Sources/Subs.php shows
function redirectexit($setLocation = '', $refresh = false, $tp_not = true)
So i'm a bit lost here ???
Link to my site: http://www.docsPT.com
SMF version: SMF 1.1.10
TP version: TP 1.0 beta 4
Theme name and version: NewDef
Everyone that made that change have things working, so make sure you made the changes and that they were saved in the files you edited.
I really don't know why this is happening :/
I only edited the Subs.php file and it's ok. All redirections are ok except the shoutbox one.
The line in TPShout.php that i have is the following:
redirectexit(strip_tags($_POST['tp-shout-url']),false,true);
which is different from
redirectexit($_POST['tp-shout-url'], false, true); like bloc suggests.
I tried to change it but the problem persists.
I'm not a coder and don't have slightest clue about what can i do to solve this :(
Then you perhaps have a mod or something else causing a problem with it?
Yes, i guess it's one of those problems it's hard to detect the cause, cause it's probably due to a conflict with other mods or blocks...
Well, i'll try to change some things in see how it goes.
Thanks for trying to help.
If you don't mind creating a test account, I'll login and test the shout to see if I can see anything wrong with the source. Feel free to PM me a temp login for it if you'd like.
Ok, I think there is a bug on this. I'll bring it up with Bloc and see what he thinks about it. I'll add something to the bug tracker in a bit. Have to get back to work for a bit here. :)
Ok, thanks ;)
aha! Figured out what the problem is. You, are using queryless URL's (aka apache friend url's). In the TPshout.php file there is this code:
// if using mod rewrite, go to forum
if(!empty($modSettings['queryless_urls']))
//redirectexit('action=forum');
else
redirectexit(strip_tags($_POST['tp-shout-url']),false,true);
This code tells the shoutbox to redirect to the forum if you have that setting enabled in SMF. I'm not sure why this is necessary, but a work around for now would be to change it to have the same line as the else statement.
// if using mod rewrite, go to forum
if(!empty($modSettings['queryless_urls']))
//redirectexit('action=forum');
redirectexit(strip_tags($_POST['tp-shout-url']),false,true);
else
redirectexit(strip_tags($_POST['tp-shout-url']),false,true);
I'll shoot Bloc a PM and see if he can clarify any reason the redirect needs to be different based upon this SMF setting.
You da man Brad.. good find.
First, it's never too much to thank you IchBinâ„¢ ;)
Before i test your code change, i checked my admin panel and i really had "Search engine friendly URLs" option on. When i turned it off, the shoutbox redirects fine, i.e., when i make a shout, it redirects to Tp portal.
Now my newbie question is: what is "Search engine friendly URLs" used for? Should i keep it on or can i turn it off? ::)
Search engine friendly URL's is what takes a URL like this:
http://www.tinyportal.net/index.php?topic=30750
And turns it into a URL like this:
http://www.tinyportal.net/index.php/topic,30750
If your URL's do not change, then your server does not support the feature. If you don't see the difference, then just leave it turned off.
O0
Well, i guess that's important for me, cause my server is Apache and i see urls like this:
http://www.tinyportal.net/index.php/topic,30750
So i changed the code like you suggested and it worked! The shoutbox is redirecting like it should :)
Hi sure hope this can help others like me with Apache servers :laugh:
Thank you very much IchBin™ for your time and patience ;)
Will mark this to solved then :up: :)
It was a quirk in the code that made it more complex to add this to forums with the queryless setting, so I opted to leave it out at that time. But I will re-visit this again.
i had the same problem and followed these instructions aswell.
but the only change that happens is that the shoutbox now redirects to the frontpage - regardless from where on the side you did the post.
but i'd like to perform the complete redirection progress aswell - is that still impossible to get this one running with search-friendly-urls enabled?
Quote from: Cetra on October 30, 2009, 04:13:57 PM
i had the same problem and followed these instructions aswell.
but the only change that happens is that the shoutbox now redirects to the frontpage - regardless from where on the side you did the post.
Sorry for bump, but I'm experiencing this as well. Are we to expect a fix for this in next version or will this be standard behaviour for TP shoutbox redirects?
The fix has been posted. In the next version there is an option in the TP settings for you to choose.