Hi. (Me again! :>)

I've just uploaded my updates to my live site. One problem I came across was the fact that PanelsEverywhere can't be disabled/enabled on a per-theme basis. If I could have told it not to operate on my old theme, I could have left the site online while setting up the new blocks, panels and so on. But because it doesn't have that tunable, I had to take the site offline while working on it, because PanelsEverywhere is a little too 'everywhere' for this scenario :)

I'd be happy to work on a patch, but do you think it's a good idea too?

Nigel

Comments

merlinofchaos’s picture

Hmmm. Yeah, it makes sense to me. I worry that the config might be a bit painful in the UI, so we'll have to do the patch in such a way that people who want to turn it on for just one theme (or something) can do it without making it even more complex to turn this module than it is already, but it should be doable since most of the important bits in it are theme dependent (since the way it takes over is to attack the theme registry).

nigelcunningham’s picture

Add a 'PanelsEverywhere' checkbox column in admin/build/themes/select?

merlinofchaos’s picture

Probably only one that appears if a "Enable per theme control" checkbox is set on the main panels everywhere settings page. That makes it easy to 'just turn on' and not too difficult to hit that checkbox and then go enable it for the appropriate theme.

nigelcunningham’s picture

Okay. That should be pretty easy to implement. I'll give it a go once I get some other jobs out of the way.

nigelcunningham’s picture

The first part was indeed easy - though ctools doesn't seem to provide a way to make an option depend on two other options. Am I missing something?

Anyway - and more importantly - I'm having difficulty with the system module's implementation of admin/build/themes. Can I get you to take a look at it and tell me if I'm right in thinking that adding another column for overriding would involve a form_alter to add the checkboxes to $form, but then a complete replacement of theme_system_themes_form to get it rendered? (If so, how do I do that?)

Regards,

Nigel

merlinofchaos’s picture

You can depend on two items. You need '#dependency_count' => 2, I think.

I'm not completely sure about adding items to the theme page. If it's ugly to do so, then I guess just list all enabled themes on the Page Manager page and put the checkboxes there.

nigelcunningham’s picture

Ok; thanks.

that0n3guy’s picture

Hey, I just started messing with panels everywhere and it is AMAZING for unique landing pages (like for marketing campaigns and such). But as such, I need this functionality also.

I am willing to test and help look over some basic code if ya need anything. Nigel, can you post what you have going already?

nigelcunningham’s picture

StatusFileSize
new3.29 KB

Hi.

Sorry for my slowness - been traveling. I've just finished the functionality, and it works for me :) Patch against -dev at the time of writing is attached.

nigelcunningham’s picture

Status: Active » Needs review
nigelcunningham’s picture

StatusFileSize
new6.78 KB

Here's a new version of the patch. I found that PanelsEverywhere was being activated by merely turning on the site template. With this version, you need to explicitly enable the "Override page template" option (or do it per-theme).

nigelcunningham’s picture

Should I make the status "Reviewed & tested", since it's working fine for me? But I'm the author of it :)

that0n3guy’s picture

Tested patch at #11, I get this error:

warning: uasort() [function.uasort]: Invalid comparison function. in /var/aegir/platforms/DRUPAL-6.19/sites/MYSITE.com/modules/panels_everywhere/panels_everywhere.admin.inc on line 67.
that0n3guy’s picture

Also, in your description it says: "This setting adds a checkbox to the Themes page, allowing you to choose which themes are overridden by Panels Everywhere"

I didn't really see any checkboxes on admin/build/themes, I think this may be a type and should say something like "this settings allows you to choose which themes are overridden, Check the checkboxes for the themes you want to override below:" You choose the theme in the admin/build/panels/settings/everywhere page not the themes page... right?

nigelcunningham’s picture

StatusFileSize
new6.91 KB

Oops! Sorry.

Both issues are fixed in this new version. You're right - enabling that checkbox makes per-theme options appear below. The original plan was to add them to the Themes form, but that turned out to be less than straight forward.

that0n3guy’s picture

Thats better, great job. I patched against dev and it seems to work just fine. Can we mark as reviewed and tested by community?

nigelcunningham’s picture

Status: Needs review » Reviewed & tested by the community

Sure. You can do that yourself, but I'll save you the effort :)

that0n3guy’s picture

Ha, what I meant was, does 2 people testing it count as "tested by the community"? 2 = community? :)

merlinofchaos’s picture

Status: Reviewed & tested by the community » Fixed

2 is more than I usually get. =)

This is a great enhancement, since it allows you to quickly switch back and forth between PE themes and non-PE themes without causing your site a lot of distress. Well done.

nigelcunningham’s picture

Thanks very much! None of my work would be possible without your work and guidance!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

sleeping_at-work-’s picture

Can't see which is the problem about

I found that PanelsEverywhere was being activated by merely turning on the site template.

in comment 11; well, as written in Panels Everywhere interface about activating the "Override the page template" option

If checked, the page.tpl.php file and preprocess functions in your theme will not be used. Instead the simplified page.tpl.php provided by Panels Everywhere will be used. This is recommended once you have your site templates set up, unless you actually need to have more control over the final page template.

In particular, if you need to explicitly enable the "Override page template" option in order to use PE, this complicates a lot configuring custom settings for your page html "head", body id and classes

sleeping_at-work-’s picture

Status: Closed (fixed) » Needs review

.

sleeping_at-work-’s picture

StatusFileSize
new1.45 KB

We'd like PE to be enabled on a per-theme basis, but we'd like to enable PE without checking "Override the page template": so I think the patch in this ticket has to be modified (have a look to http://drupal.org/node/906436).
Here's a patch, it must be improved but it's just a first step (I don't know if I'll be able to provide a complete patch, so I hope the community will help)

kars-t’s picture

Status: Needs review » Fixed

Hi sleeping_at-work

as you postet the same patch in #906436: "Override the page template" cannot be disabled I am closing this issue again and get onto the other one :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.