Ok, so it looks like this form is created by a class function and not a template in s2member.
So, one option would be to copy the code BETWEEN:
<?php
/**
* Shortcode for `[s2Member-Profile /]` ( inner processing routines ).
*
* Copyright: © 2009-2011
* {@link http://www.websharks-inc.com/ WebSharks, Inc.}
* ( coded in the USA )
*
* Released under the terms of the GNU General Public License.
* You should have received a copy of the GNU General Public License,
* along with this software. In the main directory, see: /licensing/
* If not, see: {@link http://www.gnu.org/licenses/}.
*
* @package s2Member\Profiles
* @since 3.5
*/
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
exit ("Do not access this file directly.");
/**/
if (!class_exists ("c_ws_plugin__s2member_sc_profile_in"))
{
/**
* Shortcode for `[s2Member-Profile /]` ( inner processing routines ).
*
* @package s2Member\Profiles
* @since 3.5
*/
class c_ws_plugin__s2member_sc_profile_in
{
/**
* Handles the Shortcode for: `[s2Member-Profile /]`.
*
* @package s2Member\Profiles
* @since 3.5
*
* @attaches-to ``add_shortcode("s2Member-Profile");``
*
* @param array $attr An array of Attributes.
* @param str $content Content inside the Shortcode.
* @param str $shortcode The actual Shortcode name itself.
* @return str|null The resulting Profile Modifiation Form *( inline )*, or null if not logged-in.
*/
public static function sc_profile ($attr = FALSE, $content = FALSE, $shortcode = FALSE)
{
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
do_action ("ws_plugin__s2member_before_sc_profile", get_defined_vars ());
unset ($__refs, $__v); /* Unset defined __refs, __v. */
AND:
}
}
}
?>
in this file:
wp-content/plugins/s2member/includes/classes/sc-profile-in.inc.php
Then create your own function in wp-content/mu-plugins/s2-hacks.php (you may need to create this directory and file) like this:
<?php
add_action('ws_plugin__s2member_before_sc_profile','my_profile_form');
function my_profile_form(){
//Copy the code mentioned above here and change it to look the way you want.
//See example below:
//leaving php
?>
<form action="" method="post">
My Name: <input >
</form>
<?
//back to php
exit(); // this exit function keeps the rest of their code in that class from running.
}
?>
That should override their form with yours. Assuming you keep their functionality and stuff, I think it should still work fine.
Hope that helps.
Dave
PS. This is not perfect because it uses the exit() function which kills all the rest of the processing and could mess up other s2 functions being called at the same time.
-
This reply was modified 4 years, 3 months ago by
David Welch.