SimplePortal

Customization => Custom Coding => Topic started by: grafitus on September 26, 2009, 05:39:52 AM

Title: Hide SimplePortal Version
Post by: grafitus on September 26, 2009, 05:39:52 AM
Open {Your_SMF_Directory}/index.php  (http://i33.tinypic.com/mh9hg0.png) (http://i34.tinypic.com/5682s.png) 
Code: (Find) [Select]
sportal_init();
Code: (Add After) [Select]
$GLOBALS['sportal_version'] = '';  If you make this change, anywhere "SimplePortal Version" is blank.
Title: Re: Hide SimplePortal Version
Post by: Nathaniel on September 26, 2009, 05:57:34 AM
That would work, but there is little point in hiding your portal version number.

Also, some of the code in certain areas (like the general admin information area) rely on that variable which is set to nothing. ;)
Title: Re: Hide SimplePortal Version
Post by: ccbtimewiz on September 26, 2009, 11:51:56 AM
if (!empty($_GET['action']) && ($_GET['action'] !== 'admin') && $context['user']['is_admin'])
     $GLOBALS['sportal_version'] = '';
Title: Re: Hide SimplePortal Version
Post by: Eliana Tamerin on September 26, 2009, 01:06:43 PM
Administrating SP does not require being an admin. You should be checking the permission to admin SP, rather than if they're an admin.
Title: Re: Hide SimplePortal Version
Post by: ccbtimewiz on September 26, 2009, 01:48:23 PM
Administrating SP does not require being an admin. You should be checking the permission to admin SP, rather than if they're an admin.

$context['user']['is_admin'] will return true if the user has any administrative permissions, iirc. That would include admining SP.

If not, simply change to isAllowedTo('admin_forum') or whatever the relevant permission is.
Title: Re: Hide SimplePortal Version
Post by: Adjacent on May 13, 2011, 01:05:15 PM
Open {Your_SMF_Directory}/index.php  (http://i33.tinypic.com/mh9hg0.png) (http://i34.tinypic.com/5682s.png) 
Code: (Find) [Select]
sportal_init();
Code: (Add After) [Select]
$GLOBALS['sportal_version'] = '';  If you make this change, anywhere "SimplePortal Version" is blank.

Confirmed not working on Simple Portal 2.3.3 on SMF 1.1.xx, as of May 13 2011...  :(
SimplePortal 2.3.8 © 2008-2024, SimplePortal