35.gif

Search (advanced search)
Use this Search form before posting, asking or make a new thread.
Tips: Use Quotation mark to search words (eg. "How To Make Money Online")

10-11-2017, 03:48 AM
Post: #11
RE: [GET] ReHub Wordpress Theme v7.0.7. Purchase Code
Thanks and rep+ @Astra for good guide!
10-31-2017, 12:52 AM
Post: #12
RE: [GET] ReHub Wordpress Theme v7.0.7. Purchase Code
Not working.. -_-
Can you make a video for it?

(10-10-2017 08:10 PM)astra Wrote:  NULL IT BY YOURSELF


After altering the code activate theme with any key (for example 'abc123'). Installation of plug-ins will become available after activation.

FILE rehub/admin/rehub.php


THIS CODE

function rehub_update_registration() {

global $wp_version;

$rehub_options = get_option( 'Rehub_Key' );
$data = $_POST;
$tf_username = isset( $data['tf_username'] ) ? $data['tf_username'] : '';
$tf_purchase_code = isset( $data['tf_purchase_code'] ) ? $data['tf_purchase_code'] : '';

if ( '' !== $tf_username and& '' !== $tf_purchase_code ) {

$rehub_options['tf_username'] = $tf_username;
$tf_purchase_code = strtolower(preg_replace('#([a-z0-9]{8})-?([a-z0-9]{4})-?([a-z0-9]{4})-?([a-z0-9]{4})-?([a-z0-9]{12})#','$1-$2-$3-$4-$5',$tf_purchase_code));
$rehub_options['tf_purchase_code'] = $tf_purchase_code;

$prepare_request = array(
'user-agent' => 'WordPress/'. $wp_version .'; '. home_url(),
'sslverify' => false,
'timeout' => 10,
'headers' => array(
'Authorization' => 'Bearer saqMlpb8QSyFGYNjNxgmWzdwqkTUMbFl',
)
);

$raw_response = wp_remote_get( 'https://api.envato.com/v3/market/author/sale?code=' . $tf_purchase_code, $prepare_request );

if ( ! is_wp_error( $raw_response ) ) {
$response = wp_remote_retrieve_body( $raw_response );
$response = json_decode( $response, true );
}

if ( ! empty( $response ) ) {

if ( ( isset( $response['error'] ) ) || ( isset( $response['buyer'] ) and& empty( $response['buyer'] ) ) ) {
echo 'Error';
} elseif ( isset( $response['buyer'] ) and& ! empty( $response['buyer'] ) ) {
if ($response['buyer'] == $tf_username) {
if (!empty ($response['supported_until'])) {
$rehub_options['tf_support_date'] = $response['supported_until'];
}
$result = update_option( 'Rehub_Key', $rehub_options );
echo 'Updated';
}
else {
echo 'Errorbuyer';
}

}

} else {

echo 'Error';

}

} else {
echo 'Empty';
}

die();

}




REPLACE WITH THIS



function rehub_update_registration() {

global $wp_version;

$rehub_options = get_option( 'Rehub_Key' );
$data = $_POST;
$tf_username = isset( $data['tf_username'] ) ? $data['tf_username'] : '';
$tf_purchase_code = isset( $data['tf_purchase_code'] ) ? $data['tf_purchase_code'] : '';

if ( '' !== $tf_username and& '' !== $tf_purchase_code ) {

$rehub_options['tf_username'] = $tf_username;
$tf_purchase_code = strtolower(preg_replace('#([a-z0-9]{8})-?([a-z0-9]{4})-?([a-z0-9]{4})-?([a-z0-9]{4})-?([a-z0-9]{12})#','$1-$2-$3-$4-$5',$tf_purchase_code));
$rehub_options['tf_purchase_code'] = $tf_purchase_code;

$prepare_request = array(
'user-agent' => 'WordPress/'. $wp_version .'; '. home_url(),
'sslverify' => false,
'timeout' => 10,
'headers' => array(
'Authorization' => 'Bearer saqMlpb8QSyFGYNjNxgmWzdwqkTUMbFl',
)
);

$raw_response = wp_remote_get( 'https://api.envato.com/v3/market/author/sale?code=' . $tf_purchase_code, $prepare_request );

if ( ! is_wp_error( $raw_response ) ) {
$response = wp_remote_retrieve_body( $raw_response );
$response = json_decode( $response, true );
}

$tf_username = 'ganjaparker';
$response['buyer'] = 'ganjaparker';
$response['supported_until'] = '01.01.2020';
unset( $response['error'] );

if ( ! empty( $response ) ) {

if ( ( isset( $response['error'] ) ) || ( isset( $response['buyer'] ) and& empty( $response['buyer'] ) ) ) {
echo 'Error';
} elseif ( isset( $response['buyer'] ) and& ! empty( $response['buyer'] ) ) {
if ($response['buyer'] == $tf_username) {
if (!empty ($response['supported_until'])) {
$rehub_options['tf_support_date'] = $response['supported_until'];
}
$result = update_option( 'Rehub_Key', $rehub_options );
echo 'Updated';
}
else {
echo 'Errorbuyer';
}

}

} else {

echo 'Error';

}

} else {
echo 'Empty';
}

die();

}
10-31-2017, 01:25 AM
Post: #13
RE: [GET] ReHub Wordpress Theme v7.0.7. Purchase Code
Great share steph...repped! Any chance you have the v7.3 update?
11-13-2017, 03:58 AM (This post was last modified: 11-13-2017 04:16 AM by aashian.)
Post: #14
RE: [GET] ReHub Wordpress Theme v7.0.7. Purchase Code
(10-10-2017 08:10 PM)astra Wrote:  NULL IT BY YOURSELF


After altering the code activate theme with any key (for example 'abc123'). Installation of plug-ins will become available after activation.

FILE rehub/admin/rehub.php


THIS CODE

function rehub_update_registration() {

global $wp_version;

$rehub_options = get_option( 'Rehub_Key' );
$data = $_POST;
$tf_username = isset( $data['tf_username'] ) ? $data['tf_username'] : '';
$tf_purchase_code = isset( $data['tf_purchase_code'] ) ? $data['tf_purchase_code'] : '';

if ( '' !== $tf_username and& '' !== $tf_purchase_code ) {

$rehub_options['tf_username'] = $tf_username;
$tf_purchase_code = strtolower(preg_replace('#([a-z0-9]{8})-?([a-z0-9]{4})-?([a-z0-9]{4})-?([a-z0-9]{4})-?([a-z0-9]{12})#','$1-$2-$3-$4-$5',$tf_purchase_code));
$rehub_options['tf_purchase_code'] = $tf_purchase_code;

$prepare_request = array(
'user-agent' => 'WordPress/'. $wp_version .'; '. home_url(),
'sslverify' => false,
'timeout' => 10,
'headers' => array(
'Authorization' => 'Bearer saqMlpb8QSyFGYNjNxgmWzdwqkTUMbFl',
)
);

$raw_response = wp_remote_get( 'https://api.envato.com/v3/market/author/sale?code=' . $tf_purchase_code, $prepare_request );

if ( ! is_wp_error( $raw_response ) ) {
$response = wp_remote_retrieve_body( $raw_response );
$response = json_decode( $response, true );
}

if ( ! empty( $response ) ) {

if ( ( isset( $response['error'] ) ) || ( isset( $response['buyer'] ) and& empty( $response['buyer'] ) ) ) {
echo 'Error';
} elseif ( isset( $response['buyer'] ) and& ! empty( $response['buyer'] ) ) {
if ($response['buyer'] == $tf_username) {
if (!empty ($response['supported_until'])) {
$rehub_options['tf_support_date'] = $response['supported_until'];
}
$result = update_option( 'Rehub_Key', $rehub_options );
echo 'Updated';
}
else {
echo 'Errorbuyer';
}

}

} else {

echo 'Error';

}

} else {
echo 'Empty';
}

die();

}




REPLACE WITH THIS



function rehub_update_registration() {

global $wp_version;

$rehub_options = get_option( 'Rehub_Key' );
$data = $_POST;
$tf_username = isset( $data['tf_username'] ) ? $data['tf_username'] : '';
$tf_purchase_code = isset( $data['tf_purchase_code'] ) ? $data['tf_purchase_code'] : '';

if ( '' !== $tf_username and& '' !== $tf_purchase_code ) {

$rehub_options['tf_username'] = $tf_username;
$tf_purchase_code = strtolower(preg_replace('#([a-z0-9]{8})-?([a-z0-9]{4})-?([a-z0-9]{4})-?([a-z0-9]{4})-?([a-z0-9]{12})#','$1-$2-$3-$4-$5',$tf_purchase_code));
$rehub_options['tf_purchase_code'] = $tf_purchase_code;

$prepare_request = array(
'user-agent' => 'WordPress/'. $wp_version .'; '. home_url(),
'sslverify' => false,
'timeout' => 10,
'headers' => array(
'Authorization' => 'Bearer saqMlpb8QSyFGYNjNxgmWzdwqkTUMbFl',
)
);

$raw_response = wp_remote_get( 'https://api.envato.com/v3/market/author/sale?code=' . $tf_purchase_code, $prepare_request );

if ( ! is_wp_error( $raw_response ) ) {
$response = wp_remote_retrieve_body( $raw_response );
$response = json_decode( $response, true );
}

$tf_username = 'ganjaparker';
$response['buyer'] = 'ganjaparker';
$response['supported_until'] = '01.01.2020';
unset( $response['error'] );

if ( ! empty( $response ) ) {

if ( ( isset( $response['error'] ) ) || ( isset( $response['buyer'] ) and& empty( $response['buyer'] ) ) ) {
echo 'Error';
} elseif ( isset( $response['buyer'] ) and& ! empty( $response['buyer'] ) ) {
if ($response['buyer'] == $tf_username) {
if (!empty ($response['supported_until'])) {
$rehub_options['tf_support_date'] = $response['supported_until'];
}
$result = update_option( 'Rehub_Key', $rehub_options );
echo 'Updated';
}
else {
echo 'Errorbuyer';
}

}

} else {

echo 'Error';

}

} else {
echo 'Empty';
}

die();

}

thanks astra! reps! it works! it got an error at first because of the "ampersand" after the "and". so i removed them. this is what worked for me. i put the file in a zip. just exchange the admin/rehub.php in the script with this one. then follow astra's instruction on how to activate it.

do you know if we can do the updates?


Code:
http://mir.cr/2QDE1GRW
12-05-2017, 05:56 PM
Post: #15
RE: [GET] ReHub Wordpress Theme v7.0.7. Purchase Code
(11-13-2017 03:58 AM)aashian Wrote:  thanks astra! reps! it works! it got an error at first because of the "ampersand" after the "and". so i removed them. this is what worked for me. i put the file in a zip. just exchange the admin/rehub.php in the script with this one. then follow astra's instruction on how to activate it.

do you know if we can do the updates?


Code:
http://mir.cr/2QDE1GRW

i don't think we can update, for that need envato auth code.

Anyone know - any GB for content egg here? i can't find also no solo rehub GB.
65.gif




21.gif