![]() |
|
|||||||
| Feature Requests Post your wish list for future upcoming ClipShare versions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
|Forum Newbie|
![]() Join Date: Sep 2007
Posts: 27
![]() |
Howdy CS Folks...
I have searched around incessantly for a solution but can't find one. Like most people I'd love to have an email message sent when a member gets a private message. I had this working in 2.6, but alas, no luck in 4+. Any help would be great, thanks all. |
|
|
|
|
|
#2 | |
|
Member
|Forum Guru|
![]() ![]() ![]() ![]() ![]() Join Date: Nov 2007
Posts: 2,013
![]() |
Quote:
If it doesn't work for you - can be a problem with email template. But I'm not sure of that, you must ask other people that use default 4.xx and if it's working for them. Personally I prefer to use my own code on my own site.
__________________
![]() NUEVO Flash Player - most advanced video player for Clipshare and AVS ClipShare mods by NuevoLab Hosting solution recommended by NuevoLab |
|
|
|
|
|
|
#3 |
|
Member
|Forum Newbie|
![]() Join Date: Sep 2007
Posts: 27
![]() |
There is send email code in compose.php, I've tinkered with it, but it doesn't seem to be working. The template seems fine, I've double checked names, coding, etc.
I can certainly get the correct info passed onto the email, my biggest problem seems to be triggering the email to actually send. |
|
|
|
|
|
#4 |
|
Member
|Forum Newbie|
![]() Join Date: Sep 2007
Posts: 27
![]() |
Does it tie in with function.php at all?
|
|
|
|
|
|
#5 |
|
Member
|Forum Guru|
![]() ![]() ![]() ![]() ![]() Join Date: Nov 2007
Posts: 2,013
![]() |
Not so much, I don't think any function is a problem.
Man, it's so easy to check if php go to send email code... Enough is to put few echo(), to check where it stops...
__________________
![]() NUEVO Flash Player - most advanced video player for Clipshare and AVS ClipShare mods by NuevoLab Hosting solution recommended by NuevoLab |
|
|
|
|
|
#6 |
|
Member
|Forum Newbie|
![]() Join Date: Sep 2007
Posts: 27
![]() |
Code:
$conn->execute("insert pm set subject='" .$subject. "', body='" .$details. "', sender='" .$username. "', receiver='" .$receiver_name. "', date='".date('Y-m-d H:i:s')."'");
$conn->execute("insert buddy_list set username='" .$username. "', buddy_name='" .$receiver_name. "'");
$rs_u = $conn->execute("select email, pm_notify from signup where username='" .$receiver_name. "' limit 1");
if ( $rs_u->fields['pm_notify'] == '1' && $config['pm_notify'] == '1' ) {
STemplate::assign("user_id", $_SESSION['id']);
STemplate::assign("user_name", $_SESSION['username']);
STemplate::assign("user_type", $_SESSION['type']);
STemplate::assign('sitename', $config['BASE_URL']);
$to = $rs_u->fields['email'];
$name = $config['admin_name'];
$from = $config['admin_email'];
$subj = $config['site_name']." - New Private Message";
$body = STemplate::fetch("mail/new_pm_notify.tpl");
mailing($to,$name,$from,$subj,$body);
}
Second it looks like it's trying to pick up a value from "pm_notify" in the signup table, however there is no "pm_notify" in the table. Perhaps I'm reading that all wrong, I'm not sure. I tried the echo, but wasn't having much success in deciphering what it is to do with that. Appreciate your expertise Dargre... |
|
|
|
|
|
#7 |
|
Member
|Forum Guru|
![]() ![]() ![]() ![]() ![]() Join Date: Nov 2007
Posts: 2,013
![]() |
If there's no folder or no template for email, then you can't expect it will work.
I already mentioned: can be a problem with email template... I checked 4.1.5 version, indeed there's no pm_notify field in signup table. Once it was, seems ClipShare removed it, but forgot to update compose file... But if you still want to send emails: you can always skip "IF" clause in php. Also it is possible to set simple text for email subject and message instead of email template, and it will work then. - D.
__________________
![]() NUEVO Flash Player - most advanced video player for Clipshare and AVS ClipShare mods by NuevoLab Hosting solution recommended by NuevoLab |
|
|
|
|
|
#8 | ||||
|
Member
|Forum Newbie|
![]() Join Date: Sep 2007
Posts: 27
![]() |
Got it working.
In compose.php I commented out the built in send mail code: Quote:
Quote:
Quote:
Quote:
No doubt there's a better way to do it, but it's a start. Dargre, again, thank you for your help! Last edited by ryno : 04-24-2009 at 10:31 PM. |
||||
|
|
|
|
|
#9 |
|
ClipShare Customer
|Forum Junior|
![]() ![]() Join Date: Mar 2009
Posts: 76
![]() |
A message that you sent contained no recipient addresses, and therefore no delivery could be attempted.
|
|
|
|
|
|
#10 |
|
Member
|Forum Regular|
![]() ![]() ![]() Join Date: Jun 2009
Posts: 134
![]() |
this one works as a charm!
does anybody have an add-on code that will show the user avatar instead of his/her latest video upload? i saw it about msg.tpl but cant get it to work! ![]() |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|