Chatpost Requeired

Started on the old forum in July 2009 · view the original in the archive · old links redirect here

17 replies · 953 views · started 17 years ago · 1 min read

6 participants
l0rdrayven Developer · 83 posts #1

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.

Not i rip persons off i will also do your arse !

huwad Developer · 215 posts #2

l0rdrayven wrote: 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

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

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

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

if(getplusses(getuid_sid($sid))<75)
    {
        echo "You need at least 75 plusses to shout!";

and replace it with

if(chatpost(getuid_sid($sid))<100)
    {
        echo "You need at least 100 chatpost to shout!";

hacking is like sex. you get in, you get out and you pray you left nothing behind.

robzky Developer · 205 posts #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!

bijaybd Developer · 178 posts #4

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

l0rdrayven Developer · 83 posts #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.

Not i rip persons off i will also do your arse !

kiLLeR-eyEd_14 Senior · 382 posts #6

l0rdrayven wrote: 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?

huwad Developer · 215 posts #7

😊

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

function chatpost($uid)

{

    $cmsg = mysql_fetch_array(mysql_query("SELECT chmsgs FROM ibwf_users WHERE id='".$uid."'"));

    return $cmsg[0];

}

hacking is like sex. you get in, you get out and you pray you left nothing behind.

robzky Developer · 205 posts #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!

kiLLeR-eyEd_14 Senior · 382 posts #9

robzky wrote: 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! }

robzky Developer · 205 posts #10
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&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&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&sid=$sid&fid=$fid\">$fname</a><br/>";
    echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&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!

kiLLeR-eyEd_14 Senior · 382 posts #12
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&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&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&sid=$sid&fid=$fid\">$fname</a><br/>";
    echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
    echo "</p>";
    echo "</body>";
}
l0rdrayven Developer · 83 posts #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.

Not i rip persons off i will also do your arse !

robzky Developer · 205 posts #14

kiLLeR-eyEd_14 wrote:

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&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&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&sid=$sid&fid=$fid\">$fname</a><br/>";
    echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&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!

tres Junior · 24 posts #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.

Connecting Filipino People http://pinoyworld.mobi

kiLLeR-eyEd_14 Senior · 382 posts #16

robzky wrote: -why this script not working for my lavalair site?

what error are you experiencing?Maybe you didn't add the function chatpost in core.php..As what i've said..Add it first before calling it..I just edited the script posted here and add the codings you all wanted..I just show you where the codes are to be added..

robzky Developer · 205 posts #17

tres wrote: 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.

-Hehe.. Who you tres?

LESS TALK. LESS MISTAKE.

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

robzky Developer · 205 posts #18

kiLLeR-eyEd_14 wrote: what error are you experiencing?Maybe you didn't add the function chatpost in core.php..As what i've said..Add it first before calling it..I just edited the script posted here and add the codings you all wanted..I just show you where the codes are to be added..

-I already use this script.. Thanks.. I see if what is the problem of this script! THANKS!

LESS TALK. LESS MISTAKE.

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

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