Page 1 of 1

Is there a way to disable the use of tinyurl?

PostPosted: June 22nd, 2010, 1:36 pm
by lewayotte
In my testing of s2member I noticed that the email it sent for user registration was a tinyurl. Frankly, I'd prefer it just be a link directly to my site.

Is there a reason why it is set to tinyurl by default? and is there a way to disable this? (I didn't see it in the options page.

btw, I noticed that includes/functions/sp-access.inc.php and includes/functions/register-access.inc.php have functions, that set $shrink to TRUE by default.

line 21: ws_plugin__s2member_sp_access_link_gen
and
line 244: ws_plugin__s2member_register_link_gen

I think the subscriber would feel more comfortable clicking a registration link, if they saw the actual domain they just subscribed too.

Thank you.
Lew

P.S. I bought s2member Pro this past weekend. I'm not using the pro features yet, but I wanted to support your development. You've created a really great product here. I'm glad I found the free version to get me started.

Re: Is there a way to disable the use of tinyurl?

PostPosted: June 22nd, 2010, 1:44 pm
by Jason Caldwell
Hi there. Thanks for your support!
— and for the great question.

Yes, you can disable tinyURL, but you'll need to use a WordPress Hook.

Inside the functions.php file for your theme, you can add these lines.
Code: Select all
add_action("ws_plugin__s2member_before_sp_access_link_gen", "disable_s2member_tinyURL");
add_action("ws_plugin__s2member_before_register_link_gen", "disable_s2member_tinyURL");

function disable_s2member_tinyURL($vars)
    {
        $vars["__refs"]["shrink"] = false;
    }

Now, I do NOT recommend this though :-). The reason tinyURL is being used, is because these URLs tend to be very long. They contain authorization codes in the URL. So shrinking them with tinyURL prevents broken links due to long lines in some email applications.

Re: Is there a way to disable the use of tinyurl?

PostPosted: June 22nd, 2010, 2:51 pm
by lewayotte
Cool, thanks for the reply.

I figured it was because the registration URLs would be massive.

A good "feature" to add would be something like Twitter Friendly Links (http://wordpress.org/extend/plugins/twi ... dly-links/). It basically creates a URL shortener for the domain it's installed on.

I'll keep the tinyurls for now :). I assume you haven't heard any clients complain that they weren't trusted.

Thanks again.
Lew

Re: Is there a way to disable the use of tinyurl?

PostPosted: June 23rd, 2010, 2:10 pm
by Jason Caldwell
Hi Lew. Yes, thanks for that suggestion. I'm adding this to my TODO list. I do agree, this would a nice extra feature. It's not high on my priority list, but it's definitely on my radar.

Yes, with all of the Tweets flying around, and other shortening services popping up, my opinion is that most visitors would not think twice about clicking a tinyURL. However, better is better, and a customized URL is better than a tinyURL. So again, this IS on the radar. ~Thanks.

Re: Is there a way to disable the use of tinyurl?

PostPosted: July 18th, 2010, 2:47 am
by Brian Hatano
Jason Caldwell wrote: better is better, and a customized URL is better than a tinyURL. So again, this IS on the radar


second that :D

Re: Is there a way to disable the use of tinyurl?

PostPosted: July 18th, 2010, 3:28 am
by Jason Caldwell
@TODO :: URL Shortening options.

Re: Is there a way to disable the use of tinyurl?

PostPosted: March 2nd, 2011, 5:47 pm
by Cristián Lávaque