Getting started nulling Invision Power Suite retail

by guntherbb - 11-05-2015, 04:07 AM
Novice
Posts:
44
Joined:
Apr 2015
Likes:
3
Credits:
193
Reputation:
3
2 Years of Service
#1
OP
Posted: 11-05-2015, 04:07 AM (This post was last modified: 11-05-2015, 04:22 AM by guntherbb.)
As the title says, this is to get people started and not a full blown null.  This information is used for a fresh install and has not been tested on an upgrade.

First of all, if you have memory issues when you go to install, and it won't continue, you can get around this.  The required memory is 128M, which is set in your php.ini file on your host.  If they limit you to say 64M, you can add this line to your init.php file.

ini_set('memory_limit','128M');

You want to add this right after the

namespace IPS;

which is at the top of the init.php file.  So it would look like this


<?php
/**
* @brief Initiates IPS Social Suite constants, autoloader and exception handler
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright © 2001 - SVN_YYYY Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @since 18 Feb 2013
* @version SVN_VERSION_NUMBER
*/

namespace IPS;
ini_set('memory_limit','128M');

/**



Now we will handle the license issues for the install.  Please note that this does not remove the license but will allow you to install and test the board.  Open the file license.php found at /applicatioins/core/modules/setup/install/license.php and look for the following section.


public function manage()

    {

        $form = new \IPS\Helpers\Form( 'license', 'continue', \IPS\Http\Url::external( ( ( isset( $_SERVER['HTTPS'] ) AND $_SERVER['HTTPS'] == 'on' ) ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME'] . '?controller=license' ) );

        $form->add( new \IPS\Helpers\Form\Text( 'lkey', NULL, TRUE, array( 'size' => 50 ), function( $val )

        {

            \IPS\IPS::checkLicenseKey( $val, ( ( isset( $_SERVER['HTTPS'] ) AND $_SERVER['HTTPS'] == 'on' ) ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . mb_substr( $_SERVER['SCRIPT_NAME'], 0, -mb_strlen( \IPS\CP_DIRECTORY . '/install/index.php' ) ) );

        }, NULL, '<a href="' . \IPS\Http\Url::ips( 'docs/find_lkey' ) . '" target="_blank">' . \IPS\Member::loggedIn()->language()->addToStack('lkey_help') . '</a>' ) );

        $form->add( new \IPS\Helpers\Form\Checkbox( 'eula', FALSE, TRUE, array( 'label' => 'eula_suffix' ), function( $val )

        {

            if ( !$val )

            {

                throw new \InvalidArgumentException('eula_err');

            }

        }, "<textarea disabled style='width: 100%; height: 250px'>" . file_get_contents( 'eula.txt' ) . "</textarea><br>" ) );


For the 'size'=>50 above, change the 50 to a 1, and then you can enter a letter, number, I think even a space and that is enough to satisfy the license requirements for right now to continue the install.  As for the other area highlighted red, you can remove all that.  I believe removing the eula check will prevent an error being thrown if you don't check the box, so when installing, just throw a number in the license and hit continue and it should be good to go.

Next we will deal with the big red box that would show up for a missing or invalid license, that will show up in the admin area.  To prevent/disable this, we will edit the theme.xml file located at /applications/core/data/theme.xml.  Open this file and search for a section that looks like this, it can be easily found by searching for the word "license":



<template template_group="global" template_name="lkeyWarning" template_data="" template_location="global" template_app="core"><![CDATA[

{{if $lkeyWarning = \IPS\Output::i()->licenseKeyWarning()}}

    {{if $lkeyWarning == 'none'}}

        <div class="ipsMessage ipsMessage_error" id='elLicenseKey'>

            {lang="license_error_none"}

        </div>

    {{elseif $lkeyWarning == 'expired' && !isset( \IPS\Request::i()->cookie['licenseDismiss'] )}}

        <div class="ipsMessage ipsMessage_general" id='elLicenseKey' data-controller='core.global.core.license'>

            {lang="license_error_expired"}

            <ul class='ipsList_inline'>

                <li>

                    <a href='{url="renew_my_license" ips="true"}' class='ipsButton ipsButton_verySmall ipsButton_veryLight'>{lang="license_renew_now"}</a>

                </li>

                <li>

                    <a href='{url="app=core&module=settings&controller=licensekey&do=refresh" base="admin"}' class='ipsButton ipsButton_verySmall ipsButton_veryLight'>{lang="license_check_again"}</a>

                </li>

            </ul>

            <a href='#' data-role='closeMessage' data-ipsTooltip title='{lang="license_dismiss"}'>&times;</a>

        </div>

    {{endif}}

{{endif}}]]></template>

The first set of <div></div> tags to remove are these, which are for a missing license:



<div class="ipsMessage ipsMessage_error" id='elLicenseKey'>
     {lang="license_error_none"}
</div>


And the 2nd set are these ones, which are for an expired license:



<div class="ipsMessage ipsMessage_general" id='elLicenseKey' data-controller='core.global.core.license'>

            {lang="license_error_expired"}

            <ul class='ipsList_inline'>

                <li>

                    <a href='{url="renew_my_license" ips="true"}' class='ipsButton ipsButton_verySmall ipsButton_veryLight'>{lang="license_renew_now"}</a>

                </li>

                <li>

                    <a href='{url="app=core&module=settings&controller=licensekey&do=refresh" base="admin"}' class='ipsButton ipsButton_verySmall ipsButton_veryLight'>{lang="license_check_again"}</a>

                </li>

            </ul>

            <a href='#' data-role='closeMessage' data-ipsTooltip title='{lang="license_dismiss"}'>&times;</a>

        </div>

So after we remove these, this section will shrink quite a bit and look like this:



<template template_group="global" template_name="lkeyWarning" template_data="" template_location="global" template_app="core"><![CDATA[

{{if $lkeyWarning = \IPS\Output::i()->licenseKeyWarning()}}

    {{if $lkeyWarning == 'none'}}

    {{elseif $lkeyWarning == 'expired' && !isset( \IPS\Request::i()->cookie['licenseDismiss'] )}}

    {{endif}}

{{endif}}]]></template>



Now the last thing we need to take care of for now is the md5 checks that were introduced in version 4.0.3, which allow IPS to know if you have modified the files. The md5 check takes place in a file support.php located at /applications/core/modules/admin/support/support.php To take care of this, I just replaced the file, with the one from version 4.0.2, which never performed the md5 check.  The contents of these is below:  


And the 4.0.2 support.php file:

The last reply on this thread is older than a month. Please do not unnecessarily bump it.
Register an account or login to reply
Create an account
Create a free account today and start posting right away. It only takes a few seconds.
Login
Log into an existing account.
1 Guest(s)