vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=34)
-   -   New pm alert (a replacement for pm popup) (https://vborg.vbsupport.ru/showthread.php?t=59890)

Brad 01-08-2004 04:05 PM

I have fixed the problems with avatars, if you have already installed this hack replace the block in global.php with this:

PHP Code:

// #############################################################################
// get new private message alert - hack
$newpmmsg 0;
$shownewpm false;
if (
$vboptions['checknewpm'] AND $bbuserinfo['userid'] AND $bbuserinfo['pmpopup'] == 2)
{
    
$DB_site->shutdown_query("UPDATE " TABLE_PREFIX "user SET pmpopup = 1 WHERE userid = $bbuserinfo[userid]"'pmpopup');
    if (
THIS_SCRIPT != 'private')
    {
        
$newpmmsg 1;
        
$newpm $DB_site->query_first("
            SELECT pmtext.title, fromusername, fromuserid
            FROM " 
TABLE_PREFIX "pmtext AS pmtext
            LEFT JOIN " 
TABLE_PREFIX "pm AS pm USING(pmtextid)
            WHERE pm.userid = 
$bbuserinfo[userid]
            ORDER BY pmtext.dateline DESC
            LIMIT 1
        "
);

        require_once(
'./includes/functions_user.php');
        
$pm_avaurl fetch_avatar_url($newpm['fromuserid']);

        if (empty(
$pm_avaurl))
        {
            
$showpm_ava false;
        }
        else
        {
            
$showpm_ava true;
        }
        
// end hack - new pm notifacation    
        
$newpm['username'] = unhtmlspecialchars($newpm['fromusername'], true);
        
$newpm['title'] = unhtmlspecialchars($newpm['title'], true);
        
$shownewpm true;
        
    }



Brad 01-08-2004 04:08 PM

Quote:

Originally Posted by albibak
Little remark :

If you have the welcome panel installed, a modification will be do :

Find in the .txt installation file

PHP Code:

---------------------
Open templatenavbar
---------------------

At the very end of the template add:

<
br />
$newpm 

and replace by :

PHP Code:

---------------------
Open templateforumhome
---------------------

add below [$welcome_panel], :

<
br />
$newpm 


That template modification can cause some un-desired effects because this is ment to function on the global scale, to make it only show on index.php replace:

PHP Code:

if (THIS_SCRIPT != 'private'

With:

PHP Code:

if (THIS_SCRIPT != 'private' AND THIS_SCRIPT == 'index'


albibak 01-08-2004 04:18 PM

Only for people who has the welcome panel allright ?

albibak 01-08-2004 04:21 PM

Problems with ' and avatars are solved.
Thx

Brad 01-08-2004 04:22 PM

Quote:

Originally Posted by albibak
Only for people who has the welcome panel allright ?

Yes. Or any other modification to this hack that removes it from a global template.

albibak 01-08-2004 04:26 PM

I'm glad to contribute to improve this hack, because I think it's a good hack :)

albibak 01-08-2004 04:57 PM

A little suggestion :

I think it's a good idea to let the alert for a new mp if a member don't read his mp directly, now ?

Brad 01-08-2004 05:03 PM

Quote:

Originally Posted by albibak
A little suggestion :

I think it's a good idea to let the alert for a new mp if a member don't read his mp directly, now ?

Im sorry but I cant understand your english :(

albibak 01-08-2004 05:11 PM

Sorry, for my bad english.

example (you had installed this hack here):

Imagine you go to vbulletin.org and you have a new mp. The box appear, but you don't read your pm now.
1 hours after you go to vbulletin.org, and now, the box don't appear.

I think it's more cool to let the box if you have don't read your pm, no ?

gmarik 01-08-2004 05:31 PM

Not bad. Can you add any dynamic element to it (gif or mid) so I really get noticed about the new msg?


All times are GMT. The time now is 06:41 AM.

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.01091 seconds
  • Memory Usage 1,755KB
  • 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
  • (5)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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