WordPress, Multiplied

For more information about the Multiply plugin for WordPress, visit its homepage.

   
This entry was posted on Friday, May 27th, 2005, in the categories “”, “projects”, “PHP”, “code”, “WordPress”, “plugins”, “multiply” and “multiblog”.

Thus far, 95 responses.

Supposed tozé:

hm, i’m sorry i’m asking this since it’s probably fairly obvious, but my english isn’t the best and i just want to be sure: does this plugin allow one to post at several blogs from the same administration or is it more of a weblog farm handler?

Alleged random:

I don’t really know what you mean. You can’t post to several blogs at the same time, but yes, you can post to separate blogs from the same administrative interface. It’s basically like installing WordPress several times except much easier to switch between blogs.

Postulated alto:

hi folks

  1. i have pasted the code from
    http://rephrase.net/days/05/05/wordpress-multiplied
  2. it seems as if the instructions require the plugin manager from http://wp-plugins.net/
    yet the plug-ins manager is temp. out -of-action.

QUESTION
this download - seeing the plugin manager is not currently in service, what do i do with the code to make it work?

alto

alto

Offered random:

No, you don’t need the plugin manager. You just need to copy the 000-multiply.php plugin file to your plugins directory, then activate it in wp-admin.

Said Mofo:

I installed your plugin, but upon testing it, I got several errors. Here. First, the mainpage on the presses made don’t use the themes. Secondly, upon selecting the new press in the admin section, the admin section stops working because it starts to look for the files in the new directory, instead of the old one where they reside.

I followed you instructions, and doubled checked them, yet I can’t seem to identify the problem. Any help would be greatly appreciated.

Thank you.

Offered Mofo:

Err… terribly sorry bout the link problem before, we all make mistakes from time to time.

Oddly enough, problem seemed to have worked itself out.

Answered random:

I’m not sure, Mofo. “WordPress address (URI)” should be the same as it is for your base WP install; it being different is the only reason I can think of for the admin to stop working. (Only “Blog address” should be different.)

It’s not something that happened in any of the test installs I did, so I’m not sure.

Alleged mofo:

I think that might have been the problem. Thanks for the response.

Mind Sharer - For The Marketing Mind:

Multiple blogs in one Wordpress instance

This is something that Wordpress user wanted to have for a long time - by having one Wordpress instance but allowing multiple blogs within that instance:

Multiply is a plugin for WordPress 1.5.x which allows multiple blogs — or, in the pretentious …

Offered Tech News Online:

whenever i try to activate the plugin, i get database errors, and the new tables wont be made. for some weird reason… please help?

Recorded Sam Angove:

an you tell me what the database errors are?

Posited Melina:

I can’t seem to use the bad behavior plug in to prevent robot spam with this. Do you know another which will play nice with multiply? I’d like to have a little protection, although my site doesn’t get so much traffic I’m too worried about it…

Held alto:

i have it working now.
it’s great!
thankyou sam.

Suggested alto:

sam
how do i make the new blogs “show”?

Considered Sam Angove:

Alto, if you’ve created the index.php files for the new blogs, just go to wherever they are. If you just want to make sure it’s working, add “?press_id=1″ (etc.) to the end of the address of your normal WP blog.

Thought Sam Angove:

Melina: try editing 000-multiply.php (line 35 or so) and commenting out mb_plugins(); — that is, change it to // mb_plugins(); or /* mb_plugins(); */.

This’ll mean all the blogs will have the same plugins as the default one, but I’m not sure that feature actually worked. I’ll look into it later, but I’m right in the middle of my exam period and my test server is borked, so I mightn’t get to it until late next week.

Considered whoismanu:

Hi, thanks for this great plugin. I just installed it and it runs fine.

However I noticed one thing: some other plugins might not work without problems.
I saw that this happens especially with plugins that make use of variables like $tableposts.

The problem seems to be that multiply only sets $wpdb->$table in the mb_set_press($press_id) function. To use plugins that use e.g. $tableposts you have to add something like $tableposts = $mb_real_prefix . $press_id . '_posts'; in the mb_set_press($press_id) function.

Hope this can help for a future version.

Thought alto:

hi sam
so far so good.
everything seems fine

Reckoned Gea-Suan Lin's BLOG:

Multiply

在 桑林志 那看到 Multiply WordPress 這篇文章,不同於 WordPress MU 的作法,Multiply 是透過 Plugins 處理多 blog 的情況。
也許晚點來試看看?(說實在我覺得 pLog 在 large scale 的 performance 實在是,嗯&#8...
Answered K Bouton:

Have installed it relatively easily. Took me a while to figure out I needed to set only the blog url and not the wordpress url as well - had to rtfm :) .
But even after reading it I am unclear as to user settings.

When I open url somewhere.com/wp/cat and log on, I want to only get to the dashboard for the cat press, not a dashboard with default press AND cat press.

Am I missing some setting?

Thanks

Alleged Paul van I.:

Hi! GREAT plug-in! I use it at my website and it works brilliantly. You’ve managed to get away with multiplying Wordpress using as little hard-coding as possible. Brilliant! Keep it up :D

Suggested Pras:

Hi this plugin looks very useful. Is it possible to have the same categories available to all blogs?

Recorded hanindyo:

hi..I’m having a difficulties with multiply plugin and plain vanilla themes.. checkout sukmana.com and ckunte.com
the sidebar in sukmana.com kept showing error..anyone could help ?

thanks :)

Held hanindyo:

I think it’s related with how Links is manage in the database by the multiply..and how the sidebar.php in plain vanilla theme read the database for Links…

Alleged Sam Angove:

I’m studying for an exam (tomorrow!) right at the moment, but I’ll take a look at it later.

Noted osmanmutlu:

when i create users they can enter the other users page at least they can post i want everyone to use his own blog is it possible to do this.

Reckoned Jeff Watts:

Hello - terrific plugin. I have it up and running on my site with very little difficulty installing.

I’ve got blogs setup at site.com/a and site.com/b, but I would like for those blogs to be at a.site.com and b.site.com. I can get the URLs to work with mod_rewrite, but I can’t seem to rewrite the URLs used for supporting files like images, css, and javascript. So, if a user is browsing at a.site.com, their images/css/javascript are coming from www.site.com/.

This is really not a problem until you have a plugin that needs to reference something on the wp-content directory through javascript. In my case, the plugin (votio) needs to make an xmlhttprequest in javascript, but the JS fails since it is trying to reference www.site.com from a.site.com.

Hope that makes sense. The thing I’m looking for is a way to use Multiply to get multiple blogs on multiple hostnames (a.site.com, b.site.com) and still have other plugins work that are only expecting a single host name (www.site.com).

Thanks in advance for any help you can offer.

Considered Sam Angove:

Sorry Jeff, I don’t have a good solution for this. Browsers don’t allow xmlhttprequest across domains for security reasons, so the only thing I can think of is to to modify the Votio JavaScript to send the requests somewhere on the same domain, then send them to the right place on the backend.

That is, get it to send requests to a.site.com/votio and then redirect them to site.com/wp-content/votio.php with mod_rewrite.

(And many apologies if that doesn’t work!)

Thought Ryan Alexander:

I get the following errors when I try to install the plugin:

WordPress database error: [You have an error in your SQL syntax near ‘; ‘ at line 7]
CREATE TABLE wp_multiply ( press_id int(11) NOT NULL auto_increment, press_name varchar(200) NOT NULL default ‘’, min_level tinyint(2) NOT NULL default ‘0′, PRIMARY KEY (press_id) );

WordPress database error: [You have an error in your SQL syntax near ‘; ‘ at line 8]
CREATE TABLE wp_muser ( rel_id int(11) NOT NULL auto_increment, press_id int(11) NOT NULL default ‘0′, user_id int(11) NOT NULL default ‘0′, level tinyint(2) NOT NULL default ‘0′, PRIMARY KEY (rel_id) );

WordPress database error: [Table ‘blog_aapac.wp_multiply’ doesn’t exist]
SELECT mu.press_id, mu.level, mb.press_id AS ‘press_id’, mb.press_name AS ‘press_name’ FROM wp_multiply mb, wp_muser mu WHERE mu.user_id = ‘16′ AND mu.press_id = mb.press_id ORDER BY mb.press_id

Im not an overly techsavy person…. any help you could provide would be much appreciated!

Alleged Angela:

I’m sorry if this sounds stupid, but will this plugin allow me to use ONE installation of WP for seven blogs each with their own domain name??

Answered Sam Angove:

Ryan: sorry, but I can’t reproduce the error, and have no idea why it would be happening.

Angela: honestly, I don’t know. Should do, if they’re on the same server and you can use relative file paths between them (e.g. the files are somewhere like /usr/me/public_html/site1/ and site2/), but WP might have some anti-XSS code that prevents it.

Posited trisha:

Hi there. I really like your idea and tried to install the plug-in. However, when I go to Manage>>Presses, I get these errors:

Warning: Cannot modify header information - headers already sent by (output started at /wordpress/wp-admin/admin-header.php:8) in /wordpress/wp-content/plugins/000-multiply.php on line 104

Fatal error: Cannot redeclare mb_cookiemonster() (previously declared in /wordpress/wp-content/plugins/000-multiply.php:50) in /wordpress/wp-content/plugins/000-multiply.php on line 47

I’m still learning all this stuff; I appreciate any help you can offer.

thanks!

Recorded Nick:

Question - using this plugin, is it possible to pull posts from within another blog? E.g., to have a sidebar with posts from the “Events” blog on the Main blog homepage? (Forgive me if this is a silly question - I’m considering switching from MT where this is easy to do, so I want to make sure it’s possible).

Said Kris Khaira:

If I use this plugin, can I display content from one blog in another blog?

e.g. display the latest 10 Posts from 4 different blogs in the front page of a 5th blog.

Postulated Sam Angove:

Nick, Kris: I think so, but I’m not completely sure. Never actually done it myself. I’ll have a look this afternoon. Worst case you can write some custom code to query the database directly, or just use one of the RSS parsing hacks.

Recorded Becca White:

I just wanted to say thank you for this great plugin - it certainly fills a need I’ve had a for a while :) .

I did want to mention though that editing the local time stamp in the Options->General doesn’t work on the individual blogs - they continue to utilize UTC time and don’t update.

Not a big deal (at least, not for me) but I thought you’d like to know.

Thanks again!

Posited Sam Angove:

Thanks! I fixed the bug in the version at the wp-plugins.org repository if you need it, but it’ll only apply to new blogs.

Anyone that wants to fix old blogs should run something like this in phpMyAdmin: INSERT INTO wp_2_options VALUES ('', 0, 'gmt_offset', 'Y', 1, '0', 20, 8, '', 1, 'yes');

Alleged Becca White:

Thank you Sam, your fix worked like a charm :) .

One other thing, not sure if you know about it - but the .htaccess file doesn’t auto update anymore (even when made writeable) - again, not a problem for me, but wanted to let you know.

Now I’m off to sing your praises :D

Sam Angove:

Hi again. .htaccess still updates for me, so I don’t know what the problem could be. The first version of Multiply put all of the rules in a single .htaccess at the lowest shared directory, but the new expects a separate one wherever that blog’s index.php is — are you trying the former?

Considered Kashif:

Hi Sam, this is really useful plugin for me as I am testing out a multiblog system. I have got few queries and will appreciate your feedback on them:

  1. How to show only those presses to a user (when he logs in) to which he is associated with.

  2. How to link multiple users to a press?

Thanks,

Said Sam Angove:

Kashif: User management is by far the weakest part of the plugin, and I honestly don’t recommend it for multi-user systems with different trust levels. It was hacked in at the last minute, and it doesn’t do very much at all. WordPress MU is much better.

In this version, the association with presses is based on the user level, so it can’t give you the granular control you want. WordPress 1.6 includes a much-needed overhaul of the user permissions system, so (if the hacks that make it possible still work) I’ll be releasing a better version when that comes out. That won’t be for a while, though.

Sorry!

Alleged Kashif:

Thanks for the prompt reply. I tried to use Wordpress MU on windows with apache but it’s not working due to mod-rewrite issue. Though its off topic here but have you got any tip on that?

Supposed Sam Angove:

Sorry, I don’t know. There’s an official support forum at http://blogs.linux.ie/support/ ; they should be able to help.

Held Becca White:

but the new expects a separate one wherever that blog’s index.php is — are you trying the former?

Hi Sam,
Thanks for the quick reply - I am setting up a separate .htaccess file in each directory with the index.php file and making sure to CHMOD them to 666 (even tried 777) with no luck…I narrowed it down to the plugin because the .htaccess file updates fine when it’s disabled.

Again, not a big deal manually editing it (I don’t plan to add a lot of pages) - however, if there’s anything else I can do or information you’d like, lemme know.

Recorded Sam Angove:

Well, it does sound like a problem with permissions. The plugin uses WordPress’s function, so they’re doing literally the exact same thing. Is the directory set to 666 [or whatever] as well?

Suggested Becca White:

Yep (I decided to try that after just setting the .htaccess permissions didn’t work). No luck though.

Said markus:

Nice work!

I will use it to expand my empire ;)

Thanks a lot for this work!

Noted Becca White:

Sorry to be a bugger, but there is one other thing I just discovered and it could pose a potential problem…it’s regarding user accounts.

It seems that an error appears when someone registers for the website, the wp-register.php file attempts to use the current theme for the default blog and the following error occurs:
Warning: extract(): First argument should be an array in /home/host/username/wpfolder/wp-includes/functions.php on line 1813

The registration takes place okay and the user is indeed registered, however, if the user does not have at least a level 2 status for the default blog, they aren’t able to blog on any other ‘presses’ regardless of their press user level…for instance:
1) “Natalie” registers for the blog, registration successful (regardless of error)
2) I only want her to have writing and management privileges for “press 1″ and not the default - so I upgrade her “press 1″ user level to 6 while her default user level stays at 0
3) Natalie has management power over “press 1″ (i.e. can add links, manage link categories, can manage posts below hers, etc.) - however, she cannot write or publish posts and receives the message that her status needs to be upgraded.

I believe this may be a bug?

I’m running WP 1.5.1.3 (recently upgraded to 1.5.2) and I’ve followed your instructions to the ‘t’.

If you need further clarification or some more examples, you’re welcome to email me and I’ll walk you through everything.

Answered Sam Angove:

How strange. I have neither problem in my 1.5.2 install — new user registered fine, and level 0/* user successfully published a post. Sorry.

I don’t really have time right now to go hunting for the problem, but if you have any more information then I’ll take another look.

Supposed Becca White:

No worries Sam - I just wanted to bring it to your attention…

I figured out the issue with the registration - regarding the permissions, the only other thing I realize is when I add a user to a ‘press’ a random number appears just below the sub-menu to the left (i.e. if I only have one user added to one press, the number 12 appears, if I add another user to another press, the number goes up to 223…).

The users still aren’t able to publish to their ‘press’ unless they have a level of 1+ on the default blog.

I’ll try to look through the code and see if there’s anything that sticks out…

Posited Sam Angove:

The numbers were a debugging thing ages ago. Removed in svn trunk.

My level 0 test users can post fine, so I still don’t know what’s going on there.

Suggested eyetag:

hey sam,
great plugin, provides me a wounderful workaround for something i´ve been trying to make since i run workpress!
there´s one question for me right now: how can i modify my theme-files (using the same theme) in my second blog (within it´s own filestructure)?
thanks for this lovingly handcrafted piece!
et

Considered Sam Angove:

All themes need to be in wp-content/themes. If you want a modified version of the same theme, you’ll need to make a copy of that theme’s directory and edit the copy. (Changing the name of it in style.css would probably be good too.)

If you want the theme files elsewhere, you’ll need to mess around with symlinks/hard links or have a custom plugin on the theme_redirect hook. It’s not a good idea.

Recorded Mon:

Great plugin! Super easy to use and install. Keep it up :)

Recorded eyetag:

just discovered the following bug:
after working in my second blog, i´m browsing to my default install. when i hit the edit-function of a post there, i´m taken directly to the edit post page. and here it happens: all my modifications i´m doing there are beeing ignored! i suppose it behaves as i would still be in the seconds blog admin and since there´s not a post with this id, my changes are simply not processed. i have the feeling, that this is the case for all modifications, as long as the admin is not selected before any other action!

please take a look at this.
thanks!
et

Noted Sam Angove:

Yeah I know. That’s why it says “Edit/delete links on posts and comments won’t work all of the time.” If you mean that the post you click the “edit” link on doesn’t change properly, that can probably be worked around just reloading the page with the “edit” link on it before clicking. (Cookie voodoo should take care of it.)

If you’re already editing a post in blog #1, though, then go do something in blog #2, your blog #1 editor has suddenly become very dangerous. There’s no workaround for that; you just can’t use two blogs at the same time in the same browser. Or, at least, you can’t use the admin section in both at the same time. Sorry.

I’ll look into a workaround for the next version, but that definitely won’t be for a while. Few weeks at least.

Suggested eyetag:

how do i do that, appending the set_press_id=$mb_id there? i´m not a programmer. i produced fatal errors with my attempts…
this problem only occurs for one editor, other people editing their posts at the same tim from other browsers won´t interfere, right?
another effect i was experiencing some times was a blank page after switching presses. but for now i can´t reproduce it. thanks for your quick answers. this hack/feature is really great and i appreciate your involvement and what you said, that there might come a new version (which means to me it will most likely work with newer wp-developments) very much!
cheers

Supposed Sam Angove:

Other people shouldn’t make a difference; it’s a problem with browser cookies.

Editing core files isn’t recommended (such a pain when you upgrade), but to fix edit_post_link (in template-functions-links.php), you should have a line that looks like this: global $user_ID, $post, $mb_id;

And then you should add this before the echo: $location .= "&set_press_id=$mb_id";

That’s still not going to work until you edit 000-multiply.php and remove the block in mb_cookiemonster() from “super dodgy hack” down to mb_get_cookie('mbrid').

I still haven’t really looked into WP 1.6, but yeah, if it’s possible to keep the plugin working then there’ll be a new version.

Reckoned eyetag:

hi sam,
it seems to work.
but what´s the downside of this / why didn´t you put it like that in your original script?

Considered Sam Angove:

Because you have to edit the core, and above all else I was trying to prevent that. It was a great disappointment to find that edits were necessary to (e.g.) enable pingback.

Supposed tech dude:

This is soooooooo coooooooool. Thanks a lot.

I had tried wpmu earlier, but couldn’t get hold of a stable version. I kept getting errors.

I have to create about 50 blogs on the same site and your plugin is nothing short of a god-send. Absolutely love it :) :) :) .

Took some time to figure out that I am not supposed to change the Wordpress URI ;-)

Reckoned Pras:

Hi, I have two blogs - Blog 1 (the default wordpress blog) and Blog 2 (added using multiply). I have a user ‘test’. I have made them level 1 globally. For blog 2, they are user level 4. The default level for blog 2 is 2. I would like them to publish only to blog 2 so I setup the permissions like this. However, wordpress informs me that users should be globally level 2 or above to publish. If I do this, they are able to publish to both blogs - but, I only want them to publish to blog 2. How can I achieve this? I suppose one solution is to use blogs created only through multiply, setting default access levels for these.

Thought David Keller:

I was having the same problem that Becca et all were having (but, Sam couldn’t reproduce it). ….

While managing the appropriate “PRESS” (not the default), you need to navigate to the Options - Writing page, and select “Newly registered members: [] May publish articles” I clicked “may publish articles,” the box and then it all seemed to work. By leaving this unselected on the “Default Blog” the users were not able to publish there, but were still good on the sub-Press.

Answered Roger Harrison:

I’ve just installed the plugin on a client’s site and it is working well apart from one thing.

When you create a page (rather than a post) and use wp_list_pages() in the sidebar the links go to the main blog, not the sub-blog. In fact the links come out like:
http://mainblog.com/?page_id=2

Permalinks are turned on and pages are linked to correctly in the main blog as
http://mainblog.com/whateverpage/

You can see an example at:
http://everycare.worldwide1.co.uk/deeside/
(this in development though so I might well have played about with the page by the time you get to see it.)

Considered Sam Angove:

Thanks, I’ll look into it when I have some time.

Offered Roger Harrison:

Thanks - I’ve sorted it. The problem was with the .htaccess file in the sub-directory.

Answered Charles Lindquist:

Sam:

Multiply is fabulous. It seems cleaner and leaner and easier to use by far than wpmu. (But maybe for bunches of blogs wpmu would be better.)

Anyway, is it possible to use post by mail? Should I copy wp-mail.php into each blog directory?

Thanks in advance.

Postulated Sam Angove:

Hi. The easiest way is probably to make a new copy for each blog — wp-mail-2.php etc. — in the WordPress directory, and put that old chestnut $mb_press_id = 2; at the top of the file before wp-config gets included. Each wp-mail will need to be called separately by wp-cron (or whatever). You’ll also need to make sure to set up separate email addresses in each blog’s admin section.

I haven’t tested it, but don’t see any reason why it won’t work. Hope this helps.

Said Charles Lindquist:

Thanks for this, Sam. Your suggestion works great! I styled a wp-mail-2.php file after the xmlrpc-2.php file created by multiply, adding “that old chestnut” as you suggested, followed by a line requiring wp-mail.php.

I appreciate your responsive help!

Steve:

I have installed xoops 2.2.3, should be newest version on the xoops website. I downloaded the wordpress ME .33 from the xoops website. That works correctly, however like many users I have run into the multiuser problem and im hoping ur module can fix my problem. I want users to have sole access to blogs they create or own, and only let other users read their personal blogs. I tried putting ur 000_multiply.php file in my wordpress plugin folder. The wordpress plugin gui rocognizes it succssfully but when i activate it, i don’t see a manage button specified in the readme and when i go back to my wordpress homepage it is now blank. Before it had many test posts. Any ideas, thanks for your time and helping so many people with ur plugin. steve

Considered Sam Angove:

Steve: I don’t know. It looks like the WordPress ME module is based on WP 1.2, and this plugin won’t work with anything less than WP 1.5. I’ve never used it, though, or XOOPS, so I can’t say for sure.

Sorry!

Postulated Shaun:

Great plugin, but the user management is driving me bonkers :)

I’ve seen the related posts above, but they don’t seem to fix the core problem. I can make the user a Level 9 on the secondary press, but it doesn’t matter - they are only allowed to do what the settings dictate on the Default Press. Am I missing something?

Recorded Sam Angove:

It probably won’t work properly on 1.6a, if you’re using that. Otherwise, I’m not sure.

Unfortunately, I won’t have time to play with it any more until late November, so there’s nothing I can do. Sorry!

Said Shaun:

Sam, I’m running on 1.5.2, and no problem at all. I appreciate that the plugin exists at all!

If you do catch this last note and know the answer off the top of your head, any advice is appreciated:

I don’t mind editing the main templates at all. I was wondering if there was a very easy way to replace the value of the wordpress user level variable with the value of your user level variable based on the current press. It seems like it might be an easy and quick solution…

Anyway, if it’s an easy answer, great! Otherwise, talk to you again in Nov/Dec!

Thanks!

Postulated Sam Angove:

Sorry, I’ve got nothing.

That is an easy and quick solution, though I prefer to call it a “terrible hack” or a “horrible kludge”. Unfortunately, it’s what the plugin already does. ;)

(That’s why I thought it might be a 1.6 problem, since user levels are deprecated in favour of roles.)

Offered Shaun:

Sam! I may have found the problem! It looks like Multiply is setting the $user_level var properly. However, it appears WP is not using that var when checking permissions. It uses the get_userdata function in pluggable-functions.php to recache the user data from the users table.

For example, in functions-post.php, look at function user_can_create_post. It calls the get_userdata function which returns the user level NOT based on $user_level, but based on a reread of the wp_users table. I think this is why your efforts are basically being ignored by WP.

I’m not very good with PHP & SQL, so I’m not sure how to edit the get_userdata function in pluggable-functions.php. I think if we add a couple lines of code to re-write the user level from your table BEFORE it returns the $cache_userdata array, we might be homefree!

Of course, I could be dreaming too! In either case, if it isn’t as easy as it sounds, I promise, I’ll leave you alone!

Supposed Shaun:

Okay, I figured it out. I added the following line to the get_userdata function:


$cache_userdata[$userid]->user_level = $press_cache[$mb_id]->level;

That isn’t all, but that did the trick. I’m not sure what other ramifications this might have. I am currently writing in a catch for an empty press cache. Since this is in pluggable-functions.php, I’m assuming this could be changed in the plugin without changing the main code (although I’ve never actually messed with the plugin architecture, so I don’t know how).

Point out anything that looks wrong! It has worked in all my tests though!

Suggested Shaun:

Sorry, don’t copy and paste that code line as it is missing underscores - I used the code tag, but it didn’t help :)

Alleged Kristina Maree:

Hi,

Sorry if this is a newbie question, but I need your help.
Just say I set up a blog and change things like permalinks and
update services (ie where it pings). I then use Multiply to create a new blog. How can I get it so that this new blog has the same edits I made in permalinks etc as the original blog? I don’t want to have to make the same changes all the time.
Thanks,
Kristina

Alleged Sam Angove:

Kristina, the only way is to edit the plugin file directly and change the blog creation function mb_create_press(). Adding a few update_option() calls after populate_options() (around line 700) should probably do it.

Otherwise, I’m afraid you’re stuck doing it by hand. Sorry!

Answered Kristina Maree:

Hi Sam,

How can I find out what the correct terms are to put in the update_optiion fields? You have;
update_option(’blogname’, $name);
which does the name. How can I find out which one to use to make the theme I want, or permalink settings etc be how I want them?
I have no idea :P
Kristina

Suggested Sam Angove:

If you have access to the database with phpMyAdmin or similar, browse to the *_options table and look at the option_name and option_value columns. From there it’s update_option('option_name', 'option_value');.

From memory, permalink structure is permalink_structure. I don’t know about themes, but it looks like you have to set stylesheet and template.

Thought Kristina Maree:

Where can I get the option value from? For blogname I don’t see $name but the actual name I have entered. Where can I find the option value for other things ie what it is by default?

Kristina

Postulated Sam Angove:

It might be easiest to just edit wp-admin/upgrade-schema.php, now that I think of it. It lists all the defaults that there are. (Scroll down to the add_option() bit.) If you want the values you’ve already entered, you’ll need to look in the database. I can’t help with that.

$name is a variable, if you want to enter specific text just put it in quotes –

update_option('some_option', $name);
update_option('some_option', 'This is the text in this option.');

Considered Kristina Maree:

Ummm… I guess I was asking how you knew the variable for blogname was $name?? I didn’t see this in my phpAdmin. If I want to know the variable for permalink_structure where can I find this (or is it just $name again)??

Alleged Sam Angove:

$name is passed from the admin page where you create the blog; isn’t there a box to enter it?

In phpMyAdmin you should have a $prefix_options table for every blog you have. The primary one is probably wp_options; the first new Multiply blog is probably wp_1_options. There’s a column called option_name; find the row with permalink_structure in it and take the value from the related option_value column. It should be something like /%year%/%monthnum%/%post_id%/.

To make all blogs you create in the future use that permalink structure, you would need to add something like this to the blog creation function: update_option('permalink_structure', '/%year%/%monthnum%/%post_id%/');.

There’s no easy way to automatically get the settings from the main blog and apply them to the others.

Noted Kristina Maree:

A-ha! I understand now. Thank you so much for all your help, I really appreciate it :P
hugs,
Kristina

Recorded Ben's Bits:

a year later: an overvies multiblog software options

Those who’ve been around for a while may remember my article on blogging software from last year. Actually I got (and continue to get) quite a bit of attention from that article including syndication from Lockergnome. The past year has been an inter…

Postulated Shaun:

Sam:

Just another note - I have found that the time cannot be correctly adjusted on the non-default presses:

In the Admin Control Panel, with the desired press selected, under Options > General > Date & Time, the setting “Times in the weblog should differ by” does not seem to get updated. I have done everything I can think of with rights and found the error on both a hosted blog and a locally maintained blog (my own server). I CAN edit the value directly just fine in the mySQL tables - just not through the Admin Panel with Multiply. The other items in the same area work JUST FINE.

Just a note… Thanks!

Noted Sam Angove:

Shaun: hmm, there was a bug like that a while ago where the option wasn’t added to the database so update_option() couldn’t find it. Thought that one was fixed, though. Anyway, I’m on holiday starting tomorrow, so I’ll look into it (and the rest) later this week.

Considered Val:

plugin is great but doesn’t play well with the feedwordpress plugin. any suggestions?

Posited Sam Angove:

Sorry Val, but no.

Reckoned Barry Stellrecht:

I’m probably gonna wait until WP2.0 comes out and multiply is fixed for it, but this looks like just what I want. I’ve just got two suggestions:

  1. Maybe you could automate the generation of files like xmlrpc-1,2,3.php by making a single file and using it as mb-xmlrpc.php?mb_press_id=1. If you still want to use xmlrpc-n.php as a filename, you could add a rule to .htaccess for it. That way, you need only one file, and users don’t have to customize it.

  2. I’m currently using multiple WP installs, and the biggest drawback is that site search doesn’t cross “blogs”. Does multiply do a search across all the “presses”?

Alleged Sam Angove:

Barry: IIRC there was some problem with GET vs POST vs REQUEST, which was why I went with multiple files. But I can’t for the life of me remember what it was. I’ll look into it again, maybe, but I probably won’t change it. (For a plugin I don’t even use, it takes up too much time already.)

Normal search will not work across multiple blogs; you’d have to use a third-party search system. One wouldn’t be too hard to write, I don’t think, but it’d work just as well for multiple WordPress installations (so long as they’re in the same database). Sorry.

Noted Sam Angove:

Barry: just to follow up on that, it’s because the XML-RPC client WordPress uses (IXR) strips the query string from the server URL.