Is it possible to make a panel for OG and use it (standard) for all OG's? I've now +/-20 groups i want to convert to panels. I don't see an import page like at the normal panels.
It would be nice if somehow og_ghp_ron could be replaced by panels :-)
| Comment | File | Size | Author |
|---|---|---|---|
| #22 | og_panels_defaults.tgz | 3.11 KB | jakchapman@groups.drupal.org |
| #20 | og_panels_defaults.tgz | 2.16 KB | jakchapman@groups.drupal.org |
Comments
Comment #1
michelleIt's called Blueprints and I'm waiting for sdboyer to write it. :) If there's a hacky way to do it for now, I'd love to hear it. I need to make about 200 groups that I want to all have the same layout and really don't want to do them all by hand.
Michelle
Comment #2
merlinofchaos commentedIf all groups of a given type have the same layout, basic node_view variant with selection criteria should be able to do that.
You could also have a CCK field to select layouts from a list, and use the selection criteria PHP code to look at that field, so you can have a few fixed, selectable layouts with a default without needing blueprints at all.
Comment #3
michelleIf I went that route, would it be possible to convert individual nodes of that type to OG Panels as needed? Probably 95% of them will never need a different layout but there are a few that potentially could need some customizing and I don't want to go down a path that will shut out that possibility. I don't really know anything about how OG Panels works under the hood so my apologies if that's a dumb question. :)
Thanks!
Michelle
Comment #4
MatthijsG commentedYou mean, he (she?) is working on it?
Comment #5
MatthijsG commentedLet's face it: sdboyer made his last commit 40 weeks ago on Blueprints. No trace of Blueprints Dr6. I think Blueprints is dead right now. Why not collaborate to find a hacky way (maybe someone can make a module out of it ;-)?
My brainstorm:
- take a configured og_panel for a group from the database (where?)
- where is defined that an og uses og_ghp_ron or a panel (using panel if one exists, otherwise not?)
- alter te code from step 1 (how?) to a different group
- make some kind of batch that 20 or 200 groups can be configured automatically
Comment #6
michelleHe was working on it a couple weeks ago. Sounded like he finally had time to get it going. But I haven't heard anything since.
I already spent some time in the database trying to figure out how to copy it and had no luck so I'm hoping Blueprints becomes more solid than vapor soon. :)
Michelle
Comment #7
MatthijsG commentedHow do you know?
Can we support him?
- edit : what about this one http://drupal.org/node/512698?
Comment #8
michelleHe told me.
I think what he lacks most is time but you'd be better off asking directly if there's anything else he needs.
Yeah, that makes the most sense.
Michelle
Comment #9
MatthijsG commentedSo, there will be no Blueprints but some extra functionality in Core Panels. When and how is not clear for me.
It leaves the question open how to deal with 20 or 200 OG's that all need the same Panels. It's now bedtime for me, maybe i can look into it monday or so.
Comment #10
petednz commentedCan you flesh out a bit more what you would achieve by having said Panel working for all OGs?
Comment #11
merlinofchaos commentedSince og panels uses Page Manager's node_view to select the panel for the group home page, I believe putting the variants in the proper order will allow og_panels to provide specific layouts for groups that need them and default layouts for groups that don't. Not sure about UI and permissions for actually doing that but I think it should work.
Comment #12
jimthunderbird commentedI had started similar works and created a patch before, http://drupal.org/files/issues/og_panels.import_export.patch, it's the first step, you can export and import a og_panel. It will be easy to do export and import building on top of that.
Comment #13
MatthijsG commentedDo you maybe know if there's a way to import one panel to several OG by hand (with Phpmyadmin)?
Comment #14
jimthunderbird commentedI think you can do it by:
1. Apply the patches i made for og_panels, then your og_panels module will have a function like this:
Then, pick one og panel you created which will serve as a template, copy the exported code, then write a third party script, call this function several times. For example you can do this:
$code = "Your exported source og panel code";
foreach of your targeted og_panel's display id, do
og_panels_import_from_code($code, $display_id)
I'm actually thinking about writing another patch so that you can have a UI to clone one og_panels to several others.
Comment #15
merlinofchaos commentedInstructions for what I suggested in #2 are in a pdf in this issue: #553456: HOWTO: create a panels homepage for organic group nodes?
Comment #16
populist commentedMy feeling here is that OG Panels should provide its own magic (for customizable panel pages) but should *also* provide a default fallback panel node_view that will be fired if the page has not been customized.
This is different from Sam's work on Blueprints which I hope will move forward (he is talking about it at Drupalcon SF), but is a somewhat different issue than what I described above.
Comment #17
populist commentedComment #18
chrisschaub commentedI like the idea of creating panel pages with og panels, and then marking them as "create this page for every new group." That way, you can use one group to get everything setup, your master, and then hook on group create to create those og panels from the master. Shouldn't be too hard to do?
If nobody beats me to it, I'll submit a patch for og_panels or maybe an add-on module? Hmm, not sure what the best way would be, and not sure what the og panels maintainer would accept. Blueprints for d6 would be more comprehensive, but this will solve the need for groups. Disclaimer: I wrote this post only halfway through my first cup of morning coffee, so it could be very suspect. I'm happy to write it since I need it for a few projects.
Comment #19
michelleI'd like to see it in OG Panels if it would be accepted. OG Panels is already an add on. I'm all for discrete contrib but add ons to add ons start getting to be a bit much. :)
Thanks for volunteering. I doubt anyone will beat you to it and there will be lots of people happy with your contribution. :)
Michelle
Comment #20
jakchapman@groups.drupal.org commentedI had actually just started working on this yesterday, then I found this discussion. I have it working well enough for my purposes at this time. I will eventually clean it up, or if schaub123 wants to take it and run with it, that's cool too. I just wanted to get it posted now to avoid wasted efforts.
The Caveats:
There's no interface at the moment- I hard coded the NID of my default config node, so you'll need to change that to your own default group node.
I create three tables on install for testing. To test out what's going to go in your real tables, you can run
If you want to just add your node but have the records written to the test tables, open og_panels_defaults.module and remove the "false" or change it to true on line 8:
without messing up your system. Then just manually review what ends up in og_panels_test, panels_display_test, and panels_pane_test
It's been tested on my system, with my groups and layouts, but that's pretty much it. I did verify that it works fine with multiple panes per page and everything ends up where it should.
I'm running og_panels 6.x-2.x-dev at the moment trying to clear up a calendaring problem, but it should hopefully work fine with the release version.
Also, this was quick and dirty - I know there are things I could have done more cleanly - feel free to fix it for me ;)
Comment #21
poopertropper commentedLooks really good, this could be awesome with a UI to go along with it.
Comment #22
jakchapman@groups.drupal.org commentedI've created a simple interface that lets you select the node to use as the default. admin/og/og_panels/defaults
You can autocomplete the node title or just enter the nodeid, but I'm only checking for numeric if it's a nodeid -- the title autocomplete only allows group type nodes so I recommend using the title. You can only pick one default node, but it can be from any of the group types. It would be great to add the ability to pick a different default for each group type so I'll probably work on that at some point.
I also added a check box to the group node edit form for each group type to recreate the default tabs. It just adds a new copy of each, it doesn't overwrite anything. The checkbox is disabled if there is not a numeric value for the default group source. Just a check for numeric, so if you enter a nodeid for the default that isn't really a group node, this won't work.
Comment #23
chrisschaub commentedI added a little code at the end to support default titles:
so that if the og_titles module is installed, the default titles are carried over as part of the defaults. Any chance this could get checked in as an official module? It's pretty handy. It needs some cleanup, but handy.
Comment #24
populist commentedThis work looks really cool, but closing this out since the recently released Panelizer module does a lot of this!