TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 326
  • Total: 326

Shoutbox redirect

Started by FragaCampos, September 02, 2009, 03:59:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

FragaCampos

Hello there.
I know this as been answered here, 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

G6Cad

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.

FragaCampos

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 :(

IchBin

Then you perhaps have a mod or something else causing a problem with it?

FragaCampos

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.

IchBin

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.

IchBin

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. :)

FragaCampos


IchBin

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.

Renegd98

You da man Brad.. good find.

This website is proudly hosted on Crocweb Cloud Website Hosting.