Skip to Content Skip to Menu

link to new message to specific user

14 years 8 months ago #122826 by carsten888
link to new message to specific user was created by carsten888
I want to link to the 'new message' page and have a specific user selected to mail to.

I tried this code
[code:1]index.php?option=com_comprofiler&task=emailUser&uid=780&Itemid=30[/code:1]

as this is mentioned in this post:
www.joomlapolis.com/component/option,com_joomlaboard/Itemid,/func,view/catid,58/id,84673/#84673

but it does not seem to work.

What am I doing wrong?

joomla 1.5.15
CB 1.2.1
Uddeim 1.9
The topic has been locked.
  • slabbi
  • slabbi
  • OFFLINE
  • Posts: 3709
  • Thanks: 250
  • Karma: 153
14 years 8 months ago #122832 by slabbi
Replied by slabbi on topic Re:link to new message to specific user
Please check the FAQ. There is a section that describes how to call uddeIM from third party components. There is no need to go through comprofiler (CB).

uddeIM & uddePF Development
CB Language Workgroup
CB 3rd Party Developer
The topic has been locked.
14 years 8 months ago #122836 by carsten888
Replied by carsten888 on topic Re:link to new message to specific user
I really try to work with your faqs each time, but the search just never gets me where I need to.

anyway, I fixed it like this:
url:
[code:1]index.php?option=com_uddeim&task=new&Itemid=100150&fid='.$profile_id.'[/code:1]
code in site-template:
[code:1]
if(JRequest::getVar('option', '')=='com_uddeim' && JRequest::getVar('task', '')=='new' && JRequest::getVar('fid', '')){
//get friends name
$fid = intval(JRequest::getVar('fid', ''));
$database->setQuery("SELECT username "
."FROM #__users "
."WHERE id='$fid' "
."LIMIT 1"
);
$friends_name = $database->loadResult();
?>
<script type="text/javascript">
var select_uddeim_friend_jQuery = jQuery.noConflict();
select_uddeim_friend_jQuery(document).ready(function() {
//select the friend from the url
friends_name = '<?php echo $friends_name; ?>';
document.sendeform.userlist.value = friends_name;
document.sendeform.input_to_name.value = friends_name;
});
</script>
<?php
}
[/code:1]
this uses jQuery, but it can be used with some basic javascript onload event.
The topic has been locked.
  • slabbi
  • slabbi
  • OFFLINE
  • Posts: 3709
  • Thanks: 250
  • Karma: 153
14 years 8 months ago #122838 by slabbi
Replied by slabbi on topic Re:link to new message to specific user
Maybe we are talking about different FAQs:

Especially for you:

[code:1]13.1 Calling uddeIM from a 3rd party program
How can I call uddeIM from my own component/module?
You can use following links to call uddeIM from your component or module:
Call settings dialog when "show settings" is off in backend (no menu link is shown in uddeIM):
http://yoursite/index.php?option=com_uddeim&task=settings
Open new message dialog to user with userid XX:
http://yoursite/index.php?option=com_uddeim&task=new&recip=XX [&nouserlist=Y]
Open new message dialog to user with username XX (this is independent from realname/username setting):
http://yoursite/index.php?option=com_uddeim&task=new&runame=XX [&nouserlist=Y]
when a user with username XX does not exist, XX is used untranslated in the input field, so you can also use "name 1,name 2" or "#userlist" as parameter (note: multiple recipients feature do not work with SEF).
nouserlist parameter (optional):
1 = suppress user list, 2 = suppress connection list, 3 = suppress both lists
add +4 when the TO field should be disabled
e.g. 4 = disable TO field only, 5 = suppress user list AND disable TO field, and so on[/code:1]

uddeIM & uddePF Development
CB Language Workgroup
CB 3rd Party Developer
The topic has been locked.
14 years 8 months ago #122843 by carsten888
Replied by carsten888 on topic Re:link to new message to specific user
[code:1]index.php?option=com_uddeim&task=new&recip=XX [/code:1]
that would have saved me some work.

Maybe we are talking about different FAQs

so how to go about finding this faq?
I searched for 'uddeim link' and 'uddeim link to user'. On each search I get 5-6 categories, altogether containing about 100 articles. Sifting through all that takes more time then me making a workaround. :angry:
The topic has been locked.
  • slabbi
  • slabbi
  • OFFLINE
  • Posts: 3709
  • Thanks: 250
  • Karma: 153
14 years 8 months ago #122846 by slabbi
Replied by slabbi on topic Re:link to new message to specific user
Its in the README folder of the uddeIM package or you could have read the sticky that points to the FAQ.

uddeIM & uddePF Development
CB Language Workgroup
CB 3rd Party Developer
The topic has been locked.
Moderators: beatnantslabbikrileon
Powered by Kunena Forum