This seems to be some really tricky information to come across, but I've seen so many sites that do it. I want to create a set of private groups, each with their own forum (of which it looks OG Forum accomodates), but I want the top tabs navigation to remain when viewing the forum, along with the create topic link.

The group block has a link to the forum, but it's just not the same.

I've seen the video from zacker that had a nice forum/messaging tab. I've seen other screencasts that demonstrate a nice forum tab, and none of them explain how to do it :/ Mothersclick, other websites, beautiful implementations of this, but just doesn't seem to be available information.

I looked into the OG panels mod as well, but it doesn't look like you can set up context within the group and of course no option by default to add forum to a panel. I saw some other threads with people asking for this info a long time ago, and marked as duplicate but no other duplicate to be found.

All I'm looking for is to have several tabs across the top of the group navigation - home page, members, forum, and events. Any guidance would be greatly appreciated!

CommentFileSizeAuthor
#9 og_css_images.zip3.07 KBsansui
#7 og.gif5.57 KBsansui

Comments

sansui’s picture

I'm wanting the top navigation to be persistent across all group information. I remembered I can use views to create a menu item in a tab, and with an argument will display a custom view of my forums in a tab in the group node.

But, the moment you click on a topic, you're in the 'forum' area, and the group navigation is gone.

Is this persistent effect achieved through theme templates using arguments for context instead of anything within og or panels?

sansui’s picture

So, it looks like the group block uses this bit of code to persist inside the group context: if (($node = og_get_group_context()) && node_access('view', $node))

Any way to keep the group's node menu visible in a similar way? Perhaps even defining a region in the top of the content and building a group menu inside that region, which would then persist in the same way the group block does based on the group context.

sansui’s picture

Just doing some open musing in this thread. I've decided on two approaches:

1.) Moving the group block to a new region above the content area of the page template, and theming it for horizontal dropdowns. Would have to add a couple links but probably not too difficult.

2.) Building a static menu template for my groups that uses the same path for every single group, with with the group id being the argument, and putting this code in my new region. Since all my groups will be the same in terms of pages, layout, and content types, it seems like this could work (and looks kinda like what mothersclick.com did. )

Should I succeed, I will return and demonstrate with screenshots and code :) In the meantime, comments or suggestions are welcome

ludo1960’s picture

Hi,

Just wondering if you managed it? Bcos i'm trying to do the same.

Thanks..

mailme.eva’s picture

well, yes, if this can be done, me too i would like to know how.
makes kind of more sense to have a tab for this...

merilainen’s picture

Interested.

There is some inconsistency when using OG Forum and Organic Groups. For example the URI's might not mention which groups a discussion is part of or the breadcrumb might be weird. But on the other hand it doesn't matter that much if you can build a unified look like in Mothersclick. Then the navigation is logical and looks clean.

sansui’s picture

StatusFileSize
new5.57 KB

Hey guys, sorry I didn't respond earlier

I did actually make a custom control area for my organic groups, kinda similar to mothersclick. Since all my groups are homogenous and don't have other pages, it was easy for me to do this, but in a setup that needs flexibility I don't think it would work for you.

I've attached an image of what mine looks like - I think it looks pretty good, but I was on a deadline, so I added the code below to my page tpl and called it good. So, if you're looking for a completely custom control area and your groups all have the same pages/features, this might be a good starting area for you? idk

          <?php if (($node = og_get_group_context()) && node_access('view', $node)) : ?>

          <?php $group_nid = og_get_group_context()->nid; ?>

          <?php $forum_link = og_forum_get_forum_container($group_nid); ?>

          <div id="OGControl">
             <span class="og_span"><a href="/node/<?php print $group_nid;?>" class="og_link">Home</a></span>
             <span class="og_span"><a href="/forum/<?php print $forum_link;?>" class="og_link">Forums</a></span>
             <span class="og_span"><a href="/og_calendar/<?php print $group_nid;?>" class="og_link">Events</a></span>
             <span class="og_span"><a href="/node/<?php print $group_nid;?>/broadcast" class="og_link">Broadcast</a></span>
             <span class="og_span"><a href="/og/users/<?php print $group_nid;?>" class="og_link">Members</a></span>

          <div style="clear:both; height:22px; margin-top:2px; padding-top:8px;">

          <form action="/og/search/<?php print $group_nid;?>"  accept-charset="UTF-8" method="get" id="og-search-form">
             <div class="og_search_line"><input type="text" maxlength="255" name="filter0" id="edit-filter0"  size="19" value="" class="form-text" />
             <input type="submit" name="op" id="edit-submit" value="Search"  class="form-submit" />           
             <span class="og_add_forum" style="float:left; margin-left:20px;"><a href="/node/add/forum?gids[]=<?php print $group_nid;?>" class="og_link_forum">add a new forum topic</a></span>
             <span class="og_add_event" style="float:left; margin-left:15px;"><a href="/node/add/event?gids[]=<?php print $group_nid;?>" class="og_link_event">add a new event</a></span>   </div>
          </form>

          </div>
          </div>

         <?php endif; ?>
ludo1960’s picture

Hi, very nice solution! Can you attach the css for a complete solution?

sansui’s picture

StatusFileSize
new3.07 KB

If you want the css and images to go along with it, here you go. It's specific to my theme and solution, but maybe it'll help you have a working base. Using the code shown above, along with additional or fewer links depending on your OG needs, you can create any html/css you want to make your control box :)

I've set the normal organic groups region in the page to be visible only to admins on the site, so regular uses just see my control box when browsing a group

/* ************** Organic Groups Control Box ************ */
#OGControl {
	background: url(images/og_box.gif);
	height: 86px;
	width: 671px;
	padding-left:5px;
	margin-bottom:15px;
	clear:both;
}
#OGControl .og_link {
	background:url(images/og_button.gif); 
	width:95px; 
	height:24px; 
	line-height:24px; 	
	display:block; 
	margin-top:23px; 
	text-align:center;
	color:#fff;
	font-weight:bold;
}

.og_span {
	float:left;
	margin-right:1px;
}
.og_link_forum {
	background:url(images/og_add.gif) no-repeat left center; 
	display:block; 
	padding-left:20px; 
	height:22px;
	line-height:22px;
	_display: inline
}
.og_link_event {
	background:url(images/og_event.gif) no-repeat left center; 
	display:block; 
	padding-left:23px; 
	height:22px;
	line-height:22px;
	_display: inline
}
#OGControl .form-submit {
	width:56px;
	height:22px;
	background:#656250;
	border:0px solid #28261b;
	color:#fff;
	text-align:center;	
	float:left;
	margin-left:3px;
	clear:right;
	margin-right:10px;
}
#OGControl .form-text {
	width:96px;
	float:left;
	background:url(images/mg.gif) no-repeat 2px center;
	padding-left:20px;
	clear:left;
}
.og_search_line {
	line-height:23px;
}
ludo1960’s picture

Hi, Thank you very much. I know that the css is theme specific, it just makes for a complete solution so that others (including me) can benefit from it. Thanks again, nice work!

Anonymous’s picture

Status: Active » Closed (fixed)

This looks to have resolved. Please reopen if anything further need to be discussed

tevih’s picture

sorry - i'm sure i'm missing something. Where is the above code added? (not the css)