message limit in shoutbox lava

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

    message limit in shoutbox lava

    Hi all, I would like a way to limit the number of messages per day that each user can write in the shoutbox my chat lavalair (for example, each user can write a maximum of 5 messages in the shoutbox every 24 hours) thanks to who can help me

    #2
    i don't remember lava structure, so edit this to match your script. hope you will get it.

    when a user wants to post a message:

    $time = time() - 24*60*60;

    $howmuch = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM shoutbox WHERE poster = '".$user."' AND timepost > '".$time."'"));

    if ($howmuch[0] > 4)
    {
    echo "you have reached the maximum of 5 shouts / day";
    }
    else
    {
    insert process goes here
    }
    Last edited by Mysterio; 10.04.10, 22:32.
    mysterio.al - programming is a functional art

    Comment


      #3
      does not work, or maybe I don't know where to put it I did so $time = time() - 24*60*60;

      $howmuch = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM shoutbox WHERE poster = '".$user."' AND timepost > '".$time."'"));

      if ($howmuch[0] > 4)
      {
      echo "you have reached the maximum of 5 shouts / day";
      }
      else if($action=="shout")
      {
      $shtxt = $_POST["shtxt"];

      addonline(getuid_sid($sid),"Shouting","");

      echo "<head>";
      echo "<title>$sitename</title>";
      echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
      echo "</head>";
      echo "<body>";
      echo "<p align=\"center\">";
      if(getplusses(getuid_sid($sid))<75)
      {
      echo "<img src=\"../images/notok.gif\" alt=\"X\"/>You should have at least 75 plusses to shout!<br/><br/>";
      echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
      echo "</p>";
      echo "</body>";
      echo "</html>";
      exit();
      }
      if(istrashed(getuid_sid($sid)))
      {

      echo "<img src=\"../images/notok.gif\" alt=\"X\"/><br/>Unknown error cannot shout!<br/>please try again later...<br/><br/>";
      echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
      echo "</p>";
      echo "</body>";
      echo "</html>";
      exit();
      }else{
      $shtm = time();
      if(!isblocked($shtxt,$uid))
      {

      in genproc.php but don t work

      Comment


        #4
        yeah you just a noob!






        Code:
        $oras = time() - 24*60*60;
        
        $howmuch = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_shouts WHERE shouter = '".$uid."' AND shtime > '".$oras."'"));
        
        if ($howmuch[0] > 4)
        {
        echo "<div align=\"center\">";
        echo "<img src=\"../images/notok.gif\" alt=\"X\"/>";
        
        echo "you have reached the maximum of 5 shouts / day";
        
        echo "</div>";
        
        echo "</body>";
        echo "</html>";
        exit();
        }
        just add it whatever you want



        and click thanks!
        Last edited by wapmetal; 11.04.10, 09:22.
        com site: http://vampist.net
        download site: http://wapdloads.net
        fb: http://www.facebook.com/pmplx

        Comment


          #5
          yeah it work! thank you very much wapmetal

          Comment


            #6
            And wot r u wapmetal? Advanced? Lmao humour.

            Comment


              #7
              hahaha, lol
              this is why i am lazy to help some people some time
              mysterio.al - programming is a functional art

              Comment


                #8
                is it possible in lavalair that who have 100 plusses he can shout 5 in 24 hr......500 plusses he can 20 shout in 24 hr owners unlimited ?????is it possible?@@ anyone@specially mobile gigs my fav8 member

                Comment


                  #9
                  anything is possible, u just need the coding knowledge
                  Want something coded email me at sales@webnwaphost.com for a prices.




                  Comment


                    #10
                    if you know how to code then sky is the limit.... @shakil420, you need to add some extra lines on what wapmetal posts.
                    @ranabdboy, wml hoyeche to ki hoyeche code er xhtml tag gulo fele diye wml code lagao. your Probem solved.

                    Comment


                      #11
                      is it possible in lavalair that who have 100 plusses he can shout 5 in 24 hr......500 plusses he can 20 shout in 24 hr owners unlimited ?????is it possible?@@ anyone
                      I am just a brginer so its not possible to me to convert it wml...please post the wml code @anyone

                      Comment


                        #12
                        khan89 ## pls post wml dtails

                        Comment

                        Working...
                        X