|
#1
|
|||
|
|||
popup message
hey guys,
I been fiddling with css and php to get a popup alert and I got this solution: Code:
<?php $res1 = @mysql_query("SELECT COUNT(*) FROM messages WHERE receiver=" . $CURUSER["id"] . " AND unread='yes'") or sqlerr(__LINE__,__FILE__); $arr1 = mysql_fetch_row($res1); $unread = $arr1[0]; $inbox = ($unread == 1 ? "$unread {$lang['gl_msg_singular']}" : "$unread {$lang['gl_msg_plural']}"); $email = true; if ( $unread >= "1" ) { echo "<div class='box' id='box'> <div style='margin-top: 400px;' id='popup'> <text><a style='float: right;' class='close' href='#' onclick=document.getElementById('id01').style.display='none'>×</a></text> <div class='content'> <div style='padding: 0.3em;'></div> <a href='#' class='close'></a> <text><a color: #ffffff;' href='messages.php'>$inbox</a></text> </div></div></div> "; } ?> else when you get message alert pops up: CSS: Code:
.overlay { position: fixed; top: 0; bottom: 0; left: 0; right: 0; background: rgba(0, 0, 0, 0.7); transition: opacity 500ms; visibility: hidden; opacity: 0; } .overlay:target { visibility: visible; opacity: 1; } .popup { margin-top: 590px; margin-left: 650px; padding: 20px; background: #fff; border-radius: 5px; width: 30%; position: relative; transition: all 5s ease-in-out; } .popup h2 { margin-top: 0; color: #333; font-family: Tahoma, Arial, sans-serif; } .popup .close { position: absolute; top: 20px; right: 30px; transition: all 200ms; font-size: 30px; font-weight: bold; text-decoration: none; color: #333; } .popup .close:hover { color: #06D85F; } .popup .content { max-height: 30%; overflow: auto; } @media screen and (max-width: 700px){ .box{ width: 70%; } .popup{ width: 70%; } } .overlay2 { position: fixed; top: 0; bottom: 0; left: 0; right: 0; background: rgba(0, 0, 0, 0.7); transition: opacity 500ms; visibility: hidden; opacity: 0; } .overlay2:target { visibility: visible; opacity: 1; } .popup2 { margin-left: 650px; padding: 20px; background: #fff; border-radius: 5px; width: 30%; position: relative; transition: all 5s ease-in-out; } .popup2 h2 { margin-top: 0; color: #333; font-family: Tahoma, Arial, sans-serif; } .popup2 .close { position: absolute; top: 20px; right: 30px; transition: all 200ms; font-size: 30px; font-weight: bold; text-decoration: none; color: #333; } .popup2 .close:hover { color: #06D85F; } .popup2 .content2 { max-height: 30%; overflow: auto; } @media screen and (max-width: 700px){ .box2{ width: 70%; } .popup2{ width: 70%; } } BamBam0077 Last edited by BamBam0077; 7th June 2018 at 08:40. Reason: Corrected Images, Corrected <?php tags |
#2
|
||||
|
||||
on this peace of code
Code:
<text><a color: #ffffff;' href='messages.php'>$inbox</a></text> Code:
color: #ffffff;' Code:
<text><a style='color: #ffffff;' href='messages.php'>$inbox</a></text>
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent Do not ask me to make a mod for any other source Do not Ask me to setup your site. I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Manager™ forum My Current Demo is here http://demo.btmanager.org/ |
The Following User Says Thank You to joeroberts For This Useful Post: | ||
BamBam0077 (9th June 2018)
|
#3
|
|||
|
|||
Just seen remove
Code:
$email = true; |
Tags |
message , popup |
|
|