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

Re: TinyPortal for Elkarte

Reply #15

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
Last Edit: January 27, 2023, 11:50:38 am by tino

Re: TinyPortal for Elkarte

Reply #16

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.

Re: TinyPortal for Elkarte

Reply #17

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.


Re: TinyPortal for Elkarte

Reply #19

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:

Re: TinyPortal for Elkarte

Reply #20

Updated version of german formal translation.  :)

Re: TinyPortal for Elkarte

Reply #21

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.
▬|████|▬ This is a Nudelholz! Take it und hau it on the Kopp of a bekloppt Person .... to give you a better Gefühl than vorher.

ElkArte 1.1.x & TP on Apache2.4.48, PHP 8.0.8 FPM

Re: TinyPortal for Elkarte

Reply #22

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.
Last Edit: March 21, 2022, 05:23:59 am by McFly
▬|████|▬ This is a Nudelholz! Take it und hau it on the Kopp of a bekloppt Person .... to give you a better Gefühl than vorher.

ElkArte 1.1.x & TP on Apache2.4.48, PHP 8.0.8 FPM

Re: TinyPortal for Elkarte

Reply #23

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.

Re: TinyPortal for Elkarte

Reply #24

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!

Re: TinyPortal for Elkarte

Reply #25

@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

Re: TinyPortal for Elkarte

Reply #26

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 ...
Last Edit: March 21, 2022, 05:01:30 pm by Spuds

Re: TinyPortal for Elkarte

Reply #27

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.

Re: TinyPortal for Elkarte

Reply #28

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.

Re: TinyPortal for Elkarte

Reply #29

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.