Hey, g2eat.
Thanks, it was a full custom job, used ClassiPress as the base, then just built a child theme from scratch.
Spent probably around 3 months on it on and off in the evenings, with probably a month or so of that time not doing anything overall.
Hadn't planned on selling it no, as its quite bespoke to my site. Yes there are elements I guess where could be make into a custom theme, but to be honest I think the marketplace is a little dead and not worth the effort to turning it into a general theme for everyone.
This is one of the reasons I've not pursued a private messaging system plugin I was going to make with FEP as the base (had an agreement with the owner). I don't think there is enough customes in the marketplace to make it worth while.
Ok, so I've not got time to write up the tutorial, but here is MY custom code to use FEP with ClassiPress (my actual version of the plugin has more customisation completed but this will get you started).
This works with Front End PM v4.6.
In your functions.php file you need to add this block of code:
PHP Code:
//---------------------------------- PRIVATE MESSAGE SYSTEM FORM --------------------------------------
function new_message_fep_shortcode($atts){
global $user_ID, $post, $wp;
$token = fep_create_nonce('fep_message');
$to_id = $post->post_author;
$to = get_the_author_meta('user_login', $to_id);
$current_url = home_url(add_query_arg(array(),$wp->request));
ob_start();
?>
<form class="form_contact" action="<?php echo esc_url( home_url( 'messages/?fepaction=newmessage' ) ) ?>" method="post" enctype="multipart/form-data">
<input type="hidden" id="fep-message-top" name="message_top" autocomplete="off" value="<?php echo get_the_author_meta('display_name', $to_id); ?>">
<input type="hidden" id="fep-message-to" name="message_to" autocomplete="off" value="<?php echo $to; ?>">
<label>Subject</label><br />
<input type="text" id="enq" name="message_title" placeholder="Subject" maxlength="65" value="" class="text">
<div class="clr"></div>
<label>Message</label><br />
<textarea id="enq" name="message_content" class="text"></textarea>
<input type='hidden' name='message_from' value='<?php echo $user_ID; ?>' />
<input type='hidden' name='parent_id' value='<?php echo $parent_id; ?>' />
<input type='hidden' name='token' value='<?php echo $token; ?>' /><br/>
<input type='hidden' name='redirect' value='<?php echo $current_url; ?>' /><div class="clr"></div>
<button type="submit" class="fep-button btn_orange" name="fep_action" value="newmessage">Send Message</button>
</form>
<?php
$newMsg .= ob_get_contents();
ob_end_clean();
echo $newMsg;
return $newMsg;
}
add_shortcode( 'new_message_fep', 'new_message_fep_shortcode' );
In the code above for this section:
<?php echo esc_url( home_url( 'messages/?fepaction=newmessage' ) ) ?>
You need to replace 'messages' with the name of your page with the FEP shortcode on.
eg
www.yoursite.com/private-messages/ would mean the above code would be
<?php echo esc_url( home_url( 'private-messages/?fepaction=newmessage' ) ) ?>
Then you need to open the sidebar-contact.php file which iirc is in your classipress/includes folder. (I've done things differently on my theme).
You will need to remove the code for the contact form and replace it with:
<?php do_shortcode("[new_message_fep]"); ?>
I think that's everything off the top of my head.