TinyPortal

Elkarte TinyPortal => Elk TinyPortal Issues => Topic started by: tino on January 05, 2021, 01:55:34 PM

Title: Elkarte TinyPortal Testing
Post by: tino on January 05, 2021, 01:55:34 PM
Hi All,

The latest copy of TinyPortal for Elkarte is available here;

https://tinoest.co.uk/forum/index.php?page=ElkTinyPortal

I would appreciate it if some of you can test it, obviously if you're using SMF and have no wish to change then it isn't for you.

Can you raise any issues you find in this topic, or on Github and I shall work through them all. 

tino
Title: Re: Elkarte TinyPortal Testing
Post by: Oldiesmann on January 24, 2021, 09:29:03 PM
I've still got an ElkArte test site... I'll put TP on it later and play with it some :)
Title: Re: Elkarte TinyPortal Testing
Post by: lurkalot on January 24, 2021, 11:01:48 PM
Hi Oldies, not sure what versions of Elkarte it's compatible with, tino did say at some point. I'm sure he'll let us know if that's an issue.
Title: Re: Elkarte TinyPortal Testing
Post by: tino on January 25, 2021, 12:15:24 AM
It's compatible with Elkarte 1.1.x, I'm currently working on a new branch compatible with 2.0.x
Title: Re: Elkarte TinyPortal Testing
Post by: @rjen on January 30, 2021, 07:52:47 AM
Finally got around to installing TinyPortal for Elkarte.

- First thing I noticed are the text formatting issues in de admin area: setting captions are printed in Bold, due to the font-weight: 600; in the css for .settings label. I personally find that a bit invasive...

See that some entries are not in bold, because I did not 'label' all fields...
Hmm, might be something I will pick up in SMF to prevent similar issues with SMF themes. Not a big issues, just does not look good...

- Second thing I noticed is that the tooltips don't work...

- Block styles definately need cleaning up: the block styles that made some sort of sense in SMF now all look the same in the Elkarte theme

- Check the style in tp-style.css

dl.tptitle dt {
    float: left;
    width: 40%;

The 40% should be changed to 39%: the Elkarte theme does not like this. See the "Edit Article" Title and Short name section what I mean...

(I'll update this in SMF too, maybe some SMF themes will do the same...)

- I cannot create a new Article Category from the list page.

Results in error: "The database value you're trying to insert does not exist: item_type"

- Trying to upload an article icon results in error: Call to undefined function fatal_error()

In general I noticed that the Elkarte theme indicates some layout errors in the TinyPortal templates, that SMF 2.0 and 2.1 did not show.  :doh:
Title: Re: Elkarte TinyPortal Testing
Post by: tino on January 30, 2021, 10:16:10 AM
Thanks for testing, I'll look at those errors.

The block templates is on my list of things to fix, I made a stab at in the development branch. I think also the category error is fixed in that one.

I don't mind the bold on the labels, I was going to move them all across to that. I'll add a subclass so they can be styled though.

Thanks again for testing.
Title: Re: Elkarte TinyPortal Testing
Post by: @rjen on January 30, 2021, 11:05:09 AM
No problem, if you don't mind I can submits some of the layout stuff to your development branch...

It would be nice to keep SMF and Elk branch a little bit in sync, even though with all your changes to the Elk version there is not a lot of synergy left...

Mind you: if youhave fixes / improvements that we can leverage in the SMF version (like for example the block layouts) please let me know ...
Title: Re: Elkarte TinyPortal Testing
Post by: tino on January 30, 2021, 12:38:35 PM
Quote from: @rjen on January 30, 2021, 11:05:09 AM
No problem, if you don't mind I can submits some of the layout stuff to your development branch...

It would be nice to keep SMF and Elk branch a little bit in sync, even though with all your changes to the Elk version there is not a lot of synergy left...

Mind you: if youhave fixes / improvements that we can leverage in the SMF version (like for example the block layouts) please let me know ...

You're more than welcome to contribute against it. Styling isn't my thing. I've only got the article logic to change then, I'll be adding the downloads, menu and gallery sections.

It's mostly the same, just moved around a fair bit. If I'm honest it'll also work ok SMF with minor changes for the styles. It's I feel cleaner on the ones I have moved across, but that might be as I know the code in more detail now.
Title: Re: Elkarte TinyPortal Testing
Post by: @rjen on January 30, 2021, 12:40:36 PM
Gallery sections?
Title: Re: Elkarte TinyPortal Testing
Post by: tino on January 30, 2021, 01:05:21 PM
Quote from: @rjen on January 30, 2021, 12:40:36 PM
Gallery sections?

Yeh, I'll merge what I did for YAPortal into TinyPortal and tidy up the display side. It'll also take the download logic from there largely with the front section taking bits from TinyPortal.
Title: Re: Elkarte TinyPortal Testing
Post by: tino on January 30, 2021, 08:54:42 PM
Quote from: @rjen on January 30, 2021, 07:52:47 AM

- I cannot create a new Article Category from the list page.

Results in error: "The database value you're trying to insert does not exist: item_type"


That was in a different place to I expected but is now fixed, along with the clone button.

I'll work on the other issues you raised later.
Title: Re: Elkarte TinyPortal Testing
Post by: @rjen on January 31, 2021, 05:10:38 PM
Just testing the development branch again, not sure how stable that is supposed to be?
Hmmm: I uninstalled and removed all data then reinstalled, and now it is looking better ...

Couple of observations:

Main admin page for Tinyportal gone
Is that on purpose?

Submit a new article:
Article is saved, but returns with:

An Error Has Occurred
Unable to load the 'main' template.

Cannot create article in a block
Editing a block and press save then assign the article: the selected option is not saved..

Aftre that the blocks cannot be edited: An Error Has Occurred
Database error, given array of integer values is empty. (cat)

Title: Re: Elkarte TinyPortal Testing
Post by: @rjen on January 31, 2021, 05:23:31 PM
Trying to change block sequence:
An Error Has Occurred
call_user_func() expects parameter 1 to be a valid callback, function 'template_tparticles' not found or invalid function name
Title: Re: Elkarte TinyPortal Testing
Post by: tino on January 31, 2021, 06:13:27 PM
Quote from: @rjen on January 31, 2021, 05:10:38 PM
Just testing the development branch again, not sure how stable that is supposed to be?
Hmmm: I uninstalled and removed all data then reinstalled, and now it is looking better ...

Couple of observations:

Main admin page for Tinyportal gone
Is that on purpose?


Do you mean the main page with the icons? I didn't see the need for it myself.

Quote from: @rjen on January 31, 2021, 05:10:38 PM
Submit a new article:
Article is saved, but returns with:

An Error Has Occurred
Unable to load the 'main' template.

Cannot create article in a block
Editing a block and press save then assign the article: the selected option is not saved..

Aftre that the blocks cannot be edited: An Error Has Occurred
Database error, given array of integer values is empty. (cat)

I'm working on the Article logic, it's not finished yet, it's in a half changed state.
Title: Re: Elkarte TinyPortal Testing
Post by: @rjen on January 31, 2021, 06:15:27 PM
I figured that much. I'll leave you to it then ... give me a shout when it's testable...
Title: Re: Elkarte TinyPortal Testing
Post by: tino on January 31, 2021, 06:20:05 PM
Quote from: @rjen on January 31, 2021, 05:23:31 PM
Trying to change block sequence:
An Error Has Occurred
call_user_func() expects parameter 1 to be a valid callback, function 'template_tparticles' not found or invalid function name

That's sorted, my template changes got lost somewhere for that one.
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 04, 2021, 01:56:05 PM
The above should all be fixed now, although the template error's probably still remain. I need to look at the block banner styling but not sure where to start.

The latest is available here https://github.com/Tinyportal/ElkTP/archive/master.zip

I will be packaging up a zip for RC2 later this week.
Title: Re: Elkarte TinyPortal Testing
Post by: @rjen on February 04, 2021, 08:16:05 PM
Just installed it and played around a bit: created a category, created an article, put it on the frontpage. All working OK.

Did you put the TinyPortal back in the original place? Now it is pretty much what I wanted for SMF: both options avialable...

I am already missing the menu manager: no option to put an article or category page in the menu  :(

I will spend some more time on it in the weekend and report back...
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 04, 2021, 08:32:58 PM
Quote from: @rjen on February 04, 2021, 08:16:05 PM
Just installed it and played around a bit: created a category, created an article, put it on the frontpage. All working OK.

Did you put the TinyPortal back in the original place? Now it is pretty much what I wanted for SMF: both options avialable...

I am already missing the menu manager: no option to put an article or category page in the menu  :(

I will spend some more time on it in the weekend and report back...

I used the hide menu option so you can hide it if you wish, otherwise it's in both places. Which I preferred.

I'll no doubt add the menu back in, along with the other parts as I mentioned before.
Title: Re: Elkarte TinyPortal Testing
Post by: @rjen on February 04, 2021, 08:47:36 PM
Would you be willing to make those changes on the SMF version too? ( move to admin section I mean?)

In exchange I'll give the ELK version some good beta testing for you...
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 04, 2021, 08:55:50 PM
Quote from: @rjen on February 04, 2021, 08:47:36 PM
Would you be willing to make those changes on the SMF version too? ( move to admin section I mean?)

In exchange I'll give the ELK version some good beta testing for you...

Considering the amount of time I've spent on TinyPortal for SMF I find that offer quite offensive.

If I get the time I'll look at it, it's quite in depth though and requires a fair amount of changes, having the menu at the top point to the admin sections once changed is the easy part.
Title: Re: Elkarte TinyPortal Testing
Post by: @rjen on February 04, 2021, 09:17:22 PM
No need to be offended, I know how much time you put in  (I put in quite a bit myself). No is also an acceptable answer.

I am going to support Elk beta testing regardless...
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 04, 2021, 09:46:30 PM
If I do find the the time, I will port it back. The issue is the changes were made easier by everything else I've changed along the way, which is about 20 hours dev work to get it to where it is now.

There might be a short cut I can use, but I'm not sure.
Title: Re: Elkarte TinyPortal Testing
Post by: @rjen on February 04, 2021, 09:49:10 PM
Yeah, I understand : the code base is already quite different.... never mind
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 04, 2021, 09:55:40 PM
Quote from: @rjen on February 04, 2021, 09:49:10 PM
Yeah, I understand : the code base is already quite different.... never mind

Interestingly porting what I have for Elkarte now back to SMF is not as difficult. It just lacks the menu, downloads and shoutbox  ::)
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 04, 2021, 10:07:25 PM

Adding this to Integrate.php might work...


    public static function hookAdminAreas(&$adminAreas) {{{
        global $txt;

        loadLanguage('TPortal');
        loadLanguage('TPortalAdmin');

        $adminAreas['tpadmin'] = array (
            'title' => $txt['tp-tphelp'],
            'permission' => array ('admin_forum', 'tp_articles', 'tp_blocks', 'tp_settings'),
            'areas' => array (
                'tpsettings' => array (
                    'label'       => $txt['tp-adminheader1'],
                    'function'    => 'TPortalAdmin',
                    'file'        => $sourcedir.'/TPortalAdmin.php',
                    'permission'  => array ( 'admin_forum', 'tp_settings' ),
                    'subsections' => array (
                        'settings'      => array ( $txt['tp-settings'] ),
                        'frontpage'     => array ( $txt['tp-frontpage'] ),
                    ), 
                ), 
                'tparticles' => array (
                    'label'       => $txt['tp-articles'],
                    'function'    => 'TPortalAdmin',
                    'file'        => $sourcedir.'/TPortalAdmin.php',
                    'permission'  => array ( 'admin_forum', 'tp_articles' ),
                    'subsections' => array (
                        'articles'      => array ( $txt['tp-articles'] ),
                        'categories'    => array ( $txt['tp-tabs5'] ),
                    ), 
                ), 
                'tpblocks' => array (
                    'label'       => $txt['tp-adminpanels'],
                    'function'    => 'TPortalAdmin',
                    'file'        => $sourcedir.'/TPortalAdmin.php',
                    'permission'  => array ( 'admin_forum', 'tp_blocks' ),
                    'subsections' => array (
                        'blocks'        => array ( $txt['tp-blocks'] ),
                        'panels'        => array ( $txt['tp-panels'] ),
                    ), 
                ), 
            ), 
        ); 
       
    }}}


And this to the hook's array at the top


'admin_areas'                       => 'TinyPortal\Integrate::hookAdminAreas',
Title: Re: Elkarte TinyPortal Testing
Post by: @rjen on February 05, 2021, 07:43:37 AM
Wow, that is surprisingly simple!

The basics work, just getting some errors that I need to look into, but I am sure I'll figure that out..

Type of error: Undefined
8: Undefined variable: sourcedir
https://test2.fjr-club.nl/index.php?action=admin;area=logs;sa=errorlog;desc
/home/deb77453/domains/fjr-club.nl/public_html/test2/TinyPortal/Integrate.php (Line 972)

Menu icons are not there yet and I may need to put the menu mamager, download an shoutbox links back...

that will be later, now I need to get to my paid work...
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 05, 2021, 01:40:59 PM
Quote from: @rjen on February 05, 2021, 07:43:37 AM
Wow, that is surprisingly simple!

The basics work, just getting some errors that I need to look into, but I am sure I'll figure that out..

Type of error: Undefined
8: Undefined variable: sourcedir
https://test2.fjr-club.nl/index.php?action=admin;area=logs;sa=errorlog;desc
/home/deb77453/domains/fjr-club.nl/public_html/test2/TinyPortal/Integrate.php (Line 972)

Menu icons are not there yet and I may need to put the menu mamager, download an shoutbox links back...

that will be later, now I need to get to my paid work...

$sourcedir is as I forgot to declare it as a global.

I think the issues will be with the admin section disappearing when you click on another link. It might be as simple as replacing all the instances of action=tpadmin with action=admin;area=tpadmin;

I'll have a look in to it later if I get the chance.
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 06, 2021, 10:22:06 PM
Im just rewriting the final parts of the back end code and then should be finished with the first pass, although this last update is quite major and removes any kind of semblance with what was once TinyPortal as everything will be in its own namespace away from Elkarte, which means it will work with Elkarte 2.0 :)

Then it's the templates and changing the code to use css grids and or flex.

Menu should be back in sometime next week, although it's nothing like the TinyPortal one in its looks. Functionality is similar although it will be for any internal menu or a list with sub menu items.

Gallery is then on my list, as mentioned before and Downloads will follow soon after as the code will be pretty much the same.

Then I'll look at the shoutbox, after all that I'll be done and it should be stable and at a releasable state. ( not that it doesn't work now )

Title: Re: Elkarte TinyPortal Testing
Post by: lurkalot on February 07, 2021, 01:04:46 AM
Quote from: tino on February 06, 2021, 10:22:06 PM
Im just rewriting the final parts of the back end code and then should be finished with the first pass, although this last update is quite major and removes any kind of semblance with what was once TinyPortal as everything will be in its own namespace away from Elkarte, which means it will work with Elkarte 2.0 :)

Then it's the templates and changing the code to use css grids and or flex.

Menu should be back in sometime next week, although it's nothing like the TinyPortal one in its looks. Functionality is similar although it will be for any internal menu or a list with sub menu items.

Gallery is then on my list, as mentioned before and Downloads will follow soon after as the code will be pretty much the same.

Then I'll look at the shoutbox, after all that I'll be done and it should be stable and at a releasable state. ( not that it doesn't work now )

I'll be giving this a test when ready tino.  Shame the sub menu's didn't make it into TP for SMF, that was much needed imo.  But sounds like ElkTinyPortal is comming along nicely.  ;)
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 07, 2021, 02:46:55 PM
Here is the latest RC release before I add the menu and other features back in. It should be stable but I expect that there will be some issues. Also I haven't provided an upgrade path from RC1 to RC2 so there might be some issues due to that mainly to do with the images and folder structure changing.

https://github.com/Tinyportal/ElkTP/releases/tag/V1.0.0-RC2
Title: Re: Elkarte TinyPortal Testing
Post by: lurkalot on February 07, 2021, 04:14:10 PM
Will need to check what I did, but at the moment it broke stuff.  I have this error in log,

Type of error: Undefined
Exception: Call to undefined function TinyPortal\Model\is_countable()
http://elkarte2.test/index.php?
File: C:/laragon/www/elkarte2/TinyPortal/Model/Subs.php
Line: 1617
Title: Re: Elkarte TinyPortal Testing
Post by: lurkalot on February 07, 2021, 04:35:21 PM
I had uninstalled RC1 (with the remove all data option) prior to trying RC2.

Also had to delete the RC1 package before it would let me upload RC2 because of this,

"The package you are trying to upload already exists on the server under file name: ElkTP-V1.0.0-RC1.zip"
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 07, 2021, 04:36:13 PM
Quote from: lurkalot on February 07, 2021, 04:14:10 PM
Will need to check what I did, but at the moment it broke stuff.  I have this error in log,

Type of error: Undefined
Exception: Call to undefined function TinyPortal\Model\is_countable()
http://elkarte2.test/index.php?
File: C:/laragon/www/elkarte2/TinyPortal/Model/Subs.php
Line: 1617

I need to up the minimal php version, that's version 7.3 or greater as I removed the polyfill.
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 07, 2021, 04:38:07 PM
Quote from: lurkalot on February 07, 2021, 04:35:21 PM
I had uninstalled RC1 (with the remove all data option) prior to trying RC2.

Also had to delete the RC1 package before it would let me upload RC2 because of this,

"The package you are trying to upload already exists on the server under file name: ElkTP-V1.0.0-RC1.zip"

I don't know how you got that? As the latest link calls it RC2. The original in the first post  is still RC1 as I've not released RC2 formally yet.
Title: Re: Elkarte TinyPortal Testing
Post by: lurkalot on February 07, 2021, 04:41:52 PM
It was actually running the very first version I was trying from a few weeks ago.  ???

My local is running PHP: 7.2.19
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 07, 2021, 04:45:24 PM
Quote from: lurkalot on February 07, 2021, 04:41:52 PM
It was actually running the very first version I was trying from a few weeks ago.  ???

My local is running PHP: 7.2.19

I don't intend to support less than php 7.3 as all other php versions are EOL.

I can create a polyfill package for it ( I use one on my site ) but I don't really want to have it as default as it just increases my testing time which is already limited.

Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 07, 2021, 04:46:59 PM
Add this to the bottom of Load.php if you want it to work on PHP7.2

https://github.com/PHPWatch/is_countable-polyfill/blob/master/src/is_countable.php
Title: Re: Elkarte TinyPortal Testing
Post by: lurkalot on February 07, 2021, 04:53:42 PM
Quote from: tino on February 07, 2021, 04:46:59 PM
Add this to the bottom of Load.php if you want it to work on PHP7.2

https://github.com/PHPWatch/is_countable-polyfill/blob/master/src/is_countable.php

Thanks I will give that a try.  I'd rather not update my local atm, as I'm in the middles of something, and I just know I'd lose it.
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 07, 2021, 04:57:38 PM
You should really update it to the latest php 7.2 I think it's php 7.2.34.

Title: Re: Elkarte TinyPortal Testing
Post by: lurkalot on February 07, 2021, 05:03:40 PM
Quote from: tino on February 07, 2021, 04:46:59 PM
Add this to the bottom of Load.php if you want it to work on PHP7.2

https://github.com/PHPWatch/is_countable-polyfill/blob/master/src/is_countable.php

That worked. Thanks.  O0 Now time to play.
Title: Re: Elkarte TinyPortal Testing
Post by: lurkalot on February 07, 2021, 05:12:14 PM
Ooh, what happened to the TP admin page with the icons, it was there last time I tried it?
Title: Re: Elkarte TinyPortal Testing
Post by: @rjen on February 07, 2021, 05:21:37 PM
It's gone (I already asked)
Title: Re: Elkarte TinyPortal Testing
Post by: lurkalot on February 07, 2021, 05:31:36 PM
Quote from: @rjen on February 07, 2021, 05:21:37 PM
It's gone (I already asked)

I haven't tested it since RC1 so until today wasn't aware it had gone. Obviously I knew the admin had moved into the ElkArte admin section because it was like this in the first I tried, but then you could get back to the original TP admin page from there. You can't now.
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 07, 2021, 05:31:49 PM
Quote from: lurkalot on February 07, 2021, 05:12:14 PM
Ooh, what happened to the TP admin page with the icons, it was there last time I tried it?

I didn't see what it added. It's not completely removed (yet) but as you can access everything from the top menu or the side. Then I see no need for it.
Title: Re: Elkarte TinyPortal Testing
Post by: lurkalot on February 07, 2021, 05:40:06 PM
I always found it quite a nice touch, it's been there in TP since birth, so got rather attached to it.  ;)
Title: Re: Elkarte TinyPortal Testing
Post by: @rjen on February 07, 2021, 08:37:41 PM
Just installed the latest version, but it does not seem to find any texts...
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 07, 2021, 09:07:47 PM
Quote from: @rjen on February 07, 2021, 08:37:41 PM
Just installed the latest version, but it does not seem to find any texts...

It 'should' do.

Or are you using non english ones? Although it should fall back to the old location.

If you go to TinyPortal\ModelSubs.php and change the loadLanguage function to this;

    public function loadLanguage($template_name, $lang = '', $fatal = true, $force_reload = false) {{{
        global $user_info, $language, $txt;
       
        if ($lang == '') {
            $lang = isset($user_info['language']) ? $user_info['language'] : $language;
        }
           
        foreach( array ( $lang, 'english' ) as $l) {
            $filePath = BOARDDIR . '/TinyPortal/Views/languages/'.$l.'/'.$template_name.'.'.$l.'.php';
            if(file_exists($filePath)) {
                require_once($filePath);
                return $lang;
            }
        }

        return \loadLanguage($template_name, $lang, $fatal, $force_reload);
       
    }}}


It might work correctly.
Title: Re: Elkarte TinyPortal Testing
Post by: @rjen on February 07, 2021, 09:17:50 PM
Just removed the old install completely and installed the new package
Title: Re: Elkarte TinyPortal Testing
Post by: lurkalot on February 07, 2021, 10:02:35 PM
Methinks I'll start again with a fresh install of ElkArte before trying this again.   
Title: Re: Elkarte TinyPortal Testing
Post by: lurkalot on February 07, 2021, 10:35:00 PM
OK, clean install of ElkArte and ElkTinyPortal RC2

Straight out of the box and without changing anything, I'm getting a error on page when adding a html/javascript block,

"Call to undefined method TinyPortal\Model\Subs::get_boards()"
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 07, 2021, 10:44:52 PM
Quote from: lurkalot on February 07, 2021, 10:35:00 PM
OK, clean install of ElkArte and ElkTinyPortal RC2

Straight out of the box and without changing anything, I'm getting a error on page when adding a html/javascript block,

"Call to undefined method TinyPortal\Model\Subs::get_boards()"

Must of missed that one when converting them across. It should be TPSubs::getInstance()->boards()
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 07, 2021, 11:09:13 PM
There will probably be a few of those around, I tried to change most but I'm sure I've missed more than a few.
Title: Re: Elkarte TinyPortal Testing
Post by: lurkalot on February 07, 2021, 11:12:57 PM
Quote from: tino on February 07, 2021, 10:44:52 PM

Must of missed that one when converting them across. It should be TPSubs::getInstance()->boards()


Thanks.

Just about to clean install ElkArte again, my last install (ElkArte, not TP) did something strange.  Or should I say I did.  :-[ Seems if it takes a while to install and you happen to click the continue button while you're waiting it adds duplicate membergroups. Think this is a bug in ElkArte.
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 08, 2021, 12:43:34 AM
Just rebuilt the tag with the bug fixes in for what you raised.
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 08, 2021, 12:44:03 AM
Quote from: @rjen on February 07, 2021, 09:17:50 PM
Just removed the old install completely and installed the new package

Did that resolve the language file issue?
Title: Re: Elkarte TinyPortal Testing
Post by: @rjen on February 08, 2021, 08:35:50 AM
Quote from: tino on February 08, 2021, 12:44:03 AM
Quote from: @rjen on February 07, 2021, 09:17:50 PM
Just removed the old install completely and installed the new package

Did that resolve the language file issue?

Installed the updated package and the language issue is now solved.
Title: Re: Elkarte TinyPortal Testing
Post by: lurkalot on February 08, 2021, 07:53:58 PM
Another one for you tino.

Clicking the View Article link gives error on page, only if the article is not Approved, or Not Active. It has to have both set to Approved and Active before you can view the article.

Call to undefined function TinyPortal\Controller\TP_error()

And these in log,

ype of error: General
Unknown Error: Non-static method TinyPortal\Model\Subs::chain() should not be called statically
http://elkarte4.test/index.php?action=admin;area=tparticles;sa=editarticle;article=1
File: C:/laragon/www/elkarte4/TinyPortal/Model/Article.php
Line: 597

   Type of error: General
Unknown Error: Non-static method TinyPortal\Model\Subs::chain() should not be called statically
http://elkarte4.test/index.php?action=admin;area=tparticles;sa=articles;cu=3
File: C:/laragon/www/elkarte4/TinyPortal/Model/Article.php
Line: 597

Type of error: General
Unknown Error: Non-static method TinyPortal\Model\Subs::chain() should not be called statically
http://elkarte4.test/index.php?action=admin;area=tparticles;sa=articles
File: C:/laragon/www/elkarte4/TinyPortal/Model/Article.php
Line: 597
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 08, 2021, 09:04:02 PM
Thanks, I'll sort those later tonight.

Same issue as last time. I haven't moved it all across it seems.
Title: Re: Elkarte TinyPortal Testing
Post by: lurkalot on February 08, 2021, 10:21:14 PM
Quote from: tino on February 08, 2021, 09:04:02 PM
Thanks, I'll sort those later tonight.

Same issue as last time. I haven't moved it all across it seems.

tino, I'm guessing this error is also stopping the articles displaying on the front page, and the reason the "Toggle show on front page" button wont stay selected? If not there's another issue.

Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 08, 2021, 10:44:34 PM
Quote from: lurkalot on February 08, 2021, 10:21:14 PM
Quote from: tino on February 08, 2021, 09:04:02 PM
Thanks, I'll sort those later tonight.

Same issue as last time. I haven't moved it all across it seems.

tino, I'm guessing this error is also stopping the articles displaying on the front page, and the reason the "Toggle show on front page" button wont stay selected? If not there's another issue.

If it's showing an error in the log when you press them then yes that's it.

I'll check them both out later, I thought there would be loads of issues after my last change as it was the biggest one.
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 09, 2021, 12:57:49 AM
Quote from: lurkalot on February 08, 2021, 10:21:14 PM
Quote from: tino on February 08, 2021, 09:04:02 PM
Thanks, I'll sort those later tonight.

Same issue as last time. I haven't moved it all across it seems.

tino, I'm guessing this error is also stopping the articles displaying on the front page, and the reason the "Toggle show on front page" button wont stay selected? If not there's another issue.

Those are all fixed.
Title: Re: Elkarte TinyPortal Testing
Post by: lurkalot on February 09, 2021, 07:58:58 AM
Quote from: tino on February 09, 2021, 12:57:49 AM
Quote from: lurkalot on February 08, 2021, 10:21:14 PM
Quote from: tino on February 08, 2021, 09:04:02 PM
Thanks, I'll sort those later tonight.

Same issue as last time. I haven't moved it all across it seems.

tino, I'm guessing this error is also stopping the articles displaying on the front page, and the reason the "Toggle show on front page" button wont stay selected? If not there's another issue.

Those are all fixed.


Ok, seems to work, and articles now show on front page, and the "Toggle show on front page" button button sticks as it should, but it's still putting a error in the log when you toggle it,

Type of error: Template
Unable to load the 'main' template.
http://elkarte4.test/index.php?action=admin;area=tparticles;sa=ajax;artfront=1;ai9o9N4=ok704c6q80iab6lwIostvdYvfNXb91Tr
File: C:/laragon/www/elkarte4/sources/Templates.class.php
Line: 510
[/quote]
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 09, 2021, 04:21:21 PM
Quote from: lurkalot on February 09, 2021, 07:58:58 AM
Quote from: tino on February 09, 2021, 12:57:49 AM
Quote from: lurkalot on February 08, 2021, 10:21:14 PM
Quote from: tino on February 08, 2021, 09:04:02 PM
Thanks, I'll sort those later tonight.

Same issue as last time. I haven't moved it all across it seems.

tino, I'm guessing this error is also stopping the articles displaying on the front page, and the reason the "Toggle show on front page" button wont stay selected? If not there's another issue.

Those are all fixed.


Ok, seems to work, and articles now show on front page, and the "Toggle show on front page" button button sticks as it should, but it's still putting a error in the log when you toggle it,

Type of error: Template
Unable to load the 'main' template.
http://elkarte4.test/index.php?action=admin;area=tparticles;sa=ajax;artfront=1;ai9o9N4=ok704c6q80iab6lwIostvdYvfNXb91Tr
File: C:/laragon/www/elkarte4/sources/Templates.class.php
Line: 510
Thanks, that's now fixed. Are there any other errors?
Title: Re: Elkarte TinyPortal Testing
Post by: lurkalot on February 09, 2021, 05:38:17 PM
Well, just found another one,

How to redirect after login > Redirect to frontpage gives a error when you logout.

This one on page,

Database Error
Please try again. If you come back to this error screen, report the error to an administrator.

And this one in log.

Type of error: Database
Database Error: Unknown column 'var.access' in 'where clause'
http://elkarte4.test/index.php?
File: C:/laragon/www/elkarte4/TinyPortal/Model/Database.php
Line: 43
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 09, 2021, 05:42:29 PM
Quote from: lurkalot on February 09, 2021, 05:38:17 PM
Well, just found another one,

How to redirect after login > Redirect to frontpage gives a error when you logout.

This one on page,

Database Error
Please try again. If you come back to this error screen, report the error to an administrator.

And this one in log.

Type of error: Database
Database Error: Unknown column 'var.access' in 'where clause'
http://elkarte4.test/index.php?
File: C:/laragon/www/elkarte4/TinyPortal/Model/Database.php
Line: 43

I wonder if that's also a bug in TinyPortal for SMF, as I don't recall changing that.
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 09, 2021, 05:45:25 PM
Quote from: tino on February 09, 2021, 05:42:29 PM
Quote from: lurkalot on February 09, 2021, 05:38:17 PM
Well, just found another one,

How to redirect after login > Redirect to frontpage gives a error when you logout.

This one on page,

Database Error
Please try again. If you come back to this error screen, report the error to an administrator.

And this one in log.

Type of error: Database
Database Error: Unknown column 'var.access' in 'where clause'
http://elkarte4.test/index.php?
File: C:/laragon/www/elkarte4/TinyPortal/Model/Database.php
Line: 43

I wonder if that's also a bug in TinyPortal for SMF, as I don't recall changing that.

I also can't replicate it. What is set to display on your frontpage?
Title: Re: Elkarte TinyPortal Testing
Post by: lurkalot on February 09, 2021, 05:55:18 PM
Quote from: tino on February 09, 2021, 05:45:25 PM

I also can't replicate it. What is set to display on your frontpage?

Just one html article, and also one html block which reside in the left panel.  These are in addition to the stock blocks.

And in front page settings I have, What to display on frontpage set to "Only articles"
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 09, 2021, 06:17:14 PM
Quote from: lurkalot on February 09, 2021, 05:55:18 PM
Quote from: tino on February 09, 2021, 05:45:25 PM

I also can't replicate it. What is set to display on your frontpage?

Just one html article, and also one html block which reside in the left panel.  These are in addition to the stock blocks.

And in front page settings I have, What to display on frontpage set to "Only articles"

Does that give the error as a guest user? I don't think it's related to that setting.

Also what is the structure of your tp_categories table?
Title: Re: Elkarte TinyPortal Testing
Post by: lurkalot on February 09, 2021, 08:14:12 PM
Quote from: tino on February 09, 2021, 06:17:14 PM

Does that give the error as a guest user? I don't think it's related to that setting.


Well you say that but it doesn't give the error if you select "Only forum-topics" etc, so that's what made me think it's something to do with that setting.  It gives me the error on page as soon as I click logout when that setting is set.

Table structure, in screenshot below.
Title: Re: Elkarte TinyPortal Testing
Post by: @rjen on February 09, 2021, 08:24:07 PM
Installed latest version and again all the language strings are missing
Title: Re: Elkarte TinyPortal Testing
Post by: lurkalot on February 09, 2021, 08:48:04 PM
Another.

Front page setting "Go directly to forum index" doesn't seem to show the forum index, just the blocks and panels showing,
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 09, 2021, 08:50:02 PM
Quote from: lurkalot on February 09, 2021, 08:48:04 PM
Another.

Front page setting "Go directly to forum index" doesn't seem to show the forum index, just the blocks and panels showing,

I don't know what's going on. That and the other issue are fine for me.

Your db has the right values in it. So it's not that.
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 09, 2021, 08:51:16 PM
Quote from: @rjen on February 09, 2021, 08:24:07 PM
Installed latest version and again all the language strings are missing

What changed? Is this development or the RC2?

I've not made any changes since you raised it last time, then it seemed to work again.

What language is you user / forum currently set to?
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 09, 2021, 08:53:10 PM
Quote from: lurkalot on February 09, 2021, 08:14:12 PM
Quote from: tino on February 09, 2021, 06:17:14 PM

Does that give the error as a guest user? I don't think it's related to that setting.


Well you say that but it doesn't give the error if you select "Only forum-topics" etc, so that's what made me think it's something to do with that setting.  It gives me the error on page as soon as I click logout when that setting is set.

Table structure, in screenshot below.

I meant the redirect setting not the front page one. I can see why the article_only would if you didn't have the table correct, but you do...
Title: Re: Elkarte TinyPortal Testing
Post by: @rjen on February 09, 2021, 08:56:49 PM
Quote from: tino on February 09, 2021, 08:51:16 PM
Quote from: @rjen on February 09, 2021, 08:24:07 PM
Installed latest version and again all the language strings are missing

What changed? Is this development or the RC2?

I've not made any changes since you raised it last time, then it seemed to work again.

What language is you user / forum currently set to?

That's the development branche... should I use another one? I am not sure which branch to use...
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 09, 2021, 09:33:47 PM
Quote from: @rjen on February 09, 2021, 08:56:49 PM
Quote from: tino on February 09, 2021, 08:51:16 PM
Quote from: @rjen on February 09, 2021, 08:24:07 PM
Installed latest version and again all the language strings are missing

What changed? Is this development or the RC2?

I've not made any changes since you raised it last time, then it seemed to work again.

What language is you user / forum currently set to?

That's the development branche... should I use another one? I am not sure which branch to use...

Tbh atm doesn't really matter, development has the start of the menu, gallery and downloads in it. That's about the only change.

The RC2 was just going to be stable, although lurkalot is getting errors I can't replicate as are you.
Title: Re: Elkarte TinyPortal Testing
Post by: lurkalot on February 09, 2021, 11:49:22 PM
Quote from: tino on February 09, 2021, 08:50:02 PM
Quote from: lurkalot on February 09, 2021, 08:48:04 PM
Another.

Front page setting "Go directly to forum index" doesn't seem to show the forum index, just the blocks and panels showing,

I don't know what's going on. That and the other issue are fine for me.

Your db has the right values in it. So it's not that.

Yes very strange.  Setting it to "Go directly to forum index" doesn't cause any errors, but also both the Home, and Community tabs are showing where it should just show the Community tab.

Would be interesting to see if @rjen is having the same issues. This was a fresh install of ElkArte 1.1.6 with ElkTP RC2 from your rebuilt tag https://github.com/Tinyportal/ElkTP/releases/tag/V1.0.0-RC2
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 09, 2021, 11:55:39 PM
Quote from: lurkalot on February 09, 2021, 11:49:22 PM
Quote from: tino on February 09, 2021, 08:50:02 PM
Quote from: lurkalot on February 09, 2021, 08:48:04 PM
Another.

Front page setting "Go directly to forum index" doesn't seem to show the forum index, just the blocks and panels showing,

I don't know what's going on. That and the other issue are fine for me.

Your db has the right values in it. So it's not that.

Yes very strange.  Setting it to "Go directly to forum index" doesn't cause any errors, but also both the Home, and Community tabs are showing where it should just show the Community tab.

That's not happening for me either...
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 10, 2021, 01:00:40 AM
Quote from: lurkalot on February 09, 2021, 11:49:22 PM
Quote from: tino on February 09, 2021, 08:50:02 PM
Quote from: lurkalot on February 09, 2021, 08:48:04 PM
Another.

Front page setting "Go directly to forum index" doesn't seem to show the forum index, just the blocks and panels showing,

I don't know what's going on. That and the other issue are fine for me.

Your db has the right values in it. So it's not that.

Yes very strange.  Setting it to "Go directly to forum index" doesn't cause any errors, but also both the Home, and Community tabs are showing where it should just show the Community tab.

Would be interesting to see if @rjen is having the same issues. This was a fresh install of ElkArte 1.1.6 with ElkTP RC2 from your rebuilt tag https://github.com/Tinyportal/ElkTP/releases/tag/V1.0.0-RC2

I have managed to replicate the go directly to board index one, that was an issue with my install and it not setting correctly. That's now sorted.
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 10, 2021, 01:07:09 AM
Quote from: lurkalot on February 09, 2021, 05:38:17 PM
Well, just found another one,

How to redirect after login > Redirect to frontpage gives a error when you logout.

This one on page,

Database Error
Please try again. If you come back to this error screen, report the error to an administrator.

And this one in log.

Type of error: Database
Database Error: Unknown column 'var.access' in 'where clause'
http://elkarte4.test/index.php?
File: C:/laragon/www/elkarte4/TinyPortal/Model/Database.php
Line: 43

Ok managed to replicate this one also, it seems I needed an non admin account when you logged out which causes the error. Guests are ok it seems weirdly.
Title: Re: Elkarte TinyPortal Testing
Post by: lurkalot on February 10, 2021, 01:16:54 AM
Glad you managed to replicate those issues tino. O0 I'll test again when fixed and see if I can find anything else.
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 10, 2021, 01:26:50 AM
Quote from: lurkalot on February 10, 2021, 01:16:54 AM
Glad you managed to replicate those issues tino. O0 I'll test again when fixed and see if I can find anything else.

They are now fixed, just rebuilt the tag.
Title: Re: Elkarte TinyPortal Testing
Post by: lurkalot on February 10, 2021, 07:40:31 AM
Quote from: tino on February 10, 2021, 01:26:50 AM

They are now fixed, just rebuilt the tag.


- Yep, all those errors appear to have gone. :tick:

- setting "Go directly to forum index" also working properly. :tick: 

- How to redirect after login:  Redirect to forum / Redirect to frontpage. Also working properly. :tick:

So far so good tino.  O0
Title: Re: Elkarte TinyPortal Testing
Post by: @rjen on February 10, 2021, 07:54:11 AM
Quote from: tino on February 09, 2021, 08:51:16 PM
Quote from: @rjen on February 09, 2021, 08:24:07 PM
Installed latest version and again all the language strings are missing

What changed? Is this development or the RC2?

I've not made any changes since you raised it last time, then it seemed to work again.

What language is you user / forum currently set to?

Just downloaded the tagged version and that is fine... there is something funny going on with those languages. FYI: in the test install I have no other languages than English (default)
Title: Re: Elkarte TinyPortal Testing
Post by: @rjen on February 10, 2021, 07:59:57 AM
I am seeing these errors in Elkarte ... they start popping up after TinyPortal is installed...

Type of error: General
Notice: Trying to access array offset on value of type null
http://localhost/elkarte/index.php?page=Welkom
File: C:/xampp/htdocs/elkarte/sources/subs/BBC/BBCParser.php
Line: 285
Title: Re: Elkarte TinyPortal Testing
Post by: lurkalot on February 10, 2021, 08:15:23 AM
Quote from: @rjen on February 10, 2021, 07:59:57 AM
I am seeing these errors in Elkarte ... they start popping up after TinyPortal is installed...

Type of error: General
Notice: Trying to access array offset on value of type null
http://localhost/elkarte/index.php?page=Welkom
File: C:/xampp/htdocs/elkarte/sources/subs/BBC/BBCParser.php
Line: 285

Strange. I'm not getting any errors with this latest tag build.  Wonder if it's somehow related to this, https://www.elkarte.net/community/index.php?topic=5822.msg41921#msg41921  Though not sure why it would only start occurring after installing ElkTP. I'm testing on PHP: 7.2.19
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 10, 2021, 09:58:15 AM
Quote from: @rjen on February 10, 2021, 07:59:57 AM
I am seeing these errors in Elkarte ... they start popping up after TinyPortal is installed...

Type of error: General
Notice: Trying to access array offset on value of type null
http://localhost/elkarte/index.php?page=Welkom
File: C:/xampp/htdocs/elkarte/sources/subs/BBC/BBCParser.php
Line: 285

I'm using Elkarte 1.1.7, can you post what is in your BBC article?
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 10, 2021, 10:24:17 AM
Quote from: @rjen on February 10, 2021, 07:54:11 AM
Quote from: tino on February 09, 2021, 08:51:16 PM
Quote from: @rjen on February 09, 2021, 08:24:07 PM
Installed latest version and again all the language strings are missing

What changed? Is this development or the RC2?

I've not made any changes since you raised it last time, then it seemed to work again.

What language is you user / forum currently set to?

Just downloaded the tagged version and that is fine... there is something funny going on with those languages. FYI: in the test install I have no other languages than English (default)

Do you maybe have some old files laying around in the old directories? As I removed them from the uninstaller when I moved things around and I noticed due to how I installed packages I had some left in the wrong place which were being picked up. That's about all I can think of currently.
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 13, 2021, 06:19:06 PM
Are you both happy enough for me to release this as the next RC release? I haven't found any major issues with it. Although I have only really used the bits I am interested in/use.
Title: Re: Elkarte TinyPortal Testing
Post by: @rjen on February 13, 2021, 06:31:14 PM
Tbh I did not do much of testing yet, mostly because I was under the impression that you are still making changes...
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 13, 2021, 07:59:24 PM
Quote from: @rjen on February 13, 2021, 06:31:14 PM
Tbh I did not do much of testing yet, mostly because I was under the impression that you are still making changes...

I will be on the development release, this was just an intermediate RC. Much like SMF are doing with 2.1 tbf. I just wanted to make sure it all worked as expected before I add the other things in from the development release and break things even more than I already have!

Hopefully, the majority works and I can get on with development knowing what I have released is ok.
Title: Re: Elkarte TinyPortal Testing
Post by: tino on March 06, 2021, 01:02:33 PM
I pushed RC2 as the 'stable' release a few weeks ago. Now working on the RC3 which has the blocks backend reworked and makes it easier to add new block types, and currently has templates for the menu, gallery and download sections which basically do nothing atm.

Regarding the gallery and downloads what do you like in terms of styling? I'm not overly keen on the existing TinyPortal layout (for downloads) but it's not dreadful.

It seems I have made over 100,000 lines of code edits to this from the SMF version so I think they are on different paths now..
Title: Re: Elkarte TinyPortal Testing
Post by: lurkalot on March 06, 2021, 01:45:26 PM
Quote from: tino on March 06, 2021, 01:02:33 PM
I pushed RC2 as the 'stable' release a few weeks ago. Now working on the RC3 which has the blocks backend reworked and makes it easier to add new block types, and currently has templates for the menu, gallery and download sections which basically do nothing atm.

Regarding the gallery and downloads what do you like in terms of styling? I'm not overly keen on the existing TinyPortal layout (for downloads) but it's not dreadful.

It seems I have made over 100,000 lines of code edits to this from the SMF version so I think they are on different paths now..

That's a lot of edits tino.  :o  I'll have to try it again, and see what you've done with it.  ;)

I quite like the layout for the TP downloads, I guess again it's because I'm used to it.  But gallery layouts seem to be very similar throughout and seem to follow follow a set layout, only so much you can do with it I suppose.

Are you providing the option to choose either GD or ImageMagick to process the images? Or just sticking to GD?

I've used Coppermine for many years, but although it's extremely powerful it's styling is to be desired and can be quite frustrating at times.   
Title: Re: Elkarte TinyPortal Testing
Post by: tino on March 06, 2021, 02:41:32 PM
It will support all the image library formats that PHP support. As I have a class for that already which I will just copy over, well it will try all of them anyway and fallback to which ever one works.
Title: Re: Elkarte TinyPortal Testing
Post by: lurkalot on March 06, 2021, 02:55:14 PM
Quote from: tino on March 06, 2021, 02:41:32 PM
It will support all the image library formats that PHP support. As I have a class for that already which I will just copy over, well it will try all of them anyway and fallback to which ever one works.

Thanks, not selectable in config then.  I must admit I always had a preference for ImageMagick always processed sharper images and handles more file types, but when I moved server I had to switch to GD because ImageMagick wasn't available, seems it isn't on many hosts nowadays, unless it's making a comeback.  My old host had both library's installed, so what would happen in this case, which one would it choose?
Title: Re: Elkarte TinyPortal Testing
Post by: tino on March 06, 2021, 03:45:59 PM
It's imagik then gd for manipulation, although it's exif to get the actual data. It's not configurable to choose mind, other than not installing the php package.
Title: Re: Elkarte TinyPortal Testing
Post by: lurkalot on March 14, 2021, 05:15:08 PM
Finally managed to get my FTP client to connect to my free, for how long I don't know.  It's a really pain in the arse.  Anyway,, while I have access I quickly uploaded a copy of ElkArte 1.1.6 and Elk-TinyPortal 1.0.0 RC2  http://lts4.byethost7.com/testsite9/

Looking good so far tino.  How's RC3 coming along?
Title: Re: Elkarte TinyPortal Testing
Post by: tino on March 14, 2021, 05:28:39 PM
It's kind of hit a standstill, I'm half way through the block rewrite and have template functions for shouts, downloads, menu and gallery sections.

So it's progressing just slowly.
Title: Re: Elkarte TinyPortal Testing
Post by: lurkalot on March 14, 2021, 06:44:09 PM
Thanks, let me know if you need it testing, I'll bung it up on there.

I Was going to add some sample blocks, but hit my first issue when adding a Top BBC block.. Block gets added but can't add any content to it, Got this error on page,

"An Error Has Occurred
Call to undefined function TinyPortal\Controller\TP_prebbcbox()"

And in error log,

Type of error: Undefined
Exception: Call to undefined function TinyPortal\Controller\TP_prebbcbox()
http://lts4.byethost7.com/testsite9/index.php?action=admin;area=tpblocks;sa=editblock&id=6;sesc
File: /home/vol11_7/byethost7.com/b7_24299229/htdocs/testsite9/TinyPortal/Controller/BlockAdmin.php
Line: 270

Title: Re: Elkarte TinyPortal Testing
Post by: tino on March 14, 2021, 06:56:35 PM
RC2 or RC3?

It's TPSubs::getInstance()->preBBCBox or something like that now.
Title: Re: Elkarte TinyPortal Testing
Post by: lurkalot on March 14, 2021, 06:56:55 PM
Also noticed it defaults to "Use frame style, but not title style" when you create a new block, is this by design?
Title: Re: Elkarte TinyPortal Testing
Post by: tino on March 14, 2021, 06:58:02 PM
Quote from: lurkalot on March 14, 2021, 06:56:55 PM
Also noticed it defaults to "Use frame style, but not title style" when you create a new block, is this by design?

No that's a change I've not looked in to.
Title: Re: Elkarte TinyPortal Testing
Post by: lurkalot on March 14, 2021, 06:59:00 PM
Quote from: tino on March 14, 2021, 06:56:35 PM
RC2 or RC3?

It's TPSubs::getInstance()->preBBCBox or something like that now.

Says it's RC2 from the download link on ElkArte website.
Title: Re: Elkarte TinyPortal Testing
Post by: tino on March 14, 2021, 07:30:29 PM
Thanks, it's an issue in both, although I'll add it to the fix list for RC3
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on November 20, 2021, 11:50:15 PM
A nice piece of work.  O0

I have made a little bit of an actual translation into German (formal). I found quite a few reduntante entries. Is this art or can it be removed?  ;)

What about further development? RC3?
Title: Re: Elkarte TinyPortal Testing
Post by: tino on November 21, 2021, 09:29:31 AM
Thanks for that.

My life got very hectic and I've not had a chance to really extend it much. There is a version on GitHub which is very much in testing (and has bugs, and unfinished code) which will become RC3. Most bugs from RC2 that I know of were rectified.
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on November 21, 2021, 02:01:52 PM
Thank you for the prompt reply. Have the translation gladly made as a small contribution by me. Would like to deliver the package installable via the package manager. Question about this: Do the files have to be written in "/TinyPortal/Views/languages/german-formal"? Or is the default path of ElkArte fine, too?

I also noticed two errors already. However, with one of them I don't know if it is possibly due to the server. Link to the test installation in the signature.

First (TP credit link):
Quote
Exception: Call to undefined function TinyPortal\Controller\tp_hidebars()

... /index.php?action=tportal;sa=credits
... /TinyPortal/Controller/Portal.php
line=1365

Second (link to the list of "articles in category" below an article):
Quote
Warning: Undefined array key "email_address"

... /index.php?cat=2
... /sources/Load.php
line=2717

Life usually gets hectic when you have plans. Unfortunately, mostly also in the opposite direction.  ;)
Title: Re: Elkarte TinyPortal Testing
Post by: tino on November 21, 2021, 02:26:02 PM
Thanks for those, do you mind trying the development version on GitHub? https://github.com/tinoest/ElkTinyPortal/tree/development

I recall fixing the tp_hidebars in there. Not sure on the other one. I've not made a commit since May, I have a few to push I think. I'll try and look at those tomorrow, usual warnings apply in that it's testing and buggy.

The language pack, I would like inside TinyPortal namespace but I might need to make changes to get that to work. It should in theory work in either. If it doesn't let me know and I'll correct the broken code. In essence put it where you feel it's most appropriate and I'll fix it to work if it's broken.
Title: Re: Elkarte TinyPortal Testing
Post by: tino on November 21, 2021, 05:14:10 PM
I just pushed some fixes for the issue you raised for categories, also the language loading so it can be in either place.
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on November 21, 2021, 09:49:58 PM
Just updated my test installation from RC2 to RC3. And made some work for the translation, by the way ... utf8. Now installable via the package manager in the right TP path.  :)

The first error still appears, the second is fixed.


edit: I hope I found and translated all the new lines of text.  ::)
Title: Re: Elkarte TinyPortal Testing
Post by: tino on November 22, 2021, 01:38:34 PM
Quote from: Mc Fly on November 21, 2021, 09:49:58 PM

The first error still appears, the second is fixed.


The first error is also now fixed, I have credits disabled on my test install.  :doh:

Also downloaded and installed your language file and it seems to work well. Thanks for that  O0
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on November 24, 2021, 02:48:39 PM
Quote from: tino on November 22, 2021, 01:38:34 PM
...

The first error is also now fixed, I have credits disabled on my test install.  :doh:

...

Also a way to solve things.  ;D

I stumbled over an error while creating a PHP block: The code entry field is not displayed!  :o

When viewing the HTML source, two subsequent empty DIVs are noticeable in the associated DIV.

EDIT:

Fun fact: I can enter the PHP code if I switch to HTML/Javascript and switch back to PHP code before saving. :2funny:
Title: Re: Elkarte TinyPortal Testing
Post by: tino on November 24, 2021, 10:21:53 PM
Guess there were no errors in the logs?

I'll have a variable missing or set incorrectly somewhere which is causing that one... the blocks logic from SMF TinyPortal was pretty much ripped up and started again for Elkarte so it's probably buggy as anything.

I think other than myself, lurkalot and @rjen (who kindly tested it initially for me) you're the first person to use it in anger. So any feedback is very much appreciated.
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on November 25, 2021, 05:01:06 PM
I like to test out one or the other, I enjoy it. Especially when you see that things are moving forward with ElkArte and TinyPortal. Just because TP does not change the files and "ftp" access is reduced exclusively to ssh.  O0

I have already found plenty of missing variables and other adversities. I think I should write them down ...  :hmm:  ... and as mentioned before, I'm currently testing with Apache 2.4.48, PHP 8.0.8 and MariaDB 10.5.12.
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on November 25, 2021, 05:33:59 PM
Warning: Undefined array key "memID"
index.php?action=profile;area=tparticles;sa=articles;u=1
TinyPortal/Views/TPprofile.template.php
line: 72


Warning: Undefined array key "selected_member"
index.php?action=profile;area=tparticles;sa=settings;u=1
TinyPortal/Views/TPprofile.template.php
line: 167


Warning: Undefined array key "uploads"
index.php?action=profile;area=tpsummary;u=1
TinyPortal/Views/TPprofile.template.php
line: 33


Warning: Undefined array key "portal_type"
index.php?action=admin;area=tpsettings;sa=settings
TinyPortal/Views/TPortalAdmin.template.php
line: 112


Subaction not defined
index.php?action=admin;area=tpgallery;sa=add;
sources/subs/Action.class.php
line: 129


Subaction not defined
index.php?action=admin;area=tpdownload;sa=add;
sources/subs/Action.class.php
line: 129
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on November 25, 2021, 06:34:28 PM
Just looked in maintenance, integration hooks. The existing and active hooks:

integrate_delete_members
integrate_load_illegal_guest_permissions
integrate_load_permissions
integrate_modify_attachment_settings
integrate_modify_mention_settings
integrate_sa_manage_maintenance
integrate_save_modify_mention_settings
integrate_topics_maintenance

All others have not been found.  :-\
Title: Re: Elkarte TinyPortal Testing
Post by: tino on November 25, 2021, 06:57:23 PM
Quote from: Mc Fly on November 25, 2021, 06:34:28 PM
Just looked in maintenance, integration hooks. The existing and active hooks:

integrate_delete_members
integrate_load_illegal_guest_permissions
integrate_load_permissions
integrate_modify_attachment_settings
integrate_modify_mention_settings
integrate_sa_manage_maintenance
integrate_save_modify_mention_settings
integrate_topics_maintenance

All others has not been found.  :-\

That one is due to how TinyPortal loads them and Elkarte detects them, they are there mind!

I'll work through the errors you raised tomorrow. Should have a few hours free!
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on January 20, 2022, 01:52:21 PM
I have encountered a strange problem. In the installation (see signature) I left the guests out on a trial basis. So far, so good. "Home" shows the front page and "Forum" changes to the forum. In another test installation, however, a login is requested once more and after that again I end up ... on the front page. However, this behavior persists when guest access is allowed again.  ??? :-\
Title: Re: Elkarte TinyPortal Testing
Post by: tino on January 20, 2022, 02:37:24 PM
Which version are you running? I had an issue with the guest access functionality, which I think I fixed this last weekend. But it's related to the new feature I were you can allow guests access to the portal and not the forum.
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on January 20, 2022, 04:22:46 PM
It would be much easier if the version numbers were continuous ...  ;)

I have just replaced the correctly working installation (RC3 from 21 Nov 21) with the latest version (RC3 from 8 Jan 22) and it still works correctly.

The not correctly working installation is the latest one with data transfer from SMF 2.0.19 to Elkarte, which I did now on Tuesday.
Title: Re: Elkarte TinyPortal Testing
Post by: tino on January 20, 2022, 04:29:18 PM
Quote from: Mc Fly on January 20, 2022, 04:22:46 PM
It would be much easier if the version numbers were continuous ...  ;)

I have just replaced the correctly working installation (RC3 from 21 Nov 21) with the latest version (RC3 from 8 Jan 22) and it still works correctly.

The not correctly working installation is the latest one with data transfer from SMF 2.0.19 to Elkarte, which I did now on Tuesday.

It would be but RC3 isn't released, so it's technically the git commit. If I released every time I fixed something we'd be at RC99103 by now. As I like to break things!

If you know how to pull the git commit into the code after the commit has been done then I'd happily use that as the version.
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on January 20, 2022, 04:48:39 PM
I'm going slightly mad!  :idiot2:

Just switched the non working installation from PHP 7.4 to PHP 8.0.14 as a test. Result was an error:

Error: undefined
Warning: Undefined array key "icon_max_size"

After switching back to PHP 7.4, I was able to log in again. And ... TADAAAAA ... now it runs correctly.  8)

EDIT:

Ah ... ok ... I think it's the "Forward after login" setting. The portal type must be set to "Standalone" if the redirection after login to the front page should work correctly. Or respectively, with the setting, calling the forum works again.

But still got undefined-sub-action-errors on adding downloads or galleries.
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on January 20, 2022, 05:20:47 PM
The icon-max-size / icon-width warning under PHP8 becomes a notice under PHP7:

TPortalAdmin.english.php, line 248
$txt['tp-adminiconsinfo'] = 'PNG, JPG or GIF, Max-size: ' .$context['TPortal']['icon_max_size']. ' KB. Images will be resized so the shortest side is ' .$context['TPortal']['icon_width']. ' px, while retaining aspect ratio. Note that the top area of the image will be used as article icon.';
Title: Re: Elkarte TinyPortal Testing
Post by: tino on January 20, 2022, 05:55:29 PM
Downloads, Gallaries and Menu I will probably disable as options soon. As I want to try and package a release with minimal issues.

I'll look at the icon warning. It will be a setting somewhere which isn't being set.
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on January 21, 2022, 11:44:04 AM
Updated version of german formal translation.  :)
Title: Re: Elkarte TinyPortal Testing
Post by: tino on January 21, 2022, 08:24:48 PM
It's about time I drafted the next RC release so providing no bugs are reported against this pre-release then I'll get it released early February.

https://github.com/Tinyportal/ElkTP/archive/refs/heads/master.zip
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on January 22, 2022, 02:07:30 PM
Under PHP8+ I get the following error:

Error: Undefined
Warning: Undefined array key "portal_type"
File: .../TinyPortal/Views/TPortalAdmin.template.php
Line: 112

The selection field for the portal type is corrupted and the other options are cut off, the administration page ends abruptly there.

It is also still not possible to create a PHP block because the editor field is hidden.

I'll check the PHP7.4 installation later.
Title: Re: Elkarte TinyPortal Testing
Post by: tino on January 22, 2022, 02:32:53 PM
Quote from: Mc Fly on January 22, 2022, 02:07:30 PM
Under PHP8+ I get the following error:

Error: Undefined
Warning: Undefined array key "portal_type"
File: .../TinyPortal/Views/TPortalAdmin.template.php
Line: 112

The selection field for the portal type is corrupted and the other options are cut off, the administration page ends abruptly there.

It is also still not possible to create a PHP block because the editor field is hidden.

I'll check the PHP7.4 installation later.

That's an issue when you don't do a clean install!

I'll fix that in the install options. If you can get to the TPAdmin settings and set it still through there it will work again.
Title: Re: Elkarte TinyPortal Testing
Post by: tino on January 22, 2022, 04:06:29 PM
Fixed the error and also one to do with Guest Access. Killed the release and will just work from the master until it's ready to tag, obviously I went to early.
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on January 25, 2022, 06:16:58 AM
I am not able to edit my categories. All links to edit a category under "TinyPortal -> Articles -> Categories" lead to ... "TinyPortal -> Articles -> Categories"!?  :-\

Quotehttps://.../index.php?action=admin;area=tparticles;sa=categories;cu=3
Title: Re: Elkarte TinyPortal Testing
Post by: tino on January 28, 2022, 09:39:04 PM
Quote from: Mc Fly on January 25, 2022, 06:16:58 AM
I am not able to edit my categories. All links to edit a category under "TinyPortal -> Articles -> Categories" lead to ... "TinyPortal -> Articles -> Categories"!?  :-\

Quotehttps://.../index.php?action=admin;area=tparticles;sa=categories;cu=3

Just fixed that.

Went through a few of the other options and they seem to work as I would expect.... doesn't mean I've not missed something mind  ;D

If all is good, I'll package up the RC3 release and move on to the new development one.
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on February 14, 2022, 11:57:04 AM
Quote from: tino on January 28, 2022, 09:39:04 PM
Quote from: Mc Fly on January 25, 2022, 06:16:58 AM
I am not able to edit my categories. All links to edit a category under "TinyPortal -> Articles -> Categories" lead to ... "TinyPortal -> Articles -> Categories"!?  :-\

Quotehttps://.../index.php?action=admin;area=tparticles;sa=categories;cu=3

Just fixed that.

...

Just downloaded and installed ... not fixed.  ???

I stil can't edit any categories and the code editing field for PHP blocks is not displayed. The code from the templates is not taken over.
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 14, 2022, 01:24:36 PM
Quote from: McFly on February 14, 2022, 11:57:04 AM
Quote from: tino on January 28, 2022, 09:39:04 PM
Quote from: Mc Fly on January 25, 2022, 06:16:58 AM
I am not able to edit my categories. All links to edit a category under "TinyPortal -> Articles -> Categories" lead to ... "TinyPortal -> Articles -> Categories"!?  :-\

Quotehttps://.../index.php?action=admin;area=tparticles;sa=categories;cu=3

Just fixed that.

...

Just downloaded and installed ... not fixed.  ???

I stil can't edit any categories and the code editing field for PHP blocks is not displayed. The code from the templates is not taken over.

I'll check again, maybe I didn't push it.... works for me  ;D :o
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 14, 2022, 01:46:27 PM
Quote from: tino on February 14, 2022, 01:24:36 PM
I'll check again, maybe I didn't push it.... works for me  ;D :o

No that definately works.

The other one I am not sure what you mean?

What version of PHP btw? I know there are issues still with PHP 8.1 I need to resolve.
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on February 14, 2022, 02:30:02 PM
Currently PHP 7.4.27 is running. PHP 8.0.15 and 8.1.2, as well as the outdated 7.3.33, can also be activated.

The other one: see attachment. Below the "Save" button there are only two empty DIVs in the HTML source code. And there are no errors in PHP logfiles.
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 14, 2022, 02:53:51 PM
Weird they are both working for me. I'll try and dig further. You have the latest master/RC3 tag I created?
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on February 14, 2022, 03:04:56 PM
Quote from: tino on February 14, 2022, 02:53:51 PM
Weird they are both working for me. I'll try and dig further. You have the latest master/RC3 tag I created?

Master and development. Just tested the version from this topic on the installation in my signature (homeserver). Can edit categories  :D ... but no PHP block editing.

I'll try some clean installs on the other ones.

btw. When I change a block to Java/html, in the overview under Type it shows "Code: BBC".
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 14, 2022, 06:31:56 PM
Ok, leave it with me.

I'll try and replicate, the block name being incorrect I had noticed then forgot to fix.
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 20, 2022, 07:11:55 PM
Quote from: McFly on February 14, 2022, 03:04:56 PM
Master and development. Just tested the version from this topic on the installation in my signature (homeserver). Can edit categories  :D ... but no PHP block editing.

I can't get the PHP block to break how you describe.
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 20, 2022, 07:32:26 PM
Quote from: tino on February 20, 2022, 07:11:55 PM
Quote from: McFly on February 14, 2022, 03:04:56 PM
Master and development. Just tested the version from this topic on the installation in my signature (homeserver). Can edit categories  :D ... but no PHP block editing.

I can't get the PHP block to break how you describe.

I've managed to track it down, slightly weird set of issues but I see what I have done. It'll take a while to fix as it impacts all the blocks.  :doh:
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on February 21, 2022, 07:06:14 AM
Glad to hear that you now have an idea what the error is and will (hopefully) have it sorted out soon.

Would also be fine to read a short summary about it, because I couldn't make any sense of it, since the PHP edit field works for the articles.

O0
Title: Re: Elkarte TinyPortal Testing
Post by: tino on February 27, 2022, 05:15:14 PM
Quote from: McFly on February 21, 2022, 07:06:14 AM
Glad to hear that you now have an idea what the error is and will (hopefully) have it sorted out soon.

Would also be fine to read a short summary about it, because I couldn't make any sense of it, since the PHP edit field works for the articles.

O0

Eventually done a quick fix for this. I'll do it properly later... one day.

https://github.com/tinoest/ElkTinyPortal/blob/95e3720c9a25e8205c8ac8a4cdd32900af3dae4f/TinyPortal/Views/TPBlockAdmin.template.php#L83

The error was on this line, I had the parameters the wrong way round, as I hadn't moved the other function over to use the block they still worked.

My local was in a different state and I had the PHP block named something different and it wasn't being removed when it should be.

Title: Re: Elkarte TinyPortal Testing
Post by: McFly on February 28, 2022, 11:49:26 PM
Quote from: tino on February 27, 2022, 05:15:14 PM
...
Eventually done a quick fix for this. I'll do it properly later... one day.
...

Just installed the latest master branch on the PHP-8.0.8 ... I wanna hug someone!  ^-^
Tested the "Hello" and the mini-calendar. Calendar throws an error (Class "TinyPortal\Util" not found) and messes up the page. ???

Quote from: tino on February 27, 2022, 05:15:14 PM
...
My local was in a different state and I had the PHP block named something different and it wasn't being removed when it should be.

Sometimes the little things are the proverbial needles in the haystack.  8)
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on March 01, 2022, 11:55:29 AM
Now also installed under PHP 7.4.27. Besides the "Classic Recent Topics", "Hello", "Search articles", "News Box" and the "Online Users Box" PHP block, also the blocks for the Levertine gallery work!  O0

The others come along with Class "TinyPortal/Util" or "TinyPortal/Database" not found.
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on March 01, 2022, 12:33:38 PM
Just tried something. Fix for the calendar block:

In the PHP code, look for the line:
$title = TinyPortal\Util::htmlspecialchars(ucfirst($month_name)).' '.$year;  //note that some locales don't capitalize month and day names

Simply delete the "TinyPortal\Util::". I am not a PHP programmer, but after that the error is gone and the calendar is displayed correctly.  ::)

BTW: Any idea for an internationalized version?
Title: Re: Elkarte TinyPortal Testing
Post by: tino on March 02, 2022, 07:30:54 PM
Quote from: McFly on March 01, 2022, 12:33:38 PM
Just tried something. Fix for the calendar block:

In the PHP code, look for the line:
$title = TinyPortal\Util::htmlspecialchars(ucfirst($month_name)).' '.$year;  //note that some locales don't capitalize month and day names

Simply delete the "TinyPortal\Util::". I am not a PHP programmer, but after that the error is gone and the calendar is displayed correctly.  ::)

BTW: Any idea for an internationalized version?

You mean an internationalised calendar?

I think it just needs a \ before the TinyPortal for it to work correctly. As I'm guessing the namespace isn't found correctly.
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on March 02, 2022, 10:11:51 PM
A simple backslash doesn't work. But adding a "\Model" after "TinyPortal" works. The path to the php-files has changed. ...  :o

Indeed! I ment an internationalized calendar. And btw: It is not PHP8 compatible, causo of use of list() and each().

Perhaps the function of the ELK calender module (template_show_month_grid('current')) could be used?
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on March 03, 2022, 09:47:19 AM
Weird things are happening again.  :idiot2:

Just had TP 2.1.1 installed on an SMF test system. This installation uses the same database as the ELK TP installation, but with different prefixes. So should not be a problem. After creating an article and setting it to only display articles on the home page, the panels disappeared on BOTH test installations!

Is this related to the cookies?

EDIT: After completely uninstalling both TPs and reinstalling only on the ELK system ... it was the display setting for language.

But other inputs for language control are NOT displayed in the settings of the blocks.
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on March 04, 2022, 10:25:42 AM
Don't call me a programmer. This is just the result of copy & paste and trail & error! I can't say if this is all correct from a security point of view, or which code is possibly unnecessary.

Calendar PHP block, internationalized and PHP8 ready, only ELK with enabled calendar

global $txt, $context, $modSettings, $scripturl, $options;
loadTemplate('Calendar');
require_once(SUBSDIR . '/Calendar.subs.php');
$today = getTodayInfo();
$curPage = array(
'day' => isset($_REQUEST['day']) ? (int) $_REQUEST['day'] : $today['day'],
'month' => isset($_REQUEST['month']) ? (int) $_REQUEST['month'] : $today['month'],
'year' => isset($_REQUEST['year']) ? (int) $_REQUEST['year'] : $today['year']
);
$calendarOptions = array(
'start_day' => !empty($options['calendar_start_day']) ? $options['calendar_start_day'] : 0,
'show_birthdays' => in_array($modSettings['cal_showbdays'], array(1, 2)),
'show_events' => in_array($modSettings['cal_showevents'], array(1, 2)),
'show_holidays' => in_array($modSettings['cal_showholidays'], array(1, 2)),
'show_week_num' => true,
'short_day_titles' => false,
'show_next_prev' => true,
'show_week_links' => true,
'size' => 'large',
);
$calendarOptions['show_birthdays'] = $calendarOptions['show_events'] = $calendarOptions['show_holidays'] = false;
$calendarOptions['short_day_titles'] = true;
$calendarOptions['show_next_prev'] = false;
$calendarOptions['show_week_links'] = false;
$calendarOptions['size'] = 'small';
$context['calendar_grid_current'] = getCalendarGrid($curPage['month'], $curPage['year'], $calendarOptions);
echo '
<style type="text/css">
#month_grid {
float: none;
padding: 0;
width: 100%;
}
</style>
<div id="calendar">
<div id="month_grid">
', template_show_month_grid('current'), '
</div>
</div>';
Title: Re: Elkarte TinyPortal Testing
Post by: tino on March 05, 2022, 04:14:40 PM
Quote from: McFly on March 03, 2022, 09:47:19 AM
But other inputs for language control are NOT displayed in the settings of the blocks.

Not sure I follow what you are trying to say?
Title: Re: Elkarte TinyPortal Testing
Post by: tino on March 05, 2022, 04:19:30 PM
Quote from: McFly on March 04, 2022, 10:25:42 AM
Don't call me a programmer. This is just the result of copy & paste and trail & error! I can't say if this is all correct from a security point of view, or which code is possibly unnecessary.

Calendar PHP block, internationalized and PHP8 ready, only ELK with enabled calendar


I created a new block with this in, what would you like as the description? I have said you are the author, if that's ok?
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on March 05, 2022, 05:02:15 PM
Quote from: tino on March 05, 2022, 04:14:40 PM
Quote from: McFly on March 03, 2022, 09:47:19 AM
But other inputs for language control are NOT displayed in the settings of the blocks.

Not sure I follow what you are trying to say?

If checked "Use language visibility option for blocks", then look at the display settings of any block, there should be input fields or further check marks behind "Block title per language" and "Block visible for these languages". But they are not there and NO block or panel is displayed ... until you uncheck the language vsibility option.
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on March 05, 2022, 05:13:51 PM
Quote from: tino on March 05, 2022, 04:19:30 PM
Quote from: McFly on March 04, 2022, 10:25:42 AM
Don't call me a programmer. This is just the result of copy & paste and trail & error! I can't say if this is all correct from a security point of view, or which code is possibly unnecessary.

Calendar PHP block, internationalized and PHP8 ready, only ELK with enabled calendar


I created a new block with this in, what would you like as the description? I have said you are the author, if that's ok?

Just call it "with friendly support."  ;)

Small clarification on the side: The block itself works of course also with deactivated calendar module of ELK. But the month name link directs to a page with an error message.

I also had a look at the CSS. For now, only a few display errors of the stats block eradicated. Some specifications in tp-styles have bitten with those of index of ELK and path for some grafics has changed.

Edit: Made a before after schreenshot
Every image path changed from "../images/tinyportal/ ..." to "../images/ ...".

tp-style.css, line 494 following.

The problem with "members" is that ELK (and probably SMF) already has a class called "mlist" and in this class "display: table;" is defined. But the headings should be defined with "display: block;". Furthermore, there is already a class "stats" in which the width is specified with 50%. This should be changed to 100% for the headings. Unfortunately the problem is not shown in that screenshot.
The changes and simplifications with the padding are partly a matter of taste.  ;)
Title: Re: Elkarte TinyPortal Testing
Post by: tino on March 06, 2022, 07:38:56 PM
Language thing should work again now... it was due to the language changes and looking for the older SMF way.

Title: Re: Elkarte TinyPortal Testing
Post by: McFly on March 06, 2022, 10:11:11 PM
Sounds good. Which branch is it? Which repository?

Have you overlooked that CSS or have you looked inside?
Title: Re: Elkarte TinyPortal Testing
Post by: tino on March 06, 2022, 10:22:30 PM
Quote from: McFly on March 06, 2022, 10:11:11 PM
Sounds good. Which branch is it? Which repository?

Have you overlooked that CSS or have you looked inside?

I pushed it to my master as I've broken a few other things... so no formal release as such.

Not looked at the css yet, was intending to find some time during the week to do so hopefully.
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on March 07, 2022, 08:35:57 AM
Quote from: tino on March 06, 2022, 07:38:56 PM
Language thing should work again now... it was due to the language changes and looking for the older SMF way.

Unfortunately, no improvements have been seen so far. I still don't see any input or selection fields behind the language settings of the blocks.  :'(
Title: Re: Elkarte TinyPortal Testing
Post by: tino on March 07, 2022, 09:39:35 AM
Quote from: McFly on March 07, 2022, 08:35:57 AM
Quote from: tino on March 06, 2022, 07:38:56 PM
Language thing should work again now... it was due to the language changes and looking for the older SMF way.

Unfortunately, no improvements have been seen so far. I still don't see any input or selection fields behind the language settings of the blocks.  :'(

https://github.com/tinoest/ElkTinyPortal/commit/db798137d64f559eae5d62eb7bc94e27bd843aee

That commit should resolve the issue, or it did for me when using your language pack.
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on March 07, 2022, 09:54:54 AM
Input and selection fields are now visible, but any input or saving on block preferences leads to "
Undefined variable $value"  ???

Quote... /index.php?action=admin;area=tpblocks;sa=updateblock;id=2
... /TinyPortal/Controller/BlockAdmin.php
line: 470
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on March 09, 2022, 09:13:59 AM
Addendum: No error is reported under PHP7, but no changes to block settings are applied, e.g.: the display of online time in the user block. Under PHP8, the error mentioned above then appears. :-\
Title: Re: Elkarte TinyPortal Testing
Post by: tino on March 09, 2022, 01:55:26 PM
Quote from: McFly on March 09, 2022, 09:13:59 AM
Addendum: No error is reported under PHP7, but no changes to block settings are applied, e.g.: the display of online time in the user block. Under PHP8, the error mentioned above then appears. :-\

Ok thanks, I hope to have some time this weekend to have a stab at fixing some of these errors.
Title: Re: Elkarte TinyPortal Testing
Post by: tino on March 12, 2022, 01:35:53 PM
Quote from: McFly on March 09, 2022, 09:13:59 AM
Addendum: No error is reported under PHP7, but no changes to block settings are applied, e.g.: the display of online time in the user block. Under PHP8, the error mentioned above then appears. :-\

Pushed some small fixes for these issues. Seems most were typo's or me not using the correct variable so fairly easy.
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on March 15, 2022, 08:38:53 AM
I just looked at the BlockAdmin.php on my test systems ... the line 498 that is replaced, or extended, in the fix is commented out there with two slashes. So nothing can work like that either. ;D
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on March 16, 2022, 06:03:19 PM
I can't leave it alone.  ???

I noticed at the PHP calendar block the compressed bar with the month name. This is caused by a fixed declared height of 31 pixels in line 754 following for "h2.category_header, ...". This is due to the graphical gradient in the default SMF themes. But with the CSS gradients used by ELK this is no longer necessary. So I reduced "h2.category_header, ..." to the most necessary ("overflow: hidden;").

While briefly skimming other layout abnormalities, I came across quite a few padding with exactly one percent. Should better be changed to .3em to .5em. That way the margin depends on the font and not on the screen width.

In this context I also changed the function template_categories() to a tableless layout. :doh:


// Article Categories page
function template_categories()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings, $boarddir, $boardurl, $language;

echo '
<form accept-charset="', 'UTF-8', '" name="tpadmin_news" action="' . $scripturl . '?action=admin;area=tparticles;sa=newcategory" method="post" enctype="multipart/form-data" onsubmit="syncTextarea();">
<input type="hidden" name="sc" value="', $context['session_id'], '" />
<input type="hidden" name="tpadmin_form" value="categories">
<div class="cat_bar">
<header class="category_header">
<div class="floatleft">' . $txt['tp-artcat'] . '</div>
<div class="floatright150 centertext">' , $txt['tp-actions'] , '</div>
</header>
</div>
<section id="edit-category" class="admintable admin-area">
<div class="information smalltext">' , $txt['tp-helpcats'] , '</div>';
if(isset($context['TPortal']['editcats']) && count($context['TPortal']['editcats'])>0)
{
$alt=true;
foreach($context['TPortal']['editcats'] as $c => $cat)
{
echo '
<div class="content padding-div">
<div class="floatleft">
' , str_repeat("- ",$cat['indent']) , '
<a href="' . $scripturl . '?action=admin;area=tparticles;sa=categories;cu='.$cat['id'].'" title="' .$txt['tp-editcategory']. '">' , $cat['name'] , '</a>
' , isset($context['TPortal']['cats_count'][$cat['id']]) ? '(' . ($context['TPortal']['cats_count'][$cat['id']]>1 ? $txt['tp-articles'] : $txt['tp-article']) . ': '.$context['TPortal']['cats_count'][$cat['id']].')' : '' , '
</div>
<div class="floatright150 centertext">
<a href="' . $scripturl . '?cat=' . $cat['id'] . '" title="' . $txt['tp-viewcategory'] . '"><img src="' . $settings['tp_images_url'] . '/TPfilter.png" alt="" /></a>&nbsp;
<a href="' . $scripturl . '?action=admin;area=tparticles;sa=categories;cu='.$cat['id'].'" title="' .$txt['tp-editcategory']. '"><img src="' . $settings['tp_images_url'] . '/TPconfig_sm.png" alt="" /></a>&nbsp;
<a href="' . $scripturl . '?action=admin;area=tparticles;sa=newcategory;child;cu=' . $cat['id'] . '" title="' . $txt['tp-addsubcategory'] . '"><img src="' . $settings['tp_images_url'] . '/TPadd.png" alt="" /></a>&nbsp;
<a href="' . $scripturl . '?action=admin;area=tparticles;sa=newcategory;copy;cu=' . $cat['id'] . '" title="' . $txt['tp-copycategory'] . '"><img src="' . $settings['tp_images_url'] . '/TPcopy.png" alt="" /></a>&nbsp;
<a href="' . $scripturl . '?action=admin;area=tparticles;sa=delcategory;id='.$cat['id'].';' . $context['session_var'] . '=' . $context['session_id'] . '" onclick="javascript:return confirm(\''.$txt['tp-confirmcat1'].'  \n'.$txt['tp-confirmcat2'].'\')" title="' . $txt['tp-delete'] . '"><img src="' . $settings['tp_images_url'] . '/TPdelete2.png" alt="" /></a>
</div>
</div>';
$alt = !$alt;
}
}
echo '
</div>
</section>
</form>';
}


In addition still a little CSS extended:


.floatright150 {
float: right;
min-width: 150px;
width: 20%;
}


Just had a look at the index.css of ELK an changed a little bit. Some declarations were redundant.
Title: Re: Elkarte TinyPortal Testing
Post by: tino on March 16, 2022, 07:36:12 PM
Thanks!! CSS is definitely not my forte. I'd like to change to flex or a grid layout but no idea if or when I will.
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on March 16, 2022, 08:34:56 PM
Quote from: tino on March 16, 2022, 07:36:12 PM
Thanks!! CSS is definitely not my forte. I'd like to change to flex or a grid layout but no idea if or when I will.

Hm ... I have already tried an exclusively tableless layout only with DIVs around for TP 1.3 and still some of it is in the back of my mind. And also somewhere in the nirvana of my work computer.  ^-^
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on March 17, 2022, 04:53:39 PM
Had some time during the break today.  :)

I hope I have not overlooked anything. The layout is further adapted to the standard ELK theme. <header> for the headers and <section> for the content for example. Nothing had to be changed on the CSS for this except one:


.tp_block21 {
margin: 1px 0 0 0;
padding: 4px 8px 8px 8px;
}


Edit:

Ah ... Command back. It's not so easy to eliminate the sins of the forefathers of a round design with all its nestings of <tr>, <td> and countless <span> ...

There's a bit more work waiting.  :o
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on March 18, 2022, 07:25:28 AM
By the way, after applying the last changes, the following result appears. All settings, for example, visibility of avatars in the user block or users online in the stastistics block, are deleted and can no longer be activated.  :hmm:
Title: Re: Elkarte TinyPortal Testing
Post by: tino on March 18, 2022, 11:28:02 AM
Quote from: McFly on March 18, 2022, 07:25:28 AM
By the way, after applying the last changes, the following result appears. All settings, for example, visibility of avatars in the user block or users online in the stastistics block, are deleted and can no longer be activated.  :hmm:

Is that my changes or yours for the display?
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on March 18, 2022, 02:02:08 PM
The misbehavior occurs with the design unchanged. The interesting thing about it is, for example, the deviating name of a block is saved or also for which actions the block should be displayed, but not for which language. But with activated language no blocks are displayed at all.
Title: Re: Elkarte TinyPortal Testing
Post by: tino on March 18, 2022, 04:27:15 PM
Quote from: McFly on March 18, 2022, 02:02:08 PM
The misbehavior occurs with the design unchanged. The interesting thing about it is, for example, the deviating name of a block is saved or also for which actions the block should be displayed, but not for which language. But with activated language no blocks are displayed at all.

I don't get the same issue you do, I can activate the language option and it will happily allow me to choose those settings for the User or Recent Blocks
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on March 19, 2022, 07:57:36 AM
Picking the options is also not so much the issue, I can do that too. It's just that as soon as the visibility for language is activated, the blocks are no longer displayed at all.If I then display the settings in the administration, the above-mentioned hooks ("tptitle settings") are no longer set. The hooks for the language settings are displayed there and also the field for entering the different name of the block and I can also activate or deactivate all hooks, but apart from the name only the settings below the selection options for the language are saved. Even deleting a block and creating it again does not solve the problem.  :-\

However, only with PHP7.4. Under PHP8, the warning "Undefined variable $value" remains and after disabling the visibility for language, the blocks are also visible again unchanged.
"/index.php?action=admin;area=tpblocks;sa=updateblock;id=2"
"/TinyPortal/Controller/BlockAdmin.php" line 470
Title: Re: Elkarte TinyPortal Testing
Post by: tino on March 19, 2022, 10:19:46 AM
I don't think you have the code with that fix in it. As I changed that line from value to a v (from memory)

https://github.com/tinoest/ElkTinyPortal/blob/4e89a31d82de59fe03872f24b8e6d9678afabcd4/TinyPortal/Controller/BlockAdmin.php#L470

So my first guess is your base code isn't the same as mine (GitHub latest)

If you enable the language option then the blocks won't show until you enable them for that language. This works correctly ( I think ) for me now. I can also have a different title depending on the language. The style settings should work also although I know the styling needs to be looked at.
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on March 19, 2022, 04:42:16 PM
Sorry for the troubles. I'm a honk after all ...  :2funny:

Look for a week in the wrong repository, where only the changes for "CSS" and "BlockAdmin" are shown.  :uglystupid2:

Just updated the PHP8 test installation. Works!
PHP7.4 too.
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on March 19, 2022, 05:26:18 PM
However, on the pages with the block settings of the individual blocks ("index.php?action=admin;area=tpblocks&sa=editblock&id=X") the "footer" has now slipped into the "wrapper". In both installations.
Title: Re: Elkarte TinyPortal Testing
Post by: tino on March 19, 2022, 06:08:24 PM
I think that must of always been the case, as I've not changed the html. Well in a while.

I'll work out where the missing div is as that's mostly likely what is causing the issue. It's not being closed properly somewhere.
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on March 20, 2022, 09:12:36 AM
Am curious by nature and found a <p class "clearthefloat"> unnecessary with today's CSS possibilities. But that should not be the problem here now. Much rather the following in the shout block, line 47 (so also for the SMF version?):

Quote<a style="color:#FF0000;" href="http://192.168.0.70/SMF2.1/index.php?action=profile;u=1">admin</a>: <span style="color:#000">Another one</span>

Really?

Furthermore: Please use "style=" exclusively when it comes to variables that are only defined in the settings and not in the CSS. Pixel width of the panels for example. This makes it much easier to adjust the appearance with different themes.
Title: Re: Elkarte TinyPortal Testin
Post by: @rjen on March 20, 2022, 09:24:39 AM
Please take note that the templates for the Elk version have the same origin als the SMF version. So there is a LOT of legacy in there.

And the SMF version is still supporting the 2.0 branche ...

There is a lot of cleanup that can be done..( you don't know how Much in-line styles I removed over the last few versions)

For the SMF branche this will probably have to wait till we drop 2.0 support. Feel free to contribute on the Elk branche. We can use the help...

As for the ip address, what is the question? I am assuming you are running a local install?

Title: Re: Elkarte TinyPortal Testing
Post by: tino on March 20, 2022, 09:41:35 AM
The IP address is hard coded by me when I was playing with adding a shout box in the Elkarte version, so test code.

That's one of my test IP's, I don't think you can chose a shoutbox for Elkarte yet.
Title: Re: Elkarte TinyPortal Testing
Post by: @rjen on March 20, 2022, 09:46:28 AM
Then I don't understand the Really? Question tbh. Can you elaborate?
Title: Re: Elkarte TinyPortal Testing
Post by: tino on March 20, 2022, 09:47:35 AM
Quote from: @rjen on March 20, 2022, 09:46:28 AM
Then I don't understand the Really? Question tbh. Can you elaborate?

Who me? I'm not sure what you would like me to elaborate on?
Title: Re: Elkarte TinyPortal Testing
Post by: @rjen on March 20, 2022, 09:53:18 AM
Quote from: McFly on March 20, 2022, 09:12:36 AM
Much rather the following in the shout block, line 47 (so also for the SMF version?):

Quote<a style="color:#FF0000;" href="http://192.168.0.70/SMF2.1/index.php?action=profile;u=1">admin</a>: <span style="color:#000">Another one</span>

Really?


It seems to me you are surprised about something and looking for an explanation?
Title: Re: Elkarte TinyPortal Testing
Post by: tino on March 20, 2022, 09:57:47 AM
That's not me you've quoted.

I know it's there as we allow you to style the shout box lines in the admin menu for SMF.

Not sure what McFly was on about.
Title: Re: Elkarte TinyPortal Testing
Post by: @rjen on March 20, 2022, 10:03:35 AM
Sorry, I thought it was McFly responding,  :doh:
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on March 20, 2022, 10:12:04 AM
Oh, sorry. Wanted to show the IP only in red, but that was not possible as "code".
Title: Re: Elkarte TinyPortal Testing
Post by: @rjen on March 20, 2022, 10:26:34 AM
Quote from: tino on March 20, 2022, 09:41:35 AM
The IP address is hard coded by me when I was playing with adding a shout box in the Elkarte version, so test code.

That's one of my test IP's, I don't think you can chose a shoutbox for Elkarte yet.

That explains it then
Title: Re: Elkarte TinyPortal Testing
Post by: tino on March 20, 2022, 10:37:00 AM
Quote from: McFly on March 19, 2022, 05:26:18 PM
However, on the pages with the block settings of the individual blocks ("index.php?action=admin;area=tpblocks&sa=editblock&id=X") the "footer" has now slipped into the "wrapper". In both installations.

I fixed this by adding a div after the blocks were set.
Title: Re: Elkarte TinyPortal Testing
Post by: tino on March 20, 2022, 10:38:48 AM
Quote from: @rjen on March 20, 2022, 10:26:34 AM
Quote from: tino on March 20, 2022, 09:41:35 AM
The IP address is hard coded by me when I was playing with adding a shout box in the Elkarte version, so test code.

That's one of my test IP's, I don't think you can chose a shoutbox for Elkarte yet.

That explains it then

It's actually just a copy of the html from SMF TP hence the url. I should get to looking at that sometime and adding those features back in. Although functionally it does what I want/need it to do now.
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on March 20, 2022, 11:52:00 AM
I would like to take care of editing the layout and design, or the theme "a bit". Mainly to purify it from legacy. As mentioned above, I have found about 250+ unnecessary <style="..."> in the code now, which can also be tucked away nicely in the CSS. Any ideas on this or better yet guidelines? I think most of it would also benefit the SMF variant.
Title: Re: Elkarte TinyPortal Testing
Post by: tino on March 20, 2022, 12:42:37 PM
Quote from: McFly on March 20, 2022, 11:52:00 AM
I would like to take care of editing the layout and design, or the theme "a bit". Mainly to purify it from legacy. As mentioned above, I have found about 250+ unnecessary <style="..."> in the code now, which can also be tucked away nicely in the CSS. Any ideas on this or better yet guidelines? I think most of it would also benefit the SMF variant.

Other than I would prefer to rip it up and change it all to grid/flex design. I have no preference.

If you look at Elkarte Version 2 ( there is a version of TinyPortal that works on that ) it is moving that way. So we should follow it.

However CSS/HTML is not my forte, so I'll leave it in your hands to decide on the best way and incorporate that.
Title: Re: Elkarte TinyPortal Testing
Post by: tino on March 20, 2022, 01:34:53 PM
I decided to rationalise and sort out my repo's.

Master is Elkarte 1.1

Development is Elkarte 2.0

Due to the differences between Elkarte 1.1 and Elkarte 2.0 they can't be the same base code. (Without some a lot of duplicate code so I'm going to split them) The existing master seems to work ok now you have pointed me in the direction of most of the existing bugs @McFly so I am probably going to leave that as is and move to Elkarte 2.0 development. As I am the only one actively using it other than yourself I don't see any harm in that, especially seeming I want the gallery section working for Elkarte 2.0 so I can retire my existing gallery logic in YAPortal.
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on March 20, 2022, 02:49:44 PM
Quote from: tino on March 20, 2022, 12:42:37 PM
...

Other than I would prefer to rip it up and change it all to grid/flex design. I have no preference.

If you look at Elkarte Version 2 ( there is a version of TinyPortal that works on that ) it is moving that way. So we should follow it.

However CSS/HTML is not my forte, so I'll leave it in your hands to decide on the best way and incorporate that.

This makes sense, but also a lot of work. I think the easiest thing to do first will be to get rid of everything obsolete and useless and keep only what is really necessary for the operation and appearance of the portal. Everything that is already covered by the ELK design does not need to be defined again. For a better overview and for separation from the functional, however, a separate posting for this is then also useful.

Even if ELK1 is a SMF2.0 fork, the theme there is also quite far adapted to newer CSS features and quite capable. From ELK2 I have been able to view only the developer version on the site itself. There is no public repository?
Title: Re: Elkarte TinyPortal Testing
Post by: tino on March 20, 2022, 03:21:48 PM
Public repo is here https://github.com/elkarte/Elkarte for Elkarte 2 - make sure development is selected.

Happy with either way, stripping it out to essentials then building up from that does make a lot of sense. I took the approach of rip everything up and mostly start again for TinyPortal and Elkarte which is why so much functionality is broken. This isn't always a good thing!

It is so far removed from the original they are largely two different programs now. To the point where I look at the SMF version and get confused things are not where I would expect them to be... Which is largely why I made the decision a while ago to only support that codebase with bug fixes and new PHP versions, and put what little development time I do have free into Elkarte's one. Which in the last few years has been minimal if I am completely honest.
Title: Re: Elkarte TinyPortal Testing
Post by: McFly on March 22, 2022, 08:31:12 AM
Thanks for pointing out that ELK 2.0 is hiding behind the development branch on github, which says in the column next to it on the right that the latest release is 1.1.8 ... and I've been thinking all along that the early beta is not yet public.

So I'm right in assuming that your free programming time is more towards TP for ELK2, rather than versions for SMF and ELK1 in general?

Then I will take care of the cleanup for TP for ELK1 for now, sort of as a familiarization. And because there will be fewer changes there that I would still need to include.
Title: Re: Elkarte TinyPortal Testing
Post by: tino on March 22, 2022, 10:33:19 AM
Quote from: McFly on March 22, 2022, 08:31:12 AM
Thanks for pointing out that ELK 2.0 is hiding behind the development branch on github, which says in the column next to it on the right that the latest release is 1.1.8 ... and I've been thinking all along that the early beta is not yet public.

So I'm right in assuming that your free programming time is more towards TP for ELK2, rather than versions for SMF and ELK1 in general?

Then I will take care of the cleanup for TP for ELK1 for now, sort of as a familiarization. And because there will be fewer changes there that I would still need to include.

It's been split between Elkarte 1.1 and Elkarte 2.0, Elkarte 2.0 is a moving target so it keeps breaking.

Currently when I make a change to the 1.1 version it is close enough to the 2.0 version that I can cross merge the commit and don't have to repeat my work. When this becomes too arduous I'll drop one or the other. The 1.1 version does what I need it to do, so being selfish it makes more sense to work on the 2.0 to make it do what I need it to do when Elkarte 2.0 is released. Which is add the missing features which are in the other portal I made YAPortal.

So focus on what you feel is best, I can cross merge from one to the other in most instances.