/*
Plugin Name: LastCommit
Plugin URI: http://blog.yeticode.co.uk/
Description: Gets Last Commit Message
Author: John Tindell
Version: 1
Author URI: http://blog.yeticode.co.uk/
*/
function lastCommit_widget() {
$server = 'localhost';
$link = mssql_connect($server, 'username', '************');
echo '
echo "
Last Commit
";if($link)
{
mssql_select_db('svnyeti', $link);
$query = mssql_query('select top 1 * from SVNLog order by liLogEntryPk desc', $link);
$row = mssql_fetch_array($query);
print '
' . $row['lszLogEntry'] . '
';}
echo '
}
function init_lastCommit(){
register_sidebar_widget("LastCommit", "lastCommit_widget");
}
add_action("plugins_loaded", "init_lastCommit");
When I get more time I will develop this a bit more.
John,
ReplyDeleteI would be easy to make the widget a bit more theme friendly by using my new tool over at widgetifyr.com.
If you get a chance to try it please let me know what you think.
Glenn