Recent Topics

1 May 16, 2006 19:27    

This will add the ability to select/deselect pinging the Goat (www.pingoat.com) possible from the admin advanced panel.

Ok here goes,

1) In your admin/_blogs_advanced.form.php add the following code after the Ping blo.gs line:

form_checkbox( 'blog_pingpingoat', $blog_pingpingoat, T_('Ping pingoat.com'), T_('to give notice of new post.') ); 

2) In your admin/edit_actions.php add the following code after each pingTechnorati($blogparams); line. Remember to search for this Technorati line, there should be 3 places where you add the below code:

pingPingoat($blogparams);

3) In your b2evocore/_functions_pings.php add the following code after the Technorati code at the bottom:

/*
 * pingPingoat(-)
 *
 * pings Pingoat.com
 * 
 */
function pingPingoat( & $blogparams, $display = true ) 
{
	global $baseurl;
	if( !get_bloginfo('pingpingoat',$blogparams) ) return false;
	// echo 'ping Pingoat.com';
	if( $display )
	{	
		echo "<div class=\"panelinfo\">\n";
		echo '<h3>', T_('Pinging Pingoat.com...'), "</h3>\n";
	}
	if( !preg_match( '#^http://localhost[/:]#', $baseurl) ) 
	{
		$client = new xmlrpc_client("goat/RPC2", "pingoat.com", 80);
		$message = new xmlrpcmsg( 'weblogUpdates.ping', array( 
															new xmlrpcval(get_bloginfo('name', $blogparams)) , 
															new xmlrpcval(get_bloginfo('blogurl', $blogparams)) )  );
		$result = $client->send($message);
		$ret = xmlrpc_displayresult( $result, '', $display );
		if( $display ) echo '<p>', T_('Done.'), "</p>\n</div>\n";
		return($ret);
	} 
	else 
	{
		if( $display ) echo "<p>", T_('Aborted (Running on localhost).'), "</p>\n</div>\n";
		return(false);
	}
}

*Update* the saga continues apparently the above code was not enough, still needs to be able to be saved to the data base.

4) In your admin/b2blogs.php add the following code after each Technorati line. Remember to search for this Technorati line, there should be 2 places where you add the below codes:

The first place:

param( 'blog_pingpingoat', 'integer', 0 );
				$edited_Blog->set( 'pingpingoat', $blog_pingpingoat );

The second place:

$blog_pingpingoat = get_bloginfo( 'pingpingoat' );

Arrrgh... when the code in step number 4 is added I get a MySQL error stating: :-/

Unknown column 'blog_pingpingoat' in 'field list' (Errno=1054)

So close yet so far away. I am going to look in the database to see if I can add this column.

Any input here would be great,

Thanks,

Vlad

2 May 25, 2006 22:23

That's because you didn't create a column called blogpingoat in the table evo_blogs. It's necessary to be able to track what services to ping when a post is submitted to a particular blog. I've already created a plugin that pings pingomatic that is widely available on the plugin site as well as my own.

http://www.brotherson.com/index.php/2005/08/27/b2evolution_hack_ping_pingomatic/

This was tested on 0.9.1 and I doubt there would be much to do to get it working on 0.9.2 if at all.


Form is loading...