Statistics: Posted by Cristián Lávaque — August 24th, 2011, 5:40 am
Statistics: Posted by Cristián Lávaque — August 10th, 2011, 10:07 pm
// Shorten registration link.
add_filter('ws_plugin__s2member_register_link_gen_alternative', 's2_alt_shorten_link');
function s2_alt_shorten_link($link)
{
if ($_GET['s2member_paypal_proxy'] === 'clickbank')
{
$id = (!empty($_POST['txn_id']) ?
$_POST['txn_id']
: (!empty($_POST['payer_email']) ?
md5($_POST['payer_email'])
: (!empty($_POST['subscr_id']) ?
$_POST['subscr_id']
:
time()
)));
return c_ws_plugin__s2member_utils_urls::remote('http://example.com/go/yourls-api.php?signature=xxxxxxxx&action=shorturl&format=simple&keyword=register-' . $id . '&url=' . rawurlencode($link));
}
}
Statistics: Posted by Cristián Lávaque — August 10th, 2011, 6:53 pm
$id = !empty($_POST['txn_id']) ?
$_POST['txn_id']
: !empty($_POST['payer_email']) ?
md5($_POST['payer_email'])
: !empty($_POST['subscr_id']) ?
$_POST['subscr_id']
: time();
It is recommended that you avoid "stacking" ternary expressions. PHP's behaviour when using more than one ternary operator within a single statement is non-obvious. See details here: http://php.net/manual/en/language.opera ... arison.php
Statistics: Posted by Jason Caldwell — August 10th, 2011, 6:23 pm
// Shorten registration link.
add_filter('ws_plugin__s2member_register_link_gen_alternative', 's2_alt_shorten_link');
function s2_alt_shorten_link($link)
{
if ($_GET['s2member_paypal_proxy'] === 'clickbank')
{
$id = !empty($_POST['txn_id']) ?
$_POST['txn_id']
: !empty($_POST['payer_email']) ?
md5($_POST['payer_email'])
: !empty($_POST['subscr_id']) ?
$_POST['subscr_id']
: time();
return c_ws_plugin__s2member_utils_urls::remote('http://example.com/go/yourls-api.php?signature=xxxxxxxx&action=shorturl&format=simple&keyword=register-' . $id . '&url=' . rawurlencode($link));
}
}
Statistics: Posted by Cristián Lávaque — August 10th, 2011, 6:08 pm
Statistics: Posted by Cristián Lávaque — August 10th, 2011, 4:48 pm
Statistics: Posted by Jason Caldwell — August 10th, 2011, 4:41 pm
Statistics: Posted by Cristián Lávaque — August 10th, 2011, 4:21 pm
Statistics: Posted by Jason Caldwell — August 10th, 2011, 3:16 pm
Statistics: Posted by Jason Caldwell — August 10th, 2011, 12:55 pm
// Shorten registration link.
add_filter('ws_plugin__s2member_register_link_gen_alternative', 's2_alt_shorten_link');
function s2_alt_shorten_link($link)
{
if ($_GET['s2member_paypal_proxy'] === 'clickbank')
{
return c_ws_plugin__s2member_utils_urls::remote('http://example.com/go/yourls-api.php?signature=xxxxxxxx&action=shorturl&format=simple&keyword=register-' . $_POST['txn_id'] . '&url=' . rawurlencode($link));
}
}
Statistics: Posted by Cristián Lávaque — August 8th, 2011, 2:15 am
Statistics: Posted by Cristián Lávaque — March 11th, 2011, 12:44 pm
<?php
add_filter ("ws_plugin__s2member_register_link_gen_alternative", "my_link_shortener");
add_filter ("ws_plugin__s2member_sp_access_link_gen_alternative", "my_link_shortener");
function my_link_shortener ($long_link) /* Raw link ( the long version ). */
{
if($_GET["s2member_paypal_proxy"] === "clickbank" && $_POST["txn_id"])
{ $clickbank_receipt_number = $_POST["txn_id"]; }
return /* Shorten this */ $long_link;
}
?>
Statistics: Posted by Jason Caldwell — March 11th, 2011, 5:53 am
Statistics: Posted by Cristián Lávaque — March 10th, 2011, 3:15 pm
<?php
add_filter ("ws_plugin__s2member_register_link_gen_alternative", "my_link_shortener");
add_filter ("ws_plugin__s2member_sp_access_link_gen_alternative", "my_link_shortener");
function my_link_shortener ($long_link) /* Raw link ( the long version ). */
{
return /* Shorten this */ $long_link;
}
?>
Statistics: Posted by Jason Caldwell — March 10th, 2011, 2:52 pm
if ($shrink && ($tinyurl = c_ws_plugin__s2member_utils_urls::remote ('http://**********.com/go/yourls-api.php?signature=**********&action=shorturl&format=simple&keyword=register-' . time() . '&url=' . rawurlencode ($register_link))))
return apply_filters ("ws_plugin__s2member_register_link_gen", $tinyurl, get_defined_vars ());
Statistics: Posted by Cristián Lávaque — March 2nd, 2011, 5:43 pm
if ($shrink && ($tinyurl = c_ws_plugin__s2member_utils_urls::remote ("http://tinyurl.com/api-create.php?url=" . rawurlencode ($register_link))))
if ($shrink && ($tinyurl = c_ws_plugin__s2member_utils_urls::remote ($shrink_service . rawurlencode ($register_link))))
if ($shrink && ($tinyurl = c_ws_plugin__s2member_utils_urls::shrink ($register_link)))
Statistics: Posted by Cristián Lávaque — March 1st, 2011, 7:59 pm
Statistics: Posted by Cristián Lávaque — March 1st, 2011, 7:13 pm
Statistics: Posted by lewayotte — March 1st, 2011, 7:09 pm
if ($shrink && ($tinyurl = ws_plugin__s2member_remote ('http://leenk.me/reg/yourls-api.php?signature=XXXXXXXX&action=shorturl&format=simple&url=' . rawurlencode ($register_link))))
Statistics: Posted by Cristián Lávaque — March 1st, 2011, 6:46 pm
Statistics: Posted by Cristián Lávaque — January 15th, 2011, 3:33 pm