Skip to Content Skip to Menu

🕒 Save Time and Effort with CB Editor Assistant: Effortlessly create and refine content in Joomla 3, 4, & 5.
🎁 Limited Offer: Enjoy a 5-day FREE trial and save up to 30% afterward!

<SOLVED>Manage connections in CB Content Module

  • cberry1971
  • cberry1971
  • OFFLINE
  • Posts: 125
  • Thanks: 7
  • Karma: 0
12 years 1 month ago - 12 years 1 month ago #215367 by cberry1971
Can I hide the Manage Connections link in CB Content Module for one user group but not the other?

I want group A to be able to manage connections but Group B should not see/manage connections.

Screenshot is what group B currently shows. want to get rid of the last item (not using CSS if possible)
Attachments:
Last edit: 12 years 1 month ago by cberry1971. Reason: marking solved.

Please Log in or Create an account to join the conversation.

12 years 1 month ago - 12 years 1 month ago #215395 by pepperstreet
Replied by pepperstreet on topic Re: Manage connections in CB Content Module
hello,
how to you differentiate between those groups? Is it a CB field value? Or a J!usergroup ?

In general, you can use substitution IF statements in CBcontent module. I assume your menu is currently the automatic menu... just placed via substitution, right?

As far as i know, there is no option to exclude it from the auto-generated menu. I guess, you would have to re-build the menu completely with your own UL/LI list and manual links in CBcontent module.

This (tedious) way, you have full control over what is displayed for whom.
Last edit: 12 years 1 month ago by pepperstreet.

Please Log in or Create an account to join the conversation.

  • cberry1971
  • cberry1971
  • OFFLINE
  • Posts: 125
  • Thanks: 7
  • Karma: 0
12 years 1 month ago #215396 by cberry1971
Replied by cberry1971 on topic Re: Manage connections in CB Content Module
Thank you for helping with this.

how to you differentiate between those groups? Is it a CB field value? Or a J!usergroup ?


Both.. on registration, the user selects (dropdown field) Group A or Group B. Then thru Auto Actions, the JGroup is assigned.

In general, you can use substitution IF statements in CBcontent module. I assume your menu is currently the automatic menu... just placed via substitution, right?


Yes right now it is just set to the default. How might I implement the substitutions? I see the jQuery field at the bottom but am not sure how to use.

Please Log in or Create an account to join the conversation.

12 years 1 month ago #215399 by pepperstreet
Replied by pepperstreet on topic Re: Manage connections in CB Content Module
The drawback of this manual re-build is, you have to care about all possible CB menu actions. Some are dynamic and respect the profile page you are currently viewing... own profile/other profile: report user is an example for this. So, its crucial to think about it twice... if you use a lot of CB features and menu items, it can be a tedious work.

You have to study the source code and CSS classes as well... i would suggest to use the same as the auto menu. This way, you will get the same styling with the default icons.


Substitutions IF can check for the "gid", usergroup ID. Did not use it, yet.
Since you have also the special CBfield, you might simply check for its value.

I assume your first text field shows:
[cb:usertab tab="17" user="#displayedOrMe" /]

You can keep it for reference, until you finished your own links and items!
Check your source with Firebug or Browser Dev Tools...
write down any link with its CSS class. This is important for the little icons.


Example for a manual (conditional) link to manage Invites:

<ul class="cbMenuULlist">
[cb:if cb_yourgroupname="group1"]<li class="cbMenuItem cbMenuEogr2 cbMenu_UE_MENU_MANAGEMYCONNECTIONS"><a href="index.php?option=com_comprofiler&task=pluginclass&plugin=cbinvites&Itemid=XX">Manage Invites</a></li>[/cb:if]
</ul>

Replace "XX" with respective CBprofile MenuItemID!

Please Log in or Create an account to join the conversation.

12 years 1 month ago - 12 years 1 month ago #215400 by pepperstreet
Replied by pepperstreet on topic Re: Manage connections in CB Content Module
You are right, you could also remove and alter the auto-menu output with jQuery! But that is not 100% secure. No Javascript, and your menu-Links are all accessible.

Same applies for pure CSS solution.

But both alternative ways are very quick, because both input fields in the backend support CB-Substitution Syntax as well!
Last edit: 12 years 1 month ago by pepperstreet.

Please Log in or Create an account to join the conversation.

  • cberry1971
  • cberry1971
  • OFFLINE
  • Posts: 125
  • Thanks: 7
  • Karma: 0
12 years 1 month ago #215406 by cberry1971
Replied by cberry1971 on topic Re: Manage connections in CB Content Module
Hmm. I think that is getting outside my skill set.

All I really want to do is hide manage connections for User Group B. Perhaps I am confused but recreating the whole (working) menu is a bit much... Yes?

Let me ask a different type of question which is totally related. Can I show connection types based on user type (field) or user group (joomla). That would also solve this issue.

I just don't want user group b to see a connection type which will make no sense to them.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum