vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   [UPDATE] Mass PM (vB 2.0) (https://vborg.vbsupport.ru/showthread.php?t=8742)

KarateKid 12-09-2001 08:11 PM

does it work for 2.2.1 ?

Mystics 02-10-2002 01:33 PM

I have adjusted the script a little bit.
It's now nearly the same as the "Send eMail to users"-Feature, so now you can test the process before sending and all variables get replaced correct.

The Script works perfect for vBulletin 2.2.x!

I have attached the script (German an English version!) to this Posting.

@NAM
Quote:

2. We really need Save function that keep all of our mass PM to users in Send Folder box. To keep for the record.
To save the sent PM in the Send Folder Box of the Admin who sent the PM, do the following (referring to my version of the script):

Search:
PHP Code:

    echo "<p><b>All done!</b></p>"

and replace it with:
PHP Code:

    echo "<p><b>All done!</b></p>";
    if (!
$test) {
      
$sql=$DB_site->query("INSERT INTO privatemessage (privatemessageid, folderid, userid, touserid, fromuserid, title, message, dateline, showsignature, iconid, messageread) VALUES (NULL,'-1','$fromuserid','$fromuserid','$fromuserid','".addslashes(htmlspecialchars($subject))."','".addslashes($sendmessage)."',".time().",'1','0','0')");
    } 

2003-07-09:
Small update (changed code order)


2002-09-21:
Updated the archive with new versions (Bugfix + Automatic redirect Feature when sending over several pages.)


2002-07-12:
Updated the archive with new versions (Bugfix + eMail Feature)


Greetings,
Mystics

Jawelin 02-11-2002 08:20 AM

Thanks a lot. Very cool!

Actually there are - in your masspm.php - two lines with
<b>All done!</b> (one for first page, another for the multiple pages option)

Which of them should I replace with the above INSERT to save the PM in the outbox ?

Besides, the INSERT itself contains three identical values:
'$fromuserid','$fromuserid','$fromuserid',
Is it right (I shall not save the single target of each message...) ?
Hwr. that variable is NEVER defined anywhere :stupid: :stupid:

Thanks

Jawelin 02-11-2002 09:49 AM

Sorry Mystics, but I definetively think your insert queries
PHP Code:

$sql=$DB_site->query("INSERT INTO privatemessage (privatemessageid, folderid, userid, touserid, fromuserid, title, message, dateline, showsignature, iconid, messageread) VALUES (NULL,'0','$user[userid]','$user[userid]','$fromuserid','".addslashes(htmlspecialchars($subject))."','".addslashes($sendmessage)."',".time().",'1','0','0')"); 

and the other you specified two posts above, should be replaced with something like:
PHP Code:

// insert message in inbox of the receiver 
$DB_site->query("INSERT INTO privatemessage (privatemessageid,userid,touserid,fromuserid,title,message,dateline,showsignature,iconid,messageread,folderid,receipt) VALUES (NULL,$user[userid],$user[userid],$bbuserinfo[userid],'".addslashes(htmlspecialchars($subject))."','".addslashes($sendmessage)."',".time().",'1',0,0,0,0)");

// insert message in outbox of the sender 
$DB_site->query("INSERT INTO privatemessage (privatemessageid,userid,touserid,fromuserid,title,message,dateline,showsignature,iconid,messageread,folderid,receipt) VALUES (NULL,$bbuserinfo[userid],$user[userid],$bbuserinfo[userid],'".addslashes(htmlspecialchars($subject))."','".addslashes($sendmessage)."',".time().",'1',0,0,-1,0)"); 

What do you think about ?

Thnx

Mystics 02-11-2002 10:04 AM

Quote:

Originally posted by Jawelin
Actually there are - in your masspm.php - two lines with
<b>All done!</b> (one for first page, another for the multiple pages option)

This line does not appear two times!!!

There is one line with <b>All done!</b> and one line with <p><b>All done!</b></p> and as I wrote you should replace the second one!
Quote:

Originally posted by Jawelin
Besides, the INSERT itself contains three identical values:
'$fromuserid','$fromuserid','$fromuserid',
Is it right (I shall not save the single target of each message...) ?
Hwr. that variable is NEVER defined anywhere :stupid: :stupid:

This variable is defined!
PHP Code:

  makehiddencode("fromuserid","$bbuserid"); 

But you are right, you may replace $fromuserid with $bbuserid....I just have taken this from the original "hack".

The reason why this variable appears three times in the "Save-Sent-PM-in-My-Outbox" Feature is simple: you are the sender of the pm, you are the receiver of the pm and the PM belongs to you, so all userids have to be of course the same.

I have tested all of this before I posted it, so just believe me, it works! :rolleyes:

Jawelin 02-11-2002 11:21 AM

Thnx for having cleaned out.
Bye

bluecat 06-12-2002 02:12 PM

Great hack. I'm wondering, is there a way to put to this in my control panel for easy access (rather then enter the url manually)? Thanks.

Mystics 06-12-2002 02:18 PM

Quote:

Originally posted by bluecat
Great hack. I'm wondering, is there a way to put to this in my control panel for easy access (rather then enter the url manually)? Thanks.
Open admin/index.php

Find:
PHP Code:

makenavoption("Email Users","email.php?action=start","<br>"); 

Add below it:
PHP Code:

makenavoption("Send PM to Users","masspm.php?action=start","<br>"); 


JoshFink 07-12-2002 05:40 PM

The only problem I see so far with this is that it does not send out a notification email if when someone receives a PM. Is there a way to fix this?

Thanks

Josh

Mystics 07-12-2002 05:55 PM

Quote:

Originally posted by JoshFink
The only problem I see so far with this is that it does not send out a notification email if when someone receives a PM. Is there a way to fix this?
I have replaced my attachment with the new version.

I have done the eMail Feature + Bugfix long time ago, sorry ;)

Mystics


All times are GMT. The time now is 10:30 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.01181 seconds
  • Memory Usage 1,767KB
  • 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
  • (7)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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