PDA

View Full Version : [RELEASE 1.x] PM Pop-up Alerts


Overgrow
13 Mar 2001, 22:20
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:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



and REPLACE WITH:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------




4) Right below that in Private.php FIND:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



and ADD BELOW THAT:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------




5) Open global.php and FIND:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



ADD BELOW THAT:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------




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.

Mrd
17 Jun 2001, 20:24
Hi,
have everyone a installer to create tables automaticly?
i´m not so firm to create tables manually

greets Mrd