boonebgorges / buddypress-docs-wiki

An add-on for BuddyPress Docs that creates a sitewide "Wiki" section alongside your Docs
9 stars 3 forks source link

Wiki homepage does not use bundled custom template #8

Closed r-a-y closed 11 years ago

r-a-y commented 11 years ago

Hi Boone,

Originally reported here: http://commonsinabox.org/groups/help-support/forum/topic/no-wiki-home-after-upgrading-to-cbox-1-0-4/

Since the current version of BP Docs moved to theme compat, the bundled wiki homepage template is no longer used and the default BP Docs directory template part is used instead.

My plan is to move the existing wiki home template to a template part. This also means that the wiki sidebar will no longer be used.

The next version of BP Docs Wiki will therefore require BP 1.7.

boonebgorges commented 11 years ago

It's fine with me to move to BP 1.7 requirements. But we can't just get rid of the wiki sidebar - there are probably people who have set it up a certain way. Can we filter the top-level template (or get_sidebar()) in addition to moving the guts of the template into a template part?

On 05/22/13 20:44, r-a-y wrote:

Hi Boone,

Since BP Docs moved to theme compat, the bundled template is no longer used and the default BP Docs directory template part is used.

My plan is to move the existing wiki home template to a template part. This also means that the wiki sidebar will no longer be used.

The next version of BP Docs Wiki will therefore require BP 1.7.

— Reply to this email directly or view it on GitHub https://github.com/boonebgorges/buddypress-docs-wiki/issues/8.

r-a-y commented 11 years ago

Can we filter the top-level template (or get_sidebar()) in addition to moving the guts of the template into a template part?

We can add our own top-level template, but then, that defeats the purpose of theme compat. The other option of filtering get_sidebar() will not work because WP doesn't have a filter for that.

I think if we're worried about the sidebar backpat issue, we can probably just serve our own top-level template so the plugin will act like it was before.

Let me know what you think.

boonebgorges commented 11 years ago

How about this: Let's move the top-level template, along with the sidebar, into cbox-theme. And then we check for the existence of that before loading theme compat (like BP does). For existing sites using cbox-theme (which aren't using theme compat anyway), the top-level template will load, giving them full backpat. For anyone using the plugin with a non-cbox-theme theme, theme compat will kick in - and they won't get the wiki sidebar. Do you think this will work? Am I fetishizing backpat :) ?

On 05/22/13 21:14, r-a-y wrote:

Can we filter the top-level template (or get_sidebar()) in addition
to moving the guts of the template into a template part?

We can add our own top-level template, but then, that defeats the purpose of theme compat. The other option of filtering |get_sidebar()| will not work because WP doesn't have a filter for that.

I think if we're worried about the sidebar backpat issue, we can probably just serve our own top-level template so the plugin will act like it was before.

Let me know what you think.

— Reply to this email directly or view it on GitHub https://github.com/boonebgorges/buddypress-docs-wiki/issues/8#issuecomment-18318172.

r-a-y commented 11 years ago

We have a wiener (intentionally misspelt!) :)

Will have some commits for this in a bit.

boonebgorges commented 11 years ago

Whoop! Thanks, r-a-y :)

On 05/22/2013 09:47 PM, r-a-y wrote:

We have a wiener (intentionally misspelt!) :)

Will have some commits for this in a bit.

— Reply to this email directly or view it on GitHub https://github.com/boonebgorges/buddypress-docs-wiki/issues/8#issuecomment-18319119.

r-a-y commented 11 years ago

Alright, this is done.

Check out the new cbox-theme commit, which adds the 'docs/index-wiki.php' template: https://github.com/cuny-academic-commons/cbox-theme/commit/4f97876254ac28afa8cedcc39fcd388919045589

And let me know what you think.