vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   New Posting Features - Automatic PM on New Thread (https://vborg.vbsupport.ru/showthread.php?t=184123)

xorex 07-03-2008 12:25 AM

Quote:

Originally Posted by whitemike (Post 1565120)
Updated. Should have the fix now.


Now mistake


Invalid SQL:

ALTER TABLE forum
ADD sendpm SMALLINT( 5 ) UNSIGNED DEFAULT '0' NOT NULL;

Error MySQL : Duplicate column name 'sendpm'

Michael Biddle 07-03-2008 03:57 AM

That is because it was added in the first query. Go ahead and remove that field from the forum table, and then import again.

VB-STYLE 07-03-2008 05:20 AM

great mod & install :)

If you can do some more things will be wonderful.

1- Automatic PM Title better to be with the thread title. Price quote requested for thread {1}.
2- If there is resend bottum when the thread be come importent and i need to sent it to the defined group.

chris1979 07-21-2008 12:55 PM

I get this error:



Database error in vBulletin 3.7.0:

Invalid SQL:
SELECT gfpoforumoptions FROM forum WHERE forumid =;

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 '' at line 1
Error Number : 1064
Request Date : Monday, July 21st 2008 @ 01:51:52 PM
Error Date : Monday, July 21st 2008 @ 01:51:53 PM
Script : http://www.nlpconnections.com/newthr...ostthread&f=75
Referrer : http://www.nlpconnections.com/newthr...newthread&f=75
IP Address : xxxxxxxxx
Username : chris_morris
Classname : vB_Database
MySQL Version : 5.0.45

rooban12 07-21-2008 03:34 PM

good work

Michael Biddle 07-22-2008 05:26 AM

Quote:

Originally Posted by chris1979 (Post 1580557)
I get this error:



Database error in vBulletin 3.7.0:

Invalid SQL:
SELECT gfpoforumoptions FROM forum WHERE forumid =;

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 '' at line 1
Error Number : 1064
Request Date : Monday, July 21st 2008 @ 01:51:52 PM
Error Date : Monday, July 21st 2008 @ 01:51:53 PM
Script : http://www.nlpconnections.com/newthr...ostthread&f=75
Referrer : http://www.nlpconnections.com/newthr...newthread&f=75
IP Address : xxxxxxxxx
Username : chris_morris
Classname : vB_Database
MySQL Version : 5.0.45

This error has nothing to do with my modification.

yahoooh 07-22-2008 06:11 AM

i suggest subscription if the user want to be e-mailed or pm if another user write a new thread
which is usefull

tk102 08-22-2008 03:57 AM

Just installed. Good job, it was just what I was looking for.


Three things:

1) It'd be nice to have the recipient usergroups to be specified on a forum-by-forum basis rather than a single set of groups. Haven't looked at what this would require though.

2) I noticed that for members that have already registered, their new userfield value in the userfield table shows up as NULL rather than Yes or No, which is deceptive since it appears to be Yes in the User Options area of the UCP. There's plenty of workarounds to this including simply reversing the "Yes / No" options to "No / Yes" when creating the userfield during installation. This would cause the No to show up in the UCP by default which has the same behavior here as NULL.

3) I noticed that your "AutoPM Save Thread Info" hook only looks for users who have the recipient usergroup as their primary usergroup. I added the following to the code to search for users who have the recipient group as a secondary group (though there's probably a more efficient means to do this):

After this:
Code:

                while ($name = $vbulletin->db->fetch_array($usernames))
                {
                        $pm2users[] = $name['username'];
                }
               
                $vbulletin->db->free_result($usernames);

Insert this:
Code:

                $autopm_groups=explode(',',$vbulletin->options['sendpm_usergroups']);
                while ($autopm_group = array_shift($autopm_groups)) {
                    $usernames = $vbulletin->db->query_read("
                            SELECT username
                            FROM " . TABLE_PREFIX . "user
                            LEFT JOIN " . TABLE_PREFIX . "userfield AS userfield ON (user.userid = userfield.userid)
                            WHERE membergroupids REGEXP '(^|,| )".trim($autopm_group)."($|,| )'
                            AND field" . $vbulletin->options['sendpm_sendme'] . " = 'Yes'
                            ORDER BY username ASC
                    ");
                    while ($name = $vbulletin->db->fetch_array($usernames))
                    {
                        $pm2users[] = $name['username'];
                    }
                    $vbulletin->db->free_result($usernames); 
                }

Thanks for the mod!

Videx 08-23-2008 02:17 AM

Why should I use this instead of Instant New Thread Notification? It seems to me this mod requires two steps to do what the other one does in one. Or am I missing something?

students_forum 09-09-2008 11:17 AM

Quote:

Originally Posted by Videx (Post 1604894)
Why should I use this instead of Instant New Thread Notification? It seems to me this mod requires two steps to do what the other one does in one. Or am I missing something?

1- it is a PM and not email
2- you have to subscribe to the forum ;)


All times are GMT. The time now is 12:22 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.01058 seconds
  • Memory Usage 1,749KB
  • 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
  • (3)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
  • (10)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