posts, $wpdb->comments WHERE $wpdb->posts.ID=$wpdb->comments.comment_post_ID AND $wpdb->comments.comment_approved = '1' AND $wpdb->comments.comment_type = '' AND comment_author != '' ORDER BY $wpdb->comments.comment_date DESC LIMIT $num"); $result = mysql_query($query); while ($data = mysql_fetch_row($result)) { echo '
  • '; echo '';
			echo $data[2];
			echo ''s Gravatar'; echo '
    '; echo $data[2]; echo '
    '; echo $data[5]; echo '
    '; echo '
  • '; } } ?>«'; } if(empty($nxtlabel)) { $nxtlabel = '»'; } $half_pages_to_show = round($pages_to_show/2); if (!is_single()) { if(!is_category()) { preg_match('#FROM\s(.*)\sORDER BY#siU', $request, $matches); } else { preg_match('#FROM\s(.*)\sGROUP BY#siU', $request, $matches); } $fromwhere = $matches[1]; $numposts = $wpdb->get_var("SELECT COUNT(DISTINCT ID) FROM $fromwhere"); $max_page = ceil($numposts /$posts_per_page); if(empty($paged)) { $paged = 1; } if($max_page > 1 || $always_show) { echo "$before $after"; } } } ?>'Title:', 'type'=>'text', 'default'=>''); $twitter_options['widget_fields']['username'] = array('label'=>'Username:', 'type'=>'text', 'default'=>''); $twitter_options['widget_fields']['num'] = array('label'=>'Number of links:', 'type'=>'text', 'default'=>'5'); $twitter_options['widget_fields']['update'] = array('label'=>'Show timestamps:', 'type'=>'checkbox', 'default'=>true); $twitter_options['widget_fields']['linked'] = array('label'=>'Linked:', 'type'=>'text', 'default'=>'#'); $twitter_options['widget_fields']['hyperlinks'] = array('label'=>'Discover Hyperlinks:', 'type'=>'checkbox', 'default'=>true); $twitter_options['widget_fields']['twitter_users'] = array('label'=>'Discover @replies:', 'type'=>'checkbox', 'default'=>true); $twitter_options['widget_fields']['encode_utf8'] = array('label'=>'UTF8 Encode:', 'type'=>'checkbox', 'default'=>false); $twitter_options['prefix'] = 'twitter'; function twitter_messages($username = '', $num = 1, $list = false, $update = true, $linked = '#', $hyperlinks = true, $twitter_users = true, $encode_utf8 = false) { global $twitter_options; include_once(ABSPATH . WPINC . '/rss.php'); $messages = fetch_rss('http://twitter.com/statuses/user_timeline/'.$username.'.rss'); if ($list) echo ''; } // Link discover stuff function hyperlinks($text) { // match protocol://address/path/file.extension?some=variable&another=asf% $text = preg_replace("/\s([a-zA-Z]+:\/\/[a-z][a-z0-9\_\.\-]*[a-z]{2,6}[a-zA-Z0-9\/\*\-\?\&\%]*)([\s|\.|\,])/i"," $1$2", $text); // match www.something.domain/path/file.extension?some=variable&another=asf% $text = preg_replace("/\s(www\.[a-z][a-z0-9\_\.\-]*[a-z]{2,6}[a-zA-Z0-9\/\*\-\?\&\%]*)([\s|\.|\,])/i"," $1$2", $text); // match name@address $text = preg_replace("/\s([a-zA-Z][a-zA-Z0-9\_\.\-]*[a-zA-Z]*\@[a-zA-Z][a-zA-Z0-9\_\.\-]*[a-zA-Z]{2,6})([\s|\.|\,])/i"," $1$2", $text); return $text; } function twitter_users($text) { $text = preg_replace('/([\.|\,|\:|\�|\�|\>|\{|\(]?)@{1}(\w*)([\.|\,|\:|\!|\?|\>|\}|\)]?)\s/i', "$1@$2$3 ", $text); return $text; } // Twitter widget stuff function widget_twitter_init() { if ( !function_exists('register_sidebar_widget') ) return; $check_options = get_option('widget_twitter'); if ($check_options['number']=='') { $check_options['number'] = 1; update_option('widget_twitter', $check_options); } function widget_twitter($args, $number = 1) { global $twitter_options; // $args is an array of strings that help widgets to conform to // the active theme: before_widget, before_title, after_widget, // and after_title are the array keys. Default tags: li and h2. extract($args); // Each widget can store its own options. We keep strings here. include_once(ABSPATH . WPINC . '/rss.php'); $options = get_option('widget_twitter'); // fill options with default values if value is not set $item = $options[$number]; foreach($twitter_options['widget_fields'] as $key => $field) { if (! isset($item[$key])) { $item[$key] = $field['default']; } } $messages = fetch_rss('http://twitter.com/statuses/user_timeline/'.$username.'.rss'); // These lines generate our output. echo $before_widget . $before_title . $item['title'] . $after_title; twitter_messages($item['username'], $item['num'], true, $item['update'], $item['linked'], $item['hyperlinks'], $item['twitter_users'], $item['encode_utf8']); echo $after_widget; } // This is the function that outputs the form to let the users edit // the widget's title. It's an optional feature that users cry for. function widget_twitter_control($number) { global $twitter_options; // Get our options and see if we're handling a form submission. $options = get_option('widget_twitter'); if ( isset($_POST['twitter-submit']) ) { foreach($twitter_options['widget_fields'] as $key => $field) { $options[$number][$key] = $field['default']; $field_name = sprintf('%s_%s_%s', $twitter_options['prefix'], $key, $number); if ($field['type'] == 'text') { $options[$number][$key] = strip_tags(stripslashes($_POST[$field_name])); } elseif ($field['type'] == 'checkbox') { $options[$number][$key] = isset($_POST[$field_name]); } } update_option('widget_twitter', $options); } foreach($twitter_options['widget_fields'] as $key => $field) { $field_name = sprintf('%s_%s_%s', $twitter_options['prefix'], $key, $number); $field_checked = ''; if ($field['type'] == 'text') { $field_value = htmlspecialchars($options[$number][$key], ENT_QUOTES); } elseif ($field['type'] == 'checkbox') { $field_value = 1; if (! empty($options[$number][$key])) { $field_checked = 'checked="checked"'; } } printf('

    ', $field_name, __($field['label']), $field_name, $field_name, $field['type'], $field_value, $field['type'], $field_checked); } echo ''; } function widget_twitter_setup() { $options = $newoptions = get_option('widget_twitter'); if ( isset($_POST['twitter-number-submit']) ) { $number = (int) $_POST['twitter-number']; $newoptions['number'] = $number; } if ( $options != $newoptions ) { update_option('widget_twitter', $newoptions); widget_twitter_register(); } } function widget_twitter_page() { $options = $newoptions = get_option('widget_twitter'); ?>

    300, 'height' => 300); $class = array('classname' => 'widget_twitter'); for ($i = 1; $i <= 9; $i++) { $name = sprintf(__('Twitter #%d'), $i); $id = "twitter-$i"; // Never never never translate an id wp_register_sidebar_widget($id, $name, $i <= $options['number'] ? 'widget_twitter' : /* unregister */ '', $class, $i); wp_register_widget_control($id, $name, $i <= $options['number'] ? 'widget_twitter_control' : /* unregister */ '', $dims, $i); } add_action('sidebar_admin_setup', 'widget_twitter_setup'); add_action('sidebar_admin_page', 'widget_twitter_page'); } widget_twitter_register(); } add_action('widgets_init', 'widget_twitter_init'); ?>current_component; $current_action = $bp->current_action; $directory = $bp->is_directory; if (!is_home() ) { if(isset($bp->groups->slug)){ if (!$directory && $rr_title == $bp->groups->slug) { if (!isset($current_action)) {?> <?php echo rr_bp_seo_template(get_option('rr_bp_seo_groups_home_title'))?> <?php echo rr_bp_seo_template(get_option('rr_bp_seo_groups_forum_title'))?> <?php echo rr_bp_seo_template(get_option('rr_bp_seo_groups_wire_title'))?> <?php echo rr_bp_seo_template(get_option('rr_bp_seo_groups_members_title'))?> <?php echo rr_bp_seo_template(get_option('rr_bp_seo_groups_home_title'))?> <?php echo rr_bp_seo_template(get_option('rr_bp_seo_groups_title'))?> events->slug)){ if (!$directory && $rr_title == $bp->events->slug) { if (!isset($current_action)) {?> <?php echo rr_bp_seo_template(get_option('rr_bp_seo_events_home_title'))?> <?php echo rr_bp_seo_template(get_option('rr_bp_seo_events_forum_title'))?> <?php echo rr_bp_seo_template(get_option('rr_bp_seo_events_wire_title'))?> <?php echo rr_bp_seo_template(get_option('rr_bp_seo_events_members_title'))?> <?php echo rr_bp_seo_template(get_option('rr_bp_seo_events_home_title'))?> <?php echo rr_bp_seo_template(get_option('rr_bp_seo_events_profile_title'))?> profile->slug)){ if (!$directory && $rr_title == $bp->profile->slug) { ?> <?php echo rr_bp_seo_template(get_option('rr_bp_seo_profil_title'))?> blogs->slug)){ if (!$directory && $rr_title == $bp->blogs->slug) { ?> <?php echo rr_bp_seo_template(get_option('rr_bp_seo_blogs_title'))?> blogs->slug) { ?> <?php echo rr_bp_seo_template(get_option('rr_bp_seo_directory_blogs_title'))?> groups->slug)){ if ($directory && $rr_title == $bp->groups->slug) { ?> <?php echo rr_bp_seo_template(get_option('rr_bp_seo_directory_groups_title'))?> <?php echo rr_bp_seo_template(get_option('rr_bp_seo_directory_members_title'))?> events->slug)){ if ($directory && $rr_title == $bp->events->slug) { ?> <?php echo rr_bp_seo_template(get_option('rr_bp_seo_directory_events_title'))?> <?php echo rr_bp_seo_template(get_option('rr_bp_seo_medien_title'))?> friends->slug)){ if (!$directory && $rr_title == $bp->friends->slug) {?> <?php echo rr_bp_seo_template(get_option('rr_bp_seo_friends_title'))?> <?php echo rr_bp_seo_template(get_option('rr_bp_seo_youtube_title'))?> <?php echo rr_bp_seo_template(get_option('rr_bp_seo_flickr_title'))?> wire->slug)){ if (!$directory && $rr_title == $bp->wire->slug) {?> <?php echo rr_bp_seo_template(get_option('rr_bp_seo_wire_title'))?> activity->slug)){ if (!$directory && $rr_title == $bp->activity->slug) {?> <?php echo rr_bp_seo_template(get_option('rr_bp_seo_activity_title'))?>

    Seo for Buddypress Options


    special tags:

    %username% = user full name of the user displayed
    %groupname% = group name of the group displayed
    %eventname% = event name of the event displayed


    -- buddypress directory view pages --

    directory blogs








    directory members












    directory groups








    directory events








    -- buddypress profile pages --

    profile








    blogs








    activity








    friends








    member groups








    wire








    -- buddypress groups pages --

    groups home








    groups wire








    groups forum








    groups members








    -- buddypress event pages from the bp-events plugin --

    my events in userprofile








    events home








    events wire








    events forum








    events members








    -- bb-dev youtube & flickr Pages --

    youtube








    flickr







    -- your own buddypress page --

    yourpage










    Delete Seo for Buddypress

    I don't want to use Seo for Buddypress! Delete all concerning fields from the option table.

    displayed_user->fullname; $value = str_replace("%username%", $user_tmp, $template); } else if(strpos($template, '%groupname%') !== false) { $user_tmp= $bp->bp_options_title; $value = str_replace("%groupname%", $user_tmp, $template); } else if(strpos($template, '%eventname%') !== false) { $pageURL = 'http'; if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";} $pageURL .= "://"; if ($_SERVER["SERVER_PORT"] != "80") { $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"]; } else { $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]; } $teilstring=explode('/',$pageURL); $user_tmp =$teilstring[4]; $value = str_replace("%eventname%", $user_tmp, $template); } else{ $value = $template; } return $value; } ### Update the option page data to the option table or delete all data and fields from the option table. function rr_bp_seo_options_page(){ global $current_user; get_currentuserinfo(); if (isset($_POST['directory_blogs'])) { $option_prefix_directory_blogs_title = $_POST['directory_blogs_title']; $option_prefix_directory_blogs = $_POST['directory_blogs']; $option_prefix_directory_blogs_tags = $_POST['directory_blogs_tags']; update_option('rr_bp_seo_directory_blogs_title', $option_prefix_directory_blogs_title); update_option('rr_bp_seo_directory_blogs', $option_prefix_directory_blogs); update_option('rr_bp_seo_directory_blogs_tags', $option_prefix_directory_blogs_tags); update_option('rr_bp_seo_userId', $current_user->ID); ?>

    Options profile changes saved.

    ID); ?>

    Options profile changes saved.

    ID); ?>

    Options profile changes saved.

    ID); ?>

    Options profile changes saved.

    ID); ?>

    Options profile changes saved.

    ID); ?>

    Options blogs changes saved.

    ID); ?>

    Options blogs forum changes saved.

    ID); ?>

    Options blogs wire changes saved.

    ID); ?>

    Options blogs members changes saved.

    ID); ?>

    Options blogs home changes saved.

    ID); ?>

    Options blogs forum changes saved.

    ID); ?>

    Options blogs forum changes saved.

    ID); ?>

    Options blogs wire changes saved.

    ID); ?>

    Options blogs members changes saved.

    ID); ?>

    Options blogs home changes saved.

    ID); ?>

    Options medien changes saved.

    ID); ?>

    Options friends changes saved.

    ID); ?>

    Options groups changes saved.

    ID); ?>

    Options wire changes saved.

    ID); ?>

    Options activity changes saved.

    ID); ?>

    Options youtube changes saved.

    ID); ?>

    Options flickr changes saved.

    Seo for Buddypress filds in option table sugsesful deleeted.