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
Send author PM on thread move Details »»
Send author PM on thread move
Version: 1.00, by Overgrow Overgrow is offline
Developer Last Online: Jun 2004 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 03-02-2002 Last Update: Never Installs: 33
 
No support by the author.

Disclaimer:

-No support is offered for this hack. If you PM or email for support, it will be joyfully ignored. When I have time, I will answer questions in this thread.


PM on Thread Move


Design Spec:

Alert users that their post has been moved by sending the original
author a private message. This helps prevent clogging the forums
with those ugly moved markers. An additional checkbox will be
shown allowing you to add the PM.


Steps for installation:

-edit one file 'postings.php'
-edit one template 'threads_move'


Tested: 2.2.1


Updated: Will now put a checkbox option to send the PM instead of changing the default move action.

Show Your Support

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

Comments
  #12  
Old 03-03-2002, 12:13 PM
Jawelin Jawelin is offline
 
Join Date: Nov 2001
Posts: 557
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very useful hack.

Just I found should be better replace the main two lines in postings.php with the following:

Code:
    $movemessage="Your thread entitled ".$threadinfo[title]." has been moved to the $bburl[/COLOR]/forumdisplay.php?forumid=".$foruminfo[forumid]."\"]".$foruminfo[title]." forum. You can find it by clicking:\n\n$bburl[/COLOR]/showthread.php?threadid=".$threadid."\"]$bburl/showthread.php?threadid=".$threadid."\n\nThis is an automated message, DO NOT REPLY.\n";

    $DB_site->query("INSERT INTO privatemessage (privatemessageid,userid,touserid,fromuserid,title,message,dateline,showsignature,iconid,messageread,folderid,receipt) VALUES (NULL,$firstpostinfo[userid],$firstpostinfo[userid],$bbuserinfo[userid],'Your post has been moved.','".addslashes($movemessage)."',".time().",0,9,0,0,0)");
(I put in color the differences...)

First, of couse, cause mine .txt linked to YOUR homepage...
Second, because I didn't like any move thread PM should sent with the same Admin (user 1) author... I'd prefer the original mover as the sender of the PM.

Thanks.
Bye
Reply With Quote
  #13  
Old 03-03-2002, 12:41 PM
dost dost is offline
 
Join Date: Oct 2001
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks a lot for the hack Overgrow, I have been waiting for this hack for 2 years! I have a question and a suggestion for you:
1. What happens if the person has disabled using PM's?
2. This shouldn't be very hard for you, can you make a different version of the hack so that it will send a PM on deleting the thread? My request can be found here, I just posted it a month ago.

Thanks
Reply With Quote
  #14  
Old 03-03-2002, 02:20 PM
Overgrow's Avatar
Overgrow Overgrow is offline
 
Join Date: Nov 2001
Posts: 320
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

>>What happens if the person has disabled using PM's?

Admins don't care if people have their PMs disabled They get the PM anyway.. they'll have to turn them on to read it.

>>different version of the hack so that it will send a PM on deleting the thread?

No sweat.. in postings.php, find this twice:

PHP Code:
deletethread($threadid,$foruminfo[countposts]); 
and BELOW it, add:

PHP Code:
  if ($firstpostinfo[userid]=="") {
    
$firstpostinfo=$DB_site->query_first("SELECT userid FROM post WHERE threadid='$threadid
ORDER BY dateline LIMIT 1"
);
}

$movemessage="Your thread entitled ".$threadinfo[title]." has been deleted.
\n\nThis is an automated message, DO NOT REPLY."
;

$DB_site->query("INSERT INTO privatemessage (privatemessageid,userid,touserid,fromuserid,title,
message,dateline,showsignature,iconid,messageread,folderid,
receipt) VALUES (NULL,
$firstpostinfo[userid],$firstpostinfo[userid],1,
'Your post has been deleted.','"
.addslashes($movemessage)."',".time().",0,9,0,0,0)");

if (
$noshutdownfunc) {
    
$DB_site->query("UPDATE user SET pmpopup=2 WHERE userid=$firstpostinfo[userid]");
} else {
    
$shutdownqueries[]="UPDATE LOW_PRIORITY user SET pmpopup=2 WHERE userid=$firstpostinfo[userid]";

This is untested but should be fine.

>>cause mine .txt linked to YOUR homepage...

OOPS! Sorry, I had fixed that once. I will fix it again.. Sly aren't I? Getting people to register on MY board from your error
Reply With Quote
  #15  
Old 03-03-2002, 05:33 PM
dost dost is offline
 
Join Date: Oct 2001
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, actually it does not. I'd really appreciate it if you could test it and maybe release as a different hack when you have time

Thanks
Reply With Quote
  #16  
Old 03-03-2002, 07:44 PM
Overgrow's Avatar
Overgrow Overgrow is offline
 
Join Date: Nov 2001
Posts: 320
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What doesn't work about that? What is the error? Deleting threads causes big delays on my site so I don't want to test this since I don't want to install it. The code looks like it should work, what goes wrong?
Reply With Quote
  #17  
Old 03-03-2002, 09:34 PM
SWFans.net's Avatar
SWFans.net SWFans.net is offline
 
Join Date: Oct 2001
Posts: 243
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have one more request for an addition to this hack. One I think may be easy, but I could be wrong.

Would it be possible for his hack to also perform an email notification of the PM by default as well?

I noticed that while doing some testing that even when the recipient has email notify turned on for their PMs, this particular hack skips that and does not send an email notification.

I really like this hack a lot and thank you for providing it as well as modifying it to be a selectable option.
Reply With Quote
  #18  
Old 03-03-2002, 09:41 PM
Overgrow's Avatar
Overgrow Overgrow is offline
 
Join Date: Nov 2001
Posts: 320
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Tell me if this works?

find:

}

// END PM HACK

above it put

PHP Code:
if ($firstpostinfo[emailonpm]) {
          eval(
"\$emailmsg = \"".gettemplate("email_pmreceived",1,0)."\";");
          eval(
"\$emailsubject = \"".gettemplate("emailsubject_pmreceived",1,0)."\";");
          
mail($firstpostinfo[email],$emailsubject,$emailmsg,"From: \"$bbtitle Mailer\" <$webmasteremail>");
        } 
Reply With Quote
  #19  
Old 03-03-2002, 09:57 PM
SWFans.net's Avatar
SWFans.net SWFans.net is offline
 
Join Date: Oct 2001
Posts: 243
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nope, it didn't work. =/

I moved a thread with the options selected, got the PM and checked my mail, no message. I waited a few minutes and still no mail, so I sent myself a PM to check and make sure the mail system was functioning alright and recieved the email notify for it in seconds.
Reply With Quote
  #20  
Old 04-02-2002, 08:31 PM
NSeXcellent NSeXcellent is offline
 
Join Date: Jan 2002
Location: Tampa Bay
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Apparently the $userid that this PM is coming from, is 1, however, I am user #2 and i wish for the PM to come from my name. Can you tell me where to change that? Thanks
Reply With Quote
  #21  
Old 04-02-2002, 10:32 PM
Okiewan's Avatar
Okiewan Okiewan is offline
 
Join Date: Dec 2001
Posts: 199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

NSex...
look for this:
Code:
(NULL,$firstpostinfo[userid],$firstpostinfo[userid],1,'Your post has been moved.'
I can verify that the delete PM doesn't work... no error message, just ignores the hack.


Good stuff overgrow, thanks!
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 12:19 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.06900 seconds
  • Memory Usage 2,323KB
  • Queries Executed 25 (?)
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
  • (2)bbcode_code
  • (3)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
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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