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
  #22  
Old 10-08-2002, 03:24 PM
wolfe wolfe is offline
 
Join Date: Jan 2002
Posts: 900
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

should it be names something specific?
Reply With Quote
  #23  
Old 10-08-2002, 03:43 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nope
Reply With Quote
  #24  
Old 10-13-2002, 01:19 AM
wolfe wolfe is offline
 
Join Date: Jan 2002
Posts: 900
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

tx works
Reply With Quote
  #25  
Old 03-12-2003, 03:15 AM
Javazoid Javazoid is offline
 
Join Date: Dec 2002
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

where do i put this text and what do i name the file and where do i put that?

where is this feature shown? in admin cp or user cp.

thanks

i looked up at the other posts but i created a file named masspm.php and put that code in it in my admin folder and it dun work. thanks
Reply With Quote
  #26  
Old 03-12-2003, 05:31 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Put it in the admin folder, and run the file from the admin folder. If you edit the admin/index.php and add a link to it from there, it will show up in your admin folder.
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:43 AM.


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.04087 seconds
  • Memory Usage 2,250KB
  • Queries Executed 20 (?)
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
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (6)postbit_onlinestatus
  • (6)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