Needs work
Project:
OG Vocabulary
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
30 Sep 2008 at 17:52 UTC
Updated:
6 Nov 2010 at 08:10 UTC
Jump to comment: Most recent file
Comments
Comment #1
amitaibuDuplicate #155021: Only one (first) og category is displayed for a node which is beeing submited to several groups.
Comment #2
whyameye commentedthis isn't a duplicate. What I am saying is that you have to hit "preview" before you can see the vocab for the group you have chosen when you are creating new content. What would be much more intuitive for users in my opinion is if this module used JQuery or AJAX to show the vocabs available for each group at the time the group is chosen, rather after the form is submitted.
Comment #3
amitaibuNice idea. A patch is welcomed.
Comment #4
darren.ferguson commentedThis is really funny since this is the functionality i was actually looking to get into the og vocab module.
Based off this attached is a patch that we currently run for it providing the css, js and updated module patch.
Please let me know if this will meet the needs.
We utilize it so we can attach posts and also things like files directly to the term in the audience from either the add or edit portion in the system. This original code came about due to the need for it in the add portion mostly.
Comment #5
amitaibu@darren,
Thank you for the patch.
og_vocab.module:
+ $vocabularies = db_query("SELECT nid, vid FROM {og_vocab}");
We don't need *all* vocabs, we just need to get those that are related to this node. So you can use og_vocab_get_vocabularies().
og_vocab.js:
+ if (Drupal.jsEnabled) {
+ ...
+ }
You can use Drupal.Behaviours, so we won't need this part.
btw, can you please re-roll it with the JS and CSS included (not tar) - http://drupal.org/patch/create, so I'll test the code.
Comment #6
darren.ferguson commentedThe reason behind getting all of them was that if the node has not been created yet then we would like all of the audiences so we can hide and show them as needed. As i said this patch originally was done because we wanted to make sure uploaded files were put into the correct audience and then the blog posting would go to a specific taxonomy based off the audience that was supplied. Hence since the audience is not known in the begining this is why i took all of them in the begining and the jquery will show and hide based off the audience that is selected.