Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

bp-groupblog.php 1.4.9 - subdomain installs patch

By: a guest on Sep 23rd, 2010  |  syntax: None  |  size: 2.09 KB  |  hits: 102  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. ### Eclipse Workspace Patch 1.0
  2. #P myblog.arts
  3. Index: wp-content/plugins/bp-groupblog/bp-groupblog.php
  4. ===================================================================
  5. --- wp-content/plugins/bp-groupblog/bp-groupblog.php    (revision 137)
  6. +++ wp-content/plugins/bp-groupblog/bp-groupblog.php    (working copy)
  7. @@ -535,8 +535,11 @@
  8.                                         $blog_address .= 'blog';
  9.                                 }
  10.                                 ?>
  11. -              
  12. +                               <?php if (is_subdomain_install()) { ?>
  13. +                               <span><em><?php echo 'http://' . $blog_address. '.' . $current_site->domain . $current_site->path ?></em></span>
  14. +                               <?php } else { ?>
  15.                                 <span><em><?php echo 'http://' . $current_site->domain . $current_site->path . $blog_address ?></em></span>
  16. +                               <?php } ?>
  17.                                 <input name="blogname" type="hidden" id="blogname" value="<?php echo $blog_address; ?>" maxlength="50" />
  18.                         </li>
  19.      </ul>
  20. @@ -798,6 +801,8 @@
  21.                 groups_update_groupmeta( $group_id, 'groupblog_public', $public);
  22.                 groups_update_groupmeta( $group_id, 'groupblog_title', $blog_title);
  23.                 groups_update_groupmeta( $group_id, 'groupblog_path', $path);
  24. +               groups_update_groupmeta( $group_id, 'groupblog_domain', $domain);
  25. +              
  26.         } else {
  27.                 $meta = apply_filters('signup_create_blog_meta', array ('lang_id' => 1, 'public' => $public)); // depreciated
  28.                 $meta = apply_filters( "add_signup_meta", $meta );
  29. @@ -829,6 +834,7 @@
  30.         $public = groups_get_groupmeta( $group_id, 'groupblog_public');
  31.         $blog_title = groups_get_groupmeta( $group_id, 'groupblog_title');
  32.         $path = groups_get_groupmeta( $group_id, 'groupblog_path');
  33. +       $domain = groups_get_groupmeta( $group_id, 'groupblog_domain');
  34.  
  35.         $meta = apply_filters('signup_create_blog_meta', array ('lang_id' => 1, 'public' => $public)); // depreciated
  36.         $meta = apply_filters( "add_signup_meta", $meta );
  37. @@ -839,6 +845,7 @@
  38.         groups_update_groupmeta( $group_id, 'groupblog_public', '');
  39.         groups_update_groupmeta( $group_id, 'groupblog_title', '');
  40.         groups_update_groupmeta( $group_id, 'groupblog_path', '');
  41. +       groups_update_groupmeta( $group_id, 'groupblog_domain', '');
  42.        
  43.  }
  44.  add_action( 'groups_group_create_complete', 'bp_groupblog_create_blog' );