message limit in shoutbox lava

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

#limit-shoutbox-lavalair

11 replies · 968 views · started 16 years ago · 1 min read

7 participants
LadyEnigma Developer · 71 posts #1

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 🙂

....silence please....

Mysterio Lead · 630 posts #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() - 246060;

$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 }

mysterio.al - programming is a functional art

LadyEnigma Developer · 71 posts #3

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

$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 "

"; if(getplusses(getuid_sid($sid))<75) { echo "<img src="../images/notok.gif" alt="X"/>You should have at least 75 plusses to shout!

"; echo "0<a accesskey="0" href="index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>"; echo " "; echo "</body>"; echo "</html>"; exit(); } if(istrashed(getuid_sid($sid))) {

echo "<img src=\"../images/notok.gif\" alt=\"X\"/>

Unknown error cannot shout! please try again later...

"; echo "0<a accesskey="0" href="index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>"; echo " "; echo "</body>"; echo "</html>"; exit(); }else{ $shtm = time(); if(!isblocked($shtxt,$uid)) {

in genproc.php but don t work 🙁

....silence please....

wapmetal Lead · 609 posts #4

yeah you just a noob!

$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!

LadyEnigma Developer · 71 posts #5

yeah it work! thank you very much wapmetal 🙂

....silence please....

Mysterio Lead · 630 posts #7

hahaha, lol this is why i am lazy to help some people some time

mysterio.al - programming is a functional art

shakil420 Developer · 125 posts #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

shakil420 Developer · 125 posts #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

shakil420 Developer · 125 posts #12

khan89 ## pls post wml dtails

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