• Hi all,

    I’ve got several blogs that are sharing the same user table, but now I’d like all the blogs to share the same comments too. Anyone know how to do this?

    FYI the blogs share the same users via a couple added lines in wp-config:
    define(‘CUSTOM_USER_TABLE’, ‘wp_users’);
    define(‘CUSTOM_USER_META_TABLE’, ‘wp_usermeta’);

    Thanks in advance!

Viewing 11 replies - 1 through 11 (of 11 total)
  • I also would like to know this.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    You can’t do that, because it doesn’t make much sense. A comment is made on a specific post. If the posts are not shared, then the comments can’t be either. And posts are what make a blog, so if you have the same posts, then they’re the same blog.

    And if you’re trying to make a mobile version not using a plugin, but creating a new website?

    I suppose you could check if you’re on mobile or not and change the style.css file accordingly.

    But is it also possible to hide posts on the mobile version or add some posts that aren’t on the full version?
    Is it also possible to change the content of a post that’s on the mobile?

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    The way I do mobile versions of a site is to add a new stylesheet for handheld devices into the theme.

    For example, in my header.php, I have this:
    <link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri(); ?>/handheld.css" type="text/css" media="handheld" />

    Then I made a new handheld.css file in my theme directory, and put new rules into that specifically for mobile devices. Mostly adding display:none to the sidebars and such, to hide those pieces.

    Is it possible to show a different content in a post when it’s on mobile or not?

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    Sure, it’s possible. Recognize the user agent and replace the content with something else.

    Thread Starter chanzero

    (@chanzero)

    Hmm. Thanks for your answer Otto42. I hadn’t thought of that.

    Is it possible to show a different content in a post when it’s on mobile or not?

    After a forum request, I wrote Mobile Comments Signature plugin as a project. It recognizes a comment’s user agent as mobile or not and appends user-defined text if it’s a comment made from a mobile.

    You could take a look at it for inspiration if you wanted. It’s pretty well commented and it’s got a mobile user-agent detection script in it (which I found on the web, credit given within the plugin).

    Although I’ve found (I think) that checking the user agent of a post is not as easy as checking the user agent for a comment. WordPress stores a comment’s user agent in the database to be accessed at any time, but doesn’t seem to do the same for posts.

    define(‘CUSTOM_USER_TABLE’, ‘wp_users’);
    define(‘CUSTOM_USER_META_TABLE’, ‘wp_usermeta’);

    i have added these two lines to my two blogs…
    however it doesnt work well…

    the main blog’s prefix: wp_
    the 2ng: wp2_

    i tried register in main blog..
    however i cant login with the id in 2nd blog…..

    anyone van help?

    thanks a lot

    define('CUSTOM_USER_TABLE', 'wp_users');
    define('CUSTOM_USER_META_TABLE', 'wp_usermeta');

    I tried this as well. Got locked out for having insufficient permissions?

    Look like still not fixed in 2.9.2

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘multiple blogs sharing users, but how to share comments?’ is closed to new replies.