Version: 0.7Beta, by Colin F
Developer Last Online: Apr 2014
Version: 3.0.3
Rating:
Released: 08-07-2004
Last Update: 11-02-2004
Installs: 37
Re-useable Code Translations Is in Beta Stage
No support by the author.
vB Email Reply 0.7BETA
What it does:
This allows your members (and you of course) to reply to threads by email. All they have to do is wirte to a specific email address (that you specify) and include a special code in the email subject.
How it works:
A script (vbemailreply.php) is run using the vB3 Cronsystem every minute. This checks a pop3 or imap account for emails and then processes these emails, inserting the data into the database. Then a reply is sent to the sender, stating that either the post/thread got entered correctly or that there was some kind of error.
Is it complicated?
Actually no. There is an install script that does most of the work as well as two small file changes. If you do have problems installing it, contact me for help.
Changes: New files (2):
/includes/cron/vbmailreply.php
/includes/mimeDecode.php
Changed files(1):
/includes/functions_newpost.php
New database fields/tables(1):
New userfield added by installscript
New templates(0):
Changed templates(0):
New phrases(3):
emailreplyerror
emailreplydone
emailnewthreaddone
Upload vbmailreply.php to your /includes/cron/ folder
Upload mimeDecode.php to your /includes/ folder
Open the file /includes/functions_newpost.php in your favourite PHP editing program.
Code:
FIND (around line 196):
$post['poststarttime'] = trim($post['poststarttime']);
ADD BELOW:
if ($post['isemail']) { $bbuserinfo = $post['userinfo']; }
FIND (around line 273):
if ($vboptions['logip'])
REPLACE WITH:
if ($vboptions['logip'] AND !$post['isemail'])
FIND (around line 321):
if ($prevpostfound)
{
ADD BELOW:
if ($post['isemail'])
{
return ('dupepost');
}
else
{
FIND:
}
else
{
if ($parentid == 0 AND $type != 'thread')
REPLACE WITH:
}
}
if (!$prevpostfound)
{
if ($parentid == 0 AND $type != 'thread')
FIND:
$useremails = $DB_site->query("
SELECT user.*, subscribethread.emailupdate
FROM " . TABLE_PREFIX . "subscribethread AS subscribethread, " . TABLE_PREFIX . "user AS user
LEFT JOIN " . TABLE_PREFIX . "usergroup AS usergroup ON (usergroup.usergroupid = user.usergroupid)
WHERE subscribethread.threadid = $threadid AND
subscribethread.emailupdate IN (1, 4) AND
subscribethread.userid = user.userid AND
user.usergroupid <> 3 AND
user.userid <> " . intval($userid) . " AND
user.lastactivity > " . intval($lastposttime['dateline']) . " AND
(usergroup.genericoptions & " . ISBANNEDGROUP . ") = 0
");
REPLACE WITH:
$useremails = $DB_site->query("
SELECT user.*, userfield.*, subscribethread.emailupdate
FROM " . TABLE_PREFIX . "subscribethread AS subscribethread, " . TABLE_PREFIX . "user AS user
LEFT JOIN " . TABLE_PREFIX . "userfield AS userfield ON (userfield.userid = user.userid)
LEFT JOIN " . TABLE_PREFIX . "usergroup AS usergroup ON (usergroup.usergroupid = user.usergroupid)
WHERE subscribethread.threadid = $threadid AND
subscribethread.emailupdate IN (1, 4) AND
subscribethread.userid = user.userid AND
user.usergroupid <> 3 AND
user.userid <> " . intval($userid) . " AND
user.lastactivity > " . intval($lastposttime['dateline']) . " AND
(usergroup.genericoptions & " . ISBANNEDGROUP . ") = 0
");
FIND:
$evalemail["$languageid"] = '$message = "' . str_replace("\\'", "'", addslashes(iif(empty($email_text[PHRASETYPEID_MAILMSG]), $emails['-1'][PHRASETYPEID_MAILMSG],$email_text[PHRASETYPEID_MAILMSG]))) . '";'.
ADD ABOVE:
$touserfieldcode = "field".$vboptions[mailserver_profilefieldid];
$subjectcode_reply = "[thread-".$threadinfo[threadid]."-".$touser[$touserfieldcode]."]";
$subjectcode_newthread = "[newthread-".$foruminfo[forumid]."-".$touser[$touserfieldcode]."]";
Add the following as a translation of the phrase notify:
Code:
Hello $touser[username],
$bbuserinfo[username] has just replied to a thread you have subscribed to entitled - $threadinfo[title] - in the $foruminfo[title] forum of $vboptions[bbtitle].
This thread is located at:
$vboptions[bburl]/showthread.php?t=$threadinfo[threadid]&goto=newpost
~~~~~ NEW ~~~~~
New at $vboptions[bbtitle]!
You can now reply to the thread by replying to this message. All you need to do is to make sure this code appears in the email subject:
$subjectcode_reply
You should also remove this text to ensure your reply is readable by other forum users.
Additionaly, you can start a new thread in the $foruminfo[title] Forum simply by sending a mail to $vboptions[mailserver_emailaddress] with this code in the subject: $subjectcode_newthread
~~~~~ NEW ~~~~~
Here is the message that has just been posted:
***************
$pagetext
***************
There may be other replies also, but you will not receive any more notifications until you visit the forum again.
Yours,
$vboptions[bbtitle] team
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unsubscription information:
To unsubscribe from this thread, please visit this page:
$vboptions[bburl]/subscription.php?do=usub&t=$threadinfo[threadid]
To unsubscribe from ALL threads, please visit this page:
$vboptions[bburl]/subscription.php?do=viewsubscription&folderid=all
Upload the file vbmailreply_install.php to your admincp folder
Be sure to either have a POP3 or IMAP email account ready before running the installation. The data will need to be entered.
Delete the vbmailreply_install.php file from your webserver.
Donations:
This hack will always be free, however your donations are kindly accepted and will help towards further development. If you donate, please leave me some info (either your forum site or username at vB.org) so that I can thank you.
Install:
Don't feel like donating, but still want to thank me for my work? Click the install button to show your appreciation. As a great side effect, you'll get an email update once there is a bigger update or important security fix!
Updates:
09.08.2004 - I've updated the vbemailreply_install.php file, as there was an wrong value while entering the settings.
Also added support for SSL (untested)
Fixed the whole install routine. 03.11.2004 - Updated the installation as well as the vbemailreply.php file.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
But I've gotten permission from Colin to port this as long as I release it here.
I'm giving it a whirl... but as I said.. no promises....
That'd be great.
Quote:
Originally Posted by Dullweber
I can't help with programming, but the company I'm working for would actually pay for such a feature, I just posted a service request. Maybe that's motivating enough to really give it a whirl? PM me if you are interested...
Regards,
Dullweber
I'll ask my group. They'd be happy to contribute for this functionality.
Quote:
Originally Posted by giovannicosta
Cool, I will click install to wait for updates...3.6.7 compatible I assume?
Just trying to juggle time to release a beta version. I've got it done except for attachments. I'm hoping to release something soon, it's all a matter of what time I can set aside from work and family.
Just trying to juggle time to release a beta version. I've got it done except for attachments. I'm hoping to release something soon, it's all a matter of what time I can set aside from work and family.
Will this new version be for VB 3.6 or for 3.5 ?
Im running 3.5 at the moment and dont really want to go to 3.6 cause ill lose all of the mods i have done already
Your thread \"\$threadinfo[title]\" was succesfully received and entered in the forum \$foruminfo[title]!
Here is a direct link to your post:
\$vboptions[bburl]/showthread.php?t=\$threadinfo[threadid]
and replace with:
Code:
Your thread entitled "$title" was successfully received and entered in the forum $foruminfo[title].
Here is a direct link to your post: $vboptions[bburl]/showthread.php?t=$newpost[threadid]
Or in my case, I simply modified the necessary phrases after the installation.