The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Send PMs (automatically)
If you want to (automatically) send a PM to a user, you can use the Class vB_Datamanager_PM. This class makes sure that all values are correct, handles quota for the recipients, notification eMails, etc. Example PHP Code:
PHP Code:
If everything is OK PHP Code:
Quote:
$botpermissions must be the permissions for the sending user, but can just be empty. If you want to send PMs no matter if the PM box of the recipient is full or not: PHP Code:
Furthermore you can specify ($pmdm->set(...)):
For multiple receipients just use user1;user2;useer3. This How-To is (C) 2005 by KirbyDE and you are not allowed to redistribute it in any way without my explicit consent. |
#42
|
||||
|
||||
Does anyone know if there's a setting which can be used within ($pmdm->set(...)) for whether or not to parse html? In other words, if the text sent in the PM is allowed to use html?
|
#43
|
|||
|
|||
Was something changed on 3.6? This code no longer works:
PHP Code:
Okay, I got it working, but there is no popup for the user about a PM. Any ideas? |
#44
|
|||
|
|||
This seems like a good place to ask
I'm creating a link in a vB powered page (template) for a user to send a PM to me on a specific subject (just like you can do with EM very easily). I want it to open the PM, address it, and fill in the title of the PM, then wait for the user to enter their message. Can this be done in 3.6.1? |
#45
|
||||
|
||||
I have to do this to get private messages to update correctly in most cases. In a few specific cases, I don't have too. But, don't remember off the top my head which one.
Code:
$db->query_write("UPDATE vb_user SET pmunread=pmunread+1,pmtotal=pmtotal+1 WHERE userid=$userid"); |
#46
|
|||
|
|||
Where does this go exactly XD?
|
#47
|
||||
|
||||
Quote:
The only item that I can't get working is overriding the mailbox full restriction. I've used the code above but setting adminpermissions to 2 doesn't seem to work. In class_dm_pm.php, $overridequota = false seems to need to be set to "true" but I can't figure out how to do that. If you have a few minutes, I'd really appreciate help in figuring out how to set the variables so that the user will receive the PM even if his mailbox is full and he receives PMs only from buddies and sender is not on the list and not board staff. I'm pretty sure that can be achieved by setting $overridequota = true, just can't figure out how to do that. In class_dm_pm.php, line 80: PHP Code:
PHP Code:
Thx! |
#48
|
|||
|
|||
What's the trick to Automatically parse links in text ?
|
#49
|
||||
|
||||
Quote:
[code]text My problem is: it isn't count my auto-PM into PM's quota. I found this in the previous page but it is too.... (no word to say!) Quote:
|
#50
|
||||
|
||||
Quote:
PHP Code:
PHP Code:
Mark When testing my auto send pm's code I kept seeing users that had pmpopup (popup-based pm notification) not being updated when I sent my auto pm. If a user has pmpopup notification on this column should show as "1" in the user table. If they receive a new message and haven't read it yet it should show as "2" in the user table. The two denotes that there is an unread popup. In the case where I was sending a message to multiple recipients I noticed that only the last of the recipients that also had pmpopup notification was having the pmpopup column updated to "2" while other's weren't. In debuggint this problem I found that in the forums/includes/class_dm_pm.php file that line 557: PHP Code:
To resolve this I've commented the line out for now and also filed a bug report with vBulletin to get it resolved in a future release. I found this is 3.6.1 and also in 3.6.3. Hope this helps some others that found problems in getting this mod working as expected. Mark |
#51
|
||||
|
||||
Would i need to change anything to stick this into a cron?
If so what would i change If i dont need to change anything is it because im using 3.6.0 that its not working? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|