Thank you for your inquiry.
We appreciate your patience.
1. When someone goes to http://agentdomain.com, I want them to be shown a login page and NOT have access to any of the page content. What is the best way to set this up?
The easiest way to do this would be put the URI restriction “/” in the first box here to restrict access to your site (except the Membership Options Page) to Users that are not logged in:
Dashboard -› s2Member® -› Restriction Options -› URI Access Restrictions
For your homepage, s2Member does not have any way to protect this, and it’s normally not required. The only way you could do this is using s2Member’s Advanced PHP Conditionals. You can create a Must-Use Plugin file and put this code in it:
<?php
add_action('init', 's2hack_protect_homepage');
function s2hack_protect_homepage() {
if(is_home() && !is_user_logged_in()) { // If the User isn't logged in on the home page...
wp_redirect(S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL); // ... redirect to the Membership Options Page
exit();
}
}
[/hilite]
<blockquote>
2. After they are logged with level 0 they will have pages that are custom for them using the %%current_user_login%% replacement codes. So basically I will build a custom page for each agent, with tools that access their information. Is there an api that will allow me to pass hooks to my tools from the agents custom page?
</blockquote>
I'm not sure what you mean by "pass hooks" here. Could you clarify what exactly you're looking or?
s2Member does allow some replacement codes to pass to a custom Login Welcome Page URL, which you can use with some PHP on the WordPress Page is redirects to. You'll need a PHP Execution Plugin.
See: <a href="http://www.s2member.com/kb/ezphp-plugin/">Knowledge Base » ezPHP Plugin for WordPress®</a>
See Also: Dashboard -› s2Member® -› General Options -› Login Welcome Page
3. When the agent updates their profile is there an api I can use on another website (my real estate company site) that will get the agents profile from http://agentdomain.com so I can post it on http://realestatebroker.com site?
No, s2Member doesn’t have anything like this, really. You could try something with s2Member’s API Notifications and Remote Operations, but this won’t update when a User modifies their profile.
See: Knowledge Base » Building An API Notification Handler
See Also: Dashboard -› s2Member® -› API / Scripting -› Remote Operations API
Also I would like to set http://agentdomain.com/%%current_user_login%%/ as the home page after login, but how do I do this in WordPress?
You could use a hack similar to the one I posted for your first question. WordPress doesn’t have any functionality like this.