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

Recent

Welcome to TinyPortal. Please login or sign up.

December 11, 2024, 07:14:07 AM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,443
  • Total Topics: 21,252
  • Online today: 88
  • Online ever: 6,457 (November 30, 2024, 02:40:09 PM)
Users Online
  • Users: 0
  • Guests: 45
  • Total: 45

TinyPortal Standalone

Started by tino, June 09, 2018, 06:34:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Maxxim

Quote from: tino on June 09, 2018, 06:34:35 PM
A bit of a hack but it works... assumes that you are using index.php on the main page.

Thanks a lot for this, @tino! This is exactly what I was looking for.
The code seems to work, but on my localhost WAMP setup (Windows 10, Apache 2.4, MySQL 5.7, PHP 7.1) it also displays the following:
Warning: call_user_func() expects parameter 1 to be a valid callback, no array or string given in <full path to www root>\index.php on line 15

I've got some IT background, but I'm definitely not a coder, so I would appreciate any help in dealing with this.

tino

Can you make sure that the hook which calls this file exists TPassimilate.php

I don't think it's loading properly for that error to appear

Maxxim

TPassimilate.php is in Sources directory where it belongs. I compared it with the one included in TinyPortal-1.6.6.zip, and it's a 100% match.

As for other installed mods, I only have Pretty URLs 2.3. Tried disabling it, but that didn't make the warning go away. I'm running SMF 2.0.17.

tino

Not the file itself the hook in the hooks area should be listed. It's in one of the admin sections, can never remember where mind.

If not SSI.php might not be including TinyPortal correctly.

lurkalot

Quote from: tino on May 25, 2020, 12:15:01 PM
Not the file itself the hook in the hooks area should be listed. It's in one of the admin sections, can never remember where mind.

If not SSI.php might not be including TinyPortal correctly.

Tino, don't think, or at least I haven't seen it in the 2.0.17  It's easily findable in 2.1 in maintenance > Forum Maintenance > Integration Hooks.


Maxxim

I've installed emanuele's Integration Hooks Report (?mod=3285), and here's what it shows:
(waiting for moderator to approve image attachment :)

PS. sniped by @vbgamer45 XD

PPS. The code seems to work only if I specify
$ssi_path       = './forum/SSI.php';
$forum_path     = '';


If I set $forum_path     = '/forum'; (which makes sense because that's where forum files are located), it fails to apply theming to the output.

lurkalot

Tino, I don't know if this has any relevance.

In your code, first post of this topic, this line,

loadTheme();

I noticed in the included (in package) TP TPStanalone.php file it has this

loadTheme(1, false);

Maxxim

I also noticed that Integration Hooks Report left 38 pages of error messages in my SMF Error Log. Looks like whenever it's called, it produces two errors, "Array to string conversion" and "Undefined variable: Array".

The offender is line 327 in Subs-IntegrationHooks.php (the mod's file):
$sort[] = $$sort_options[0];
I wonder if we can trust the tool's output.

Unfortunately, the mod's authors are not around any more, so chances of getting support are very slim.

tino

The one included might work better, I've not tested it in a while tbf. I had hoped to find some time to look at it this week in a test install but time as always is fleeting atm.