Results 1 to 2 of 2

Thread: PHP help needed

  1. #1
    Thread Starter
    Member italo_disco's Avatar
    Join Date
    Jul 2010
    Thanked 22 Times in 5 Posts

    PHP help needed

    Looking to change something in theme-emails.php

    I want to put a facebook share link into the "Your ad has been approved" email.

    This calls the permalink for the ad - get_permalink($post->ID)

    This is the facebook share link -
    How do I combine the two in the code below? The relevant place is marked in red, with my effort which doesnt work.


    // if the ad has been approved send email to ad owner only if owner is not equal to approver
    // admin approving own ads or ad owner pausing and reactivating ad on his dashboard don't need to send email
    if ($old_status == 'pending' && $new_status == 'publish' && $current_user->ID != $ad_author_id && $send_approved_email == 'yes') {

    $subject = __('Your Ad Has Been Approved','cp');
    $headers = 'From: '. sprintf(__('%s Admin', 'cp'), FarmAds) .' <'. get_option('admin_email') .'>' . "\r\n";

    $message = sprintf(__('Hi %s,', 'cp'), $ad_author) . "\r\n\r\n";
    $message .= sprintf(__('Your ad listing, "%s" has been approved and is now live on our site.', 'cp'), $ad_title) . "\r\n\r\n";

    $message .= __('You can view your ad by clicking on the following link:', 'cp') . "\r\n";
    $message .= get_permalink($post->ID) . "\r\n\r\n\r\n\r\n";

    $message .= __('Share your ad with your friends on Facebook:', 'cp') . "\r\n";
    $message .= "$post->ID)" . "\r\n\r\n\r\n\r\n";

    $message .= __('Regards,', 'cp') . "\r\n\r\n";
    $message .= sprintf(__('Your %s Team', 'cp'), FarmAds) . "\r\n";
    $message .= $siteurl . "\r\n\r\n\r\n\r\n";

    // ok let's send the email
    wp_mail($mailto, $subject, $message, $headers);

  2. #2
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Thanked 3,393 Times in 3,264 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.

    Thank you and have a nice day.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Banner Ad help needed
    By inspired in forum Report ClassiPress Bugs
    Replies: 8
    Last Post: December 28th, 2012, 01:34 PM
  2. Help needed with ads and a plugin.
    By jordansmith in forum ClassiPress General Discussion
    Replies: 1
    Last Post: January 14th, 2011, 12:56 PM
  3. Exact rules needed for ClassiPress htaccess file needed
    By cloudybright in forum Help Using ClassiPress
    Replies: 2
    Last Post: November 27th, 2010, 06:37 PM
  4. Some HTML Help Needed
    By italo_disco in forum ClassiPress General Discussion
    Replies: 1
    Last Post: August 16th, 2010, 01:03 PM
  5. Webform Help Needed
    By webferret in forum Help Using ClassiPress
    Replies: 1
    Last Post: December 31st, 1969, 06:00 PM