Closed (fixed)
Project:
OG Vocabulary
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
16 Aug 2007 at 21:49 UTC
Updated:
25 Jan 2009 at 08:40 UTC
My solution was to patch the search_config module with og_vocab support.
After line 104 in search_config.module:
$terms = variable_get('search_config_disable_category', array());
Insert the following:
if (module_exists('og_vocab')) {
$groupnode = og_get_group_context();
$sql = "SELECT t.tid FROM {vocabulary} v, {term_data} t LEFT JOIN {og_vocab} ov ON v.vid = ov.vid WHERE (v.module = 'og_vocab' AND ov.nid != %d) AND t.vid=v.vid";
$result = db_query($sql, $groupnode->nid);
while ($row = db_fetch_object($result)) {
$terms[$row->tid] = $row->tid;
}
}
Also posting this as a search_config issue.
Comments
Comment #1
moshe weitzman commentedwe ned to form alter this advanced search form.
Comment #2
amitaibuIndeed. we need to form_alter() the advanced search and only show vocabs that are global _or_ that a user is a member in the associated group.
Comment #3
amitaibuBetter title.
Comment #4
amitaibuMoshe I need your help on this one:
1) We can't form_alter() as the vid doesn't appear in the list, only the vocab title.
2) This keeps us with db_rewrite_sql(), however I have an endless loop problem which I don't know how to solve:
Comment #5
moshe weitzman commentedSeems like the easiest approach is to do one of:
Comment #6
amitaibuDone.