Chatpost Requeired

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

    Chatpost Requeired

    guys how to code this and where to insert the code? It is like
    if(getplusses) code something like that.for example You Need 100+s To Shout In Lavalair script.then what is the code if we want to required chatpost before the user can create topic and post a reply.thanks in advance for those who wants to help.

    #2
    Originally posted by l0rdrayven View Post
    guys how to code this and where to insert the code? It is like
    if(getplusses) code something like that.for example You Need 100+s To Shout In Lavalair script.then what is the code if we want to required chatpost before the user can create topic and post a reply.thanks in advance for those who wants to help.
    add this to core.php

    Code:
    function chatpost($uid)
    
    {
    
        $cmsg = mysql_fetch_array(mysql_query("SELECT chmsgs FROM ibwf_users WHERE id='".$uid."'"));
    
        return $cmsg[0];
    
    }
    and edit genproc.php

    in else if($action=="shout") look for

    Code:
    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/>";
    and replace it with

    Code:
    if(chatpost(getuid_sid($sid))<100)
    
        {
    
        echo "<img src=\"../images/notok.gif\" alt=\"X\"/>You should have at least 100 chatpost to shout!<br/><br/>";
    also in index.php, in else if($action=="shout")

    look for

    Code:
    if(getplusses(getuid_sid($sid))<75)
        {
            echo "You need at least 75 plusses to shout!";
    and replace it with

    Code:
    if(chatpost(getuid_sid($sid))<100)
        {
            echo "You need at least 100 chatpost to shout!";
    Last edited by huwad; 10.07.09, 06:14.

    Comment


      #3
      How about 100 plusses for creating a new topic and 100 plusses for posting in forum! WHAT IS THE CODE FOR THIS? THANKS HUWAD!
      LESS TALK. LESS MISTAKE.

      HTTP://APPSROB.COM - LIST OF MY FACEBOOK APPS!

      Comment


        #4
        just change the value 75 to 100 for new topic 75 to 100 for posting in forum.

        Comment


          #5
          how about in posting and creating topics sir huwad.my shout page required 50 plusses and it is enough for me.all i want now is in forum.

          Comment


            #6
            Originally posted by l0rdrayven View Post
            how about in posting and creating topics sir huwad.my shout page required 50 plusses and it is enough for me.all i want now is in forum.
            lol..observe d script, if cpost < 100 then print u nid atleast 100 cpost to post reply else, is the code to post reply..got it?
            My Blog: http://jhommark.blogspot.com
            My Facebook: http://www.facebook.com/jhommark
            My Official Site: http://www.undergroundweb.tk
            My Community Site: http://undergroundwap.xtreemhost.com

            Comment


              #7


              nope.. you have to declare this to core.php to make it work

              Code:
              function chatpost($uid)
              
              {
              
                  $cmsg = mysql_fetch_array(mysql_query("SELECT chmsgs FROM ibwf_users WHERE id='".$uid."'"));
              
                  return $cmsg[0];
              
              }
              Last edited by huwad; 07.08.09, 02:22.

              Comment


                #8
                hmm.. How to do this?
                Need a 100 plusses/Chatpost to Create A New Topic?
                LESS TALK. LESS MISTAKE.

                HTTP://APPSROB.COM - LIST OF MY FACEBOOK APPS!

                Comment


                  #9
                  Originally posted by robzky View Post
                  hmm.. How to do this?
                  Need a 100 plusses/Chatpost to Create A New Topic?
                  add first the function that huwad had posted..then try this,
                  if(getplusses($uid)<100 && chatpost($uid)<100)
                  {
                  echo "You should have atleast 100 plusses and 100 chatposts to create new topic!!!";
                  }else{
                  put here the codes for creating new topic!
                  }
                  My Blog: http://jhommark.blogspot.com
                  My Facebook: http://www.facebook.com/jhommark
                  My Official Site: http://www.undergroundweb.tk
                  My Community Site: http://undergroundwap.xtreemhost.com

                  Comment


                    #10
                    PHP Code:
                    else if($action=="newtopic")
                    {
                      
                    $fid $_GET["fid"];
                      if(!
                    canaccess(getuid_sid($sid), $fid))
                        {
                        echo 
                    "<head>";
                        echo 
                    "<title>New Topic</title>";
                        echo 
                    "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
                        echo 
                    "</head>";
                        echo 
                    "<body>";
                          echo 
                    "<p align=\"center\">";
                          echo 
                    "You Don't Have A Permission To View The Contents Of This Forum<br/><br/>";
                          echo 
                    "<a href=\"index.php?action=main&amp;sid=$sid\">Home</a>";
                          echo 
                    "</p>";
                          echo 
                    "</body>";
                          echo 
                    "</html>";
                          exit();
                        }
                      
                    $mmsg htmlspecialchars(getsetmood(getuid_sid($sid)));
                        
                    addonline(getuid_sid($sid),"Creating new topic ($mmsg)","index.php?action=online");
                        echo 
                    "<head>";
                        echo 
                    "<title>New Topic</title>";
                        echo 
                    "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
                        echo 
                    "</head>";
                        echo 
                    "<body>";
                        echo 
                    "<p align=\"center\">";
                        echo 
                    "<form action=\"genproc.php?action=newtopic&amp;sid=$sid\" method=\"post\">";
                        echo 
                    "Title:<input name=\"ntitle\" maxlength=\"250\"/><br/>";
                        echo 
                    "Text:<input name=\"tpctxt\" maxlength=\"1000\"/><br/>";
                        echo 
                    "<input type=\"hidden\" name=\"fid\" value=\"$fid\"/>";
                        echo 
                    "<input type=\"submit\" value=\"Create\"/>";
                        echo 
                    "</form>";
                        
                    $fname getfname($fid);
                        echo 
                    "<br/><br/><b>9 </b><a accesskey=\"9\" href=\"index.php?action=viewfrm&amp;sid=$sid&amp;fid=$fid\">$fname</a><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>";


                    -Where can i add that code in my CREATING NEW TOPIC script..
                    thanks
                    LESS TALK. LESS MISTAKE.

                    HTTP://APPSROB.COM - LIST OF MY FACEBOOK APPS!

                    Comment


                      #11
                      lol i think that chatpost req idea is from. .. . Tnt (pinoy nga naman)

                      Comment


                        #12
                        PHP Code:
                        else if($action=="newtopic")
                        {
                          
                        $fid $_GET["fid"];
                          if(!
                        canaccess(getuid_sid($sid), $fid))
                            {
                            echo 
                        "<head>";
                            echo 
                        "<title>New Topic</title>";
                            echo 
                        "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
                            echo 
                        "</head>";
                            echo 
                        "<body>";
                              echo 
                        "<p align=\"center\">";
                              echo 
                        "You Don't Have A Permission To View The Contents Of This Forum<br/><br/>";
                              echo 
                        "<a href=\"index.php?action=main&amp;sid=$sid\">Home</a>";
                              echo 
                        "</p>";
                              echo 
                        "</body>";
                              echo 
                        "</html>";
                              exit();
                            }
                          
                        $mmsg htmlspecialchars(getsetmood(getuid_sid($sid)));
                            
                        addonline(getuid_sid($sid),"Creating new topic ($mmsg)","index.php?action=online");
                            echo 
                        "<head>";
                            echo 
                        "<title>New Topic</title>";
                            echo 
                        "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
                            echo 
                        "</head>";
                            echo 
                        "<body>";
                            echo 
                        "<p align=\"center\">";
                        if(
                        getplusses($uid)<100 && chatpost($uid)<100)
                        {
                        echo 
                        "You should have atleast 100 +s and 100cp to create new topic!!!<br/>";
                        }else{
                            echo 
                        "<form action=\"genproc.php?action=newtopic&amp;sid=$sid\" method=\"post\">";
                            echo 
                        "Title:<input name=\"ntitle\" maxlength=\"250\"/><br/>";
                            echo 
                        "Text:<input name=\"tpctxt\" maxlength=\"1000\"/><br/>";
                            echo 
                        "<input type=\"hidden\" name=\"fid\" value=\"$fid\"/>";
                            echo 
                        "<input type=\"submit\" value=\"Create\"/>";
                            echo 
                        "</form>";
                        }
                            
                        $fname getfname($fid);
                            echo 
                        "<br/><br/><b>9 </b><a accesskey=\"9\" href=\"index.php?action=viewfrm&amp;sid=$sid&amp;fid=$fid\">$fname</a><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>";

                        My Blog: http://jhommark.blogspot.com
                        My Facebook: http://www.facebook.com/jhommark
                        My Official Site: http://www.undergroundweb.tk
                        My Community Site: http://undergroundwap.xtreemhost.com

                        Comment


                          #13
                          tnx bro but i already finish this stuffs,hey bro killer_eyed do u have some download script with category? It i was like w2c.mobi download script.

                          Comment


                            #14
                            Originally posted by kiLLeR-eyEd_14 View Post
                            PHP Code:
                            else if($action=="newtopic")
                            {
                              
                            $fid $_GET["fid"];
                              if(!
                            canaccess(getuid_sid($sid), $fid))
                                {
                                echo 
                            "<head>";
                                echo 
                            "<title>New Topic</title>";
                                echo 
                            "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
                                echo 
                            "</head>";
                                echo 
                            "<body>";
                                  echo 
                            "<p align=\"center\">";
                                  echo 
                            "You Don't Have A Permission To View The Contents Of This Forum<br/><br/>";
                                  echo 
                            "<a href=\"index.php?action=main&amp;sid=$sid\">Home</a>";
                                  echo 
                            "</p>";
                                  echo 
                            "</body>";
                                  echo 
                            "</html>";
                                  exit();
                                }
                              
                            $mmsg htmlspecialchars(getsetmood(getuid_sid($sid)));
                                
                            addonline(getuid_sid($sid),"Creating new topic ($mmsg)","index.php?action=online");
                                echo 
                            "<head>";
                                echo 
                            "<title>New Topic</title>";
                                echo 
                            "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
                                echo 
                            "</head>";
                                echo 
                            "<body>";
                                echo 
                            "<p align=\"center\">";
                            if(
                            getplusses($uid)<100 && chatpost($uid)<100)
                            {
                            echo 
                            "You should have atleast 100 +s and 100cp to create new topic!!!<br/>";
                            }else{
                                echo 
                            "<form action=\"genproc.php?action=newtopic&amp;sid=$sid\" method=\"post\">";
                                echo 
                            "Title:<input name=\"ntitle\" maxlength=\"250\"/><br/>";
                                echo 
                            "Text:<input name=\"tpctxt\" maxlength=\"1000\"/><br/>";
                                echo 
                            "<input type=\"hidden\" name=\"fid\" value=\"$fid\"/>";
                                echo 
                            "<input type=\"submit\" value=\"Create\"/>";
                                echo 
                            "</form>";
                            }
                                
                            $fname getfname($fid);
                                echo 
                            "<br/><br/><b>9 </b><a accesskey=\"9\" href=\"index.php?action=viewfrm&amp;sid=$sid&amp;fid=$fid\">$fname</a><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>";


                            -why this script not working for my lavalair site?
                            LESS TALK. LESS MISTAKE.

                            HTTP://APPSROB.COM - LIST OF MY FACEBOOK APPS!

                            Comment


                              #15
                              hey robz. kozmoz told me u are good in. . . if user chatpost/plusses is less than (number){you nid number cp/+s to post/create topic}else{<form></form>} hehe.

                              Comment

                              Working...
                              X