vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Pm All Members *Via Email Form (https://vborg.vbsupport.ru/showthread.php?t=64629)

insanctus 05-01-2004 10:00 PM

Pm All Members *Via Email Form
 
As asked for Here

What this does, is turn your admin email all into an email or pm all.

I did it this way due to less clutter and files also effective.

I will offer support as my time allows.

See Screan Shot To See Effect.

Vivi Ornitier 05-02-2004 02:29 AM

oh wow, good stuff man, gvery good thinking *clicks install*

insanctus 05-02-2004 02:36 AM

No trouble at all, the thought on how to do it this way came to me in the middle of dinner.

Very odd this hack is not showing up on main page....

Vivi Ornitier 05-02-2004 02:36 AM

it's not showing up for some reason

I can't find the

if (!$_POST['test'])
{
echo $vbphrase['emailing']." \n";
vbmail($user['email'], $_POST['subject'], $sendmessage, true, $_POST['from']);
}
}

Instead the part i do find in email.php is

if (!$_POST['test'])
{
echo $vbphrase['emailing']." \n";
vbmail($user['email'], $_POST['subject'], $sendmessage, true, $_POST['from']);
}
else
{
echo $vbphrase['test'] . " ... \n";
}

insanctus 05-02-2004 02:40 AM

Ok Instead Do This

Find
Code:

                                                echo $vbphrase['emailing']." \n";
                                                vbmail($user['email'], $_POST['subject'], $sendmessage, true, $_POST['from']);

Replace With

Code:

                if ($_POST['pm']==1){// Lets PM All Instead
                        $DB_site->query("INSERT INTO pmtext (fromuserid, fromusername, title, message, touserarray, iconid, dateline, showsignature, allowsmilie)
                        VALUES ($bbuserinfo[userid], '$bbuserinfo[username]', '$_POST[subject]', '" . addslashes($sendmessage) . "',  '" . serialize(array($user[userid] => $user[username])) . "', 0, " . TIMENOW . ", 0, 0)");
                        $pmid = $DB_site->insert_id();
                        $DB_site->query("UPDATE user SET pmtotal=pmtotal+1, pmunread=pmunread+1, pmpopup=2 WHERE userid=$user[userid]");
                        $DB_site->query("INSERT INTO pm (pmtextid, userid, folderid, messageread) VALUES ('$pmid', '$user[userid]', '0', '0')");
                }else{
                        echo $vbphrase['emailing']." \n";
                        vbmail($user['email'], $_POST['subject'], $sendmessage, true, $_POST['from']);
}

I will update the txt now

Vivi Ornitier 05-02-2004 02:53 AM

i get this error when i mass pm it. It stops at the UserID 464 with a guy's name X's Angel, this is the sql error it gives.


Database error in vBulletin 3.0.0:

Invalid SQL: INSERT INTO pmtext (fromuserid, fromusername, title, message, touserarray, iconid, dateline, showsignature, allowsmilie)
VALUES (1, 'deathscythehell', 'test #3', 'testing once more', 'a:1:{i:464;s:9:"X's Angel";}', 0, 1083469828, 0, 0)
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 Angel";}', 0, 1083469828, 0, 0)' at line 2

mysql error number: 1064

Date: Sunday 02nd of May 2004 03:50:29 AM
Script: http://forums.squareultima.com/admincp/email.php
Referer: http://forums.squareultima.com/admin...l.php?do=start
Username: deathscythehell
IP Address: 64.40.53.44

allhandl 05-02-2004 02:58 AM

fantastic work. Went flawlessly

insanctus 05-02-2004 03:00 AM

Are you possitive you added it in right spot, I just did a test on my site of 940 members and it worked as planed.

insanctus 05-02-2004 03:02 AM

Quote:

Originally Posted by Vivi Ornitier
i get this error when i mass pm it. It stops at the UserID 464 with a guy's name X's Angel, this is the sql error it gives.


Database error in vBulletin 3.0.0:

Invalid SQL: INSERT INTO pmtext (fromuserid, fromusername, title, message, touserarray, iconid, dateline, showsignature, allowsmilie)
VALUES (1, 'deathscythehell', 'test #3', 'testing once more', 'a:1:{i:464;s:9:"X's Angel";}', 0, 1083469828, 0, 0)
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 Angel";}', 0, 1083469828, 0, 0)' at line 2

mysql error number: 1064

Date: Sunday 02nd of May 2004 03:50:29 AM
Script: http://forums.squareultima.com/admincp/email.php
Referer: http://forums.squareultima.com/admin...l.php?do=start
Username: deathscythehell
IP Address: 64.40.53.44

Do me a favor and post your exact code from that section

It sounds to me like you did the first edit, then put the fix over top of it.

Vivi Ornitier 05-02-2004 03:03 AM

Ya, i think it's somethin to do with confliction with apostrophes. You can't have any ' in a name or else it screws it up?

insanctus 05-02-2004 03:06 AM

Quote:

Originally Posted by allhandl
fantastic work. Went flawlessly

Good to hear :) , I did install to 2 sites and both going as planned.

Boofo 05-02-2004 03:07 AM

That's easy to fix. You just need to add an addslashes to the username variable when inserting it into the db.

Vivi Ornitier 05-02-2004 03:09 AM

hey insanctus, you should create a user with an apostrophe in its name and then try mass pming. I'm pretty dead set sure it's the apostrophes doin the error.

insanctus 05-02-2004 03:23 AM

Find
Code:

$DB_site->query("INSERT INTO pmtext (fromuserid, fromusername, title, message, touserarray, iconid, dateline, showsignature, allowsmilie)
                        VALUES ($bbuserinfo[userid], '$bbuserinfo[username]', '$_POST[subject]', '" . addslashes($sendmessage) . "',  '" . serialize(array($user[userid] => $user[username])) . "', 0, " . TIMENOW . ", 0, 0)");

Replace with
Code:

                                                $DB_site->query("INSERT INTO pmtext
                                                            (fromuserid, fromusername, title, message, touserarray, iconid, dateline, showsignature, allowsmilie
                                                            )
                                                            VALUES
                                                            ($bbuserinfo[userid], '" . addslashes($bbuserinfo[username]) . "', '$_POST[subject]', '" . addslashes($sendmessage) . "',  '" . serialize(array($user[userid] => addslashes($user['username']))) . "', 0, " . TIMENOW . ", 0, 0)");

I will update the text now

Vivi Ornitier 05-02-2004 03:32 AM

parse error on line 201 and line 201 is just a ).

insanctus 05-02-2004 03:33 AM

Sounds like you missed some of the code copy. Can you post your code?

Vivi Ornitier 05-02-2004 03:37 AM

Quote:

Originally Posted by insanctus
Sounds like you missed some of the code copy. Can you post your code?

here is email.php

insanctus 05-02-2004 03:41 AM

Quote:

Originally Posted by Vivi Ornitier
here is email.php

Code:

                                                $DB_site->query("INSERT INTO pmtext
                                                            (fromuserid, fromusername, title, message, touserarray, iconid, dateline, showsignature, allowsmilie
                                                            )
                                                            VALUES
                                                            ($bbuserinfo[userid], '" . addslashes($bbuserinfo[username]) . "', '$_POST[subject]', '" . addslashes($sendmessage) . "',  '" . serialize(array($user[userid] => addslashes($user['username']))) . "', 0, " . TIMENOW . ", 0, 0)"

You forgot the ); at the end , it should be

Code:

                                                $DB_site->query("INSERT INTO pmtext
                                                            (fromuserid, fromusername, title, message, touserarray, iconid, dateline, showsignature, allowsmilie
                                                            )
                                                            VALUES
                                                            ($bbuserinfo[userid], '" . addslashes($bbuserinfo[username]) . "', '$_POST[subject]', '" . addslashes($sendmessage) . "',  '" . serialize(array($user[userid] => addslashes($user['username']))) . "', 0, " . TIMENOW . ", 0, 0)");


Boofo 05-02-2004 03:42 AM

Quote:

Originally Posted by Vivi Ornitier
here is email.php

Vivi Ornitier, you need to remove the link for that file. vBulletin files are not allowed to be posted here. Please just post the code you need looked at. ;)

Vivi Ornitier 05-02-2004 03:45 AM

workin perfectly ;)

Boofo 05-02-2004 03:45 AM

Will this work even if they have pms or emails turned off from Admins?

insanctus 05-02-2004 03:47 AM

Quote:

Originally Posted by Boofo
Will this work even if they have pms or emails turned off from Admins?

Yes, it even makes it have a pop up , no matter if they choose :)

You will have to click the ignore those who do not want emails from admin though.

I found this the most efficent way to do the hack.

insanctus 05-02-2004 03:47 AM

Quote:

Originally Posted by Vivi Ornitier
workin perfectly ;)

Sweet, and thanks for finding that ' in name bug. I not do not have any members that have that so it did not effect me :)

Boofo 05-02-2004 03:49 AM

Then I better click install, huh? ;)

insanctus 05-02-2004 03:52 AM

Quote:

Originally Posted by Boofo
Then I better click install, huh? ;)

Please do :), so far only one has.... lol

templates911 05-02-2004 04:00 AM

nice. Ive been waiting forever on this hack! Installing now.

templates911 05-02-2004 04:09 AM

im getting a Parse error: parse error in email.php on line 204

insanctus 05-02-2004 04:12 AM

Quote:

Originally Posted by templates911
im getting a Parse error: parse error in email.php on line 215

Can you post your line 215 for me?

Floris 05-02-2004 11:43 AM

Quote:

Originally Posted by insanctus
Can you post your line 215 for me?

Can I limit this to a usergroup? I.e. Mass PM all admins, or registered members .. ?

insanctus 05-02-2004 11:48 AM

Quote:

Originally Posted by floris
Can I limit this to a usergroup? I.e. Mass PM all admins, or registered members .. ?

Yes using the search criteria as you would a mass email, it works exact same way :)

It has all the options of mass email. I do recommend checking the "Include users that have declined admin emails?"

Oblivion Knight 05-02-2004 01:17 PM

Thanks.! Works great.. :D
I made this work with phrases too, just to be a little cleaner.

templates911 05-02-2004 01:18 PM

would you mind me emailing the file to you? I think its a problem with another hack i had installed on the email.php

trainer 05-02-2004 02:19 PM

is there way you could do a auto-reload the next page after X number of seconds? sending out 10k emails or PM's kill the server or time-out. being able to auto-reload the next page so we can do 50-100 at a time would really make things alot easier!

Smoker 05-02-2004 02:44 PM

Sory for my very very bad englisch.

This Hack no email sends to the user which it has a PM :(

bye
Smoker

FleaBag 05-02-2004 03:30 PM

Sweet - wanted this for a while as my e-mail always times out.

insanctus 05-02-2004 08:55 PM

Quote:

Originally Posted by templates911
would you mind me emailing the file to you? I think its a problem with another hack i had installed on the email.php

Email it to me admin@sanoxs.com I will take a look.

insanctus 05-02-2004 08:58 PM

Quote:

Originally Posted by Smoker
Sory for my very very bad englisch.

This Hack no email sends to the user which it has a PM :(

bye
Smoker

If you mean it does not email them they have a new pm then no, I could add this in but the point of it was to not have them emailed.

Quote:

Originally Posted by trainer
is there way you could do a auto-reload the next page after X number of seconds? sending out 10k emails or PM's kill the server or time-out. being able to auto-reload the next page so we can do 50-100 at a time would really make things alot easier!

I can look into it later, I think it would be very possible.

Quote:

Originally Posted by Oblivion Knight
Thanks.! Works great..
I made this work with phrases too, just to be a little cleaner

Very cool, glad it came in handy.

subu1 05-03-2004 02:54 AM

Quote:

Originally Posted by insanctus
If you mean it does not email them they have a new pm then no, I could add this in but the point of it was to not have them emailed.

oh yes please do it, we need this function :-)))

greetz subu1

SnowBot 05-03-2004 04:16 AM

Quote:

Originally Posted by subu1
oh yes please do it, we need this function :-)))

greetz subu1

why do u need that function? Just email what you would have said in the PM.

Great hack, installing later but will click install :)

BigJohnson 05-03-2004 09:25 AM

How can we fix this?

Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in /forum/admincp/email.php on line 132


All times are GMT. The time now is 04:28 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.01342 seconds
  • Memory Usage 1,836KB
  • 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
  • (6)bbcode_code_printable
  • (17)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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