Popups For Lavascript That Work Well Here It Is

Started on the old forum in April 2007 · view the original in the archive · old links redirect here

15 replies · 1,923 views · started 19 years ago · 2 min read

TL;DR · summary of 15 replies
  • - The fix for the popups issue was suggested to edit the core.php and ibwf_user sql tables.
  • - However, some participants preferred a complete script rather than just parts of it.
  • - There were disagreements about whether using alert messages instead of popups is better.

Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.

5 participants
linkrx7 #1

put this in pages where u want popups to appear

      $unreadinbox=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE unread='1' AND touid='".$uid."'"));
    $pmtotl=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE touid='".$uid."'"));
    $unrd="(".$unreadinbox[0]."/".$pmtotl[0].")";
    
    
    if ($unreadinbox[0]>0)
    {
       $uid = getuid_sid($sid);

echo " "; $popsenabled=mysql_fetch_array(mysql_query("SELECT popmsg FROM ibwf_users WHERE id='".$uid."'")); if($popsenabled[0]==1) { $pminfo = mysql_fetch_array(mysql_query("SELECT id, text, byuid, timesent,touid, reported FROM ibwf_private WHERE unread='1' AND touid='".$uid."'")); $pmfrm = getnick_uid($pminfo[2]);

       $pmurd = mysql_query("UPDATE ibwf_private SET unread='0' WHERE id='".$pminfo[0]."'");
       echo "**POP-UP Message From $pmfrm**";
       echo "

"; $tmstamp = $pminfo[3]; $tmdt = date("d m Y - H:i:s", $tmstamp); $pmtext = parsepm($pminfo[1], $sid); $pmtext = str_replace("/llfaqs","<a href="lists.php?action=faqs&sid=$sid">$sitename F.A.Qs</a>", $pmtext); $pmtext = str_replace("/reader",getnick_uid($pminfo[4]), $pmtext); $pmid=$pminfo[0]; echo "Msg: $pmtext ";

       echo "Send Reply to $pmfrm

"; echo "<input name="pmtext" maxlength="500"/> "; echo "<anchor>SEND<go href="inbxproc.php?action=sendpm2&who=$pminfo[2]&sid=$sid&pmid=$pminfo[0]" method="post">"; echo "<postfield name="pmtext" value="$(pmtext)"/>"; echo "</go></anchor> "; $popmsgs = mysql_fetch_array(mysql_query("SELECT popmsg FROM ibwf_users WHERE id='".$uid."'")); if($popmsgs[0]==1){ echo "<a href="index.php?action=popdisable&sid=$sid">Disable PopUps</a> "; } // $res = mysql_query("INSERT INTO ibwf_online SET userid='".$uid."', actvtime='".$tm."', place='".$place."', placedet='".$plclink."'"); $location = mysql_fetch_array(mysql_query("SELECT placedet FROM ibwf_online WHERE userid='".$uid."'")); $loca = $location[0]; }else{ echo " <a href="inbox.php?action=main&sid=$sid">»Inbox$unrd</a>"; } echo " "; }

add ths next bit into inboxproc.php

else if($action=="sendpm2") { echo "<card id="main" title="Inbox">"; echo " "; $pmid = $_GET["pmid"]; $whonick = getnick_uid($who); $byuid = getuid_sid($sid); $tm = time(); $lastpm = mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM ibwf_private WHERE byuid='".$byuid."'")); $pmfl = $lastpm[0]+getpmaf(); $pmurd = mysql_query("UPDATE ibwf_private SET unread='0' WHERE id='".$pmid."'");

if($byuid==1)$pmfl=0; if($pmfl<$tm) { if(!isblocked($pmtext,$byuid)) { if((!isignored($byuid, $who))&&(!istrashed($byuid))) { $res = mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$byuid."', touid='".$who."', timesent='".$tm."'"); }else{ $res = true; } if($res) {

echo "<img src=\"../images/ok.gif\" alt=\"O\"/>";
echo "PM was sent successfully to $whonick

"; echo parsepm($pmtext, $sid);

}else{ echo "<img src="../images/notok.gif" alt="X"/>"; echo "Can't Send PM to $whonick

"; } }else{ $bantime = time() + (302460*60); echo "<img src="../images/notok.gif" alt="X"/>"; echo "Can't Send PM to $whonick

"; echo "You just sent a link to one of the crapiest sites on earth The members of these sites spam here a lot, so go to that site and stay there if you don't like it here as a result of your stupid action:

  1. you have lost your sheild
  2. you have lost all your plusses
  3. You are BANNED!"; $user = getnick_sid($sid); mysql_query("INSERT INTO ibwf_mlog SET action='autoban', details='Wap Desire auto banned $user for spamming inbox', actdt='".time()."'"); mysql_query("INSERT INTO ibwf_penalties SET uid='".$byuid."', penalty='1', exid='1', timeto='".$bantime."', pnreas='Banned: Automatic Ban for spamming for a crap site'"); mysql_query("UPDATE ibwf_users SET plusses='0', shield='0' WHERE id='".$byuid."'"); mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$byuid."', touid='1', timesent='".$tm."'"); } }else{ $rema = $pmfl - $tm; echo "<img src="../images/notok.gif" alt="X"/>"; echo "Flood control: $rema Seconds

"; } $uid = getuid_sid($sid); $location = mysql_fetch_array(mysql_query("SELECT placedet FROM ibwf_online WHERE userid='".$uid."'")); $loca = $location[0]; echo " <a href="$loca&sid=$sid">Ok!</a>"; if($lastloc=="cht"){ $popmsgs = mysql_fetch_array(mysql_query("SELECT popmsg FROM ibwf_users WHERE id='".$uid."'")); if($popmsgs[0]==0){ echo " <a href="index.php?action=popenable&sid=$sid">Enable Pop-Ups</a> "; }else{ echo " <a href="index.php?action=popdisable&sid=$sid">Disable Pop-Ups</a> "; } echo " <a href="chat.php?sid=$sid&rid=$rid">Back To $rname</a> "; echo "

<a href="inbox.php?action=main&sid=$sid">Inbox</a> "; echo "<a href="lists.php?action=buds&sid=$sid">BuddyList</a> "; echo "<a href="index.php?action=chat&sid=$sid">Chat</a> "; $fcats = mysql_query("SELECT id, name FROM ibwf_fcats ORDER BY position, id"); while($fcat=mysql_fetch_array($fcats)) { $catlink = "<a href="index.php?action=viewcat&sid=$sid&cid=$fcat[0]">$fcat[1]</a>"; echo "$catlink

"; } echo "<a href="index.php?action=main&sid=$sid"><img src="../images/home.gif" alt="*"/>"; echo "Home</a>"; echo " </card>"; }else{ $popmsgs = mysql_fetch_array(mysql_query("SELECT popmsg FROM ibwf_users WHERE id='".$uid."'")); if($popmsgs[0]==0){ echo " <a href="index.php?action=popenable&sid=$sid">Enable Pop-Ups</a> "; }else{ echo " <a href="index.php?action=popdisable&sid=$sid">Disable Pop-Ups</a> "; } echo "

<a href="inbox.php?action=main&sid=$sid">Inbox</a> "; echo "<a href="lists.php?action=buds&sid=$sid">BuddyList</a> "; echo "<a href="index.php?action=chat&sid=$sid">Chat</a> "; $fcats = mysql_query("SELECT id, name FROM ibwf_fcats ORDER BY position, id"); while($fcat=mysql_fetch_array($fcats)) { $catlink = "<a href="index.php?action=viewcat&sid=$sid&cid=$fcat[0]">$fcat[1]</a>"; echo "$catlink

"; } echo "<a href="index.php?action=main&sid=$sid"><img src="../images/home.gif" alt="*"/>"; echo "Home</a>"; echo " "; echo "</card>"; } }

now on each page wif popup u hav to add the pages link into the addonline function like this

addonline(getuid_sid($sid),"Main Menu","index.php?action=$action");

other wise when u type ur popup reply the next page wont let u bak to where u were u would get 404 not found

enjoy any questions feel free 2 ask me

Guest #2

where is pop up sql????

Guest #4

i just tried it did not work

Guest #6

put this in pages where u want popups to appear

      $unreadinbox=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE unread='1' AND touid='".$uid."'"));
    $pmtotl=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE touid='".$uid."'"));
    $unrd="(".$unreadinbox[0]."/".$pmtotl[0].")";
    
    
    if ($unreadinbox[0]>0)
    {
     $uid = getuid_sid($sid);

echo " "; $popsenabled=mysql_fetch_array(mysql_query("SELECT popmsg FROM ibwf_users WHERE id='".$uid."'")); if($popsenabled[0]==1) { $pminfo = mysql_fetch_array(mysql_query("SELECT id, text, byuid, timesent,touid, reported FROM ibwf_private WHERE unread='1' AND touid='".$uid."'")); $pmfrm = getnick_uid($pminfo[2]);

     $pmurd = mysql_query("UPDATE ibwf_private SET unread='0' WHERE id='".$pminfo[0]."'");
     echo "**POP-UP Message From $pmfrm**";
     echo "

"; $tmstamp = $pminfo[3]; $tmdt = date("d m Y - H:i:s", $tmstamp); $pmtext = parsepm($pminfo[1], $sid); $pmtext = str_replace("/llfaqs","<a href="lists.php?action=faqs&sid=$sid">$sitename F.A.Qs</a>", $pmtext); $pmtext = str_replace("/reader",getnick_uid($pminfo[4]), $pmtext); $pmid=$pminfo[0]; echo "Msg: $pmtext ";

     echo "Send Reply to $pmfrm

"; echo "<input name="pmtext" maxlength="500"/> "; echo "<anchor>SEND<go href="inbxproc.php?action=sendpm2&who=$pminfo[2]&sid=$sid&pmid=$pminfo[0]" method="post">"; echo "<postfield name="pmtext" value="$(pmtext)"/>"; echo "</go></anchor> "; $popmsgs = mysql_fetch_array(mysql_query("SELECT popmsg FROM ibwf_users WHERE id='".$uid."'")); if($popmsgs[0]==1){ echo "<a href="index.php?action=popdisable&sid=$sid">Disable PopUps</a> "; } // $res = mysql_query("INSERT INTO ibwf_online SET userid='".$uid."', actvtime='".$tm."', place='".$place."', placedet='".$plclink."'"); $location = mysql_fetch_array(mysql_query("SELECT placedet FROM ibwf_online WHERE userid='".$uid."'")); $loca = $location[0]; }else{ echo " <a href="inbox.php?action=main&sid=$sid">»Inbox$unrd</a>"; } echo " "; }

add ths next bit into inboxproc.php

else if($action=="sendpm2") { echo "<card id="main" title="Inbox">"; echo " "; $pmid = $_GET["pmid"]; $whonick = getnick_uid($who); $byuid = getuid_sid($sid); $tm = time(); $lastpm = mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM ibwf_private WHERE byuid='".$byuid."'")); $pmfl = $lastpm[0]+getpmaf(); $pmurd = mysql_query("UPDATE ibwf_private SET unread='0' WHERE id='".$pmid."'");

if($byuid==1)$pmfl=0; if($pmfl<$tm) { if(!isblocked($pmtext,$byuid)) { if((!isignored($byuid, $who))&&(!istrashed($byuid))) { $res = mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$byuid."', touid='".$who."', timesent='".$tm."'"); }else{ $res = true; } if($res) {

echo "<img src=\"../images/ok.gif\" alt=\"O\"/>";
echo "PM was sent successfully to $whonick

"; echo parsepm($pmtext, $sid);

}else{ echo "<img src="../images/notok.gif" alt="X"/>"; echo "Can't Send PM to $whonick

"; } }else{ $bantime = time() + (302460*60); echo "<img src="../images/notok.gif" alt="X"/>"; echo "Can't Send PM to $whonick

"; echo "You just sent a link to one of the crapiest sites on earth The members of these sites spam here a lot, so go to that site and stay there if you don't like it here as a result of your stupid action:

  1. you have lost your sheild
  2. you have lost all your plusses
  3. You are BANNED!"; $user = getnick_sid($sid); mysql_query("INSERT INTO ibwf_mlog SET action='autoban', details='Wap Desire auto banned $user for spamming inbox', actdt='".time()."'"); mysql_query("INSERT INTO ibwf_penalties SET uid='".$byuid."', penalty='1', exid='1', timeto='".$bantime."', pnreas='Banned: Automatic Ban for spamming for a crap site'"); mysql_query("UPDATE ibwf_users SET plusses='0', shield='0' WHERE id='".$byuid."'"); mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$byuid."', touid='1', timesent='".$tm."'"); } }else{ $rema = $pmfl - $tm; echo "<img src="../images/notok.gif" alt="X"/>"; echo "Flood control: $rema Seconds

"; } $uid = getuid_sid($sid); $location = mysql_fetch_array(mysql_query("SELECT placedet FROM ibwf_online WHERE userid='".$uid."'")); $loca = $location[0]; echo " <a href="$loca&sid=$sid">Ok!</a>"; if($lastloc=="cht"){ $popmsgs = mysql_fetch_array(mysql_query("SELECT popmsg FROM ibwf_users WHERE id='".$uid."'")); if($popmsgs[0]==0){ echo " <a href="index.php?action=popenable&sid=$sid">Enable Pop-Ups</a> "; }else{ echo " <a href="index.php?action=popdisable&sid=$sid">Disable Pop-Ups</a> "; } echo " <a href="chat.php?sid=$sid&rid=$rid">Back To $rname</a> "; echo "

<a href="inbox.php?action=main&sid=$sid">Inbox</a> "; echo "<a href="lists.php?action=buds&sid=$sid">BuddyList</a> "; echo "<a href="index.php?action=chat&sid=$sid">Chat</a> "; $fcats = mysql_query("SELECT id, name FROM ibwf_fcats ORDER BY position, id"); while($fcat=mysql_fetch_array($fcats)) { $catlink = "<a href="index.php?action=viewcat&sid=$sid&cid=$fcat[0]">$fcat[1]</a>"; echo "$catlink

"; } echo "<a href="index.php?action=main&sid=$sid"><img src="../images/home.gif" alt="*"/>"; echo "Home</a>"; echo " </card>"; }else{ $popmsgs = mysql_fetch_array(mysql_query("SELECT popmsg FROM ibwf_users WHERE id='".$uid."'")); if($popmsgs[0]==0){ echo " <a href="index.php?action=popenable&sid=$sid">Enable Pop-Ups</a> "; }else{ echo " <a href="index.php?action=popdisable&sid=$sid">Disable Pop-Ups</a> "; } echo "

<a href="inbox.php?action=main&sid=$sid">Inbox</a> "; echo "<a href="lists.php?action=buds&sid=$sid">BuddyList</a> "; echo "<a href="index.php?action=chat&sid=$sid">Chat</a> "; $fcats = mysql_query("SELECT id, name FROM ibwf_fcats ORDER BY position, id"); while($fcat=mysql_fetch_array($fcats)) { $catlink = "<a href="index.php?action=viewcat&sid=$sid&cid=$fcat[0]">$fcat[1]</a>"; echo "$catlink

"; } echo "<a href="index.php?action=main&sid=$sid"><img src="../images/home.gif" alt="*"/>"; echo "Home</a>"; echo " "; echo "</card>"; } }

now on each page wif popup u hav to add the pages link into the addonline function like this

addonline(getuid_sid($sid),"Main Menu","index.php?action=$action");

other wise when u type ur popup reply the next page wont let u bak to where u were u would get 404 not found

enjoy any questions feel free 2 ask me

scripts r nt complete like no action=popdisable in index.php smae case in action=popenable index.php,hw will ppl use these External image (may be gone) incomplete scripts

linkrx7 #7

i have made alot of modifications since then and there not part the inbox anymore they seperate plus its pretty easy to make a code to enable n disable lol

Guest #8

i have made alot of modifications since then and there not part the inbox anymore they seperate plus its pretty easy to make a code to enable n disable lol

if that you should post here complete script External image (may be gone)

linkrx7 #9

my complete script? lol keep dreaming i didnt do all my hard work 4 nothing i dnt mind helping ppl get few features going but puttin my whole script would take the fun away from ppl coding things themselves... ill try and post the full popup bits u need but may not work as most my script has been remade

Guest #10

my complete script? lol keep dreaming i didnt do all my hard work 4 nothing i dnt mind helping ppl get few features going but puttin my whole script would take the fun away from ppl coding things themselves... ill try and post the full popup bits u need but may not work as most my script has been remade

so why is this 4?

"enjoy any questions feel free 2 ask me"

linkrx7 #11

cos the original lavalair is shit lol thats why... with my touches i made it better and tonnes more secure

Guest #12

cos the original lavalair is shit lol thats why... with my touches i made it better and tonnes more secure

need only an complete popup scripts.no need to judge irisblaze's script External image (may be gone)

Guest #13

He's just a dickryder he doesnt have the complete script...let the real wap coders talk.!!!

ACIDCORE Junior · 30 posts #14

i think its better to use alert link rather than popups..in my script i have 2 messaging system..the main inbox and the other one is for the alert messages..popups is not "in" nowadays..btw its just my opinion..

woody Developer · 176 posts #15

ACIDCORE wrote: i think its better to use alert link rather than popups..in my script i have 2 messaging system..the main inbox and the other one is for the alert messages..popups is not "in" nowadays..btw its just my opinion..

and you felt it necessary to drag up a 5yr old topic to share that gem of information with us? 😌

spiritbreaker69 Junior · 12 posts #16

SQL

-- Table structure for table `minunga_popups`
--

CREATE TABLE IF NOT EXISTS `minunga_popups` (
  `id` int(100) NOT NULL AUTO_INCREMENT,
  `text` blob NOT NULL,
  `byuid` int(100) NOT NULL DEFAULT '0',
  `touid` int(100) NOT NULL DEFAULT '0',
  `unread` char(1) NOT NULL DEFAULT '1',
  `timesent` int(100) NOT NULL DEFAULT '0',
  `reported` char(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `minunga_popups`
--

On core.php

function popup($sid)
{
 $uid = getuid_sid($sid);
          $unreadpopup=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM minunga_popups WHERE unread='1' AND touid='".$uid."'"));

	       $popsenabled=mysql_fetch_array(mysql_query("SELECT popmsg FROM minunga_users WHERE id='".$uid."'"));
	       
	       $pminfo = mysql_fetch_array(mysql_query("SELECT id, text, byuid, timesent, touid, reported FROM minunga_popups WHERE unread='1' AND touid='".$uid."'"));
	       $pmfrm = getnick_uid($pminfo[2]);
		    $avlink = getavatar($pminfo[2]);
            
	       $popmsgbox .= "<div align=\"left\"><div class=\"a\"><div class=\"avatar\"><img src=\"$avlink\" alt=\"$id\" width=\"30\" height=\"30\"/></div>From $pmfrm";
	       $popmsgbox .= "<br/>";
	       $tmstamp = $pminfo[3];
		   $tmdt = date("d m Y - H:i:s", $tmstamp);
	       $pmtext = parsepm($pminfo[1], $sid);
    	   $pmtext = str_replace("/llfaqs","<a href=\"lists.php?action=faqs&sid=$sid\">$sitename F.A.Qs</a>", $pmtext);
    	   $pmtext = str_replace("/reader",getnick_uid($pminfo[4]), $pmtext);
    	   $pmid=$pminfo[0];
	       $popmsgbox .= "<br/>Message:<br/>$pmtext";
	  	 $popmsgbox .= "<form action=\"inboxproc.php?action=sendpopup&sid=$sid;&who=$pminfo[2]&pmid=$pminfo[0]\" method=\"post\">";
  		 $popmsgbox .= "<input name=\"pmtext\" maxlength=\"500\"/><br/>";
  		 $popmsgbox .= "<input type=\"Submit\" name=\"submit\" Value=\"Send\"></form>";
  		 $res = mysql_query("INSERT INTO minunga_online SET userid='".$uid."', actvtime='".$tm."', place='".$place."', placedet='".$plclink."'");
  		   $popmsgbox .= "<center><a href=\"genproc.php?action=skippopup&sid=$sid;&pmid=$pminfo[0]\">Skip Msg</a> ";
  		   $popmsgbox .= "<a href=\"inbxproc.php?action=rptpop&sid=$sid;&pmid=$pminfo[0]\">Report</a></div></div>";
              
               
  		   return $popmsgbox;
}

function ispopup($uid)
{
    $unreadpopup = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM minunga_popups WHERE unread='1' AND touid='".$uid."'"));
	return $unreadpopup[0];
}

on main menu after the session expyrd or the function of ban..

if(ispopup($uid))

    {

  echo "<head>";

  echo "<title>Popup Message</title>";

  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"$style[0]\"/>";

  echo "</head>";

  addonline(getuid_sid($sid),"Reading Popup Msg","");

echo "<div class=\"head\"><center><font color=\"white\">Popup Menu</font></center></div>";

echo "<center>View Popup Msg</center></div><br/>";

echo popup($sid);

echo "<div class=\"footer\"><cemter><a href=\"main.php\">Home";

echo "</div>";

echo "<div class=\"lcstyle\">All Rights Reserved<br/>© Lavalair.net</div>";

echo "</body>";

echo "</html>";

exit();

}

"Up, Up, Down, Down, Left, Right, Left, Right, SELECT, START AB"

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close