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,966
  • Latest: safir45
Stats
  • Total Posts: 195,994
  • Total Topics: 21,325
  • Online today: 319
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 292
  • Total: 292

Default to TP front page on login

Started by confuzed, February 09, 2009, 05:24:34 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

confuzed

Hello

I was reading this topic today http://www.tinyportal.net/index.php/topic,23213.msg188221.html#msg188221 regarding how to get TP frontpage to display on login instead of forum.  There were some file edits to be done but it also mentioned possibly being fixed in the next beta.

So I upgraded to TinyPortal v.1.0.6 beta 2 and the problem is still there.  I'm just about to edit the files but I just thought I would mention that this still seems to be a problem.

Any news on when it will be fixed?

Thanks

FUBAR

I think they are looking to correct this in the next BETA release. 

It's a very easy fix though if you wanted to try.

confuzed


TimUSA

#3
i just tried making these edits and it fixed the redirect when logging in, but not the shoutbox.
QuoteIf 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)

However when trying this edit, I search for the string in the v.1.0.6 TPShout.php and the string does not exist. (Yes I did search for the string and line by line!)
QuoteOpen 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);


any ideas?

TimUSA

#4
Im guessing what i am looking for is this: (around line 190)
// if using mod rewrite, go to forum
if(!empty($modSettings['queryless_urls']))
redirectexit('action=forum');
else
redirectexit(strip_tags($_POST['tp-shout-url']));


but what should i change it to?

// if using mod rewrite, go to forum
if(!empty($modSettings['queryless_urls']))
redirectexit('');
else
redirectexit(strip_tags($_POST['tp-shout-url']));


this seems to work, redirects to the fron page, but how would i schange this so it stays on the current page.

TimUSA

in an attempt to not be to impatient, i do this with great risk...."bump"

IchBin

You can possible use $_SERVER['PHP_SELF'] to do that. Give it a shot and let me know if it works.

TimUSA

Thanks for looking into this IchBin, I know you guys are busy and I was hesitant to bump my post. I tried this and it did not work, it still redirects to the front page after submitting a shout.

// if using mod rewrite, go to forum
if(!empty($modSettings['queryless_urls']))
redirectexit($_SERVER['PHP_SELF']);
else
redirectexit(strip_tags($_POST['tp-shout-url']));


Is there a way we can determine the current location of the user and then put it into a variable? (I know the answer to this, just don't know how!!)

If you feel it needed, you can break this off into a different topic.

IchBin

Try and see if this works.

$_SERVER['QUERY_STRING']

TimUSA

#9
i tried using $_SERVER['REQUEST_URI']  and using $_SERVER['QUERY_STRING']

when i start at say http://vsk-ayc.totalh.com/index.php/page,212.html and type in a shout and submit, i get an error:

AN ERROR HAS OCCURRED!
Unable to load the 'main' template.

and the address bar shows http://vsk-ayc.totalh.com/index.php?action=tpmod;shout=save

This website is proudly hosted on Crocweb Cloud Website Hosting.