BCcampus / pressbooks-textbook

A plugin that extends Pressbooks for textbook authoring
GNU General Public License v2.0
25 stars 13 forks source link

Meta Settings Controls? #67

Open SteelWagstaff opened 8 years ago

SteelWagstaff commented 8 years ago

I'd like to suggest the addition of some meta settings controls that would be capable of being set/controlled at a network admin level, so that they'd pertain to all new texts created on that network.

If the Pressbooks Textbook plugin is network activated, I'd like to be able to tell the network to do any/all of the following:

  1. Automatically create new texts with the Pressbooks Textbook theme activated (or otherwise select the default theme). This might be a request to make of Pressbooks core--if it is, let me know?
  2. Set the Creative Commons Configurator setting to yes (the default is currently no, but I'd like the ability to set the default on this to yes for all new sites/texts).
  3. Set the Share Latest Export Files setting to yes (the default is currently no, but I'd like the ability to set the default on this to yes for all new sites/texts).
  4. Turn on the Hypothesis functionality (change the default from no to yes).

Is this possible?

bdolor commented 8 years ago

Hi Steel,

thanks for these feature requests. I will look at setting up some network level options for new books, specifically for the pressbooks textbook plugin. Some background info:

  1. This used to be a feature that was implemented any time a new book was created: https://github.com/BCcampus/pressbooks-textbook/blob/dev/pressbooks-textbook.php#L358 It started to demonstrate some inconsistent behaviour. I'm willing to look at this again to see where we're at.
  2. In that same function, I've got the display copyright license set to 'true' https://github.com/BCcampus/pressbooks-textbook/blob/dev/pressbooks-textbook.php#L346 though it requires the user to set a specific licence in Book Info, which can't be pre-determined. I'll leave this one as is. If it is indeed the 'Creative Commons Configurator' that you're talking about, I'll have to leave that one as well. I discourage the use of that plugin since the license information it provides does not make it through the export routines. It was used as a stop-gap measure until I could build the other Creative Commons functionality into PB core. The intention behind building it into core was so that license information wouldn't be lost each time a book was published. It's there for legacy purposes and can be useful if exports aren't your primary use case.
  3. I guess I was being cautious when I first introduced it, but if people are using an Open Textbook theme, then it wouldn't be beyond expectations that they would want that feature turned on by default. Will do.
  4. Our use-case for this plugin hasn't been very strong, but I have no problem making this an option that can be configured at the network level.
SteelWagstaff commented 8 years ago

Thanks for the quick response, Brad.

  1. If there was a way to do this w/o inconsistent behavior, I'd be all for it.
  2. Makes total sense. Am happy with your explanation of situation. Didn't know the history behind the stopgap. Consider original request rescinded. 3 & 4. If you're making #4 an option that can be configured at the network level, perhaps #3 could be as well? I'd vote for that, if asked.
greatislander commented 8 years ago

I took a look at the first item on your list, @SteelWagstaff, and realized that this was something that should be fixed in Pressbooks Core. In WordPress multisite you can define the WP_DEFAULT_THEME constant in wp-config.php and all new blogs (books) will use that theme (see here). Instead, we were hard-coding pressbooks-book as the default theme. I've introduced a PR for Pressbooks Core (https://github.com/pressbooks/pressbooks/pull/463) which changes this behaviour so that the WP_DEFAULT_THEME constant will be respected. I think that should address your request and also just kinda makes sense.