Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome, Guest. Please login or register.
Did you miss your activation email?

October 04, 2022, 11:17:03 AM

Login with username, password and session length
Members
  • Total Members: 3848
  • Latest: rrolle
Stats
  • Total Posts: 193513
  • Total Topics: 21092
  • Online today: 58
  • Online ever: 3540
  • (September 02, 2022, 06:38:54 PM)
Users Online
Users: 0
Guests: 51
Total: 51

Author Topic: Elkarte TinyPortal Testing  (Read 18446 times)

0 Members and 1 Guest are viewing this topic.

Offline tino

  • Developer
  • *
  • Posts: 2615
Re: Elkarte TinyPortal Testing
« Reply #20 on: February 04, 2021, 01:55:50 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.

Offline @rjen

  • Support Team
  • *
  • Posts: 3300
    • FJR-club Nederland
Re: Elkarte TinyPortal Testing
« Reply #21 on: February 04, 2021, 02: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...
Running Latest TP on SMF2.1 at: www.fjr-club.nl

Offline tino

  • Developer
  • *
  • Posts: 2615
Re: Elkarte TinyPortal Testing
« Reply #22 on: February 04, 2021, 02: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.

Offline @rjen

  • Support Team
  • *
  • Posts: 3300
    • FJR-club Nederland
Re: Elkarte TinyPortal Testing
« Reply #23 on: February 04, 2021, 02:49:10 PM »
Yeah, I understand : the code base is already quite different.... never mind
Running Latest TP on SMF2.1 at: www.fjr-club.nl

Offline tino

  • Developer
  • *
  • Posts: 2615
Re: Elkarte TinyPortal Testing
« Reply #24 on: February 04, 2021, 02:55:40 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  ::)

Offline tino

  • Developer
  • *
  • Posts: 2615
Re: Elkarte TinyPortal Testing
« Reply #25 on: February 04, 2021, 03:07:25 PM »

Adding this to Integrate.php might work...

Code: [Select]
    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

Code: [Select]
'admin_areas'                       => 'TinyPortal\Integrate::hookAdminAreas',

Offline @rjen

  • Support Team
  • *
  • Posts: 3300
    • FJR-club Nederland
Re: Elkarte TinyPortal Testing
« Reply #26 on: February 05, 2021, 12: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...
Running Latest TP on SMF2.1 at: www.fjr-club.nl

Offline tino

  • Developer
  • *
  • Posts: 2615
Re: Elkarte TinyPortal Testing
« Reply #27 on: February 05, 2021, 06:40:59 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.

Offline tino

  • Developer
  • *
  • Posts: 2615
Re: Elkarte TinyPortal Testing
« Reply #28 on: February 06, 2021, 03: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 )


Offline lurkalot

  • Administrator
  • *
  • Posts: 7409
    • Camera Craniums
Re: Elkarte TinyPortal Testing
« Reply #29 on: February 06, 2021, 06:04:46 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.  ;)