• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: is it possible to conesc rsform with sobi2 listing

is it possible to conesc rsform with sobi2 listing 17 years 3 months ago #1641

  • svarmuza
  • svarmuza's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
Greetings,
When I put this code to my sobi 2 template it works and sends mails to addresses inserted in listing.
<?php
 
$task = mosGetParam( $_REQUEST, 'task', '' );
$mySobi_id = $mySobi->id ;
 
switch ($task) {
case 'email' :
emaillisting($mySobi_id);
}
 
function emaillisting($mySobi_id) {
global $mosConfig_live_site, $mosConfig_mailfrom, $mosConfig_fromname;
 
$directory_email = mosGetParam( $_POST, 'directory_email', '' );
$directory_name = mosGetParam( $_POST, 'directory_name', '' );
$v_firstname = mosGetParam( $_POST, 'name', '' );
$v_email = mosGetParam( $_POST, 'email', '' );
$v_telephone = mosGetParam( $_POST, 'telephone', '' );
$v_comments = mosGetParam( $_POST, 'comments', '' );
$number = intval( mosGetParam( $_POST, 'number', 0 ) );
$othernumber = intval( mosGetParam( $_POST, 'othernumber', 0 ) );
$sum = intval( mosGetParam( $_POST, 'sum', 0 ) );
 
$query_text = sprintf( _DIRECTORY_CONTACT_LETTER, $v_firstname, $v_email, $v_telephone, $v_comments, $mosConfig_fromname );
 
if($number + $othernumber == $sum){
// - directory member
$success = mosMail( $email, $mosConfig_fromname , $directory_email, \"SeeLesotho.com Website Enquiry\", $query_text, 0, null,null,null,$v_email,$v_firstname );
// - directory owner
$success = mosMail( $email, $mosConfig_fromname , $mosConfig_mailfrom, \"Copy of SeeLesotho.com Website Enquiry for \" . $directory_name, $query_text, 0, null,null,null,$v_email,$v_firstname );
}else{
mosRedirect(\"index.php?option=com_sobi2&sobi2Task=sobi2Details&sobi2Id=$mySobi_id\", \"Message sending failed. Please insert the sum of numbers..\"«»);
}
 
mosRedirect(\"index.php?option=com_sobi2&sobi2Task=sobi2Details&sobi2Id=$mySobi_id\", \"Message sent successfully..\"«»);
}
?>
 
<?php
$number = rand(1,10);
$othernumber = rand(1,9)*10;
?>
<form action=\"<?php echo sefRelToAbs( 'index.php?option=com_sobi2&sobi2Task=sobi2Details&sobi2Id='. $mySobi->id ); ?>\"
method=\"post\" name=\"emailForm\" target=\"_top\" id=\"emailForm\">
<label>Name</label><br />
<input name=\"name\" type=\"text\" size=\"30\" /><br />
<label>Email</label><br />
<input name=\"email\" type=\"text\" size=\"30\" /><br />
<label>Telephone Number</label><br />
<input name=\"telephone\" type=\"text\" size=\"30\" /><br />
<label>Message</label><br />
<textarea name=\"comments\" cols=\"50\" rows=\"10\"></textarea>
<br />
<label>To prove you are not a spambot, please complete the sum below:<br />
<?php echo $number; ?> + <?php echo $othernumber;?> = </label>
<input type=\"text\" name=\"sum\" size=3 maxlength=3><br />
<input type=\"submit\" name=\"Submit\" value=\"Submit\" />
<input type=\"hidden\" name=\"task\" value=\"email\" />
<input type=\"hidden\" name=\"directory_email\" value=\"<?php echo $mySobi->customFieldsData['field_email']; ?>\" />
<input type=\"hidden\" name=\"directory_name\" value=\"<?php echo $mySobi->customFieldsData['field_contact_person']; ?>\" />
<input type=\"hidden\" name=\"number\" value=\"<?php echo $number; ?>\" />
<input type=\"hidden\" name=\"othernumber\" value=\"<?php echo $othernumber; ?>\" />
</form>
Now, I can use rsforms through mambot, but I need to program it to send mails to different addresses, the ones that customers wrote when they signed, not all mails to go to the administrator. Does anybody could point me how to connect with sobi 2 and program forme to do this using parts of the code above.
Thanks for the help.
Sasa
The administrator has disabled public write access.

Re:is it possible to conesc rsform with sobi2 listing 17 years 3 months ago #1674

  • alex
  • alex's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 443
  • Thank you received: 3
Hi Sasa,

i installed sobi2 right now, but i'll need a link from you to understand better how you want to connect the 2 components. Send it to my e-mail, alex at rsjoomla dot com.
The administrator has disabled public write access.

Re:is it possible to conesc rsform with sobi2 listing 16 years 5 months ago #5541

  • Ulubatli
  • Ulubatli's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Hi Sasa,

I'm not sure if I understood you correctly but if you are making a new form for every customer, (thats how I do it) you can put email addresses in Forme.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!