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

Recent

Welcome to TinyPortal. Please login or sign up.

March 29, 2024, 04:52:54 AM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,105
  • Total Topics: 21,213
  • Online today: 304
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 307
  • Total: 307

How i removed TinyPortal profiles buttons

Started by jotade29, May 02, 2022, 03:40:39 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jotade29

I use v2.0.19 SMF
Version TinyPortal 2.1.0

I have tried to comment out the code in tpsubs but nothing, the menu keeps showing up. How can I remove it?

@rjen

Hi, can you be a bit more specific ? What are you trying to remove ?
Running Latest TP on SMF2.1 at: www.fjr-club.nl

@rjen

Just guessing you mean the TinyPortal option in the profile...

You have to change the file Integrate.php in Tinyportal folder

change this code

    public static function hookProfileArea(&$profile_areas)
    {
        global $txt, $context;

        $profile_areas['tp'] = array(
            'title' => 'TinyPortal',
            'areas' => array(),
        );
               // Profile area for 2.1
        if( TP_SMF21 ) {
            $profile_areas['tp']['areas']['tpsummary'] = array(
                'label' => $txt['tpsummary'],
                'file' => 'TPSubs.php',
                'function' => 'tp_summary',
                'icon' => 'menu_tp',
                'permission' => array(
                    'own' => 'profile_view_own',
                    'any' => 'profile_view_any',
                ),
            );

            if (!$context['TPortal']['use_wysiwyg']=='0') {
                $profile_areas['tp']['areas']['tparticles'] = array(
                    'label' => $txt['articlesprofile'],
                    'file' => 'TPSubs.php',
                    'function' => 'tp_articles',
                    'icon' => 'menu_tparticle',
                    'permission' => array(
                        'own' => 'profile_view_own',
                        'any' => 'profile_view_any',
                    ),
                    'subsections' => array(
                        'articles' => array($txt['tp-articles'], array('profile_view_own', 'profile_view_any')),
                        'settings' => array($txt['tp-settings'], array('profile_view_own', 'profile_view_any')),
                    ),
                );
            }
            else {
                $profile_areas['tp']['areas']['tparticles'] = array(
                    'label' => $txt['articlesprofile'],
                    'file' => 'TPSubs.php',
                    'function' => 'tp_articles',
                    'icon' => 'menu_tparticle',
                    'permission' => array(
                        'own' => 'profile_view_own',
                        'any' => 'profile_view_any',
                    ),
                );
            }

            if(!empty($context['TPortal']['show_download'])) {
                $profile_areas['tp']['areas']['tpdownload'] = array(
                    'label' => $txt['downloadsprofile'],
                    'file' => 'TPSubs.php',
                    'function' => 'tp_download',
                    'icon' => 'menu_tpdownload',
                    'permission' => array(
                        'own' => 'profile_view_own' && !empty($context['TPortal']['show_download']),
                        'any' => 'profile_view_any' && !empty($context['TPortal']['show_download']),
                    ),
                );
            }

            if(!$context['TPortal']['profile_shouts_hide']) {
                $profile_areas['tp']['areas']['tpshoutbox'] = array(
                    'label' => $txt['shoutboxprofile'],
                    'file' => 'TPShout.php',
                    'function' => 'tp_shoutb',
                    'icon' => 'menu_tpshout',
                    'permission' => array(
                        'own' => 'profile_view_own',
                        'any' => 'profile_view_any',
                    ),
                );
            }
        }
        else {
            // Profile area for 2.0 - no icons
            $profile_areas['tp']['areas']['tpsummary'] = array(
                'label' => $txt['tpsummary'],
                'file' => 'TPSubs.php',
                'function' => 'tp_summary',
                'permission' => array(
                    'own' => 'profile_view_own',
                    'any' => 'profile_view_any',
                ),
            );

            if (!$context['TPortal']['use_wysiwyg']=='0') {
                $profile_areas['tp']['areas']['tparticles'] = array(
                    'label' => $txt['articlesprofile'],
                    'file' => 'TPSubs.php',
                    'function' => 'tp_articles',
                    'permission' => array(
                        'own' => 'profile_view_own',
                        'any' => 'profile_view_any',
                    ),
                    'subsections' => array(
                        'articles' => array($txt['tp-articles'], array('profile_view_own', 'profile_view_any')),
                        'settings' => array($txt['tp-settings'], array('profile_view_own', 'profile_view_any')),
                    ),
                );
            }
            else {
                $profile_areas['tp']['areas']['tparticles'] = array(
                    'label' => $txt['articlesprofile'],
                    'file' => 'TPSubs.php',
                    'function' => 'tp_articles',
                    'permission' => array(
                        'own' => 'profile_view_own',
                        'any' => 'profile_view_any',
                    ),
                );
            }

            if(!empty($context['TPortal']['show_download'])) {
                $profile_areas['tp']['areas']['tpdownload'] = array(
                    'label' => $txt['downloadsprofile'],
                    'file' => 'TPSubs.php',
                    'function' => 'tp_download',
                    'permission' => array(
                        'own' => 'profile_view_own',
                        'any' => 'profile_view_any',
                    ),
                );
            }

            if(!$context['TPortal']['profile_shouts_hide']) {
                $profile_areas['tp']['areas']['tpshoutbox'] = array(
                    'label' => $txt['shoutboxprofile'],
                    'file' => 'TPShout.php',
                    'function' => 'tp_shoutb',
                    'permission' => array(
                        'own' => 'profile_view_own',
                        'any' => 'profile_view_any',
                    ),
                );
            }

        }

    }


to this code..


    public static function hookProfileArea(&$profile_areas)
    {
        global $txt, $context;

        $profile_areas['tp'] = array(
            'title' => 'TinyPortal',
            'areas' => array(),
        );
               // Profile area for 2.1
        if( TP_SMF21 ) {
            $profile_areas['tp']['areas']['tpsummary'] = array(
                'label' => $txt['tpsummary'],
                'file' => 'TPSubs.php',
                'function' => 'tp_summary',
                'icon' => 'menu_tp',
                'permission' => array(
                    'own' => 'profile_view_own',
                    'any' => 'profile_view_any',
                ),
            );

            if (!$context['TPortal']['use_wysiwyg']=='0') {
                $profile_areas['tp']['areas']['tparticles'] = array(
                    'label' => $txt['articlesprofile'],
                    'file' => 'TPSubs.php',
                    'function' => 'tp_articles',
                    'icon' => 'menu_tparticle',
                    'permission' => array(
                        'own' => 'profile_view_own',
                        'any' => 'profile_view_any',
                    ),
                    'subsections' => array(
                        'articles' => array($txt['tp-articles'], array('profile_view_own', 'profile_view_any')),
                        'settings' => array($txt['tp-settings'], array('profile_view_own', 'profile_view_any')),
                    ),
                );
            }
            else {
                $profile_areas['tp']['areas']['tparticles'] = array(
                    'label' => $txt['articlesprofile'],
                    'file' => 'TPSubs.php',
                    'function' => 'tp_articles',
                    'icon' => 'menu_tparticle',
                    'permission' => array(
                        'own' => 'profile_view_own',
                        'any' => 'profile_view_any',
                    ),
                );
            }

            if(!empty($context['TPortal']['show_download'])) {
                $profile_areas['tp']['areas']['tpdownload'] = array(
                    'label' => $txt['downloadsprofile'],
                    'file' => 'TPSubs.php',
                    'function' => 'tp_download',
                    'icon' => 'menu_tpdownload',
                    'permission' => array(
                        'own' => 'profile_view_own' && !empty($context['TPortal']['show_download']),
                        'any' => 'profile_view_any' && !empty($context['TPortal']['show_download']),
                    ),
                );
            }

            if(!$context['TPortal']['profile_shouts_hide']) {
                $profile_areas['tp']['areas']['tpshoutbox'] = array(
                    'label' => $txt['shoutboxprofile'],
                    'file' => 'TPShout.php',
                    'function' => 'tp_shoutb',
                    'icon' => 'menu_tpshout',
                    'permission' => array(
                        'own' => 'profile_view_own',
                        'any' => 'profile_view_any',
                    ),
                );
            }
        }
        else {
            // Profile area for 2.0 - no icons
/*            $profile_areas['tp']['areas']['tpsummary'] = array(
                'label' => $txt['tpsummary'],
                'file' => 'TPSubs.php',
                'function' => 'tp_summary',
                'permission' => array(
                    'own' => 'profile_view_own',
                    'any' => 'profile_view_any',
                ),
            );

            if (!$context['TPortal']['use_wysiwyg']=='0') {
                $profile_areas['tp']['areas']['tparticles'] = array(
                    'label' => $txt['articlesprofile'],
                    'file' => 'TPSubs.php',
                    'function' => 'tp_articles',
                    'permission' => array(
                        'own' => 'profile_view_own',
                        'any' => 'profile_view_any',
                    ),
                    'subsections' => array(
                        'articles' => array($txt['tp-articles'], array('profile_view_own', 'profile_view_any')),
                        'settings' => array($txt['tp-settings'], array('profile_view_own', 'profile_view_any')),
                    ),
                );
            }
            else {
                $profile_areas['tp']['areas']['tparticles'] = array(
                    'label' => $txt['articlesprofile'],
                    'file' => 'TPSubs.php',
                    'function' => 'tp_articles',
                    'permission' => array(
                        'own' => 'profile_view_own',
                        'any' => 'profile_view_any',
                    ),
                );
            }

            if(!empty($context['TPortal']['show_download'])) {
                $profile_areas['tp']['areas']['tpdownload'] = array(
                    'label' => $txt['downloadsprofile'],
                    'file' => 'TPSubs.php',
                    'function' => 'tp_download',
                    'permission' => array(
                        'own' => 'profile_view_own',
                        'any' => 'profile_view_any',
                    ),
                );
            }

            if(!$context['TPortal']['profile_shouts_hide']) {
                $profile_areas['tp']['areas']['tpshoutbox'] = array(
                    'label' => $txt['shoutboxprofile'],
                    'file' => 'TPShout.php',
                    'function' => 'tp_shoutb',
                    'permission' => array(
                        'own' => 'profile_view_own',
                        'any' => 'profile_view_any',
                    ),
                );
            }
*/
        }

    }
Running Latest TP on SMF2.1 at: www.fjr-club.nl

jotade29

Yes, thank you very much. Before it was in the following file -> TPassimilate.php but apparently its content has been migrated to integrate.php