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?


All times are GMT. The time now is 01:54 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.01079 seconds
  • Memory Usage 1,741KB
  • 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
  • (1)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