The MU forums have moved to WordPress.org

Cricket Moods MU Feature Suggestions (11 posts)

  1. kccricket
    Member
    Posted 16 years ago #

    I am working on making my plugin, Cricket Moods, WPMU compatible.

    Posters can create a list of moods to choose from when posting. Each mood can have an image associated with it. The plugin has an option to set what directory the images reside in. I felt that it would be appropriate to prevent blog owners (other than the site admin) from changing the image directory on their blog. The site admin can change the directory used for all the blogs on the MU installation. Each blog owner can see that list of images when modifying their moods. Does this sound like a desirable and reasonable behavior?

    I'm assuming that the site admin always owns blog number one. Are there any WPMU-specific capabilities, like manage_blogs, I can check with current_user_can(), rather than checking for blog ID 1? This is to determine who can change the image directory.

    Thanks in advance for any advice or information.

  2. andrea_r
    Moderator
    Posted 16 years ago #

    is_site_admin. :)

  3. lunabyte
    Member
    Posted 16 years ago #

    Also, images by theme might be a better fit. Certainly easier then editing a ton of blogs.

  4. kccricket
    Member
    Posted 16 years ago #

    andrea_r: thank you!

    lunabyte: Are you familiar with Cricket Moods? Can you elaborate? I'm interested in your ideas.

    Just as a side note, blog owners and the users of those blogs can always change their own personal list of moods. When you say "editing a ton of blogs" I assume you mean setting up the list of moods that appears when the user uses Cricket Moods for the first time. Also, just to clarify, any user of a blog that can edit_posts (contributor and up) has her own personal list of moods separate from other users of that blog. Additionally, the blog itself has a default list of moods that is used to populate each user's list of moods the first time they use the plugin. Currently, the blog's default mood list is populated from a list hardcoded in the plugin. Would it make more sense to populate all the other blogs' default lists using blog-id-1's default list, rather than from the hardcoded list?

    Thanks for your input.

  5. kccricket
    Member
    Posted 16 years ago #

    Ok, I think I may see where I wasn't clear enough. When I said:

    The site admin can change the directory used for all the blogs on the MU installation.

    What I really meant to say was:

    The site admin can change the directory used for all the blogs on the MU installation by changing the image directory on blog number 1.

    I think what I was trying to ask was: would it be useful to WPMU admins to be able to specify a different image folder for different blogs, or would it suffice to have all the blogs use the same image directory?

  6. lunabyte
    Member
    Posted 16 years ago #

    I would think specific images by theme would be nice. Say in a dir like themes/my-theme/moods/ or whatever.

    Then if that directory doesn't exist, it could pull from the default theme.

    Reason being, you're not going to be able to pull information from the main blog, and use it elsewhere. That's where site_options come in, which are site-wide option settings.

  7. kccricket
    Member
    Posted 16 years ago #

    What would be the benefit of that versus a single directory containing all the smilies users could ever want? Do WPMU users have write access to their theme directories? I suppose it wouldn't be a difficult change, though (if you can convince me, of course).

    get_blog_option($blogid, $key);

    But, regardless, I am using the site_options to store the image directory (in a WPMU environment, at least) for all blogs.

  8. lunabyte
    Member
    Posted 16 years ago #

    Really, it depends on what the end user (in this case a site admin) would want. They could load up a directory with tons of images, trying to cover as many themes as possible, or split it out into images that match different themes.

    Maybe it would be used, maybe not. But, have you ever ran into an image that looks bad on a black background, or bad on a white background?

    With at least having an option to have images per theme, the site admin could somewhat keep control of the visual aspect, and keep images from clashing really bad with a theme. In MU, it would happen. Believe me. lol

    Another possibility would be to have a basic directory with a few images, and then let users upload their own to their own upload directory. It could then read those images, and add them into the selection possibilities.

    That kind of skirts the whole visual control and clash thing, but it's an option I guess.

  9. andrea_r
    Moderator
    Posted 16 years ago #

    I think for now it *would* suffice to have them all in one directory.

    Lemme know when you need it tested. I have another site in dev and this would work well for it.

  10. kccricket
    Member
    Posted 16 years ago #

    That's definitely an interesting concern. I hadn't considered a site admin making pseudo-antialiased smilies available for users. By pseudo-antialiased I mean indexed-color GIFs or PNGs that are matted against a background color. I always imagined smilies being background neutral, like the smilies included with WP.

    As far as the theme-dependent mood folder goes, I can certainly do that if someone requests it. There's two ways I can do that: the easy way where the theme mood folder overrides the site-wide mood folder, or the harder way where the theme-mood folder is presented in addition to the default ones. Correct me if I'm wrong, but you're advocating the "easy way" in order to prevent visual conflicts, correct?

    I'll also separate the site-wide mood image directory and the site-wide default mood list from the settings of blog number one. I'll create a new "Site Admin" panel where you can set the site-wide mood image directory and default list for new blogs. If you need to change the image directory for a particular blog, you can do so using the standard "Edit Blog" Site Admin panel. Sound good?

    I don't really feel like adding upload functionality to CM, to be honest. If someone can point me to a drop-in way to add image and/or zip-file-full-of-images upload form, I'll do it. Perhaps there's a way to utilize WP's content upload functions? I'll investigate after I get the WPMU functionality polished.

    andrea_r: I should have it ready in the next couple of days--I'll contact you then. Thanks for your offer, this is my first experience with WPMU, so testing by a seasoned WPMU admin will help a lot.

  11. lunabyte
    Member
    Posted 16 years ago #

    Pretty much to avoid visual conflicts, yes. That and also to maybe make sets a little more blended to the theme as well.

    Actually, it would be pretty easy.

    -- pseudo code

    if !file_exists(path-to-theme/mood/default.jpg) {
         $path = /path-to-default-theme/mood/;
    } else {
         $path = /path-to-theme/mood/;
    }

    Just as a basic example, of course. Or a blank index.html, whatever.

    For a mixture, you could break out all the images to something like wp-content/moods/ and have the default images there, but then also have sub directories below there, corresponding to the theme name, and read in images from the main dir, as well as the sub.

    A little more involved, but not too much really.

    Then again, you could instead offer it up in sets, where the user can choose from different sets that the site admin sets as default.

    With MU, there are tons of options and ways to integrate things, which is why my 2c is being chipped in. :)

About this Topic

  • Started 16 years ago by kccricket
  • Latest reply from lunabyte