m000 Posted February 11, 2015 Share Posted February 11, 2015 (edited) beta 6:init.phpchange public static function checkLicenseKey( $val, $url ) { $test = FALSE; if ( mb_substr( $val, -12 ) === '-TESTINSTALL' ) { $test = TRUE; $val = mb_substr( $val, 0, -12 ); } $urlKey = $test ? 'test_url' : 'url'; try { $response = IPSHttpUrl::ips( 'license/' . $val )->setQueryString( $urlKey, $url )->request()->get(); switch ( $response->httpResponseCode ) { case 200: $response = json_decode( $response, TRUE ); if ( $response['legacy'] ) { throw new DomainException( 'license_key_legacy' ); } /* Previously, URL's were stored as http://domain.com/forums - this check here may throw a "key already in use" error if upgrading or setting up a test install */ if ( rtrim( $response[ $urlKey ], '/' ) !== rtrim( $url, '/' ) ) { if ( $response[ $urlKey ] ) { throw new DomainException( $test ? 'license_key_test_active' : 'license_key_active' ); } else { IPSHttpUrl::ips( 'license/' . $val )->request()->post( array( $urlKey => $url ) ); } } break; case 404: throw new DomainException( 'license_key_not_found' ); default: throw new DomainException( 'license_server_error' ); } } catch ( IPSHttpRequestException $e ) { throw new DomainException( 'license_server_error' ); } }topublic static function checkLicenseKey( $val, $url ) { /*$test = FALSE; if ( mb_substr( $val, -12 ) === '-TESTINSTALL' ) { $test = TRUE; $val = mb_substr( $val, 0, -12 ); } $urlKey = $test ? 'test_url' : 'url'; try { $response = IPSHttpUrl::ips( 'license/' . $val )->setQueryString( $urlKey, $url )->request()->get(); switch ( $response->httpResponseCode ) { case 200: $response = json_decode( $response, TRUE ); if ( $response['legacy'] ) { throw new DomainException( 'license_key_legacy' ); } /* Previously, URL's were stored as http://domain.com/forums - this check here may throw a "key already in use" error if upgrading or setting up a test install if ( rtrim( $response[ $urlKey ], '/' ) !== rtrim( $url, '/' ) ) { if ( $response[ $urlKey ] ) { throw new DomainException( $test ? 'license_key_test_active' : 'license_key_active' ); } else { IPSHttpUrl::ips( 'license/' . $val )->request()->post( array( $urlKey => $url ) ); } } break; case 404: throw new DomainException( 'license_key_not_found' ); default: throw new DomainException( 'license_server_error' ); } } catch ( IPSHttpRequestException $e ) { throw new DomainException( 'license_server_error' ); }*/ }systemOutputOutput.phpchangepublic function licenseKeyWarning() { if ( !IPSSettings::i()->ipb_reg_number and IPSMember::loggedIn()->hasAcpRestriction( 'core', 'settings', 'licensekey_manage' ) ) { return 'none'; } else { $licenseKey = IPSIPS::licenseKey(); if ( ( $licenseKey === NULL or ( isset( $licenseKey['legacy'] ) and $licenseKey['legacy'] ) ) and IPSMember::loggedIn()->hasAcpRestriction( 'core', 'settings', 'licensekey_manage' ) ) { return 'none'; } elseif ( ( ( $licenseKey['expires'] and strtotime( $licenseKey['expires'] ) < time() ) or ! isset( $licenseKey['active'] ) or !$licenseKey['active'] ) and IPSMember::loggedIn()->hasAcpRestriction( 'core', 'settings', 'licensekey_manage' ) ) { return 'expired'; } } return NULL; }topublic function licenseKeyWarning() { /*if ( !IPSSettings::i()->ipb_reg_number and IPSMember::loggedIn()->hasAcpRestriction( 'core', 'settings', 'licensekey_manage' ) ) { return 'none'; } else { $licenseKey = IPSIPS::licenseKey(); if ( ( $licenseKey === NULL or ( isset( $licenseKey['legacy'] ) and $licenseKey['legacy'] ) ) and IPSMember::loggedIn()->hasAcpRestriction( 'core', 'settings', 'licensekey_manage' ) ) { return 'none'; } elseif ( ( ( $licenseKey['expires'] and strtotime( $licenseKey['expires'] ) < time() ) or ! isset( $licenseKey['active'] ) or !$licenseKey['active'] ) and IPSMember::loggedIn()->hasAcpRestriction( 'core', 'settings', 'licensekey_manage' ) ) { return 'expired'; } }*/ return NULL; } Edited February 11, 2015 by m000 1 Link to comment Share on other sites More sharing options...
Bogdan. Posted February 12, 2015 Share Posted February 12, 2015 Thanks very much! Link to comment Share on other sites More sharing options...
Administrator Tony Posted February 24, 2015 Administrator Share Posted February 24, 2015 Just to note, this tutorial does not work with any of the Release Candidates. Link to comment Share on other sites More sharing options...
Xing Posted February 25, 2015 Share Posted February 25, 2015 I currently have RC1 (well I'm pretty sure I do... it's not really helpful since they removed the version counter from the footer and files :<) installed with changes done to my init.php file that should fix this issue (it's working for me atm... at least). Try these changes as I've published it to diffchecker: https://www.diffchecker.com/vg8i4n2p Let me know if this works ;3 2 Link to comment Share on other sites More sharing options...
Wifi123 Posted February 28, 2015 Share Posted February 28, 2015 Awesome tut, man. Thanks. Link to comment Share on other sites More sharing options...
frederik Posted February 28, 2015 Share Posted February 28, 2015 I currently have RC1 (well I'm pretty sure I do... it's not really helpful since they removed the version counter from the footer and files :<) installed with changes done to my init.php file that should fix this issue (it's working for me atm... at least). Try these changes as I've published it to diffchecker: https://www.diffchecker.com/vg8i4n2p Let me know if this works ;3 Its working on RC2 :3 Link to comment Share on other sites More sharing options...
Decon Posted March 1, 2015 Author Share Posted March 1, 2015 Good to here that it is working. Glad someone can actually verify that it works on the latest release. Link to comment Share on other sites More sharing options...
Luke Posted March 6, 2015 Share Posted March 6, 2015 This works great, but is there anyways to remove the license key missing warning? Link to comment Share on other sites More sharing options...
Mortiferr Posted March 6, 2015 Share Posted March 6, 2015 This works great, but is there anyways to remove the license key missing warning? Link to comment Share on other sites More sharing options...
Luke Posted March 7, 2015 Share Posted March 7, 2015 I'd assume this doesn't apply in IPB 4... After my testing, I'll likely continue to use 3.x.x until an actual nulled release is made available by one of the generous flakes here! Link to comment Share on other sites More sharing options...
Oklah Posted March 7, 2015 Share Posted March 7, 2015 Thx Link to comment Share on other sites More sharing options...
Erza Posted March 7, 2015 Share Posted March 7, 2015 Thanks for the time to write this tutorial. Sadly, I will have to replace my beta forum again now. Link to comment Share on other sites More sharing options...
Liiku Posted March 15, 2015 Share Posted March 15, 2015 Thanks for this guide! Link to comment Share on other sites More sharing options...
marcussacana Posted March 19, 2015 Share Posted March 19, 2015 for the rc need null the upgrade and install... and remove the request of dashboard and make the spam fuction abort all checks... Link to comment Share on other sites More sharing options...
louanbastos Posted April 22, 2015 Share Posted April 22, 2015 how can i upgrade, i do the tutorial says, but i want know how I can upgrade this.... everytime when i try to upgrade, show this to me Link to comment Share on other sites More sharing options...
Recommended Posts