I have a client that is a nationwide restauraunt chain, with probably about 14 locations total. So far, their CMS setup is going great (drupal 4.7 is pretty damn amazing to work with.) However, there's one feature that they ABSOLUTELY insist on having that totally has me stumped though, because it's not something that drupal was really designed for, but now I need to try to hack into it. They need to have a system-wide admin be able to post content across all sites simultaneously. If that's not bad enough, they need to be able to edit any of a number of static pages and have the ability to have that update occur system-wide as well. These are pages like menus, directions, about the restauraunt, etc. and would be individualized to the local restauraunt under normal circumstances, except when corporate deemed in nessesary to make a system wide update.
Aside from reservations I have about usability in a system where local admins are getting their content overwritten by a superadmin, I have no clue what the best way to pull this off would be.
Here's what I've come up with, and it looks like it *should* work, at least for the static pages. Can anyone offer any feedback / validation / suggestions? Maybe there's a much easier way and I'm going about it all wrong? Thanks!
- Create all the static page nodes on the various systems. (most of these will be flexinodes because of the structured content they need to store)
- Create a module called something like "node_broadcast", that has basically 4 parts:
- System setttings page where each system can:
- define the sites they need to update / recieve updates from if that action is called by an admin.
- define a "node map" of pairs of NIDs and a Broadcast ID, because you
can't rely on all 15 "about us" pages having the same NID across systems - permissions created to allow people to admin the site settings and to actually carry out the broadcast operation
- the actual broadcast operation itself. This would happen by inserting a checkbox with hook_form_alter into a node edit page, only if that node appeared in the "node map". There would be copius warnings around this checkbox about the possibility of overwriting other people's data if this box is checked. Upon submission, the node, along with it's "broadcast ID" are sent to each of the sites defined in the settings page via xmlrpc, where the node is picked up and processed by part d. (below)
- Code to recieve and process the node to be updated via xmlrpc. An authentication process should probably happen here, and then the node is updated just as if it was edited via the nid/edit page.
- System setttings page where each system can:
Obviously, that system requires a fairly high degree of coordination between systems, which is ok because it makes it slightly more secure. It still does nothing to address the posting of new content (the only new content they'll likely have to post is events for the calendar). I'm fairly comfortable with writing modules, although I've never messed with xmlrpc. It doesn't seem too complicated though.
Is there anything obviously wrong with that plan? I'm on a bit of a deadline and would hate to go down the wrong path if it can be avoided. These will all be set up in a multisite environment using a common codebase, but storing content in seperate DBs. Maybe there's some database trickery that can avoid the need for the xmlrpc?
Thanks in advance for any insight!
Comments
OMG. I was just thinking a
OMG. I was just thinking a module like this would be good. I'm not really sure about creating nodes on each setup and having access to overwrite them. I was thinking more like a person with permission to do so could create a special node type that was like any other node type except it distributed it across installations. This would not overwrite, it would add a node.
To configure this the best thing I could come up with so far is that in this users account settings it was required that the person had accounts on each system and provided the data in their profile. Then the original node would contact the sites listed and attempt to post new content. To check against this, a user would have to have the proper role already set up on the other drupal installation(s). If everything was a go then it would be posted to the proper category.
Perhaps another module would 'unpublish' the other nodes of that type when a new one was added, sort of like a 'static page' node, where the old versions would be kept but new versions would be considered separate nodes and hide others. ... Or making sure revisions are enabled could work too...
Hope that helps out.
Use taxonomy instead
Maybe you could just use the taxonomy system to achieve this on a single Drupal site? Add a vocabulary containing a term for each restaurant. Then modify the theme to be able to remember what restaurant the user is looking at and to add the term to any link's URL selected. Within the theme you could have a drop down list at the top/bottom of each page to change restaurant but otherwise, as you browse through, everything is limited to the one restaurant.
Cheers,
Chris
www.barc.org.au
Getting there
I'm pretty close to releasing a module that will do this. The tricky part is access control. I'm working on a taxonomy access control module for Merlin's node access arbitrator system.
Use my contact form if you want a pre-release of the module.
-Mark
--
http://www.ppmaf.org
how i did it
just solved the same problem.
see: http://drupal.org/node/59309
i am working on a module to manage restauraunts/menus/recipes, etc...
it might be made public. if anyone else is interested in helping, it would definitely be made public :)
--
Drupal tips, tricks and services
http://devbee.com/ - Effective Drupal
--
Devbee - http://devbee.net/
I've been trying to do
I've been trying to do something similar: http://drupal.org/node/59979
Does anyone have a working example of this working ?
see: http://devbee.com/node/57
Marcel
http://www.bigvertiser.com - add your website
http://01wholesale.com
i do
i've got it working in a dev environment. it's really pretty simple as long as you are comfortable with mysql.
if my howto instructions aren't clear, post a specific question here or to my instructions.
--
Drupal tips, tricks and services
http://devbee.com/ - Effective Drupal
--
Devbee - http://devbee.net/
I haven't used them yet
but would the publish and subscribe modules help out?
--
Anton
New to Drupal? | Forum posting tips | Troubleshooting FAQ
Example Knowledge Base built using Drupal
Your wondering if they would
Initially, I think some modules would not work with these hacks, they would also need modification.
But there are external tools that can be used instead.
There are RSS 2 Email services
And you can create a RSS directory page for specific domains - manually.
Marcel
http://www.bigvertiser.com