Page 1 of 1

Protect Links w/ Shortcode?

PostPosted: December 15th, 2010, 10:40 am
by trentscott1
I use another Wordpress plugin that generates dynamic authenticated links on-the-fly. For example, a link to a file might look like: http://s3.killertuts.com/source_files/2 ... 3450299013 where the last part is different on each page view. Is there a way I can set S2Member to only display such a link when a member is Level 2, for example?

Is the best way to do that to create a rule that looks for the string 'source_files' which should be a constant URI in the links I want to protect? Or, is there a way where I can surround the link with short tags to protect it, like [s2member][level2]http://s3.killertuts.com/source_files/23423423423423[/level2][/s2member]

Re: Protect Links w/ Shortcode?

PostPosted: December 27th, 2010, 1:19 am
by Cristián Lávaque
Why do you need shortcode instead of PHP for that?

Code: Select all

<?php if (current_user_is("s2member_level2")){ ?>
    http://s3.killertuts.com/source_files/23423423423423
<?php } ?>