Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

Adding Group related modules

9 years 11 months ago
  • lafemme's Avatar
    Topic Author
  • lafemme
  • Offline
  • Fresh Boarder
  • Posts: 72
  • Thank you received: 9
Licenses:
JomSocial Active

Dear Support Staff,

Is it possible to add Group Related Modules?

Thank you...

9 years 11 months ago
Licenses:

Hi, lafemme.

Please tell me more about "Group Related Modules".
What they should display?


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
9 years 11 months ago
  • lafemme's Avatar
    Topic Author
  • lafemme
  • Offline
  • Fresh Boarder
  • Posts: 72
  • Thank you received: 9
Licenses:
JomSocial Active

Ehmm.. like tips and guidelines for that specific group...

:)

9 years 11 months ago
Licenses:

Hi, Cynthia.

Ah, so you want to be able to add some html modules with text.
It could be done. The problem here is that groups don't have own menu item id (they inherit id from parent item = Groups).
But groups have own groupid... so we can use that. But this could be a bit complicated as you'll need to create one php condition for each groupid. So I prepared full solution for you:

You probably already customized file: groups.viewgroup.php but in sake for future references I repeat whole procedure :)

Copy this file:

ROOT/components/com_community/templates/default/groups.viewgroup.php

to

ROOT/templates/your-template/html/com_community (if you don't have "html" or "com_community" folders, feel free to create them)

Edit file and look for <div class="cSidebar"> . It should be around line 376.

Add this code right under <div class="cSidebar">

    <?php if ((JRequest::getInt( 'groupid' )) == '26') {
    			$this->renderModules( 'group-module-1' );;
    		} else if((JRequest::getInt( 'groupid' )) == '25') {
    			$this->renderModules( 'group-module-2' );;
    		} else if((JRequest::getInt( 'groupid' )) == '24') {
    			$this->renderModules( 'group-module-3' );;
    		} else if((JRequest::getInt( 'groupid' )) == '23') {
    			$this->renderModules( 'group-module-4' );;
    		} else if((JRequest::getInt( 'groupid' )) == '22') {
    			$this->renderModules( 'group-module-5' );;
    		} else if((JRequest::getInt( 'groupid' )) == '21') {
    			$this->renderModules( 'group-module-6' );;
    		} else if((JRequest::getInt( 'groupid' )) == '20') {
    			$this->renderModules( 'group-module-7' );;
    		} else if((JRequest::getInt( 'groupid' )) == '19') {
    			$this->renderModules( 'group-module-8' );;
    		} else if((JRequest::getInt( 'groupid' )) == '17') {
    			$this->renderModules( 'group-module-9' );;
    		} else if((JRequest::getInt( 'groupid' )) == '15') {
    			$this->renderModules( 'group-module-10' );;
    		} else if((JRequest::getInt( 'groupid' )) == '13') {
    			$this->renderModules( 'group-module-11' );;
    		} else if((JRequest::getInt( 'groupid' )) == '12') {
    			$this->renderModules( 'group-module-12' );;
    		} else if((JRequest::getInt( 'groupid' )) == '11') {
    			$this->renderModules( 'group-module-13' );;
    		} else if((JRequest::getInt( 'groupid' )) == '10') {
    			$this->renderModules( 'group-module-14' );;
    		} else if((JRequest::getInt( 'groupid' )) == '9') {
    			$this->renderModules( 'group-module-15' );;
    		}
    	 ?>

So what we have here? Condition says: if group id is equal to certain number then display certain module position...els if condition returns false check another condition.

You can check group ids in url e.g:

ROOT/index.php?option=com_community&view=groups&task=viewgroup&groupid=26&Itemid=540
Here we have groupid=26 and it's "Quote Paradise" group.

Now just create html module and assign them to certain module position. remember to add: " cGroup-Categories app-box" (remove quote signs) as class suffix to preserve styling.

In future if you add new group just copy part of code and add it to the end - just change group id and module position name.

I tested it - works 100% :D


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
The following user(s) said Thank You: lafemme
9 years 11 months ago
  • lafemme's Avatar
    Topic Author
  • lafemme
  • Offline
  • Fresh Boarder
  • Posts: 72
  • Thank you received: 9
Licenses:
JomSocial Active

Oh wow!! Thank you SOOOO much!! This really helps.. ALOT! now i can make my groups even more wicked! Thanks :D

Maybe its an idea for your team to store them on one place, these kind of custom codings. I'll bet that other members would appreciate this to.

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW