News: September 21st, 2019, The Tinyportal team is pleased to announce the release of ~~ TinyPortal 1.6.4! GET IT NOW!!!

Login  |  Register
HTML5 Icon HTML5 Icon
TP on Social Media
Welcome, Guest. Please login or register.
Did you miss your activation email?

October 16, 2019, 08:39:02 PM

Login with username, password and session length

Recent

Members
  • Total Members: 3756
  • Latest: Ocean
Stats
  • Total Posts: 189087
  • Total Topics: 20763
  • Online Today: 58
  • Online Ever: 629
  • (November 08, 2018, 01:36:54 PM)
Users Online
Users: 0
Guests: 39
Total: 39

Author Topic: TinyPortal Standalone  (Read 1120 times)

0 Members and 1 Guest are viewing this topic.

Offline tino

  • Developer
  • *
  • Posts: 1673
TinyPortal Standalone
« on: June 09, 2018, 11:34:35 AM »
Not sure where this should go...

If you want to have your TinyPortal index on a different page/url to the main forum then you can do the following.

Code: [Select]
<?php

$ssi_path       
'/path/to/SSI.php';
$forum_path     '/forum';

require_once(
$ssi_path);

ob_start('tp_url_rewrite');

loadTheme();

TPortal_init();
writeLog();

call_user_func(whichTPAction());

obExit(true);

function 
tp_url_rewrite($buffer)
{
        global 
$forum_path;
        if (!empty(
$buffer) && stripos($buffer$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']) !== false) {
                
$buffer str_replace($_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'], $_SERVER['SERVER_NAME'].$forum_path.$_SERVER['REQUEST_URI'], $buffer);
        }       
        
        return 
$buffer;
}       

?>


I couldn't work out why the menu url etc was set to where I was rather than the path of the forum... so I just rewrote it. A bit of a hack but it works... assumes that you are using index.php on the main page.
« Last Edit: June 09, 2018, 12:07:20 PM by tino »

Offline bigguy

  • Beta Tester
  • *
  • Posts: 257
  • Be Nice...
    • What's Ur Beef
Re: TinyPortal Standalone
« Reply #1 on: August 17, 2019, 07:11:07 AM »
Would this work for 2.1 ? How is it used exactly. Do I need to make a file named index.php and put this in it. ??

Offline bigguy

  • Beta Tester
  • *
  • Posts: 257
  • Be Nice...
    • What's Ur Beef
Re: TinyPortal Standalone
« Reply #2 on: August 17, 2019, 07:37:33 AM »
It does work, lol. Cool.

Offline lurkalot

  • Administrator
  • *
  • Posts: 6290
    • Camera Craniums
Re: TinyPortal Standalone
« Reply #3 on: August 17, 2019, 07:53:36 AM »
It does work, lol. Cool.

Yes t should work.  I haven't tested or tried it myself, I was hoping tino would see this and answer for you as he wrote it for us. But glad you worked it out.

So where did you test this, got an example BG?

Offline bigguy

  • Beta Tester
  • *
  • Posts: 257
  • Be Nice...
    • What's Ur Beef
Re: TinyPortal Standalone
« Reply #4 on: August 17, 2019, 08:06:03 AM »
Here check the url out. If you try to use it without the /index.php it seems as though the style does not load, also there is no forum button but it does show up.
Link removed as this is a test site. (Lurkalot knows it though)

Offline bigguy

  • Beta Tester
  • *
  • Posts: 257
  • Be Nice...
    • What's Ur Beef
Re: TinyPortal Standalone
« Reply #5 on: August 17, 2019, 08:06:45 AM »
Well, I guess there is a forum button but it says home.

Offline bigguy

  • Beta Tester
  • *
  • Posts: 257
  • Be Nice...
    • What's Ur Beef
Re: TinyPortal Standalone
« Reply #6 on: August 17, 2019, 08:10:03 AM »
And I can't login on that page either.

Offline lurkalot

  • Administrator
  • *
  • Posts: 6290
    • Camera Craniums
Re: TinyPortal Standalone
« Reply #7 on: August 17, 2019, 08:17:11 AM »
I don't have any answers for you atm.  I'm wondering what would happen if you had your portal front page settings set to, "Go directly to forum index"

Offline bigguy

  • Beta Tester
  • *
  • Posts: 257
  • Be Nice...
    • What's Ur Beef
Re: TinyPortal Standalone
« Reply #8 on: August 17, 2019, 08:19:59 AM »
They are on "Redirect to forum".

Offline bigguy

  • Beta Tester
  • *
  • Posts: 257
  • Be Nice...
    • What's Ur Beef
Re: TinyPortal Standalone
« Reply #9 on: August 19, 2019, 03:38:30 AM »
OK, it was my cookie settings. This works fine now.