Go Back   vb.org Archive > News and Announcements > News and Announcements
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #41  
Old 05-17-2003, 03:19 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can't believe I missed it - thanks filburt1.

Okay, to make it so that if the "PM Email notification" is ON, the PM is automatically made READ when the Email is sent to you, do this:

Open private.php, find:

PHP Code:
  // enhanced
  
if ($prevmessageid) { 
Above it, add:

PHP Code:
$the_pm_id $DB_site->insert_id(); 
Those who installed the direct PM link will have the above line already from that hack.

Then, find:

PHP Code:
    if ($touserinfo[emailonpm]) { 
Underneath, add:

PHP Code:
        $DB_site->query("UPDATE privatemessage SET messageread=1, readtime='".time()."', receipt=2 WHERE privatemessageid=$the_pm_id"); 
Done.

This hack may interfere with other PM hacks. I've had to modify global.php as well. I hope it is all working now.
Reply With Quote
  #42  
Old 05-17-2003, 03:21 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What did you modify in the global.php?
Reply With Quote
  #43  
Old 05-17-2003, 03:24 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Isn't your code above the same code that was in the first message you posted it in?
Reply With Quote
  #44  
Old 05-17-2003, 03:27 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Basically, if you have the direct PM link hack installed, this mod interferes with it. So I disabled the PM popup code when you access private.php (which you don't need anyway since you are looking at your PMs).

You find this in global.php:

PHP Code:
    if ($hack_pm_total 1) { 
Above this, add:

PHP Code:
 if (strpos($_SERVER['PHP_SELF'], "private.php" ) == false) { 
Then, find:

PHP Code:
    eval("\$headnewpm = \"".gettemplate('head_newpm')."\";"); 
Below this, add:

PHP Code:


The PM code will not show up when you are at private.php, preventing the 2 hacks from interfering with each other.
Reply With Quote
  #45  
Old 05-17-2003, 03:28 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 02:24 PM Boofo said this in Post #48
Isn't your code above the same code that was in the first message you posted it in?
Yes, it was. I took it out because I had to fix the global.php error, but put it back, when I realized the easier way to do it was keep the code the same, and just modify global.php.
Reply With Quote
  #46  
Old 05-17-2003, 03:35 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for sorting this out. Great idea!

Also, I have the "Improved PM Popup Start" hack installed. This should all be ok together, shouldn't it?
Reply With Quote
  #47  
Old 05-17-2003, 03:39 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not familiar with that hack, but if it's working, then it should be ok.
Reply With Quote
  #48  
Old 05-17-2003, 03:44 AM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

so wait, let me get this straight. if you get an email with the pm content, the code in post 41 makes it so the pm is automatically made read. Whats the code in post 44 do? Does it stop the pm pop-up from happening?
Reply With Quote
  #49  
Old 05-17-2003, 04:16 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Mmm... your post numbers are different to mine... the private.php code is like you say, to make the message read if email is sent.

The global.php is OPTIONAL and only if you get a global.php error - this hack may interfere with the PM popup direct PM link hack (at least here anyway) - if so, put that piece of code in to fix it.
Reply With Quote
  #50  
Old 05-17-2003, 04:26 AM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ah, ok, but here the question. If you get email with the pm content, and the code you posted makes the pm automatically read, is there a way to not get the pm popup if you have email on pm's? It seems very redundant to get the email and the pm popup. I'm not talking about changing the setting in your user cp, but if a user has pm email notification set to yes, the pm pop-up would be turned off.
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 02:17 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.06804 seconds
  • Memory Usage 2,268KB
  • Queries Executed 13 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (8)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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