Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ship CBOX with Child Theme / Easy Child Theme Wizard? #96

Open
BoweFrankema opened this issue Dec 5, 2012 · 13 comments
Open

Ship CBOX with Child Theme / Easy Child Theme Wizard? #96

BoweFrankema opened this issue Dec 5, 2012 · 13 comments
Assignees

Comments

@BoweFrankema
Copy link
Collaborator

Hi guys,

So far we have not really promoted the usage of a CBOX Child Theme. I think we should start doing this sooner than later. I think there is a few ways we could potentially handle this

1 - Include a pre-made child theme inside the CBOX plugin/theme that needs to be moved manually by the user into the theme directory

2 - Add some kind of Wizard/Screen for moving/creating it. Like this: http://wordpress.org/extend/plugins/one-click-child-theme/

3 - Include a link on the CBOX Dashboard to a download link of the child theme and let people manually upload and install it.

4 - Update the auto installer and let it first install the parent CBOX theme and then install a child (and activate that by default)

I'd really like your ideas on these ones? Personally I'm leaning towards 2 or 4, but that's because that is the fanciest. It might also be the hardest ones to do right :-)

@ghost ghost assigned boonebgorges and r-a-y Dec 5, 2012
@r-a-y
Copy link
Member

r-a-y commented Dec 5, 2012

For point 4, when we were still dealing with using cbox-theme as a child of infinity, I wrote some code that handled this, so a combination of 1 and 4 would be easiest to do.

One question though, for existing cbox-theme users, should they continue to use cbox-theme or should they use the new child theme when it is created? If they should use the new child theme, would that cause any issues with their current customizations?

@MrMaz
Copy link
Collaborator

MrMaz commented Dec 5, 2012

Option settings are tied to theme slug, so yes they would lose their settings when switching to a child theme.

@r-a-y
Copy link
Member

r-a-y commented Dec 5, 2012

Thanks for replying, MrMaz!

So for existing cbox-theme users, we should probably just leave things the way they currently are (could do a check to see if an option exists in the DB). When we introduce the child theme, new CBOX users will use the child theme and existing cbox-theme users will continue to use the parent theme.

Any other approaches?

@boonebgorges
Copy link
Member

Before we move forward too much on the technical end, I'd like to be clear what we're trying to do here, and why.

The core cbox package, including the cbox-theme, is meant to get the user up and running as quickly as possible. One of our goals is to make as many smart decisions as possible (about plugins, theme settings, config, etc), so that the user doesn't have to do so.

Shipping a child theme with the package could go against these goals. For one thing, it would provide another layer of choice: do you want cbox-theme, or this other theme that's a bit different? A user might not be able to tell the difference between installing a child theme and changing configuration of cbox-theme through the admin panel (and in fact, there may not be a clear line between the two in terms of end functionality).

In additon, the concept of a "child theme" is probably not going to be clear to many of our target users. Those of the users who are technically inclined will, on the other hand, be able to build child themes without our assistance.

So, if the goal is to educate people about the possibilities of child theming, I think this is best done through our (already very good) documentation. If the goal is to provide more than one choice for a theme out of the box, I'm not fundamentally opposed, but I want to come up with a way of justifying this decision that is rooted in a distinction that will be salient to the non-technical user. For example: one theme (cbox-default) could be pitched as the best choice for faculty communities, while the other theme (the child theme) might be best for professional organizations.

Bowe, can you say a bit more about what you want to accomplish by introducing a child theme into the main cbox package?

@BoweFrankema
Copy link
Collaborator Author

My main motivation for including a pre-made Child Theme for CBOX is because it's slightly more complicated to set up a child theme with Infinity. Just as with Infinity a CBOX-Child would allow us to set up the correct folder structure and provide some inline docs inside the pre-made child theme. Check out Infinity Skeleton to get a good idea of how helpful this can be: https://github.com/PressCrew/infinity-skeleton

While this stuff is more useful for a developer, there are also some advantages for novice users. We ship all our Premium Themes with a pre-made Child Theme and motivate our customers to activate that (with some links/reasons of why) and then as soon as they need to change something on a template level or with a bit more CSS, we can safely paste them some code they can put in style.css/functions.php or a forked template without them needing to know EXACTLY what they are doing. The worst thing that has happened to our customers is them making changes and overwriting them on upgrade. As soon as a user needs to change something on a template level or through functions.php he either needs to create a child theme and redo their theme options, or hack the parent. We decided to teach our users to activate the child theme from the moment they start using our theme, and it has been working out really well.

It's a tough decision, but I do get your concerns raised.. It's a tricky problem to solve.

Screen Shot 2012-12-10 at 6.33.55 PM.png

@boonebgorges
Copy link
Member

Ah, this makes more sense. Thanks for the further explanation, Bowe.

I think this is a reasonable motivation for shipping a child theme,
albeit a pretty much empty one (it would have a style.css and
functions.php, but would basically do nothing else). I would want to
actually filter the themes displayed on wp-admin/themes.php so that the
parent theme was hidden, as under this schema, there's no reason for
anyone to ever activate the parent theme.

Let's think about this post-1.0. For the time being, let's make sure
that our documentation on commonsinabox.org and Infinity's site as clear
as we can make it.

On 12/10/2012 12:35 PM, Bowe Frankema wrote:

My main motivation for including a pre-made Child Theme for CBOX is
because it's slightly more complicated to set up a child theme with
Infinity. Just as with Infinity a CBOX-Child would allow us to set up
the correct folder structure and provide some inline docs inside the
pre-made child theme. Check out Infinity Skeleton to get a good idea of
how helpful this can be: https://github.com/PressCrew/infinity-skeleton

While this stuff is more useful for a developer, there are also some
advantages for novice users. We ship all our Premium Themes with a
pre-made Child Theme and motivate our customers to activate that (with
some links/reasons of why) and then as soon as they need to change
something on a template level or with a bit more CSS, we can safely
paste them some code they can put in style.css/functions.php or a forked
template without them needing to know EXACTLY what they are doing. The
worst thing that has happened to our customers is them making changes
and overwriting them on upgrade. As soon as a user /needs/ to change
something on a template level or through functions.php he either needs
to create a child theme and redo their theme options, or hack the
parent. We decided to teach our users to activate the child theme from
the moment they start using our theme, and it has been working out
really well.

It's a tough decision, but I do get your concerns raised.. It's a tricky
problem to solve.

Screen Shot 2012-12-10 at 6.33.55 PM.png
https://f.cloud.github.com/assets/855037/4005/cddcbc5a-42ef-11e2-908e-bf1b66658973.png


Reply to this email directly or view it on GitHub
#96 (comment).

@Ardibee
Copy link

Ardibee commented Dec 29, 2012

Hi Boone, Bowe, MrMaz and r-a-y (and the rest of the CBOX team) - I'm loving what you guys have done so far with CBOX.

I'm a WordPress noob but have been reading everything I can find for the last month or two and I have just got to the point where I'm thinking of creating a child theme for CBOX. Why?

Well, there are tons of little bp-tricks and hacks and code snippets you can find online, all of which make Wordpress that little bit closer to how you want your site to be, many of which involve functions.php and are so far not in the cornucopia of options (nice work, btw) provided by CBOX. For example: selectively redirecting anonymous users to the logon page, making the little Wordpress menu disappear, adding a new page that has that cool slider thing from the CBOX home page.

Everything I have read so far tells me that child themes are the way to (a) not lose your hacks when upgrading your theme and (b) upgrade your theme while not losing your hacks. I mean, er, enhancements. So I read the CBOX documentation about child themes and it talks a lot about Infinity, naturally, and the need to make Infinity the parent template in style.css.

At this point things started to unravel. If I use Infinity as the template in style.css then WP tells me to install the Infinity theme. If I use cbox-theme as the template then I get an error message (see below). If I use the Infinity Master Skeleton then it wants Infinity installed too. It's probably simple (like any question, once you know the answer) but a default child theme would give novices like me a fantastic leg-up and a great practical tutorial on how to build a child theme too.

FYI, the error message I got was:
Fatal error: Uncaught exception 'Exception' with message 'The extension "options/css/overlay-image" was not found.'

To be fair, I haven't finished reading all the CBOX documentation yet (again - great work guys) so if the answer is in there then my apologies for not RTM all the way through. Once I hit an error I couldn't easily fix I did a spot of googling and found this thread and thought I'd offer up a noobie's point of view.

Hope it helps...

@smartsite4u
Copy link

Hey Everyone, how is this going.

I feel a default child theme is a very needed feature for the CBOX theme especially for all the enhancements everyone is making these days to their Wordpress themes.

Is there a manual way for now I can create a child theme for my CBOX install without getting the issue which Ardibee is getting above....which is what I am also getting when trying to create a child theme.

I will wait for your response guys. Great work has been put into this theme and how it works.

@boonebgorges
Copy link
Member

@Ardibee @elishatad I'm curious about how you've set up your child theme. Are you running a git checkout of cbox-theme? Or are you using the version of cbox-theme that is downloaded automatically when installing Commons In A Box? There's an important difference: the version downloaded by Common In A Box is compiled, so that it's no longer a child theme of Infinity.

When building a child theme, you should be using the compiled version of cbox-theme as the parent, not the master branch of the Git repo. If you would prefer to use a Git clone for your local development, you can checkout out the builds branch, which contains the compiled theme.

@Ardibee
Copy link

Ardibee commented Jan 25, 2013

Ha. @boone. Good question and VERY useful information I wasn't aware of. I read the CBOX documentation, which looks a bit like generic infinity theme documentation and tried making Infinity the parent template (to a standard WP download of CBOX) and got the same set of error messages that another pioneer recently posted. Then I tried making the parent theme CBOX instead of Infinity and that didn't work for a different reason then I posted on a thread between you and @Bowe... about creating a child theme as the standard CBOX offering. And the nub of it was that CBOX wasn't really aimed at people who knew how to make a child theme (and I'm totally behind what you are trying to create here, I'm just nosey enough to want to know how it all works so I can bend it to my will). I am almost certainly paraphrasing what you and Bowe said here, btw.

Erm.. To sum up, I think we all like CBOX so much that we want to play with it and at the same time not lose all the bug fixing and enhancements that the CBOX team are putting into making this a fantastic community site creation platform. I can't praise you all enough.

But making a CBOX child theme is really quite confusing. Could you give us a simple example to get us started?

:D

On 24 Jan 2013, at 15:40, Boone Gorges [email protected] wrote:

@Ardibee @elishatad I'm curious about how you've set up your child theme. Are you running a git checkout of cbox-theme? Or are you using the version of cbox-theme that is downloaded automatically when installing Commons In A Box? There's an important difference: the version downloaded by Common In A Box is compiled, so that it's no longer a child theme of Infinity.

When building a child theme, you should be using the compiled version of cbox-theme as the parent, not the master branch of the Git repo. If you would prefer to use a Git clone for your local development, you can checkout out the builds branch, which contains the compiled theme.


Reply to this email directly or view it on GitHub.

@r-a-y
Copy link
Member

r-a-y commented Jan 25, 2013

@Ardibee Thanks for asking about creating a CBOX child theme.

We're actually in the process of updating the documentation for this on commonsinabox.org. Expect it in the next day or so. Will update the ticket once it's up.

@r-a-y
Copy link
Member

r-a-y commented Jan 29, 2013

@Ardibee @elishatad - Bowe has just updated our child theme documentation on commonsinabox.org:
http://commonsinabox.org/documentation/themes/developer-guide

Let us know if you have any other questions in our support group:
http://commonsinabox.org/groups/help-support/

@smartsite4u
Copy link

@r-a-y thanks so much...the extra documentation for child themes and the sample child theme really gives a boost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants