PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Shortcodes

s2Member Plugin. A Membership plugin for WordPress®.

Shortcodes

Postby eshanfelt » August 17th, 2010, 9:12 am

I have the s2Member Pro developer license. I've seen the scripting/API section, but am wondering if there are shortcodes for many of the PHP functions listed in that section. On my member "welcome" page, I'd like to put a link to modify the profile. I see the various PHP options, but cannot (and don't want to) have PHP in a WordPress post or page.

How can I get the following into a shortcode?
Code: Select all
<a href="#" onclick="if(!window.open('<?php echo S2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL; ?>',
'_popup', 'height=350,width=400,left=100,screenX=100,top=100,screenY=100,
location=0,menubar=0,toolbar=0,status=0,scrollbars=1,resizable=1'))
alert('Please disable popup blockers and try again!');
return false;">Modify Profile</a>
User avatar
eshanfelt
Registered User
Registered User
 
Posts: 2
Joined: August 16, 2010

Re: Shortcodes

Postby Jason Caldwell » August 17th, 2010, 3:03 pm

Hi there. Great question.

There are two ways that I'm aware of.

1. You could hard-code the link. It's always:
Code: Select all
http://path/to/wordpress/?s2member_profile=1

2. You could use this plugin, to create a Shortcode out of that snippet:
http://wordpress.org/extend/plugins/shortcode-exec-php/
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA


Return to s2Member Plugin

Who is online

Users browsing this forum: Google [Bot] and 12 guests

cron