TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

May 25, 2024, 02:41:10 PM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,197
  • Total Topics: 21,221
  • Online today: 144
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online

Elkarte TinyPortal Testing

Started by tino, January 05, 2021, 01:55:34 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

tino

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.

@rjen

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...
Running Latest TP on SMF2.1 at: www.fjr-club.nl

tino

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.

@rjen

Yeah, I understand : the code base is already quite different.... never mind
Running Latest TP on SMF2.1 at: www.fjr-club.nl

tino

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  ::)

tino


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',

@rjen

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...
Running Latest TP on SMF2.1 at: www.fjr-club.nl

tino

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.

tino

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 )


lurkalot

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.  ;)