ElkArte Community

Extending Elk => Addons => Topic started by: tino on December 22, 2020, 04:32:22 pm

Title: TinyPortal for Elkarte
Post by: tino on December 22, 2020, 04:32:22 pm
Hi All,

After quite some time I have eventually got TinyPortal to a stage where I can start to port it across to Elkarte relatively easily. It is available here; https://github.com/Tinyportal/ElkTP although I have currently tagged it as 1.0.0 please assume it is in Alpha stages and needs a lot of testing.

I have removed the Shoutbox, Menu and Downloads from it currently and will add them back in when I have got the existing code ported across in a nicer manor than I have currently. There isn't a controller as such it just hooks into the existing logic used for SMF which is what I will focus on. Most of the SQL was moved to the TinyPortal namespace before I started this in TinyPortal 2.0.0 and that's where eventually all the SQL will reside with the controller and views calling the appropriate functions.

The CSS styling on the blocks is one thing which I know doesn't work correctly and if I'm honest is not my forté. So if anyone can help with that I would appreciate it.

The latest tagged release download is here; https://tinoest.co.uk/forum/index.php?page=ElkTinyPortal

tino
Title: Re: TinyPortal for Elkarte
Post by: Spuds on December 22, 2020, 05:35:58 pm
Congratulations on getting that to work, it must have been a labor of love !!!

TP is a very cool portal I had wanted to port as well but the way it was written at the time required a level of dedication that I could not supply, you really had to "live" with that code to effectively make changes.

I've downloaded it and when I'm done playing with 1.1.7 I'm going to give it a run :D
Title: Re: TinyPortal for Elkarte
Post by: ahrasis on December 23, 2020, 12:58:44 am
Great news. Congratulations!
Title: Re: TinyPortal for Elkarte
Post by: emanuele on December 29, 2020, 09:08:55 am
Indeed congratz!
I think I tried once, but gave up halfway, I had more confidence (not that much for the matter) with SP.
Title: Re: TinyPortal for Elkarte
Post by: tino on January 03, 2021, 01:19:15 pm
Thanks.

I have moved things around a lot since my first post. So I would get the latest version from GitHub when you do try it as it's probably not going to be the same as yesterday let alone a week ago.  O:-)
Title: Re: TinyPortal for Elkarte
Post by: Bloc on January 05, 2021, 03:11:58 pm
I have to admit - the way TP coding was before Brad(Ichbin) and later tino, took over, was..."dedicated". :D I guess I wanted to put so much functionality in and really having less-than-ideal knowledge of finer PHP coding - I just used what I knew and duplicated. And duplicated again, possibly tweaked lol.So no wonder the code had to be "lived" to change it.

Seriously though, I think its great TinyPortal lives on, both as SMF and now also Elkarte mod. 
Title: Re: TinyPortal for Elkarte
Post by: Steeley on January 05, 2021, 06:03:46 pm
Quote from: Bloc – I have to admit - the way TP coding was before Brad(Ichbin) and later tino, took over, was..."dedicated". :D I guess I wanted to put so much functionality in and really having less-than-ideal knowledge of finer PHP coding - I just used what I knew and duplicated. And duplicated again, possibly tweaked lol.So no wonder the code had to be "lived" to change it.

Seriously though, I think its great TinyPortal lives on, both as SMF and now also Elkarte mod. 

Just a note that you're in good company Bloc.  God created the platypus first,...

(Link-6856)

.a beaked, web-footed hairy mammal that lays eggs (arguably putting too much functionality in, also) and then began to refine things from there..

And likewise, if you live with one long enough you find the platypus is kinda cool..
Title: Re: TinyPortal for Elkarte
Post by: radu81 on April 14, 2021, 05:26:20 am
I just tested this add-on on Elkarte 1.1.7 and after I click on "Promote to frontpage" I get an error:
Code: [Select]
    Tipo di errore: Generale
    Warning: require_once(/sources/subs/Exception/Controller/TinyPortal/ElkException.class.php): failed to open stream: No such file or directory
    /index.php?action=tportal;sa=publish;t=4
    File: /sources/Autoloader.class.php
    Line: 223
Title: Re: TinyPortal for Elkarte
Post by: tino on April 14, 2021, 06:23:11 am
Quote from: radu81 – I just tested this add-on on Elkarte 1.1.7 and after I click on "Promote to frontpage" I get an error:
Code: [Select]
    Tipo di errore: Generale
    Warning: require_once(/sources/subs/Exception/Controller/TinyPortal/ElkException.class.php): failed to open stream: No such file or directory
    /index.php?action=tportal;sa=publish;t=4
    File: /sources/Autoloader.class.php
    Line: 223


Thanks, looks like I need to escape the exception class. I’ll fix that in RC3, although that’s hiding another error.
Title: Re: TinyPortal for Elkarte
Post by: radu81 on April 14, 2021, 07:47:02 am
Found another one, when you click to "show latest comments" index.php?action=tparticle;sa=showcomments
Code: [Select]
    Tipo di errore: Database
    Errore del Database: Unknown column 'var.type' in 'where clause'
    /index.php?action=tparticle;sa=showcomments
    File: /TinyPortal/Model/Database.php
    Line: 43
Title: Re: TinyPortal for Elkarte
Post by: tino on April 14, 2021, 07:53:22 am
Quote from: radu81 – Found another one, when you click to "show latest comments" index.php?action=tparticle;sa=showcomments
Code: [Select]
    Tipo di errore: Database
    Errore del Database: Unknown column 'var.type' in 'where clause'
    /index.php?action=tparticle;sa=showcomments
    File: /TinyPortal/Model/Database.php
    Line: 43


Thanks, I have fixed the first one.

It's in this commit, which is mixed with other changes I'm afraid.

https://github.com/tinoest/ElkTinyPortal/commit/361e08bcc45bba028a6a1f5191e63628135ed2ae

The bit you need is https://github.com/tinoest/ElkTinyPortal/blob/361e08bcc45bba028a6a1f5191e63628135ed2ae/TinyPortal/Controller/Portal.php#L80

How do you get to the showcomments link? I never actually found out where that was defined.

Edit:

That was fixed on the main TinyPortal in this commit, https://github.com/Tinyportal/TinyPortal/commit/a8519b8a8303af4e5a48c4e5e683e4b2e14b5392#diff-e527f1a1f68898c41b31e4c2aae658183c74f4979192b96c45599c9ceaf980c9 I either need to port it across or if it's not actually referenced remove it. (As I don't know where it's referenced I'm relying on you for that one I am afraid)

Title: Re: TinyPortal for Elkarte
Post by: tino on April 14, 2021, 10:54:58 am
Quote from: radu81 – Found another one, when you click to "show latest comments" index.php?action=tparticle;sa=showcomments
Code: [Select]
    Tipo di errore: Database
    Errore del Database: Unknown column 'var.type' in 'where clause'
    /index.php?action=tparticle;sa=showcomments
    File: /TinyPortal/Model/Database.php
    Line: 43


That's also fixed in this PR and will be part of the RC3 release.

https://github.com/tinoest/ElkTinyPortal/commit/69d9e2382d8bfc9db4467da3147a31fc866d6de0

Thanks for the feedback and testing.
Title: Re: TinyPortal for Elkarte
Post by: McFly on November 21, 2021, 05:05:20 pm
Killed a little time in home office.  :D

German formal language pack for TinyPortal for ElkArte V1.0.0 RC3. Installable via package manager.
Title: Re: TinyPortal for Elkarte
Post by: augras on December 22, 2021, 04:29:34 am
Hi,
I just downloaded and installed TinyPortal from github.
I get an error :

Exception: Call to undefined method TinyPortal\Model\Admin::updateSettingData()
https://augras.eu/elkatest/index.php?action=admin;area=tpsettings;sa=updatesettings
Fichier: /home/augras/public_html/augras.eu/elkatest/TinyPortal/Controller/PortalAdmin.php
Ligne: 148

It's in TinyPoratl setting, Select non responsive themes, pickElkArte Default Theme and click Save.

Philippe
Title: Re: TinyPortal for Elkarte
Post by: tino on December 22, 2021, 08:21:36 am
That function should be updateSettings, I’ll get that changed when I can.

Title: Re: TinyPortal for Elkarte
Post by: tino on January 08, 2022, 01:17:27 pm
If you wanted to use TinyPortal on Elkarte 2.0 there is this branch which should largely work...

https://github.com/Tinyportal/ElkTP/tree/master

The old version which works on Elkarte 1.1. is here

https://github.com/Tinyportal/ElkTP/tree/Elkarte_1.1.0

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.

edit: fixed URL's
Title: Re: TinyPortal for Elkarte
Post by: Spuds on January 08, 2022, 03:25:25 pm
Awesome!

How difficult was the change over?  I've not done any 1.1->2.0 addon updates as of yet so I'm pretty curious as to how much broke.
Title: Re: TinyPortal for Elkarte
Post by: tino on January 08, 2022, 03:48:00 pm
Quote from: Spuds – Awesome!

How difficult was the change over?  I've not done any 1.1->2.0 addon updates as of yet so I'm pretty curious as to how much broke.

To be honest fewer than I’d expected however TinyPortal isn’t written like any other Mod on here in that I’d moved it pretty much entirely to it’s own namespace. So I just needed to reference \Elkarte\Util rather than just Util. etc

The only issue I really had was integrate_front_page no longer seems to be called.
Title: Re: TinyPortal for Elkarte
Post by: tino on January 14, 2022, 12:12:03 pm
@Spuds This should show the changes; https://github.com/Tinyportal/ElkTP/compare/development...tinoest:TinyPortal_Elkarte2 some are formatting related, but relatively few in the grand scheme of things.
Title: Re: TinyPortal for Elkarte
Post by: Spuds on January 14, 2022, 06:50:02 pm
Very cool ... thanks for sharing those changes, its good to see what is required.

 I do have the frontpage issue on my list.  I'm kind of hoping it get magically fixed by one of my other many fixes :smile:
Title: Re: TinyPortal for Elkarte
Post by: McFly on January 21, 2022, 06:46:29 am
Updated version of german formal translation.  :)
Title: Re: TinyPortal for Elkarte
Post by: McFly on February 14, 2022, 06:43:00 am
Does anyone else here have problems with PHP blocks? For me, the code editing field is not displayed and also the code from the existing templates is not taken over.

For the PHP articles and also for SMF2.0.19 with TinyPortal2.2 everything runs smoothly.
Title: Re: TinyPortal for Elkarte
Post by: McFly on March 21, 2022, 03:37:24 am
I found out finally that the development branch on github is ELK2.0 ...  ::) ... thanx @tino

After the successful installation on my test system, TP was installed as a package: white page and the error log in the database tells me that several language files are not found ('Index.' , 'Addons.' , 'TPortal.') .

EDIT 1. After new installation (only ELK2)
Also interesting. I have to save the language manually in the settings as default for all after the installation.

EDIT 2. After installation of TP
White page remains. Even the error with missing language file (Unable to load the 'TPortal.English.php' language file.)

PS It's the system in the signature. Change ElkArte_TP to ElkArte2_TP.
Title: Re: TinyPortal for Elkarte
Post by: Spuds on March 21, 2022, 10:47:43 am
There were some updates, really a rewrite, of how language files are loaded and where they are saved.  I feel @emanuele made these changes after @tino did his updates for 2.0.  

Languages used to be under [themes/languages/name/areas.php] so all areas of that language were lumped into a single directory.  Example (/themes/languages/german/addons.german.php, and /themes/languages/german/index.german.php)

Now they are in the sources under ElkArte/Languages/Area/Xyz  For example it would be /ElkArte/Languages/Addons/German.php and /ElkArte/Languages/Index/German.php  (and all other installed languages there as well so /ElkArte/Languages/Index/English.php ... Addons can create their own Area directories so there could be a ElkArte/Languages/TP/Xyx.php

I guess the point being language is not a theme, but a site item.  I have not done much with the new functions myself (yet) so can't really provide any specifics on how to best implement addons. 

If emanuele can tear away from pornhub :see_no_evil:  for a bit :laughing: , he can explain better.
Title: Re: TinyPortal for Elkarte
Post by: tino on March 21, 2022, 03:51:25 pm
I just need to change the TinyPortal load language function to accommodate that then, I’ve moved languages out into a TinyPortal namespace anyway so it’ll just be how I’m referencing the old stuff that’s causing the issue.

I’ll update the latest GitHub branch and get it all working again!
Title: Re: TinyPortal for Elkarte
Post by: tino on March 21, 2022, 04:10:29 pm
@Spuds I would try and update TinyPortal but it seems the installer is broken I get the following

Code: [Select]
[Mon Mar 21 20:09:04.093197 2022] [php7:error] [pid 2120] [client 192.168.0.15:50612] PHP Fatal error:  Uncaught Error: Call to undefined function ElkArte\\detectServer() in /var/www/html/Elkarte2/sources/ElkArte/HttpReq.php:115\nStack trace:\n#0 /var/www/html/Elkarte2/sources/ElkArte/HttpReq.php(515): ElkArte\\HttpReq->__construct()\n#1 /var/www/html/Elkarte2/sources/ElkArte/AbstractModel.php(49): ElkArte\\HttpReq::instance()\n#2 /var/www/html/Elkarte2/sources/ElkArte/Errors/Errors.php(60): ElkArte\\AbstractModel->__construct()\n#3 /var/www/html/Elkarte2/sources/ElkArte/Errors/Errors.php(72): ElkArte\\Errors\\Errors->__construct()\n#4 /var/www/html/Elkarte2/sources/ElkArte/Database/Postgresql/Query.php(240): ElkArte\\Errors\\Errors::instance()\n#5 /var/www/html/Elkarte2/sources/ElkArte/Database/AbstractQuery.php(660): ElkArte\\Database\\Postgresql\\Query->error()\n#6 /var/www/html/Elkarte2/install/DatabaseCode.php(44): ElkArte\\Database\\AbstractQuery->query()\n#7 /var/www/html/Elkarte2/install/install_2-0_postgresql.php(190): DbWrapper->__call()\n#8 /var/www/html/Elkarte2/install/install.php(368): InstallInstructions_install_2_0_po in /var/www/html/Elkarte2/sources/ElkArte/HttpReq.php on line 115, referer: http://192.168.0.70/Elkarte2/install/install.php?step=3
Title: Re: TinyPortal for Elkarte
Post by: Spuds on March 21, 2022, 04:27:09 pm
I think I may have recently fixed that on my local.  I need to put together a fix PR since I have a few now.

ETA: Nope that was a different issue, so this one is new.  Will either have to add a stub in the install or ...
Title: Re: TinyPortal for Elkarte
Post by: tino on March 21, 2022, 04:50:04 pm
Quote from: tino – I just need to change the TinyPortal load language function to accommodate that then, I’ve moved languages out into a TinyPortal namespace anyway so it’ll just be how I’m referencing the old stuff that’s causing the issue.

I’ll update the latest GitHub branch and get it all working again!

Ok got it working on MySQL... the error isn't actually an error as such. I just need to change some logic around as @emanuele has changed what is classed as an error and what isn't.
Title: Re: TinyPortal for Elkarte
Post by: tino on March 21, 2022, 04:55:03 pm
Quote from: Spuds – I think I may have recently fixed that on my local.  I need to put together a fix PR since I have a few now.

It's only on postgre, MySQL install's fine.
Title: Re: TinyPortal for Elkarte
Post by: tino on March 21, 2022, 04:56:42 pm
Quote from: McFly – I found out finally that the development branch on github is ELK2.0 ...  ::) ... thanx @tino

After the successful installation on my test system, TP was installed as a package: white page and the error log in the database tells me that several language files are not found ('Index.' , 'Addons.' , 'TPortal.') .

EDIT 1. After new installation (only ELK2)
Also interesting. I have to save the language manually in the settings as default for all after the installation.

EDIT 2. After installation of TP
White page remains. Even the error with missing language file (Unable to load the 'TPortal.English.php' language file.)

PS It's the system in the signature. Change ElkArte_TP to ElkArte2_TP.

This should work on PHP 7.4 after this fix

https://github.com/tinoest/ElkTinyPortal/commit/4084d87005f005514cde30c6694c109e873c739a

Not sure about other PHP version's, I need to sort the regression test for those.
Title: Re: TinyPortal for Elkarte
Post by: emanuele on March 25, 2022, 07:10:42 pm
Quote from: McFly – I found out finally that the development branch on github is ELK2.0 ...  ::) ... thanx @tino

After the successful installation on my test system, TP was installed as a package: white page and the error log in the database tells me that several language files are not found ('Index.' , 'Addons.' , 'TPortal.') .

EDIT 1. After new installation (only ELK2)
Also interesting. I have to save the language manually in the settings as default for all after the installation.

EDIT 2. After installation of TP
White page remains. Even the error with missing language file (Unable to load the 'TPortal.English.php' language file.)

PS It's the system in the signature. Change ElkArte_TP to ElkArte2_TP.
Likely because I recently moved language files from themes/default/languages to sources/ElkArte/Languages and them a folder and a file with the language name.
This time around I don't think I have set up any sort of compatibility mode because it would have been to big of a pain in the plumbers crack to do...
Try changing the place of the files accordingly, in theory it should Just WorksTM.
Title: Re: TinyPortal for Elkarte
Post by: Aaron101 on March 31, 2022, 03:19:43 pm
Is there a way to edit the "About the author" below an article? I would like to add a brief bio, and not info about when I registered on the site, etc...
Title: Re: TinyPortal for Elkarte
Post by: tino on April 10, 2022, 01:30:52 pm
Quote from: Aaron101 – Is there a way to edit the "About the author" below an article? I would like to add a brief bio, and not info about when I registered on the site, etc...

Only just seen this, you can edit the template or create your own custom one.
Title: Re: TinyPortal for Elkarte
Post by: Hometutor on June 09, 2022, 09:47:25 pm
How do I uninstall TinyPortal?

Rick
Title: Re: TinyPortal for Elkarte
Post by: ahrasis on June 10, 2022, 12:05:39 am
Like any other addons.
Title: Re: TinyPortal for Elkarte
Post by: Hometutor on June 10, 2022, 01:38:36 pm

Other add-ons have an uninstall feature this one does not
Title: Re: TinyPortal for Elkarte
Post by: tino on June 10, 2022, 03:55:48 pm
Quote from: Hometutor –
Quote from: ahrasis – Like any other addons.

Other add-ons have an uninstall feature this one does not

I beg to differ, as it installs and uninstalls the same as other addon’s.
Title: Re: TinyPortal for Elkarte
Post by: ahrasis on June 10, 2022, 10:30:43 pm
Addon uninstall is made from admin > package manager page.
Title: Re: TinyPortal for Elkarte
Post by: Hometutor on June 13, 2022, 11:16:14 pm
Quote from: ahrasis – Addon uninstall is made from admin > package manager page.
Looked there before didn't see it. Then I found it. Sorry gang, doctor won't let me drink coffee and it makes me look even dumber than I am.

Rick
Title: Re: TinyPortal for Elkarte
Post by: Vague Whiner on January 25, 2023, 09:57:23 pm
Quote from: tino – It's only on postgre, MySQL install's fine.

Development version cannot be installed on PostgreSQL apparently and the version that can be downloaded from the addons seems to have some issue :(

After I install the one from the addons I get this:

(Link-10232)

And index seems to get whole page stuffed into the left column. When clicking the TinyPortal settings it seems again duplicate the whole page in the place I suppose those settings should be. TP admin menu is showing on the left column though.
Title: Re: TinyPortal for Elkarte
Post by: ahrasis on January 26, 2023, 04:37:34 am
I am not sure if TinyPortal is properly maintained or whether it is suitable with development version. Have you tried the suggestion in reply #30 or tried it on 1.1.9 instead?
Title: Re: TinyPortal for Elkarte
Post by: Vague Whiner on January 26, 2023, 04:53:46 am
Quote from: ahrasis – I am not sure if TinyPortal is properly maintained or whether it is suitable with development version. Have you tried the suggestion in reply #30 or tried it on 1.1.9 instead?

Ain't reply #30 about EA 2.0?

And no, I haven't tried on 1.1.9 ...

What comes to the development and maintaining I think @tino is the one who can answer to that :)
Title: Re: TinyPortal for Elkarte
Post by: ahrasis on January 26, 2023, 08:12:36 am
Sorry I misread thus misunderstood. I thought you tried TP RC3 (the one in the link and in the guthub release) on EA development version which 2.0.
Title: Re: TinyPortal for Elkarte
Post by: tino on January 26, 2023, 08:13:38 am
Quote from: Vague Whiner –
Quote from: tino – It's only on postgre, MySQL install's fine.

Development version cannot be installed on PostgreSQL apparently and the version that can be downloaded from the addons seems to have some issue :(

After I install the one from the addons I get this:

[attach type=image]10232[/attach]

And index seems to get whole page stuffed into the left column. When clicking the TinyPortal settings it seems again duplicate the whole page in the place I suppose those settings should be. TP admin menu is showing on the left column though.

What version of php are you running? is_countable is a core function.

The left column thing is due to the error you raised.
Title: Re: TinyPortal for Elkarte
Post by: tino on January 26, 2023, 08:15:58 am
Quote from: Vague Whiner –
Quote from: ahrasis – I am not sure if TinyPortal is properly maintained or whether it is suitable with development version. Have you tried the suggestion in reply #30 or tried it on 1.1.9 instead?

Ain't reply #30 about EA 2.0?

And no, I haven't tried on 1.1.9 ...

What comes to the development and maintaining I think @tino is the one who can answer to that :)

I’ve not tried it on Postgre recently as I couldn’t get Elkarte 2.0 to install let alone TinyPortal.

I know it works in Postgre in 1.1.8 as that’s what I run it under. I need to fix the security issue warning for 1.1.9 (which is actually a patch I put in 1.1.9 so my own fault it’s broken)
Title: Re: TinyPortal for Elkarte
Post by: Vague Whiner on January 26, 2023, 08:45:57 am
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.
Title: Re: TinyPortal for Elkarte
Post by: tino on January 26, 2023, 10:29:47 am
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.
Title: Re: TinyPortal for Elkarte
Post by: Vague Whiner on January 26, 2023, 03:22:47 pm
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 :)
Title: Re: TinyPortal for Elkarte
Post by: tino on January 26, 2023, 05:25:46 pm
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
Title: Re: TinyPortal for Elkarte
Post by: tino on January 26, 2023, 05:27:13 pm
Quote from: Vague Whiner – Followed that hyperlink which said to work with 1.1.x

That’s out of date now. I’ll sort the link to point to the Elkarte 1 branch later.

https://github.com/tinoest/ElkTinyPortal/tree/Elkarte_1.1.0

Title: Re: TinyPortal for Elkarte
Post by: Vague Whiner on January 27, 2023, 11:27:07 am
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
Title: Re: TinyPortal for Elkarte
Post by: tino on January 27, 2023, 11:48:12 am
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 ?>
Title: Re: TinyPortal for Elkarte
Post by: Vague Whiner on January 27, 2023, 12:22:16 pm
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 :)
Title: Re: TinyPortal for Elkarte
Post by: tino on January 27, 2023, 02:00:27 pm
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.
Title: Re: TinyPortal for Elkarte
Post by: tino on February 10, 2023, 02:55:03 pm
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.