Helping you Build Your Own Social Network!

Faster, better and easier!

Use $_blog_id instead of $blog_id in WPMU 2.9 trunk-r2033

(6 posts) (2 voices)
  • Started 2 years ago by mercime
  • Latest reply from Brajesh Singh

  1. I noticed this in trac last night and there is that change in wpmu-functions.php file. I am looking to see where some features of existing installs might "break" with the change and prepare for them. So please correct me if I am wrong in any of my assumptions below:
    1. For main navigation I use the <?php switch_to_blog('1') ?> for sub-blogs of WPMU installs used as CMS. The main navigation won't be affected.
    2. For an old WPMU install, I put BP in blog_id_2 by adding the following in wp-config.php:
    define ( 'BP_ROOT_BLOG', $blog_id ); where $blog_id is 2 in that install. Since $blog_id is WPMU function and not BP, then I don't need to change anything when I upgrade this old install later on to stable WPMU 2.9 and BP 1.2.
    3. I have to check plugins especially the ones in my mu-plugins for references to $blog_id and replace with new $_blog_id - and see if they work when I upgrade the development install later this week to trunk.

    Feel free to correct me or add to checklist above.

    Posted 2 years ago #
  2. hi mercime
    let me clarify first thing. You don't have to change anything. This change in mu trunk will not break any plugin/theme/custom code you have used.

    Reason: $blog_id is a global variable which contains current blog id. the current change in trunk has not affected it in any way.
    The change has affected some local variable(they have only existance inside some methods) which was also named $blog_id. As far as I see, Donncha have done it to remove some confusions and another benefit will be the global variable $blog_id can be used inside those methods too now. Earlier, It could not be, as there were local variables overtaking.

    so it is good for us and It is not going to break anything :)

    Posted 2 years ago #
  3. Thank you for the reassurance and the explanation Brajesh. With the almost daily upgrading of both WPMU and BP trunk versions just so I could soft launch by mid-January, I just don't want to be surprised by any unpleasant stuff in the site ;-

    Posted 2 years ago #
  4. You are most welcome :) I understand it, I see there are so many commits(specially in BP), It is really an awful task to keep up and be sure everything works perfectly. still I hope you won't have any issues with your launch in mid January, there should be stable version of both of the softwares available by then :)

    Posted 2 years ago #
  5. "I hope you won't have any issues with your launch in mid January"

    Thank you for your concern, Brajesh. It will be a soft launch with membership mid-January and official launch end of January. And yes, I'm expecting many issues because of the major releases in WPMU and BP :-) So you might be seeing a lot more mercime in these forums - panicking- LOL. Which reminds me, I will be posting another thread soon.

    This is a pro-bono project for an outdoor group I have climbed mountains with. The group has two YahooGroups Accounts (local and international) since 1999, a Facebook account and a Geocities site. Fortunately, I was able to copy the posts and images in the Geocities site before it closed down sometime Sept/Oct this year, and have those in Archives sub-blog of the site. Nevertheless, pro-bono or not, "if it's worth doing ... it's worth doing it well."

    Posted 2 years ago #
  6. hi mercime
    You are most welcome to post more. I will be glad to assist :)
    Your project sounds so good, I will be glad to see it live and in action. I understand, It will take some work on your part as you will need to copy the posts etc, but still I hope it all goes smooth.

    Nevertheless, pro-bono or not, "if it's worth doing ... it's worth doing it well."

    Loved it, you are right, If it is worth doing, It's worth doing it well :)

    Posted 2 years ago #

Reply

You must log in to post.