Skip to main content
Topic: TinyPortal for Elkarte (Read 10694 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: TinyPortal for Elkarte

Reply #45

Quote from: tino –
I know it works in Postgre in 1.1.8 as that’s what I run it under.

Unfortunately not for me :(

I installed the one that is available from the EA addons, download didn't work from the package manager in EA, but I downloaded the .zip and then uploaded.

But the development version didn't have install button when I uploaded it ... so I don't know why gives.
Stop Whining!

 

Re: TinyPortal for Elkarte

Reply #46

Quote from: Vague Whiner – But the development version didn't have install button when I uploaded it ... so I don't know why gives.

Development won't on Elkarte 1.1.8 as it's for Elkarte 2.0.0 only. The master is also towards that now. The last tag should work on 1.1.8.

What version of PHP were you running? is_countable was introduced in PHP 7.3 and I would expect most places to be on that by now.

Re: TinyPortal for Elkarte

Reply #47

Quote from: tino –
Development won't on Elkarte 1.1.8 as it's for Elkarte 2.0.0 only. The master is also towards that now. The last tag should work on 1.1.8.

Oh ... then I've got misinformation about this matter from:

Quote from: tino – If you wanted to use TinyPortal on Elkarte 2.0 there is this branch which should largely work..
.

https://github.com/tinoest/ElkTinyPortal/tree/TinyPortal_Elkarte2

The old version which works on Elkarte 1.1. is here

https://github.com/tinoest/ElkTinyPortal/tree/development

In both instances they are an RC Release, due to the changes between Elkarte 1.1 and Elkarte 2.
0 a new version is needed as the namespace is completely changed between the two.


Followed that hyperlink which said to work with 1.1.x

Quote from: tino – What version of PHP were you running? is_countable was introduced in PHP 7.3 and I would expect most places to be on that by now.

OK ... that explains it then, since the server is way behind the updates for reasons I don't even want to know and I don't run the box, it's in much more knowledgeable hands of my friend, so I cannot do anything but relay this to him.

Server is in process to get some love and updates so when that happens things will work :)
Stop Whining!

Re: TinyPortal for Elkarte

Reply #48

Code: [Select]
 if (!function_exists('is_countable')) {
     function is_countable($var) {
         return ( is_array($var) || $var instanceof Countable || $var instanceof \SimpleXMLElement || $var instanceof \ResourceBundle; );
     }
 }


Adding that to the bottom of TPortal.php should solve the undefined issue


Re: TinyPortal for Elkarte

Reply #50

Quote from: tino – Adding that to the bottom of TPortal.php should solve the undefined issue

I'm not sure if blind or what, but I cannot find such file ... closest one I could locate is

ElkTinyPortal/TinyPortal/Views/TPortal.template.php
Stop Whining!

Re: TinyPortal for Elkarte

Reply #51

Quote from: Vague Whiner –
Quote from: tino – Adding that to the bottom of TPortal.php should solve the undefined issue

I'm not sure if blind or what, but I cannot find such file ... closest one I could locate is

ElkTinyPortal/TinyPortal/Views/TPortal.template.php

Nope you're not blind, I was thinking about TinyPortal for SMF.

https://github.com/tinoest/ElkTinyPortal/blob/abe7d8e4a0f64b63bbf54a593dfd67a6acafa733/TinyPortal/Integrate.php#L729

This line is where you want to add it. After the closing } and before the ?>

Re: TinyPortal for Elkarte

Reply #52

Quote from: tino – This line is where you want to add it. After the closing } and before the ?>

After adding that code I get
Code: [Select]
HTTP ERROR 500

And when I remove it "work" again. "Work" as in don't get the 500 :)
Stop Whining!

Re: TinyPortal for Elkarte

Reply #53

Error 500 is something is wrong.

It was added after the } and before the ?> ?

Should be happy as it’s outside the class scope. Only thing I can think of is it wasn’t in the right place or I’ve missed something obvious.

When I’m back on a pc I’ll upload the file with the change.

Re: TinyPortal for Elkarte

Reply #54

Quote from: tino – Error 500 is something is wrong.

It was added after the } and before the ?> ?

Should be happy as it’s outside the class scope. Only thing I can think of is it wasn’t in the right place or I’ve missed something obvious.

When I’m back on a pc I’ll upload the file with the change.

Bit delayed but attached is the file which should correct the error you are having. I haven't tested it on this version of PHP as it's been EOL for a long time. So there might be other errors.