Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by chrispadfield chrispadfield is offline
Developer Last Online: Oct 2008 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 02-13-2001 Last Update: Never Installs: 4
 
No support by the author.

Ok my first hack (and very simple)

What it does is lets an admin pm everyone. This is very simple at the moment and could be made more complicated like the email one in later versions. It only pm's people who have set pm to on in their profile.

I have attached the file but this is it:

PHP Code:
<?
require("./global.php");
    
echo "<html><body>";

echo "<h1>Mass PM</h1><br>";
echo "This will send a pm to every user who has set receive pm on.";
echo "<FORM METHOD=\"post\" ACTION=\"$PHP_SELF\">";
echo "Your user number:<br>";
echo "<INPUT type=\"text\" NAME=\"adminuser\" value=\"$adminuser\" SIZE=5></P>";
echo "PM Title:<br>";
echo "<INPUT type=\"text\" NAME=\"title\"  SIZE=\"40\"></P>";
echo "Message:<br>";
echo "<textarea name=\"message\" rows=\"8\" cols=\"0\"></textarea><br>";
echo "<INPUT type=\"hidden\" NAME=\"action\" value=\"do\">";
echo "<INPUT type=\"submit\" NAME=\"Submit\">";
echo "<P><P><P>";



if ($action=="do") {

echo "<html><body>";
    

    
$forums=$DB_site->query("SELECT userid,username FROM user WHERE receivepm=1 ORDER BY userid");
    
    while ($forum=$DB_site->fetch_array($forums)) {
    

    $sql=$DB_site->query("INSERT INTO privatemessage (privatemessageid, folderid, userid, touserid, fromuserid, title, message, dateline, showsignature, iconid, messageread) VALUES (NULL, '0', '$forum[userid]', '$forum[userid]', '$adminuser', '".addslashes($title)."', '".addslashes($message)."', UNIX_TIMESTAMP(), '1', '1', '0')");
    
echo "pm sent to $forum[userid] <br>";
    
    
        }
  
    echo "</body></html>";
    
    }
?>
this is my first mod so i would like comments on what i am doing wrong!

p.s. do i get an award for the first v2.0 mod?

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 02-14-2001, 07:21 AM
Guest
 
Posts: n/a
Default

Edit your thread here if you can and add a 2.0 to the title line, so we know its for 2.0.
Reply With Quote
  #3  
Old 02-14-2001, 09:51 AM
Guest
 
Posts: n/a
Default

44 views, so is anyone using it ?
Reply With Quote
  #4  
Old 02-14-2001, 10:36 AM
Guest
 
Posts: n/a
Default

does it work on v1.14? thanks for your nice hack
Reply With Quote
  #5  
Old 02-14-2001, 10:41 AM
Guest
 
Posts: n/a
Default

i don't know what the table structure is for 1.4, if you post the table structure here for me i can edit it so that it will work.
Reply With Quote
  #6  
Old 02-14-2001, 12:48 PM
Guest
 
Posts: n/a
Default

i'm new, i dunno where can i get it. sorry~~~ thanks for replied
Reply With Quote
  #7  
Old 02-14-2001, 01:12 PM
Guest
 
Posts: n/a
Default

you are using v 1.4 are you? (i would recommend upgrading) but if you don't want to.

install phpmyadmin from www.phpwizard.com (i think that is right, otherwise search for it at www.hotscripts.com

Then once installed (it is very useful) click on your database with your forum in it and then you should see all the tables appear. Click on the privatemessage one and copy and paste the next page. It just shows me what the names of the columns are.
Reply With Quote
  #8  
Old 02-14-2001, 01:38 PM
Guest
 
Posts: n/a
Default

i'm not sure is this you looking for.
msgid mediumint(8) UNSIGNED No auto_increment Change Drop Primary Index Unique
toid smallint(5) UNSIGNED No 0 Change Drop Primary Index Unique
fromid smallint(5) UNSIGNED No 0 Change Drop Primary Index Unique
title varchar(100) No Change Drop Primary Index Unique
text mediumtext No Change Drop Primary Index Unique
datetime datetime No 0000-00-00 00:00:00 Change Drop Primary Index Unique
signature tinyint(4) No 0 Change Drop Primary Index Unique
iconid smallint(5) No 0 Change Drop Primary Index Unique

Thanks a lot for all your helping
Reply With Quote
  #9  
Old 02-15-2001, 12:10 AM
Guest
 
Posts: n/a
Default

Chris,

I just used it for a little over 1,500 members and it was FAST!

Thanks for the great add-on!
Reply With Quote
  #10  
Old 02-15-2001, 12:33 AM
Guest
 
Posts: n/a
Default

cool, glad someone used it. I have already sent 2 to my members, it is a little difficult to contain oneself
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:51 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04500 seconds
  • Memory Usage 2,273KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (1)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete