Pop-up pm

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Pop-up pm

    I need a script for pop up messages! pls give me
    http://www.youtube.com/watch?v=vsLkpcFKbOk

    #2
    u need to learn how to ask nicely . cos no one gonna help if u ask like that.
    Wapchat4u


    Topsites4u

    Comment


      #3
      Usage
      Code:
      getalert($sid);
      in ur cpanel or where ppl can turn on the allerts
      Code:
      if (alertstat($sid)==0){
      echo "<a href=\"index.php?action=alert&amp;sid=$sid\">»Turn alerts on</a><br/>";
      }
      else{
      echo "<a href=\"index.php?action=alert&amp;sid=$sid\">»Turn alerts off</a><br/>";
      }
      any place in the index
      Code:
      /////////////////////////////turn alerts on or off////////////////////
      else if($action=="alert")
      {
      addonline($uid,"Toggling alerts","index.php?action=$action");
      gettimebar();
      getnewmsg($sid);
      getalert($sid);
      getshouts($sid);
      boxstart("Toggle Alerts");
      $userwa = $uid;
      if(alertstat($sid)==0){
              mysql_query("UPDATE ibwf_users SET alert=1 WHERE id=$userwa");
              echo "<p>Alerts have been successfully activated<br/>";
      }
      else if(alertstat($sid)==1){
              mysql_query("UPDATE ibwf_users SET alert=0 WHERE id=$userwa");
              echo "<p>Alerts have been successfully de-activated<br/>";
      }
      echo "</p>";
      boxend();
      getfooter($sid);
      }
      in core.php
      Code:
      function getalert($sid){
      
          if (alertstat($sid)==1){
      
          $userid = getuid_sid($sid);
      
              $count = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM ibwf_private WHERE touid = $userid AND unread='1'"));
      
              if($count[0]>0){
      
          $lastmsg_id = mysql_fetch_array(mysql_query("SELECT MIN(id) FROM ibwf_private WHERE touid = $userid AND unread='1'"));
      
              $pminfo = mysql_fetch_array(mysql_query("SELECT text, timesent, byuid, reported FROM ibwf_private WHERE id = $lastmsg_id[0]"));
      
          if(isonline($pminfo[2])){
      
      $iml = "<img src=\"http://coding-talk.com/images/onl.gif\" alt=\"On\"/>";
      
      }else{
      
      $iml = "<img src=\"http://coding-talk.com/images/ofl.gif\" alt=\"Off\"/>";
      
      }
      
      $msgtxt = "
      
          <div class=\"boxed\">
      
            <div class=\"boxedTitle\">
      
              <h1 align=\"center\" class=\"boxedTitleText\"><b>Message Alert</b>
      
          </h1>
      
            </div>
      
            <div class=\"boxedContent\">
      
      ";
      
      $msgtxt .= "<small><b>From</b>: $iml<a href=\"index.php?action=viewuser&amp;who=$pminfo[2]&amp;sid=$sid\">".getnick_uid($pminfo[2])."</a><br/>";
      
      $tmstamp = $pminfo[1] + addhours();
      
      $tmdt = date("d/m/Y h:i:s A", $tmstamp);
      
      $diff1=time()-$pminfo[1];
      
      $msgtxt .= "<b>Sent</b>: $tmdt<br/>".gettimemsg($diff1)."<br/>";
      
      $pmtext = parsepm($pminfo[0], $sid);
      
      if(isspam($pmtext)){
      
      if(($pminfo[3]=="0") && ($pminfo[2]!=1)){
      
      mysql_query("UPDATE ibwf_private SET reported='1' WHERE id='".$pmid."'");
      
      }
      
      }
      
      $msgtxt .= "<b>Message</b>:<br/>".$pmtext;
      
      $msgtxt .= "<u><br/>Reply:</u>:<br/>";
      
      $msgtxt .= "<form action=\"inbxproc.php?action=sendpm&amp;who=$pminfo[2]&amp;sid=$sid\" method=\"post\"><textarea id=\"inputText\" name=\"pmtext\"></textarea><br/>";
      
      $msgtxt .= "<input id=\"inputButton\" type=\"submit\" value=\"Send\"/>";
      
      $msgtxt .= "</form>";
      
      $msgtxt .= "<br/><a href=\"inbox.php?action=main&amp;sid=$sid\">Go to Inbox</a><br/></small></div></div>";
      
      mysql_query("UPDATE ibwf_private SET unread='0' WHERE id = $lastmsg_id[0]");
      
      echo $msgtxt;
      
      return;
      
      }
      
      else {
      
          return "";
      
      }
      
      }
      
      else {
      
          return "";
      
      }
      
      }function getppp($uid){
      
          $ppp = mysql_fetch_array(mysql_query("SELECT ppp FROM ibwf_users WHERE id = $uid"));
      
          return $ppp[0];
      
      }
      function alertstat($sid){
      
          $userid=getuid_sid($sid);
      
          if(!$userid){
      
              return 0;
      
          }
      
      $alerstat = mysql_fetch_array(mysql_query("SELECT alert FROM ibwf_users WHERE id = $userid"));
      
      return $alerstat[0];
      
      }
      here are the sql add in ibwf_user
      Code:
       `alert` int(1) NOT NULL default '0',
      This code will make ur pm shown as a popup dnt know if thats what u want
      NEXT TIME USE THE SEARCH BUTTON

      Comment


        #4
        ..i th ink he can't speak engLish too much

        ..Like me ~LoL~
        Did I help you?
        You can help me too
        Your donations will help me finance my studies.

        Comment


          #5
          tnx 4 code
          http://www.youtube.com/watch?v=vsLkpcFKbOk

          Comment

          Working...
          X