WordPress.org

Ready to get started?Download WordPress

Forums

multiple blogs sharing users, but how to share comments? (12 posts)

  1. chanzero
    Member
    Posted 5 years ago #

    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!

  2. Cryo
    Member
    Posted 5 years ago #

    I also would like to know this.

  3. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    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.

  4. Cryo
    Member
    Posted 5 years ago #

    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?

  5. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    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.

  6. Cryo
    Member
    Posted 5 years ago #

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

  7. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

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

  8. chanzero
    Member
    Posted 5 years ago #

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

  9. asechrest
    Member
    Posted 5 years ago #

    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.

  10. lameian
    Member
    Posted 4 years ago #

    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

  11. LSmith
    Member
    Posted 4 years ago #

    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?

  12. Umbrovskis.com
    Member
    Posted 4 years ago #

    Look like still not fixed in 2.9.2

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags