Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome, Guest. Please login or register.
Did you miss your activation email?

July 13, 2020, 11:20:43 AM

Login with username, password and session length
Members
  • Total Members: 3786
  • Latest: Deaks
Stats
  • Total Posts: 190436
  • Total Topics: 20856
  • Online Today: 140
  • Online Ever: 917
  • (January 21, 2020, 09:02:26 AM)
Users Online
Users: 2
Guests: 58
Total: 60

Author Topic: TinyPortal Standalone  (Read 6604 times)

0 Members and 1 Guest are viewing this topic.

Offline tino

  • Developer
  • *
  • Posts: 1931
Re: TinyPortal Standalone
« Reply #20 on: May 29, 2020, 02:57:00 AM »
I just tried the one packaged in with TinyPortal 1.6.x with SMF 2.0 and it works ok if I add the $forum_version into the script (otherwise TPShout has a issue)

The one on Github for TinyPortal 2.0.0 also works as expected without any modifications.

The one on the opening post here is out of date.

This is what is needed for TinyPortal 1.6.x

https://github.com/Tinyportal/TinyPortal/blob/1.6.x/TPStandalone.php

Adding the SMF Version before the loadTheme line

Code: [Select]
$forum_version  = 'SMF 2.0.17';

Offline Maxxim

  • Jr. Member
  • **
  • Posts: 12
Re: TinyPortal Standalone
« Reply #21 on: May 29, 2020, 08:24:06 AM »
Thank you, Tino, that seems to work now! :)

However... Either I'm doing something wrong here or it doesn't play nice with custom themes (even with Curve derivatives like Ant's Mutant Curve). It does load the theme I specify in loadTheme(), but it totally mangles the linktree area and the footer. :(

Offline tino

  • Developer
  • *
  • Posts: 1931
Re: TinyPortal Standalone
« Reply #22 on: May 29, 2020, 09:50:37 AM »
I never tried it with a custom theme. I’ll have a look this weekend and see what’s causing that.

Offline tino

  • Developer
  • *
  • Posts: 1931
Re: TinyPortal Standalone
« Reply #23 on: May 29, 2020, 11:07:29 AM »
Try the below

Code: [Select]
<?php
/**
 * TPStandalone.php
 *
 * @package TinyPortal
 * @version 1.6.7
 * @author tinoest - http://www.tinyportal.net
 * @founder Bloc
 * @license MPL 2.0
 *
 * The contents of this file are subject to the Mozilla Public License Version 2.0
 * (the "License"); you may not use this package except in compliance with
 * the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Copyright (C) 2020 - The TinyPortal Team
 *
 */
ob_start('tp_url_rewrite');
global 
$boardurl$context$txt;

$txt['tp-tphelp']   = 'TinyPortal';

$forum_version      'SMF 2.0.17';
$forum_path         '/var/www/html/forum/';

require_once(
$forum_path '/Settings.php');

$context['TPortal'] = array();
$actual_boardurl    $boardurl;

require_once(
$forum_path '/SSI.php');

TPortal_init();

writeLog();

call_user_func(whichTPAction());

obExit(true);

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

    return 
$buffer;
}}}

?>


Offline Maxxim

  • Jr. Member
  • **
  • Posts: 12
Re: TinyPortal Standalone
« Reply #24 on: May 29, 2020, 10:46:31 PM »
It seems to work flawlessly now with several custom themes and Pretty URLs enabled.  :D
A triple huzzah for Tino! O0 O0 O0

Offline makuta_iii

  • Newbie
  • *
  • Posts: 3
Re: TinyPortal Standalone
« Reply #25 on: July 05, 2020, 12:43:49 PM »
Hi.
Is such a solution possible (of course, if you make the necessary changes) to display the main page of the portal on a separate page, if you put this code in the file portal.php? My forum is located at forum.wabisabi.by and i would like to see the portal Frontpage with articles at link forum.wabisabi.by/portal. This is now implemented on this forum, but not using your portal, unfortunately.
Sorry if I repeat my question, but this is the only problem that I can not solve to install your portal on my forum.

Thanks.