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] Private Message System as menu item

  • rokkmedia
  • rokkmedia
  • OFFLINE
  • Posts: 22
  • Thanks: 0
  • Karma: 0
12 years 1 month ago - 12 years 1 month ago #215585 by rokkmedia
Hi

I have CB Private Message System installed and I want to know if the 'Send a private message' link can be displayed as a menu item, only available to a selected user group?

Joomla:1.5
CB:1.8.1

Thanks
Last edit: 12 years 1 month ago by krileon.

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

12 years 1 month ago - 12 years 1 month ago #215624 by pepperstreet
Replied by pepperstreet on topic Re: Private Message System as menu item
How do you currently display the link? I assume you are using the (automatic) CBmenu ? Or do you have a normal J! menu?

As far as CBmenu is concerned, there is no parameter to restrict one of the menu items. So, you might need to hide the menu link with CSS.

J! Menu and core MenuItems: Unfortunately, you are on J!1.5 That means, you can´t select a custom usergroup for your menuitems. A workaround to get there with J15 and CB core features:

CBcontent module:
Read its module parameter description in the backend. There is a hint, how you can place the CBmenu in this module! Than add the necessary CSS lines in the respective input box. The cool feature of this module: It can use CBsubstitutions. This means, you can conditionally display things and substitute CB field data in.

Assuming you have a CB field, which contains your "group" name or "type". Try the following lines in the CSS input text area:

[cb:if cb_yourgroup="YourGroupName"] li.cbMenu_UE_PM_USER { display: none; } [/cb:if]


Hint: If you use the CBcontent module method, you should also hide the original CBmenu. Just put your CBmenu TAB on a position called "not_on_profile_1". The plugin itself HAS to be published!



Alternative with jQuery:
You can also modify the menu with JavaScript/jQuery. Should have the same effect! Sorry, but jQuery is not my bag, yet. Support staff "krileon" might help here with the correct Syntax?! My guess is:

$(".cbMenu_UE_PM_USER").hide();
Last edit: 12 years 1 month ago by pepperstreet.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48709
  • Thanks: 8319
  • Karma: 1447
12 years 1 month ago #215642 by krileon
Replied by krileon on topic Re: Private Message System as menu item
No, it's a dynamic link and Joomla can't have dynamic menu links. You can render it in CB Content Module however if you want by rendering the entire CB Menu or by building the URL with Substitutions so it has the appropriate recipient user id. Example as follows to build the URL with substitutions.

index.php?option=com_uddeim&task=new&recip=[cb:userfield field="user_id" user="#displayed" /]


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: pepperstreet

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

  • rokkmedia
  • rokkmedia
  • OFFLINE
  • Posts: 22
  • Thanks: 0
  • Karma: 0
12 years 1 month ago #215698 by rokkmedia
Replied by rokkmedia on topic Re: Private Message System as menu item
Thanks so much for your help pepperstreet and kirleon:) some great tips here.

Just one more question, how can I get this module to display within a users profile? there doesn't seem to be any options in the module's page dropdown?

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

  • rokkmedia
  • rokkmedia
  • OFFLINE
  • Posts: 22
  • Thanks: 0
  • Karma: 0
12 years 1 month ago #215699 by rokkmedia
Replied by rokkmedia on topic Re: Private Message System as menu item
By process of elimination I have found the page I need to add the module to:)

Krileon - the suggested link you gave to the IM client doesn't seem to be pulling in the ID of the user, should I be replacing any part of the url, I had assumed that the user id fields would be the same on any installation?

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

  • rokkmedia
  • rokkmedia
  • OFFLINE
  • Posts: 22
  • Thanks: 0
  • Karma: 0
12 years 1 month ago #215715 by rokkmedia
Replied by rokkmedia on topic Re: Private Message System as menu item
Sorted - I've used : cb:userdata field="user_id" instead :)

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

Moderators: beatnantkrileon
Powered by Kunena Forum