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?

October 04, 2022, 11:37:50 AM

Login with username, password and session length
Members
  • Total Members: 3848
  • Latest: rrolle
Stats
  • Total Posts: 193513
  • Total Topics: 21092
  • Online today: 58
  • Online ever: 3540
  • (September 02, 2022, 06:38:54 PM)
Users Online
Users: 1
Guests: 46
Total: 47

Author Topic: TinyPortal Standalone  (Read 11637 times)

0 Members and 1 Guest are viewing this topic.

Offline Maxxim

  • Jr. Member
  • **
  • Posts: 12
Re: TinyPortal Standalone
« Reply #10 on: May 24, 2020, 07:25:37 AM »
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:
Code: [Select]
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.

Offline tino

  • Developer
  • *
  • Posts: 2615
Re: TinyPortal Standalone
« Reply #11 on: May 24, 2020, 11:28:39 AM »
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

Offline Maxxim

  • Jr. Member
  • **
  • Posts: 12
Re: TinyPortal Standalone
« Reply #12 on: May 25, 2020, 02:40:27 AM »
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.

Offline tino

  • Developer
  • *
  • Posts: 2615
Re: TinyPortal Standalone
« Reply #13 on: May 25, 2020, 05:15:01 AM »
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.

Offline lurkalot

  • Administrator
  • *
  • Posts: 7409
    • Camera Craniums
Re: TinyPortal Standalone
« Reply #14 on: May 25, 2020, 05:55:53 AM »
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.

Offline vbgamer45

  • Jr. Member
  • **
  • Posts: 12
    • SMFHacks.com
Re: TinyPortal Standalone
« Reply #15 on: May 25, 2020, 09:51:57 PM »

Offline Maxxim

  • Jr. Member
  • **
  • Posts: 12
Re: TinyPortal Standalone
« Reply #16 on: May 25, 2020, 10:31:16 PM »
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
Code: [Select]
$ssi_path       = './forum/SSI.php';
$forum_path     = '';

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

Offline lurkalot

  • Administrator
  • *
  • Posts: 7409
    • Camera Craniums
Re: TinyPortal Standalone
« Reply #17 on: May 26, 2020, 12:51:02 AM »
Tino, I don't know if this has any relevance.

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

Code: [Select]
loadTheme();
I noticed in the included (in package) TP TPStanalone.php file it has this

Code: [Select]
loadTheme(1, false);

Offline Maxxim

  • Jr. Member
  • **
  • Posts: 12
Re: TinyPortal Standalone
« Reply #18 on: May 26, 2020, 04:10:24 AM »
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):
Code: [Select]
$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.

Offline tino

  • Developer
  • *
  • Posts: 2615
Re: TinyPortal Standalone
« Reply #19 on: May 26, 2020, 12:39:05 PM »
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.