Forum Replies Created

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter andrewkhunn

    (@andrewkhunn)

    Latest iteration that’s not working:

    if (!function_exists('email_notification')) {
    
    	function email_notification($post_ID) {
    
    		global $wpdb;
    		$post_ID = $post->ID;
    
    		if (function_exists('similar_posts')) {
    
    			ob_start();
    			similar_posts();
    			$email_notification_similar = "<h3>Similar Posts</h3>".ob_get_contents();
    			$email_notification_similar = preg_replace('<code>[\r\n]+</code>', '', $email_notification_similar);
    			ob_end_clean();
    
    		}
    
    		$email_notification_to = "[email protected]";
    		$email_notification_subject = "New Article at ".get_bloginfo('name');
    		$email_notification_message = "This is an automated message notifying you that there has been a new article posted at ".get_bloginfo('name').".\n\nTitle: ".the_title('', '', FALSE)."\nAuthor: ".get_the_author()."\nURL: ".get_permalink()."\n\nPlease copy/paste the following HTML (the code in between the \"<!-- article -->\" and \"<!-- /article -->\" tags) into your web publishing software:\n\n\n\n<!-- article -->\n\n".wpautop(wptexturize(get_the_content()))."<blockquote><small>\n".$email_notification_similar."\n<p>This article is &copy; ".$copyright." by <a href=\"".$blog_owner_url."\" target=\"_blank\">".$blog_owner."</a> and was originally published at <a href=\"".get_permalink()."\" target=\"_blank\">".get_bloginfo('name')."</a>. This article may not be copied, distributed, or transmitted without attribution. Additionally, you may not use this article for commercial purposes or to generate derivative works without explicit written permission. Please <a href=\"mailto:".get_bloginfo('admin_email')."?subject=License%20Request%20for%20".str_replace(' ', '%20', the_title('','',FALSE))."\">contact us</a> if you wish to license this content for your own use.</p>\n</small></blockquote>\n\n<!-- /article -->\n\n\n\nLet us know if you have any questions or comments.\n\nThanks!\n\n-- \n\nMe\nWebsite\[email protected]";
    
    		wp_mail($email_notification_to, $email_notification_subject, $email_notification_message);
    
       	}
    
    }
    
    add_action('new_to_publish', 'email_notification');
    add_action('draft_to_publish', 'email_notification');
    add_action('pending_to_publish', 'email_notification');
    add_action('future_to_publish', 'email_notification');
    Thread Starter andrewkhunn

    (@andrewkhunn)

    Anyone?

    Forum: Plugins
    In reply to: Pushit

    All you have to do is rename the plugin file on your server and WordPress will automatically disable it so you can login again.

    Thread Starter andrewkhunn

    (@andrewkhunn)

    Solved. I just needed to change:

    return apply_filters('get_comment_author_link_new', $return);

    to

    return $return;

    Thread Starter andrewkhunn

    (@andrewkhunn)

    Just for future reference, I finally found the code I needed to manipulate to get this working right:

    wp-admin/edit-pages.php: line 22
    wp('post_type=page&orderby=menuorder&what_to_show=posts&posts_per_page=-1&posts_per_archive_page=-1&order=asc');
    to
    wp('post_type=page&orderby=title&what_to_show=posts&posts_per_page=-1&posts_per_archive_page=-1&order=asc');

    Forum: Plugins
    In reply to: query_posts in 2.1?
    Thread Starter andrewkhunn

    (@andrewkhunn)

    Holy crap. I was pulling my hair out.

    Adhesive was indeed causing the issues. I thought it was 2.1-compatible. Guess I’ll wait for an update.

    Thanks so much!

    Thread Starter andrewkhunn

    (@andrewkhunn)

    I meant that the other way around. Sheesh.

    Thread Starter andrewkhunn

    (@andrewkhunn)

    Replacing post_title with post_name does not fix the order. Already tried that. ??

    Thread Starter andrewkhunn

    (@andrewkhunn)

    Having re-read your post for the third time now Michael, the display default is post_title further on down the code from the snippet I posted, but for some reason it is obviously not sorting by that in the administration panel itself.

    Any other hints anyone?

    Thread Starter andrewkhunn

    (@andrewkhunn)

    No go.

    Thread Starter andrewkhunn

    (@andrewkhunn)

    Oh wait, are you saying just strip out the:

    'sort_column=post_name'

    and get_pages() should sort by name? I’ll try that real quick and see if it works.

    Thread Starter andrewkhunn

    (@andrewkhunn)

    That’s my altered attempt. The actual un-modified code is:

    function page_rows( $parent = 0, $level = 0, $pages = 0, $hierarchy = true ) {
    global $wpdb, $class, $post;
    if (!$pages )
    $pages = get_pages( 'sort_column=menu_order' );
    if (! $pages )
    return false;

    Sorry for the confusion.

Viewing 12 replies - 1 through 12 (of 12 total)