vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   PM Auto Reply (https://vborg.vbsupport.ru/showthread.php?t=116325)

Hellcat 05-21-2006 10:00 PM

PM Auto Reply
 
So, a little something this time I had on my mind for quite a while now.... :)

PM Auto-Reply MOD by ---==> HELLCAT <==---
This adds an "auto responder" to the PMs.

When enabled, everytime you get sent a PM the sender is automatically returned a PM containing a predefined message (editable in options).
To tell the sender you're offline for a while and answer should be expected sometime later or such....

Features:
  • Adds an auto responder (auto reply) option to the PMs
  • Can be turned ON and OFF in useroptions
  • A date can optionally be specified between automated replies are sent
  • Another user can optionally be specified to whom a copy of the recieved PM is forwarded to
  • Admin can specify usergroups not allowed to use the auto responder

Installation:
  • Import the product .XML
  • One tiny template edit:
    Open template "modifyoptions " (in "Modify Useroptions" group) and FIND THIS:
    Code:

    $customfields[messaging]
    AFTER it, ADD:
    Code:

    $pmautoreply_option
    Save the template.
Done, and enjoy! :)

The admin option for excluding usergroups is in "vBulletin Options" -> "Private Messaging Options" at the bottom: "Exclude usergroups from using the PM auto reply feature"

I intentionally didn't do it with usergroup permissions since that would require a .XML file to be uploaded and I wanted to stay this as a single product/plugin file :)

[hint]I'd also like something like this on vb.org ;)[/hint]

Boofo 05-21-2006 10:20 PM

Can the date be eneterd into the PM also?

Hellcat 05-21-2006 10:38 PM

You can enter any text you like for the auto PM :)

Boofo 05-21-2006 10:40 PM

I was referring to a time variable. ;)

Hellcat 05-21-2006 10:42 PM

Yeah, could be done.
Wouldn't even be hard to do. But why not just type it in your PM text? ;)

DementedMindz 05-21-2006 11:33 PM

another great mod from a great coder thanks...

Ntfu2 05-22-2006 12:28 AM

score, i've been wondering if something like this existed.

Boofo 05-22-2006 01:22 AM

Quote:

Originally Posted by Hellcat
Yeah, could be done.
Wouldn't even be hard to do. But why not just type it in your PM text? ;)

In case you ever wanted to change it I guess and still use a standard message.

Ziki 05-22-2006 03:47 AM

Quote:

I intentionally didn't do it with usergroup permissions since that would require a .XML file to be uploaded and I wanted to stay this as a single product/plugin file
:):):)

Quote:

Import the product .XML

Zia 05-22-2006 03:58 AM

:) ah hellcat..alive :)

nice to see a hack from u ..after a long time....

Tc.

Stangsta 05-22-2006 04:04 AM

Instead of usergroups to exclude, why not groups to INCLUDE?

Ntfu2 05-22-2006 04:12 AM

Just wondering if there is built in protection from this looping all day until pm boxes are full

User A pms UserB who sets this up

User A also has this setup which returns his to USers B

User B then begins the madness with another reply of his away message

repeat till pm box is full

Stangsta 05-22-2006 04:12 AM

I feel honored to find the first bug!

I have a usergroup say....ID #5 (administrator) and I have another usergroup say....ID #15 registered users. If I exclude ID 15 from the options, it will exclude ID #5 as well. Same with #16 & #6.....#17 &#7 and so on.

Ntfu2 05-22-2006 04:18 AM

Quote:

Originally Posted by Ntfu2
Just wondering if there is built in protection from this looping all day until pm boxes are full

User A pms UserB who sets this up

User A also has this setup which returns his to USers B

User B then begins the madness with another reply of his away message

repeat till pm box is full


after testing the answer is that it does not loop like i thought it would

Nice hack indeed

projectego 05-22-2006 06:59 AM

Nice idea, I'll check this out now. ;)

Snake 05-22-2006 08:33 AM

Another great hack by Hellcat. You are awesome man!

Thanks, will install this tonight. ;)

Hellcat 05-22-2006 09:07 PM

Quote:

Originally Posted by Stangsta
I feel honored to find the first bug!

I have a usergroup say....ID #5 (administrator) and I have another usergroup say....ID #15 registered users. If I exclude ID 15 from the options, it will exclude ID #5 as well. Same with #16 & #6.....#17 &#7 and so on.

Huh?
You're sure it'not the other way round, when excluding #5 it also excludes #15?
I think I know why, will take a look and upload a fixed version tomorrow :)

bada_bing 05-22-2006 09:54 PM

Cool when the exclude thing is fixed I will install

Nathan2006 05-23-2006 02:51 AM

Thank you Hellcat :D

This is great!

Install

Just one problem I receive is this error below when The redirect message appears after sending the pm.

Thanks for any help :)

Quote:

Warning: Missing argument 2 for set_recipients() in /includes/class_dm_pm.php on line 231

Cybertims 05-23-2006 08:24 AM

Quote:

Originally Posted by Nathan2006
Thank you Hellcat :D

This is great!

Install

Just one problem I receive is this error below when The redirect message appears after sending the pm.

Thanks for any help :)

I get the same error....otherwise great hack.

installed......

Hellcat 05-23-2006 11:06 AM

Ha!

Just uploaded an updated version.
Hopefully fixed the two bugs ("blahblah missing bleh error in whatdoiknow.php" and the excluding issue) and added (by special request of a special Boofo ;)) some replacement variables:
{name}, {from} and {to} :)

Boofo 05-23-2006 11:11 AM

All right! You da man! ;)

htscpl 05-23-2006 12:48 PM

Just installed from previous download and got error but I am re-installing with new file. Looks like this will be a great little addition to my site.
Thanks!

*** clicks install ***


PS: bug was fixed, auto reply works great! Thanks again Michael !

vBulletin THEN DAYLIGHT 05-23-2006 04:26 PM

Ever since installing this plugin I have been getting a MySQL error when sending PM's to someone with a # in their username, I never had the problem before.

Database error in vBulletin 3.5.4:

Invalid SQL:
SELECT userid, pmautoreplystatus, pmautoreplytext, pmautoreplydate FROM vb_user WHERE username='vaughan's #1 fan';

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's #1 fan'' at line 1
Error Number : 1064
Date : Tuesday, May 23rd 2006 @ 01:13:06 PM
Script : http://www.cricket247.net/forum/private.php
Referrer : http://www.cricket247.net/forum/priv...do=newpm&u=197
IP Address : 87.113.26.175
Username : Rob
Classname : vb_database


Scott MacVicar had this to say:

Quote:

Its the unescaped ' and that is an SQL Injection and a serious security issue.

The query is a non standard vBulletin query from an auto reply hack.
I recommend no one installs this until the problem is sorted.

*disables

BoYagoob 05-23-2006 06:20 PM

Thanks ..

Hellcat 05-23-2006 09:22 PM

Ouch....
Never trust vB's cleanGPC() again, I guess....
I'll add an escaping of all input and upload an updated version later, once I get home!

Thanks for bringing this to my attention!

[EDIT]
UPDATED VERSION HAS BEEN UPLOADED!
SECURITY ISSUE SHOULD BE FIXED!


I added an additional escaping of the username inside the SQL query!

SaN-DeeP 05-24-2006 03:33 PM

Hellcat, thank you for your support for releasing good addons :)

vBulletin THEN DAYLIGHT 05-24-2006 06:17 PM

Thanks, Hellcat

Stangsta 05-25-2006 01:26 AM

Quote:

Originally Posted by Stangsta
I feel honored to find the first bug!

I have a usergroup say....ID #5 (administrator) and I have another usergroup say....ID #15 registered users. If I exclude ID 15 from the options, it will exclude ID #5 as well. Same with #16 & #6.....#17 &#7 and so on.

Still having same problem :(

Hellcat 06-08-2006 08:23 AM

Howdy :)

[high]Concerning vBulletin 3.6 (beta 1):[/high]
This seems to be working fine under vB3.6b1.

At least I didn't encounter any problems while testing ;)

Nathan2006 06-11-2006 12:26 AM

Quote:

Originally Posted by Hellcat
Ha!

Just uploaded an updated version.
Hopefully fixed the two bugs ("blahblah missing bleh error in whatdoiknow.php" and the excluding issue) and added (by special request of a special Boofo ;)) some replacement variables:
{name}, {from} and {to} :)

Hi Hellcat,

Thank you for the update :)

I'm having problems with the tags.

If I type a message in the box such as:


Quote:

Hi {to},

Thank you for your message.

I will get back to you shortly,

Regards,
{name}
The {name} works but {to} does not work and leaves the message like this missing out the name of the member its being sent to.


Quote:

Hi ,

Thank you for your message.

I will get back to you shortly,

Regards,
Nathan
Thank you for any help :)

klaush 06-11-2006 08:58 AM

Thanks! Very, very usefull!

This would be perfect if i could name one user who will optional receive a copy of this pn, so my co-admin for example will receive this pn as well and could answer?

Smiry Kin's 06-11-2006 02:00 PM

wow this is really nice.. great work dude

user02934123123 06-12-2006 03:34 PM

Quote:

Originally Posted by Hellcat
Howdy :)

[high]Concerning vBulletin 3.6 (beta 1):[/high]
This seems to be working fine under vB3.6b1.

At least I didn't encounter any problems while testing ;)

Nor I ... seems to work just fine with 3.6b1.

Hellcat 06-12-2006 04:09 PM

Quote:

Originally Posted by klaush
Thanks! Very, very usefull!

This would be perfect if i could name one user who will optional receive a copy of this pn, so my co-admin for example will receive this pn as well and could answer?

I actually like that idea :) and I could be quite easiely be done, I think....
[high]* Hellcat puts on ToDo[/high]

bada_bing 06-12-2006 06:14 PM

Just install on my 3.5.3 site and does not work. No error plugin installs and added the code to the modifyoptions template and excluded the groups from admincp and nothing shows up in the users edit options :surprised:

Hellcat 06-12-2006 10:29 PM

Quote:

Originally Posted by bada_bing
Just install on my 3.5.3 site and does not work. No error plugin installs and added the code to the modifyoptions template and excluded the groups from admincp and nothing shows up in the users edit options :surprised:

Remove everything from the excluded groups setting in the AdminCP and try again.
There's a bug with that I still need to fix.

Report if it's showing up then, if not wee look for other causes :)

bada_bing 06-13-2006 02:14 AM

I have removed everything in the excluded and still does not show?

freedom2support 06-13-2006 11:58 AM

Great plugin this. Exactly what one of our users was asking for. One problem I've noticed though is the textarea for editing the autoreply message appears too wide in Firefox:

http://img149.imageshack.us/img149/5...toowide7ry.png

It causes the box around the PM Auto-Reply Options to be wider than the other boxes around settings groups on that page. Seems fine in IE and Opera though. I found changing the textarea to 60 columns from 64 got it looking right in Firefox (but made the textarea slightly smaller in IE and Opera).

Also I'm not sure if the {name} replacement variable is working right. Your description says it gets replaced with the name of the auto-reply recipient, which is the person receiving the automatic reply. So if I send a PM to bob and get an autoreply, {name} should be replaced with freedom2support since I am the auto-reply recipient. But currently the plugin would replace it with the recipient of the PM (bob) and not of the auto-reply.

Smiry Kin's 06-13-2006 01:17 PM

Quote:

Originally Posted by freedom2support
Great plugin this. Exactly what one of our users was asking for. One problem I've noticed though is the textarea for editing the autoreply message appears too wide in Firefox:

http://img149.imageshack.us/img149/5...toowide7ry.png

It causes the box around the PM Auto-Reply Options to be wider than the other boxes around settings groups on that page. Seems fine in IE and Opera though. I found changing the textarea to 60 columns from 64 got it looking right in Firefox (but made the textarea slightly smaller in IE and Opera).

Also I'm not sure if the {name} replacement variable is working right. You description says it gets replaced with the name of the auto-reply recipient, which is the person receiving the automatic reply. So if I send a PM to bob and get an autoreply, {name} should be replaced with freedom2support since I am the auto-reply recipient. But currently the plugin would replace it with the recipient of the PM (bob) and not of the auto-reply.

it maybe a little big, but still looks ok, it doesnt make the outside table any bigger.

also the name functiion works perfect.


All times are GMT. The time now is 06:46 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01367 seconds
  • Memory Usage 1,830KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (16)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete