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?
|
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? |
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? |
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"); |
Where does this go exactly XD?
|
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! |
What's the trick to Automatically parse links in text ?
|
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:
|
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 |
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? |
Are you wanting to bulk email members based on a cron? If so the only thing I believe you need to do would be to figure out what you needed to populate when the cron is run (ie - subject, body, etc.)
Mark |
no, only want it to send 2 pms, but its not sending any, and the cron IS being run correctly.
|
I guess I'm confused as to why you are doing this with a cron. If you can provide some background it will give me a better idea of how it might be done.
As to the cron itself. How are you verifying that it is being run correctly? Is there some type of output being generated? Thanks Mark |
in my auction modification, a cron runs every 10 minutes which closes auctions and notifies buyer and seller of who won.
|
Um I have the below code in a cron job, and when it runs Im getting this error:
PHP Code:
Code:
// Fetch the PM message |
Quote:
|
PHP Code:
|
Quote:
|
actually if I take out the PM datamanager code temporarily...and replace with this:
Code:
$pmto_users[] = $pquery['username']; Its printing out CMUrick twice and I have no idea why. But its working kinda... jwocky: You need the code in this post I think to grab names and put em in an array, then you will get a different output in your tests. |
Quote:
Ok, i imploded the array $pmdm->errors in the same way you did above and got it to spit out the error code, turns out in my case, the user set to recieve the PM had his inbox full! argh. |
least urs might be working..mine keeps sending multiple PM's to the same person. argh
|
Quote:
|
Ok here is my code in my cron...stripped down to show the basic idea.
Code:
$userpointsqry = $vbulletin->db->query_read(" PHP Code:
I got it, Im an idiot |
i get an mySQL sytax error if i use this to send a PM to a user with an apostrophe in his name........any help?
Edit: Manually Escaping the apostrophe also doesnt work (generates a vbulletin error: cant find user) nevermind, its not a problem after all :D |
Any ideas how to override a full PM box in vb 3.6? the $pmdm->overridequota = true; doesn't seem to be working at all :(
|
$pmdm->overridequota = true; works fine for me. Although I think it needs to be right after you initialize the class like this:
$pmdm =& datamanager_init('PM', $vbulletin, ERRTYPE_ARRAY); $pmdm->overridequota = true; You might also need to set $botpermissions in set recipients like this: $pmdm->set_recipients($recipient, $botpermissions); |
Quote:
Thanks. |
Quote:
|
Well.. I have stored the userid into another custom table..and it is not the userid that is currently accessing the page. I didn't store the username..
If there is no way to send to the userid using the functions then I guess I can always just store the username also... Good point. |
Quote:
|
Yeah I didn't want to run another query it's a relatively small table.. but I just wasn't thinking and storing the username also is the smart move... thanks for waking me up :)
|
How do I send a PM to a user A (normal) and the same PM to user B (with BCC)? user B shall receive the same PM from A but user A should'nt know that user B got the PM too.
|
Quote:
|
Thank you for your useful and explicite answer .
I made a modul in wich a member can add a text. I want this member to receive a pm in case I erase his text. I have accomplished a modul but I want to know if the code is correct . Code:
//The link is : script.php?do=delete&p=$row['text_id'] |
Quote:
|
Quote:
This isn't the entire code , I wrote just the part that I was more intrested in . I am interested in the idea not in the code itself . Thanks . |
I am using this snippet on a non-VB page. Beforehand I am including the global.html and so on - as described in various "login from non-vb page" threads/hacks.
Code:
$pmdm =& datamanager_init('PM', $vbulletin, ERRTYPE_ARRAY); Quote:
|
Is there a way I can use this to automatically PM someone when they get an infraction?
|
Quote:
|
Is there a way I can call this from a link or button? Some hook I could use?
|
All times are GMT. The time now is 03:04 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 | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|