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)
-   -   Auto PM to Thread Starter on Moderation (https://vborg.vbsupport.ru/showthread.php?t=69212)

kall 09-07-2004 10:00 PM

Auto PM to Thread Starter on Moderation
 
What does this Hack do?
When a thread is Opened/Closed, Stuck/Unstuck, Moved, Split, Merged, or a Post is deleted, a PM will be automatically sent to the Poster to inform them of this.

If you don't want to have a PM sent for a specific action, just don't add the code for that bit.

As requested here

Don't forget to click Install. :)

Update: PM now includes the name of the Moderator who actioned the changes.

22 December 2004 - Bugfix - missing variables. Thanks to Bison.

14 April 2005 - Fixed missing $action for Deleted threads.

Phalynx 09-08-2004 07:03 AM

Really usefull, have waiting for such a hack a long time. Thanks!

Oblivion Knight 09-08-2004 07:24 AM

Nice, I have some custom code that auto PM's the author when a thread has been moved that also says where it has been moved to, and who moved it.. I'll probably integrate some of these options in to it.

kall 09-08-2004 07:27 AM

Quote:

Originally Posted by Oblivion Knight
Nice, I have some custom code that auto PM's the author when a thread has been moved that also says where it has been moved to, and who moved it.. I'll probably integrate some of these options in to it.

I've got the 'where its moved to' bit, but it's not parsed as yet. :)

Polo 09-08-2004 01:13 PM

Nice, do you have any idea on how does this hack respons in a large forum?

mtha 09-08-2004 02:26 PM

Very intetesting hack. I will consider installing this one :)

kall 09-08-2004 06:05 PM

Quote:

Originally Posted by Polo
Nice, do you have any idea on how does this hack respons in a large forum?

No idea sorry...it seems to work fine on my 250-member forum.
:)

q8manar 09-10-2004 02:45 PM

thanks kall becuase you did what I requested

Thank you very much

q?

can we make the sender of PM is who did the modeartor task ???

kall 09-11-2004 02:37 AM

Quote:

Originally Posted by q8manar
thanks kall becuase you did what I requested

Thank you very much

q?

can we make the sender of PM is who did the modeartor task ???

*tips cap*

No worries, I saw you request it and am glad I was able to help.

I think it is possible to do what you are asking, and it shouldn't be too hard, but it's not something I will be able to look at for at least a couple of days.

At the moment, it's very rough, and quite limited. Eg: It only sends the PM to the thread starter. In the case of a thread being Split, the thread starter may not be the person whose posts have been split off..but they are the one who gets the message.

I would like to have a switch/checkbox to tick if you don't want to send the auto-PM, among other things. I'll add your request to the wishlist.

AbOd 09-17-2004 07:15 PM

thanks kall

Quote:

can we make the sender of PM is who did the modeartor task ???
it will be better.

DJ RRebel 09-18-2004 01:00 AM

Hey ... great hack (in theory .. lol .. as I haven't installed it yet) ... anyhow what would make it really great, is if you had a checklist of all the people who posted in that thread, and had the option of sending to those you checked. You could also add a [check all / uncheck all] box, as well as be sure there are no duplicate names. :)

Just a couple of ideas to make a good hack even better !!! :)

OmaniMan 09-18-2004 08:14 PM

Iam really don't know if word (( Thanks alot )) is enough to you because what did you do ??

I was waiting this hack creating since vB3.0.0 Beta 1 !! because I really need it too much ...

I installed it ...

OmaniMan 09-18-2004 08:22 PM

Dear ...

I forgot to ask you :
Can you add more feature to this hack for example :
as same time a poster get PM because of his thread or post ... need to send auto email to poster to remind him by Email ??

Thanks ... :cool:

OmaniMan 09-20-2004 11:07 AM

Up :) >>> :disappointed:

Ghanem 09-20-2004 02:22 PM

Thank you very much
a very very great powrfull hack

regards.

nnjj.net 09-20-2004 03:34 PM

Find:

$_REQUEST['forceredirect'] = 1;
$url = "showthread.php?$session[sessionurl]t=$threadid";
eval(print_standard_redirect('redirect_openclose') );

__________________________________________________ _________________
there are 3 places, shall I modify all 3?

OmaniMan 09-24-2004 12:21 AM

No dear...

Only 1 Place ... Exactly Here ...

Find :
eval(print_standard_redirect('redirect_openclose') );

Then Above :
$_REQUEST['forceredirect'] = 1;

Add The Code .. :o

and waiting for your answer dear kall ... about email ??

futureye 10-02-2004 02:38 AM

Dear kall,
i tried the hack with 3.0.1
but seem to have problems.

am not sure with adding the request in data base

shell i add every line alone
or all togather

Ageel 10-04-2004 05:01 PM

hi there,

I don't know if somebody said this or not :)

for me, I am using 'User Notes' to tell the user that something has been done against his thread/post... since many users are disabling their PM.

so, It's would be great if it can be shifted to add a 'User Note' to the user notes... where you can assign moderators to see those notes also and track the history of the user. :)

anybody agree?!!

thanx

TundraSoul 10-05-2004 03:43 AM

In the instructions it states

Add $modby to your PM text in the Admin CP options.

Where exactly does $modby go?

theArchitect 10-06-2004 09:24 AM

Sensational idea for a hack, but i am getting the following DB error when i try and moderate a thread:

Code:

Invalid SQL:
                            SELECT postid, post.title, pagetext, post.threadid, thread.title AS threadtitle
                                FROM post AS post
                                INNER JOIN thread AS thread USING(threadid)
                                WHERE postid =
                       
 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 '' at line 4
 
 mysql error number: 1064

Any assistance would be most appreciated.

kall 10-06-2004 06:36 PM

Quote:

Originally Posted by TundraSoul
In the instructions it states

Add $modby to your PM text in the Admin CP options.

Where exactly does $modby go?

@Tundrasoul: In the part in the AdminCP where you define what the message will be - it's in the User Posting part from memory.

@omaniman: Another good idea, but again, something I couldn't work out how to do.

@futureye: if you are using vBs built in SQL thingame, one command at a time. If you are using phpmyadmin you can copy and paste the entire queries and run them at once.

@theArchitect: I don't know why you are getting that error, it looks like it's not getting the postid for some reason.

@Ageel: I agree, but I couldn't work out how to do that easily. If someone wants to write the code for that I can add it to the first post and credit them. :)

Delphiprogrammi 12-20-2004 09:25 AM

can't get this working i installed tested it did a post with my "test user" logged out looged back in as admin locked the thread and finally checked the pm's on the test account but nope ... no errors at all but no pm either

pm is enabled on both accounts

Bison 12-22-2004 07:00 AM

The variables to delete, close and move aren't printing in the PM...

kall 12-22-2004 08:08 AM

Quote:

Originally Posted by Bison
The variables to delete, close and move aren't printing in the PM...

Oh dear, so they aren't. Thanks man.

Fixed install file uploaded...I think that's correct, it's 11PM here and I'm rapidly losing consciousness. :)

Delphiprogrammi 12-22-2004 09:02 AM

can't get this working no errors at all when i am done editing postings.php i upload the modified file to /forums/ then i goto

http://forums.mysite.com/admincp/opt...ing&do=options and i click save then i moderate a thread (i lock it) but no pm ....

Bison 12-22-2004 12:59 PM

Quote:

Originally Posted by kall
Oh dear, so they aren't. Thanks man.

Fixed install file uploaded...I think that's correct, it's 11PM here and I'm rapidly losing consciousness. :)

Thanks for the fix Kall, but there's still another problem ... if you "soft delete" a thread or post, and restore the same thread or post later later, no notification is sent when the thread was retored. Also, the delet fix didn't work. The $action variable is not storing values.

Delphiprogrammi 01-01-2005 11:03 AM

i can't get this to work pm's on my testaccount are on i did the database querys you instructions tell us todo then i edit postings.php i upload the modified file (overwriting the existing one) then i close a thread and login with the test account but no pm ??????

PHP Code:

$_REQUEST['forceredirect'] = 1;
    
$url "showthread.php?$session[sessionurl]t=$threadid";
    eval(
print_standard_redirect('redirect_openclose')); 

above that code i add code like your instructions tells us ... but nope :devious:

Filmrus 01-02-2005 04:32 PM

Hello,
I have found one problem in your script. When deleting one of any posts in the topic then confirmation message has been sending not to the author of the post but to the author of the topic. Could you please fix it?

kadafi_alive 01-04-2005 09:26 AM

Does anyone know how to do undo the database? I'm gettin' a error when I try to moderate threads and posts.

I want to do delete the SQL queries I ran, what queries do I've to type in to delete?

theArchitect 01-06-2005 11:14 PM

I am having a slight problem with this hack.

I didn't used it under 3.0.3 but have decided to under 3.0.4. However, I have noticed that whenever a thread is modified so too are the users settings for PM notification. The option is turned to on, and the user then needs to go into their user CP and turn them off again. It will then stay off for normal PMs but once another notification PM is sent about moderation the option is affected again.

Is this normal for the hack? If so is there a way to change his as it could become annoying.

Delphiprogrammi 01-11-2005 05:42 AM

now it works fine however one more small issue here it look like the $url variable isn't processed it just turns up as "located at URL $url" in the notification pm look at the attached image and you'll see what i mean


theArchitect,

look at this line of php code

PHP Code:

$DB_site->query("UPDATE " TABLE_PREFIX "user SET pmtotal=pmtotal+1, pmunread=pmunread+1, pmpopup=2 WHERE userid=$threadinfo[postuserid]"); 

that might help you

theArchitect 01-11-2005 08:15 PM

Quote:

Originally Posted by Delphiprogrammi
now it works fine however one more small issue here it look like the $url variable isn't processed it just turns up as "located at URL $url" in the notification pm look at the attached image and you'll see what i mean


theArchitect,

look at this line of php code

PHP Code:

$DB_site->query("UPDATE " TABLE_PREFIX "user SET pmtotal=pmtotal+1, pmunread=pmunread+1, pmpopup=2 WHERE userid=$threadinfo[postuserid]"); 

that might help you

So if I remove pmpopup=2 WHERE userid=$threadinfo[postuserid] then it should stop the popup from reactivating? Or do I change the pmpopup number?

Delphiprogrammi 01-11-2005 09:13 PM

i'm not sure but most of us have a testsite with a vbulletin installation (remember you have to call it 'testvb') and there you could test that i think the number controls wheter members want a notification about new pm's in a popup or not just an idea i have the author of this hack can help you better however

kadafi_alive 01-17-2005 05:38 AM

Quote:

Originally Posted by kadafi_alive
Does anyone know how to do undo the database? I'm gettin' a error when I try to moderate threads and posts.

I want to do delete the SQL queries I ran, what queries do I've to type in to delete?

Anyone figured it out?

The queries are:
Quote:

INSERT INTO `setting` (`varname`, `grouptitle`, `value`, `defaultvalue`, `optioncode`, `displayorder`, `advanced`, `volatile`) VALUES ('modpmfrom', 'posting', '1', '1', '', 140, 0, 0);
INSERT INTO phrase (phraseid, languageid, varname, `text`, phrasetypeid) VALUES (NULL, '0', 'setting_modpmfrom_title', 'User Who Sends Automatic PM on Moderation', '5000');
INSERT INTO phrase (phraseid, languageid, varname, `text`, phrasetypeid) VALUES (NULL, '0', 'setting_modpmfrom_desc', 'Enter the user ID of the person whose account you\'d like to be used when sending Auto Moderation PMs.', '5000');


INSERT INTO `setting` (`varname`, `grouptitle`, `value`, `defaultvalue`, `optioncode`, `displayorder`, `advanced`, `volatile`) VALUES ('modpmtext', 'posting', 'Hi $username,\r\n\r\nThis message is to advise that your $type titled "$threadinfo" has been $action.\r\n\r\nThe $type is located at this URL $url\r\n\r\nIf you have any questions, you can ask an administrator for assistance\r\n\r\nSincerely,\r\nThe $bbtitle staff.', 'Hi $username,\r\n\r\nThis message is to advise that your $type titled "$threadinfo" has been $action by $modby.\r\n\r\nThe $type is located at this URL $url\r\n\r\nIf you have any questions, you can ask an administrator for assistance\r\n\r\nSincerely,\r\nThe $bbtitle staff.', 'textarea', 150, 0, 0);
INSERT INTO phrase (phraseid, languageid, varname, `text`, phrasetypeid) VALUES (NULL, '0', 'setting_modpmtext_title', 'Auto PM on Moderation Text', '5000');
INSERT INTO phrase (phraseid, languageid, varname, `text`, phrasetypeid) VALUES (NULL, '0', 'setting_modpmtext_desc', 'Set the text of the PM sent to users on Moderation.<br />\r<br />\rNote: You can use the following variables to specify the <b>user\'s</b> information: $bbtitle, $username, $type, $action, $userid, $threadinfo, $modby.', '5000');


INSERT INTO `setting` (`varname`, `grouptitle`, `value`, `defaultvalue`, `optioncode`, `displayorder`, `advanced`, `volatile`) VALUES ('modpmtitle', 'posting', 'Your $type "$threadinfo" has been $action', 'Your $type "$threadinfo" has been $action', '', 160, 0, 0);
INSERT INTO phrase (phraseid, languageid, varname, `text`, phrasetypeid) VALUES (NULL, '0', 'setting_modpmtitle_title', 'Title Of the PM That is Sent on Thread Moderation', '5000');
INSERT INTO phrase (phraseid, languageid, varname, `text`, phrasetypeid) VALUES (NULL, '0', 'setting_modpmtitle_desc', 'Set the title of the PM that is sent to users when threads are moderated. You can use the same variables as above.', '5000');

Delphiprogrammi 01-20-2005 12:43 PM

Quote:

Originally Posted by Delphiprogrammi
now it works fine however one more small issue here it look like the $url variable isn't processed it just turns up as "located at URL $url"

fixed this issue myself look at the image :D

Paprika 02-06-2005 02:02 AM

Dude, I am tired. I just installed this Hack/Mod and the $action varible isn't being printed. No intent to be rude, or anything negative like that but it would be really nice if you fixed it. Thanks! :)

Meanwhile I am going to look into myself and probably will end up using generic message until you come back, but you are coming back... right?

OK, EDIT BIGTIME:
If you are having a problem like me where your $action varible isn't defined for some of the moderation tasks then listen up. After looking around and comparing blocks of code I deducted that the $action varible was straight up forgetten about in some of the If cases, so I added:

PHP Code:

$action "Deleted"

at line 380 of postings.php and now it is defined in the PMs. Using this pattern you should be able to fix all other PM variable issues.

See what I am saying?

Delphiprogrammi 03-31-2005 05:57 PM

hi people,

i made a small modification to this hack basicly it hyperlinks the url where a thread is located rater then just plain text where a user can't click on in the code of this hack a variable $newurl is used (except in delete thread &post) modify this variable like this

PHP Code:

$newurl="[URL=$vboptions[bburl]/showthread.php?$session[sessionurl]t=$threadid]newurl[/URL]"

note
$threadid is not always the same look in the instruction from this hack ....

SmartGnome 04-04-2005 08:05 AM

Great hack... .clicked install.

But this is the PM I get:

Code:


Hi SmartGnome,

This message is to advise that your thread titled "proxy test" has been by SmartGnome.

The thread is located at this URL DELETED

If you have any questions, you can ask an administrator for assistance

Sincerely,
The Anita's Lifestyle Board staff.

Any Idea why the link doesn't show ??

@Delphiprogrammi
Also not with your modification :disappointed:

Cheers
Smarty

Delphiprogrammi 04-04-2005 08:55 AM

Quote:

Originally Posted by SmartGnome
Great hack... .clicked install.

But this is the PM I get:

Code:


Hi SmartGnome,

This message is to advise that your thread titled "proxy test" has been by SmartGnome.

The thread is located at this URL DELETED

If you have any questions, you can ask an administrator for assistance

Sincerely,
The Anita's Lifestyle Board staff.

Any Idea why the link doesn't show ??

@Delphiprogrammi
Also not with your modification :disappointed:

Cheers
Smarty

you cannot link to a deleted thread / post that's pretty normal i guess since the deleted post is "deleted" i think vb temporarly stores deleted post/threads in another db table (for the restore option) but you will not get a hyperlinked $newurl with deleting posts / threads cause deletion is done when the board owner does not want the post/thread on his / her board


All times are GMT. The time now is 10:29 PM.

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.01323 seconds
  • Memory Usage 1,851KB
  • 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
  • (3)bbcode_code_printable
  • (5)bbcode_php_printable
  • (12)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