Skip to Content Skip to Menu

🌟Discover the Joomla AI Plugin that wrote its own story! - CB Editor Assistant 1.1now for Joomla 3, 4 & 5!
✍️ 5-Day Free Trial, then 🎯 save up to 30% with our 🛍️ Intro Offer (First 50 users, ends Dec. 25th)
🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

[SOLVED] connection request email

13 years 9 months ago - 13 years 9 months ago #155578 by Thelowlandpiper
[SOLVED] connection request email was created by Thelowlandpiper
The text of the email sent to a CB connection request is not easy to understand; I'd like to edit it, but can't find where it's stored; where is it?
Last edit: 13 years 9 months ago by krileon.

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

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
13 years 9 months ago #155580 by nant

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

13 years 9 months ago #155595 by Thelowlandpiper
Replied by Thelowlandpiper on topic Re: connection request email
well, that's where the language items are, for sure; but where is the email itself built? I found it eventually by using notepad ++ 's 'Find in Files' option [absolutely indispensible for this sort of thing]
root/components/com_comprofiler/plugin/user/plug_cbmenu/cb.menu.php [who'd have guessed?]
line 1135 builds the html to create the [horrible] blue form that displays when you click 'Send Request'; [the class is ".cb-tips-bg" so you could write some css to if you want to re-style it to display a more appropriate color background]
This form will submit your email, so this is where the message is built. Clicking the submit button calls the function 'cbConnSubmReq()'. Another Notepad++ search locates this function in root/components/com_comprofiler/comprofiler.html.php:
this is simply a function to submit the form; my particular form tag contents are:
'<form name="connOverForm" id="connOverForm" method="post" action="root/your-profile/addconnection.html?act=connections&amp;connectionid=63">'

the addconnection task is called in comprofiler.php at line 445:
'addConnection( $_CB_framework->myId(), (int) cbGetParam($_REQUEST,'connectionid'), ((isset($_POST)) ? cbGetParam($_POST,'message') : ""));'
and the function begins at line 3339 but the work is done at line 3365:
$cbCon=new cbConnection($userid);
$cbCon->addConnection($connectionid,stripcslashes($umsg));
So where is this cbConnection class? why, it's in the administrator folder
root/administrator/components/com_comprofiler/comprofiler.class.php
line 8517:
but the work is at line 8543 where the function insertconnection() is called:
which puts the conection in the database. line 8573 calls _notifyConnectionChange() at line 8589; and hey, here we are, building the email message!
well, almost; the function at line 9531 adds more and then calls _sendEmailMSG() at line 9733 where more formatting and language codes are added till at line 9763 the comprofilerMail() function is called. This function is at line 216 and it calls comprofilerCreateMail() at line 93 which creates the mail object and returns it to the comprofilerMail function where at line 324 the mail object's send method is called, and off it goes.

So there are three main places to configure the content of the message; lines 8589, 9531 , 9733; now I just need to figure out how to edit these lines and their language codes to get a message my users will understand -

well, no wonder it was difficult to find; I now know a lot more about the way CB works than I did this afternoon...

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48616
  • Thanks: 8302
  • Karma: 1446
13 years 9 months ago #155690 by krileon
Replied by krileon on topic Re: connection request email
Don't recommend editing the source as the strings are easily changed by editing the language strings. What specifically are you trying to change about the strings that simple language string adjustment can't satisfy?


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.

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

13 years 9 months ago #155775 by Thelowlandpiper
Replied by Thelowlandpiper on topic Re: connection request email
I was reluctant to change the source strings since I was not sure whether they were referred to elsewhere, especially the 'Manage Connections' field which was the one I especially wanted to change (to something like 'To accept or decline the connection go to:')
But my principle concern, based on user feedback, was to alter the order in which the strings were presented; it was suggested that the link to the 'from' usere should come after the 'manage connection' link;
All of this was thrown into confusion when I noted that users who were not logged-in would see the registration page as a result of clicking these links; I decided to remove the links altogether and replace them with a message like 'Please visit your profile page and follow the 'Connections>>Manage Connections' menu item to accept or decline this connection.'

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48616
  • Thanks: 8302
  • Karma: 1446
13 years 9 months ago #155797 by krileon
Replied by krileon on topic Re: connection request email
Users who are not logged in should not see Manage Connection links or anything of the sort. The menu becomes very minimal if they are not logged in. In addition to this in Tab Management you can set CB Menu to Registered so only users can actually see an use the menu.


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.

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

Moderators: beatnantkrileon
Powered by Kunena Forum