Closed (fixed)
Project:
OG Galleries
Version:
5.x-1.7
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
7 Jan 2008 at 18:00 UTC
Updated:
8 Jan 2008 at 16:49 UTC
i have og:galleries installed, created some images , they work fine, but, how are group members (or even non-group members) access the galleries, the module doesn't crete any menu item or block for this purpose, the only way is trought the "galleries" tab en the ghp, but only the group admin can view that, i've looked up and found this code to create a block that lists taxonomy terms:
$vid = 1; /* <---- put correct vocabulary ID here */
$terms = taxonomy_get_tree($vid);
print "<div class=\"item-list\">";
print "<ul>";
foreach ( $terms as $term ) {
$tcount = taxonomy_term_count_nodes($term->tid);
print "<li>".
l($term->name." (".$tcount.")",'taxonomy/term/'.$term->tid, array('title' => $tcount." posts in ".$term->name)).
"</li>";
} /* end foreach */
print "</ul>";
print "</div>";
but thats not enought, i need that the "$vid" loads automatically the current group's galleries vocabulary. so i'd need to add some code en the first line: $vid = the vocabulary for the groups galleries;
any help will be welcome
Comments
Comment #1
leanazulyoro commentedi'm approaching, excuse but my php skill aren't the best, i addes this function to the first line:
og_galleries_get_group_vid($gid);
at this point i have to especifi the actual group id inbetween the brackets.
now, what is the variable for the current group's id?
Comment #2
leanazulyoro commentedwell, seems like i solved this:
i'm still getting some trouble, i don't know why, but i have one of my groups in wich it is not working, when i figure this out i'll let know.
but basicaly that's it, that is a code snippet to create a list of the group's galleryes with the number of images in each.
Comment #3
leanazulyoro commentedmmm not quite working yet, it works onl for the last created group, no idea why, any help?
Comment #4
leanazulyoro commentedok, no one actually replied but me, that's ok, i found help somewhere else and here's the final code, for those who need a list of the groups galleries from og_galleries.module:
Comment #5
leanazulyoro commentedComment #6
najibx commentedwhere does this code go? create a node with PHP input? how do we link there ...
Anyhow, how do we go about to Implementation of hook_og_create_links() just like og_forum, so I can have a link on group's menu
--> function og_forum_og_create_links($group) {
Comment #7
leanazulyoro commentedSorry najibx, i don't undertand what you just said :P . i'm not an advanced developer, not even intermediate. i just found a peace of code somewhere and managed toi modify it to do whant i wanted, i actually found help from other user of the site.
and i just realises that the final result is not actually what i wanted: it list taxonomy terms, and links to the list of nodes that are in it. but doesn't display them as the og_gallerie view, so i close this post, and open a new one, sorry i can't help u