![]() |
OK this is something I meant to do a while ago but
seeing it in 2.0 reminded me. So for all you 1.x'ers, here is PM pop ups to alert you to new PM's no matter where you are on the board. I have no idea if this is the same functionality as 2.0's, I don't have the code, so this is from scratch. 1) Create table: CREATE TABLE pmpopup ( fromid smallint(5) DEFAULT '0' NOT NULL, fromname varchar(50) NOT NULL, toid smallint(5) DEFAULT '0' NOT NULL, msgid mediumint(8) DEFAULT '0' NOT NULL, title varchar(100) NOT NULL, UNIQUE toid (toid) ); 2) Modify your user table: ALTER TABLE user ADD pmpopup TINYINT (1) DEFAULT '1' not null ; 3) In private.php FIND: Code:
$senderid = verifyusername($username,$password); Code:
$senderid = verifyusername($username,$password); 4) Right below that in Private.php FIND: Code:
$DB_site->query("INSERT INTO pmstats (id, toid, fromid, datetime) VALUES (NULL, '$touserid', '$senderid', NOW())"); Code:
// PM POP UP HACK 5) Open global.php and FIND: Code:
// load vars Code:
// PM POP UP HACK 6) Last step. Open up your footer template and at the bottom above $CloseDB, ADD: $javascriptalert That's it, enjoy your 2.0 pop up functionality ;) If you want to give your users an option to turn it off, you'll have to edit your profile options page and give it a radio button. |
Hi,
have everyone a installer to create tables automaticly? i´m not so firm to create tables manually greets Mrd |
All times are GMT. The time now is 02:09 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|