Alerts/popup
Started on the old forum in February 2007 · view the original in the archive · old links redirect here
TL;DR · summary of 119 replies
- - The fix for the popup script was not fully resolved as some users still had issues with their popups not appearing.
- - Users were advised to change $(msg) to $msg in the code, and place the include statement where they wanted the popup message to show up on their site.
- - Subzero suggested creating a separate file (like 1.php) for the include statement, which could be placed anywhere on the page where the popup should appear.
- - The thread concluded with users trying different configurations of popups.php and lists.php, but some still had issues getting the popups to work.
Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.
hey all even in having problem with pop up on my rw script could someone tell me wht exactly is wrong here oh lists.php i added like this
//////////////////////////////////Pop-Up
else if($action=="sendto"){
addonline(getuid_sid($sid),"Sending pop-up MSG",""); echo "<card id="main" title="popups">"; echo " "; echo "$getbuttons
"; $whonick = getnick_uid($who); $byuid = getuid_sid($sid); echo "Sending to ".$whonick." "; echo "<input name="msg" maxlength="150"/> "; echo "<anchor>SEND<go href="popus.php?action=send&who=$who&sid=$sid" method="post">"; echo "<postfield name="msg" value="$(msg)"/>"; echo "<postfield name="who" value="$(who)"/>"; echo "</go></anchor> "; echo "
<a href="index.php?action=main&sid=$sid">Home</a> "; echo " "; echo "</card>"; }
then on users profile where u have send pm i added link like this
echo ""; } echo "<a href="lists.php?action=sendto&sid=$sid">Send Pop-Up</a> "; echo "<a href="inbox.php?action=sendpm&who=$who&sid=$sid">Send PM</a> "; $uid = getuid_sid($sid); if(budres($uid, $who)==0) { echo "<a href="genproc.php?action=bud&who=$who&sid=$sid&todo=add">Add to buddy list</a> "; }else if(budres($uid, $who)==1)
and after clickin on send popup till next page it works fine i get input box and send msg but after i click on send the next page i get this
Warning: Cannot modify header information - headers already sent by (output started at /home/xxxx/domains/xxx.com/public_html/popus.php:1) in /home/xxxx/domains/xxx.com/public_html/popus.php on line 2
Warning: Cannot modify header information - headers already sent by (output started at /home/xxxx/domains/xxxx.com/public_html/popus.php:1) in /home/xxxx/domains/xxx.com/public_html/re/popus.php on line 3
Popup Message Sent to !
Home
and on main index page i added include
echo " "; include ('popups.php'); echo "
";
but somethin strange i see where i added this code there is this symbol
can someone of you please guide me what i did wrong and where???
Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!
hey all even in having problem with pop up on my rw script could someone tell me wht exactly is wrong here oh lists.php i added like this //////////////////////////////////Pop-Up
else if($action=="sendto"){
addonline(getuid_sid($sid),"Sending pop-up MSG",""); echo "<card id="main" title="popups">"; echo " "; echo "$getbuttons
"; $whonick = getnick_uid($who); $byuid = getuid_sid($sid); echo "Sending to ".$whonick." "; echo "<input name="msg" maxlength="150"/> "; echo "<anchor>SEND<go href="popus.php?action=send&who=$who&sid=$sid" method="post">"; echo "<postfield name="msg" value="$(msg)"/>"; echo "<postfield name="who" value="$(who)"/>"; echo "</go></anchor> "; echo "
<a href="index.php?action=main&sid=$sid">Home</a> "; echo " "; echo "</card>"; } then on users profile where u have send pm i added link like this echo ""; } echo "<a href="lists.php?action=sendto&sid=$sid">Send Pop-Up</a> "; echo "<a href="inbox.php?action=sendpm&who=$who&sid=$sid">Send PM</a> "; $uid = getuid_sid($sid); if(budres($uid, $who)==0) { echo "<a href="genproc.php?action=bud&who=$who&sid=$sid&todo=add">Add to buddy list</a> "; }else if(budres($uid, $who)==1) and after clickin on send popup till next page it works fine i get input box and send msg but after i click on send the next page i get this Warning: Cannot modify header information - headers already sent by (output started at /home/xxxx/domains/xxx.com/public_html/re/popus.php:1) in /home/xxxx/domains/xxx.com/public_html/re/popus.php on line 2
Warning: Cannot modify header information - headers already sent by (output started at /home/xxxx/domains/xxxx.com/public_html/re/popus.php:1) in /home/xxxx/domains/xxx.com/public_html/re/popus.php on line 3 Popup Message Sent to !
Home and on main index page i added include echo " "; include ('popups.php'); echo "
"; but somethin strange i see where i added this code there is this symbol can someone of you please guide me what i did wrong and where???
use it
add this code in ur index.php
echo"<a href="index.php?action=viewbud&who=$who&sid=$sid">Send pop up msg</a> ";
b4
echo "<a href="inbox.php?action=sendpm&who=$who&sid=$sid">Send PM</a> "; External image (may be gone) External image (may be gone)
its not workin it takes me to the main login page:(
Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!
its not workin it takes me to the main login page:(
just given my scripts which is working fine,find out where u made mistakes by urself External image (may be gone)
atleast tell me bro how do you people link it exactly and do i have to also do somethin in lists.php ect?
Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!
atleast tell me bro how do you people link it exactly and do i have to also do somethin in lists.php ect?
man i gave u a complete script with a read me.txt,in my script u can find an action index.php n the link is
echo"<a href="index.php?action=viewbud&who=$who&sid=$sid">Send pop up msg</a> "
and the link 4 ur codes in list.php will b
echo"<a href="lists.php?action=sendto&who=$who&sid=$sid">Send pop up msg</a> " External image (may be gone) External image (may be gone)
ok i did everythin right bro but after i click on send popup i get this
Fatal error: Call to undefined function getuid_sid() in /home/xxxx/domains/xxx.com/public_html/pops.php on line 4
Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!
and when i click on this link
echo"<a href="index.php?action=viewbud&who=$who&sid=$sid">Send pop up msg</a> "
it takes me to main index page where u login
Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!
hey bro thanks alot i got it to work finally External image (may be gone)
Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!
and when i click on this link
echo"<a href="index.php?action=viewbud&who=$who&sid=$sid">Send pop up msg</a> "
it takes me to main index page where u login
u might nt follow the directions of my readme.txt.do u think PHP will work as ur own wish?
add this codes
in ur index.php
else if($action=="viewbud") { addonline(getuid_sid($sid),"Viewing buddy","index.php?action=viewbud&who=$who"); echo "<card id="main" title="buddylist">";
echo "
";
$sql = "SELECT a.lastact, a.name, a.id, b.uid, b.tid, b.reqdt FROM ibwf_users a INNER JOIN ibwf_buddies b ON (a.id = b.uid) OR (a.id=b.tid) WHERE (b.uid='".$uid."' OR b.tid='".$uid."') AND b.agreed='1' AND a.id!='".$uid."'";
$items = mysql_query($sql);
while ($item = mysql_fetch_array($items))
{
if(isonline($item[2]))
{ $iml = "<img src="images/onl.gif" alt="+"/>";
$plc = mysql_fetch_array(mysql_query("SELECT place FROM ibwf_online WHERE userid='".$item[2]."'"));
$uact .= $plc[0];
}else{ $iml = "<img src="images/ofl.gif" alt="-"/>"; $uact = "Last Active: "; $ladt = date("d m y-H:i:s", $item[0]); $uact .= $ladt; } }
$whonick = getnick_uid($who); if(arebuds($uid, $who)==true) { echo "<a href="index.php?action=viewuser&sid=$sid&who=$who">$whonick</a> "; echo "($uact) "; echo "pop-up message: "; echo "<input type="text" name="msg" maxlength="150"/>"; echo "<anchor>Send<go href="popup.php?action=send&sid=$sid" method="post">";
echo "<postfield name="who" value="$who"/>"; echo "<postfield name="msg" value="$(msg)"/>";
echo "</go></anchor>";
echo " <a href="inbox.php?action=sendpm&who=$who&sid=$sid">+ send message</a>"; echo " <a href="genproc.php?action=bud&who=$who&sid=$sid&todo=del">- remove from buddylist</a>"; }else{ echo "$whonick is not a buddy";
}
echo " <a href="index.php?action=main&sid=$sid">Home</a>"; echo " "; echo "</card>";
}
before
else{ /////////////////////////Main Page Here echo "<card id="main" title="nicechat">"; echo " "; echo "<img src="images/logo.gif" alt="*"/> "; echo "Welcome to our online music community "; $onu = getnumonline(); echo "Members Inside: $onu
";
echo "LOGIN or REGISTER to enjoy live chat, blogs, polls, mesage boards, online server games, and so much more. Absolutely free!"; echo " <a href="http:///yoursite.php">Your OWN Personal Site</a> "; echo "<a href="http:///rssservice.php">RSS music Feeds</a>
";
echo "UserID: <input name="loguid" format="*x" maxlength="30"/> "; echo "Password: <input type="password" name="logpwd" maxlength="30"/> "; echo "<anchor>LOGIN<go href="login.php" method="get">"; echo "<postfield name="loguid" value="$(loguid)"/>"; echo "<postfield name="logpwd" value="$(logpwd)"/>"; echo "</go></anchor>"; echo ""; echo " <a href="register.php">REGISTER</a> "; echo "<a href="index.php?action=terms&sid=$sid">TERMS OF USE</a>
"; echo "";
echo "";
echo "<a href="http://">nicechat(v2)</a> "; echo "© hardstyles"; echo " "; echo "</card>"; }
?>
</wml>hey bro thanks alot i got it to work finally External image (may be gone)
ok,nxt time never forget to follow the directions of read me.txt External image (may be gone) External image (may be gone)
jackk bro im converting ur script in xhtml but somethin not right could anyone of u help me out wots wrng in here coz when i try to send popup it says buddy not in list
pops.php
<?php $uid = getuid_sid($sid); $nopop = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_pops WHERE touid='".$uid."' AND unread='1'")); if($nopop[0]>0) { $sql ="SELECT * FROM ibwf_pops where touid='".$uid."' AND unread = '1' ORDER BY id LIMIT 0, 1"; $pd = mysql_query($sql); while ($pop = mysql_fetch_array($pd)) { $id = mysql_fetch_array(mysql_query("SELECT touid FROM ibwf_pops WHERE touid='".$uid."'")); if($uid==$id[0]) { $chread = mysql_query("UPDATE ibwf_pops SET unread='0' WHERE id='".$pop[0]."'"); } $dtop = date("d/m/y - H:i:s",$pop[5]); $by = getnick_uid($pop[2]); $msg = parsepm($pop[1], $sid); echo "**$by:** $msg - $dtop "; echo "<form action=\"popup.php?action=send&sid=$sid\" method=\"post\">"; echo "<input type=\"text\" name=\"msg\" maxlength=\"150\"/>"; echo "<input type=\"submit\" value=\"send pop up\"/>"; echo "<postfield name=\"who\" value=\"$pop[2]\"/>"; echo "<postfield name=\"msg\" value=\"$(msg)\"/>"; echo "</go></form>"; echo " --- "; } } -------------- popup.php <?php include("config.php"); include("core.php"); header("Content-type: text/html; charset=ISO-8859-1"); echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\"\"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">"; echo "<html xmlns="http://www.w3.org/1999/xhtml">";
echo "<head>";
echo "<title>$stitle</title>";
echo "<body bgcolor="#00FF00" link="#FFFF00" vlink="#FFFF00" alink="#FFFF00">";
echo "</head>";
echo "<body>";
connectdb(); $action = $_GET['action']; $sid = $_GET['sid']; $page = $_GET['page']; $who = $_GET['who']; $pmid = $_GET['pmid']; if(islogged($sid)==false) {
echo "
"; echo "You are not logged in "; echo "Or Your session has been expired
"; echo "<a href="index.php">Login</a>"; echo " "; exit(); } $uid = getuid_sid($sid); if(isbanned($uid)) {
echo "
"; echo "<img src="images/notok.gif" alt="x"/> "; echo "You are Banned "; $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_penalties WHERE uid='".$uid."' AND penalty='1'")); $remain = $banto[0]- time(); $rmsg = gettimemsg($remain); echo "Time to finish your penalty: $rmsg
"; //echo "<a href="index.php">Login</a>"; echo " "; exit(); }
if($action=="send") { $who=$_POST["who"]; $msg=$_POST["msg"];
addonline(getuid_sid($sid),"Sending pop-up MSG",""); echo "<card id="main" title="Pop-Up Sent">";
echo "
"; $whonick = getnick_uid($who); $byuid = getuid_sid($sid); $tm = time(); if(arebuds($byuid, $who)==true) { $res = mysql_query("INSERT INTO ibwf_pops SET text='".$msg."', byuid='".$byuid."', touid='".$who."', timesent='".$tm."'"); if($res) { include("pops.php"); echo "<img src="images/ok.gif" alt="O"/> "; echo "Popup Message Sent to $whonick! "; }else{ echo "<img src="images/notok.gif" alt="X"/> "; echo "Can't Send Message to $whonick
"; } }else{ echo "Name is not in buddylist!"; } echo "
<a href="index.php?action=main&sid=$sid"><img src="images/home.gif" alt="*"/>"; echo "Home</a>"; echo " "; echo "</body>"; } else if($action=="archive") { echo "<card id="main" title="xxx">";
echo "</body>";
}
else{ /////////////////////////Main Page Here echo "<card id="main" title="xxx">"; echo " ";
echo " "; echo "</body>"; }
?>
</html>index.php
else if($action=="viewbud") { addonline(getuid_sid($sid),"Viewing buddy","index.php?action=viewbud&who=$who"); echo "<card id="main" title="buddylist">";
echo "
";
$sql = "SELECT a.lastact, a.name, a.id, b.uid, b.tid, b.reqdt FROM ibwf_users a INNER JOIN ibwf_buddies b ON (a.id = b.uid) OR (a.id=b.tid) WHERE (b.uid='".$uid."' OR b.tid='".$uid."') AND b.agreed='1' AND a.id!='".$uid."'";
$items = mysql_query($sql);
while ($item = mysql_fetch_array($items))
{
if(isonline($item[2]))
{ $iml = "<img src="images/onl.gif" alt="+"/>";
$plc = mysql_fetch_array(mysql_query("SELECT place FROM ibwf_online WHERE userid='".$item[2]."'"));
$uact .= $plc[0];
}else{ $iml = "<img src="images/ofl.gif" alt="-"/>"; $uact = "Last Active: "; $ladt = date("d m y-H:i:s", $item[0]); $uact .= $ladt; } }
$whonick = getnick_uid($who); if(arebuds($uid, $who)==true) { echo "<a href="index.php?action=viewuser&sid=$sid&who=$who">$whonick</a> "; echo "($uact) "; echo "pop-up message: "; echo "<form action="popup.php?action=send&sid=$sid" method="post">"; echo "<input type="text" name="msg" maxlength="150"/>"; echo "<input type="submit" value="SEND"/>";
echo "<postfield name="who" value="$who"/>"; echo "<postfield name="msg" value="$(msg)"/>";
echo "</go></form>";
//echo " <a href="index.php?action=sendpm&who=$who&sid=$sid">+ send message</a>"; echo " <a href="inbox.php?action=sendpm&who=$who&sid=$sid">+ send message</a>"; echo " <a href="genproc.php?action=bud&who=$who&sid=$sid&todo=del">- remove from buddylist</a>"; }else{ echo "$whonick is not a buddy";
}
echo " <a href="index.php?action=main&sid=$sid">Home</a>"; echo " "; echo "</body>";
}
someone help me please
Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!
jackk bro im converting ur script in xhtml but somethin not right could anyone of u help me out wots wrng in here coz when i try to send popup it says buddy not in list
pops.php
<?php $uid = getuid_sid($sid); $nopop = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_pops WHERE touid='".$uid."' AND unread='1'")); if($nopop[0]>0) { $sql ="SELECT * FROM ibwf_pops where touid='".$uid."' AND unread = '1' ORDER BY id LIMIT 0, 1"; $pd = mysql_query($sql); while ($pop = mysql_fetch_array($pd)) { $id = mysql_fetch_array(mysql_query("SELECT touid FROM ibwf_pops WHERE touid='".$uid."'")); if($uid==$id[0]) { $chread = mysql_query("UPDATE ibwf_pops SET unread='0' WHERE id='".$pop[0]."'"); } $dtop = date("d/m/y - H:i:s",$pop[5]); $by = getnick_uid($pop[2]); $msg = parsepm($pop[1], $sid); echo "**$by:** $msg - $dtop "; echo "<form action=\"popup.php?action=send&sid=$sid\" method=\"post\">"; echo "<input type=\"text\" name=\"msg\" maxlength=\"150\"/>"; echo "<input type=\"submit\" value=\"send pop up\"/>"; echo "<postfield name=\"who\" value=\"$pop[2]\"/>"; echo "<postfield name=\"msg\" value=\"$(msg)\"/>"; echo "</go></form>"; echo " --- "; } } -------------- popup.php <?php include("config.php"); include("core.php"); header("Content-type: text/html; charset=ISO-8859-1"); echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\"\"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">"; echo "<html xmlns="http://www.w3.org/1999/xhtml">";
echo "<head>";
echo "<title>$stitle</title>"; echo "<body bgcolor="#00FF00" link="#FFFF00" vlink="#FFFF00" alink="#FFFF00">";
echo "</head>";echo "<body>"; connectdb(); $action = $_GET['action']; $sid = $_GET['sid']; $page = $_GET['page']; $who = $_GET['who']; $pmid = $_GET['pmid']; if(islogged($sid)==false) {
echo ""; echo "You are not logged in "; echo "Or Your session has been expired
"; echo "<a href="index.php">Login</a>"; echo " "; exit(); } $uid = getuid_sid($sid); if(isbanned($uid)) {
echo ""; echo "<img src="images/notok.gif" alt="x"/> "; echo "You are Banned "; $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_penalties WHERE uid='".$uid."' AND penalty='1'")); $remain = $banto[0]- time(); $rmsg = gettimemsg($remain); echo "Time to finish your penalty: $rmsg
"; //echo "<a href="index.php">Login</a>"; echo " "; exit(); } if($action=="send") { $who=$_POST["who"]; $msg=$_POST["msg"];
addonline(getuid_sid($sid),"Sending pop-up MSG",""); echo "<card id="main" title="Pop-Up Sent">";
echo ""; $whonick = getnick_uid($who); $byuid = getuid_sid($sid); $tm = time(); if(arebuds($byuid, $who)==true) { $res = mysql_query("INSERT INTO ibwf_pops SET text='".$msg."', byuid='".$byuid."', touid='".$who."', timesent='".$tm."'"); if($res) { include("pops.php"); echo "<img src="images/ok.gif" alt="O"/> "; echo "Popup Message Sent to $whonick! "; }else{ echo "<img src="images/notok.gif" alt="X"/> "; echo "Can't Send Message to $whonick
"; } }else{ echo "Name is not in buddylist!"; } echo "
<a href="index.php?action=main&sid=$sid"><img src="images/home.gif" alt="*"/>"; echo "Home</a>"; echo " "; echo "</body>"; } else if($action=="archive") { echo "<card id="main" title="xxx">";
echo "</body>";}
else{ /////////////////////////Main Page Here echo "<card id="main" title="xxx">"; echo " ";
echo " "; echo "</body>"; } ?>
</html>
index.php
else if($action=="viewbud") { addonline(getuid_sid($sid),"Viewing buddy","index.php?action=viewbud&who=$who"); echo "<card id="main" title="buddylist">";
echo "
";
$sql = "SELECT a.lastact, a.name, a.id, b.uid, b.tid, b.reqdt FROM ibwf_users a INNER JOIN ibwf_buddies b ON (a.id = b.uid) OR (a.id=b.tid) WHERE (b.uid='".$uid."' OR b.tid='".$uid."') AND b.agreed='1' AND a.id!='".$uid."'";
$items = mysql_query($sql);
while ($item = mysql_fetch_array($items)) { if(isonline($item[2])){ $iml = "<img src="images/onl.gif" alt="+"/>";
$plc = mysql_fetch_array(mysql_query("SELECT place FROM ibwf_online WHERE userid='".$item[2]."'")); $uact .= $plc[0];}else{ $iml = "<img src="images/ofl.gif" alt="-"/>"; $uact = "Last Active: "; $ladt = date("d m y-H:i:s", $item[0]); $uact .= $ladt; } } $whonick = getnick_uid($who); if(arebuds($uid, $who)==true) { echo "<a href="index.php?action=viewuser&sid=$sid&who=$who">$whonick</a> "; echo "($uact) "; echo "pop-up message: "; echo "<form action="popup.php?action=send&sid=$sid" method="post">"; echo "<input type="text" name="msg" maxlength="150"/>"; echo "<input type="submit" value="SEND"/>";
echo "<postfield name="who" value="$who"/>"; echo "<postfield name="msg" value="$(msg)"/>";
echo "</go></form>";
//echo " <a href="index.php?action=sendpm&who=$who&sid=$sid">+ send message</a>"; echo " <a href="inbox.php?action=sendpm&who=$who&sid=$sid">+ send message</a>"; echo " <a href="genproc.php?action=bud&who=$who&sid=$sid&todo=del">- remove from buddylist</a>"; }else{ echo "$whonick is not a buddy";
} echo " <a href="index.php?action=main&sid=$sid">Home</a>"; echo " "; echo "</body>";
}
someone help me please
is my scripts working i mean in wml?
brother its workin good in wml but in xhtml it aint could you please help me convert it in xhtml? i m getting error when i try to send pop up it says user not in buddylist
Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!
someone please help me fix the error in popup that i converted into xhtml im unable send pop up it says not in buddy list
Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!
waitin for help here aswell;)
Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!