Special thanks to GaMerZ for creating the Widget. Version: 1.0 Author: Joe Author URI: http://blog.fileville.net */ /* Copyright 2006 Joe (ttech5593@gmail.com) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ ### Function: Init Mini Blog Widget function widget_miniblog_init() { if (!function_exists('register_sidebar_widget')) { return; } ### Function: Mini Blog Widget function widget_miniblog($args) { extract($args); $options = get_settings('widget_miniblog'); $title = $options['title']; $name = $options['name']; $date = $options['date']; $limit = intval($options['limit']); $site_name = get_settings('blogname'); $site_des = get_settings('blogdescription'); echo $before_widget.$before_title.$title.$after_title; // People who don't mind experementing you can edit "'
  • ', '
    ', '
  • '" // First
  • = Before Post
    Last (Closing
  • )
  • = Ending of post miniblog_list_entries('
  • ', '
    ', '
  • ', '', $options['limit']); echo $after_widget; echo '
    '."\n"; //echo '

    '.$title.'

    '."\n"; $miniblog_array = miniblog_return_entries($limit, 0, $name, '_date'); if($miniblog_array) { foreach($miniblog_array as $miniblog) { echo '
    '."\n"; echo ' '.__($miniblog->title).'
    '."\n"; echo '
    '."\n"; echo 'Posted on '.__(date($date, strtotime($miniblog->date)))."\n"; echo '
    '."\n"; echo '
    '."\n"; _e($miniblog->text); echo '
    '."\n"; echo '
    '."\n"; echo '
    '."\n"; } } echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo '
    Miniblog RSS'."\n"; echo 'Archives'."\n"; echo '
    '."\n"; echo '
    '."\n"; } ### Function: Mini Blog Widget Options function widget_miniblog_options() { global $wpdb; $options = get_settings('widget_miniblog'); if (!is_array($options)) { $options = array('title' => 'Miniblog', 'name' => 'default', 'limit' => 10, 'date' => 'm/j/y'); } if ($_POST['miniblog-submit']) { $options['title'] = trim($_POST['miniblog_title']); $options['name'] = trim($_POST['miniblog_name']); $options['date'] = trim($_POST['miniblog_date']); $options['limit'] = intval($_POST['miniblog_limit']); update_option('widget_miniblog', $options); } echo '

       

    '."\n"; echo '

       

    '."\n"; echo '

       

    '."\n"; echo '

       

    '."\n"; echo ''."\n"; echo '

    '."\n"; } // Register Widgets register_sidebar_widget('Mini Blog', 'widget_miniblog'); register_widget_control('Mini Blog', 'widget_miniblog_options', 400, 200); } ### Function: Load The Mini Blog Widget add_action('plugins_loaded', 'widget_miniblog_init'); ?>