how to make automessage for book in lavalair?

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

17 replies · 1,442 views · started 16 years ago · 1 min read

TL;DR · summary of 17 replies
  • LadyEnigma asked how to make an automated message for a book in Lavalair.
  • Subzero suggested adding the automessage functionality to their site, but did not provide specific code or file location.
  • LadyEnigma tried implementing it previously and encountered issues with ghost messages appearing instead of actual messages.
  • Thanatos advised learning PHP and MySQL, implying that understanding these technologies would help solve the problem.

Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.

4 participants
LadyEnigma Developer · 71 posts #1

how to make automessage for book in lavalair? How can I make every time someone signs the book user the owner of that book arrives an automated message warning .Thanks to anyone who helps me

....silence please....

subzero Super moderator Fellow · 3,954 posts #2

Add it to ur site easy.

$pm = who("who[0]","$by");

sql = mysql_query("INCLUDE NOOB_BASE where id,user ORDER BY id='$id'");

thats not how it is but you got a idea..

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

LadyEnigma Developer · 71 posts #3

subzero in which file? I had tried to do that long ago for the blog comments and made me ghost message

$byuid = getuid_sid($sid);
$pmtext = "<b>".$did."</b></u><br/><b>".$uid." Comment on your blog [br/][br/][small] This is an automated message, and do not respond to it [/small]";
$tm = time();
$res = mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$did."', touid='".$who."', timesent='".$tm."'");

or a message appeared to me or nn ghost appeared nothing, anyway I could see the message in the database 🙁 What wrong? 🙁

....silence please....

thanatos Senior · 261 posts #4

i suggest u learn PHP and MySQL

LadyEnigma Developer · 71 posts #5

thanatos thanks for the tip and I am doing but there's a lot to learn and, If I'm not mistaken this forum should be the place to ask for help from people who make themselves available to give it 🙂

....silence please....

thanatos Senior · 261 posts #6

not everythng will be spoon fed

wap_king Developer · 126 posts #7

LadyEnigma wrote: subzero in which file? I had tried to do that long ago for the blog comments and made me ghost message

$byuid = getuid_sid($sid);
$pmtext = "<b>".$did."</b></u><br/><b>".$uid." Comment on your blog [br/][br/][small] This is an automated message, and do not respond to it [/small]";
$tm = time();
$res = mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$did."', touid='".$who."', timesent='".$tm."'");

or a message appeared to me or nn ghost appeared nothing, anyway I could see the message in the database 🙁 What wrong? :(

post the the guestbook coding and the genproc coding has well

wap_king Developer · 126 posts #8

LadyEnigma wrote: thanatos thanks for the tip and I am doing but there's a lot to learn and, If I'm not mistaken this forum should be the place to ask for help from people who make themselves available to give it :)

Thats so true they all stay like that...

thanatos Senior · 261 posts #9

ppl will never learn if they always depend on others. try learning php and mysql and see for urslf wat u cn accomplish with it

wap_king Developer · 126 posts #10

thanatos wrote: ppl will never learn if they always depend on others. try learning php and mysql and see for urslf wat u cn accomplish with it

i am sure you see that she tried and cant get it thats why she is asking for help...if you dont want to help just leave the topic alone simple

LadyEnigma Developer · 71 posts #11

wap_king wrote: post the the guestbook coding and the genproc coding has well

else if($action=="gbook")

{

    $who = $_GET["who"];
  $mmsg = htmlspecialchars(getsetmood(getuid_sid($sid)));
    addonline(getuid_sid($sid),"sta guardando il Guestbook ($mmsg)","");

    echo "<head>";

    echo "<title>guestbook</title>";

    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";

    echo "</head>";

    echo "<body>";

    $uid = getuid_sid($sid);

    

    //////ALL LISTS SCRIPT <<

    if($page=="" || $page<=0)$page=1;

    $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_gbook WHERE gbowner='".$who."'"));

    $num_items = $noi[0]; //changable

    $items_per_page= 5;

    $num_pages = ceil($num_items/$items_per_page);

    if(($page>$num_pages)&&$page!=1)$page= $num_pages;

    $limit_start = ($page-1)*$items_per_page;

    

        $sql = "SELECT gbowner, gbsigner, gbmsg, dtime, id FROM ibwf_gbook WHERE gbowner='".$who."' ORDER BY dtime DESC LIMIT $limit_start, $items_per_page";

    echo "<p>";

    $items = mysql_query($sql);

    echo mysql_error();

    if(mysql_num_rows($items)>0)

    {

    while ($item = mysql_fetch_array($items))

    {

        

          if(isonline($item[1]))

  {

    $iml = "<img src=\"../images/onl.gif\" alt=\"+\"/>";

    

  }else{

    $iml = "<img src=\"../images/ofl.gif\" alt=\"-\"/>";

  }

    $snick = getnick_uid($item[1]);

      $lnk = "<a href=\"index.php?action=viewuser&who=$item[1]&sid=$sid\">$iml$snick</a>";

      $bs = date("d m y-H:i:s",$item[3]);

      echo "$lnk<br/><small>";

      if(candelgb($uid, $item[4]))

      {

        $delnk = "<a href=\"genproc.php?action=delfgb&sid=$sid&mid=$item[4]\">[x]</a>";

      }else{

        $delnk = "";

      }

      $text = parsepm($item[2], $sid);

      echo "$text<br/>$bs $delnk<br/>";

      echo "</small>";

    }

    }

    echo "</p>";

    echo "<p align=\"center\">";

    if($page>1)

    {

      $ppage = $page-1;

      echo "<a href=\"lists.php?action=$action&page=$ppage&sid=$sid&who=$who\">«Indietro</a> ";

    }

    if($page<$num_pages)

    {

      $npage = $page+1;

      echo "<a href=\"lists.php?action=$action&page=$npage&sid=$sid&who=$who\">Avanti»</a>";

    }

    echo "<br/>$page/$num_pages<br/>";

    if($num_pages>2)

    {

        $rets = "<form action=\"lists.php\" method=\"get\">";

        $rets .= "<input name=\"page\" style=\"-wap-input-format: '*N'\" size=\"2\"/>";

        $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";

        $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";

        $rets .= "<input type=\"hidden\" name=\"who\" value=\"$who\"/>";

        $rets .= "<input type=\"submit\" value=\"vai a pagina\"/>";

        $rets .= "</form>";

        echo $rets;

    }

    echo "</p>";

  ////// UNTILL HERE >>

    echo "<p align=\"center\">";

    if(cansigngb($uid, $who))

    {

    echo "<a href=\"index.php?action=signgb&sid=$sid&who=$who\">Aggiungi tuo Messaggio</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>";

}

genproc

else if($action=="signgb")
{
    $who = $_POST["who"];
   
if(!cansigngb(getuid_sid($sid), $who))
    {
      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\">";
      echo "You cant Sign this user guestbook<br/><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>";
      echo "</html>";
      exit();
    }
  $msgtxt = $_POST["msgtxt"];
  //$qut = $_POST["qut"];
  addonline(getuid_sid($sid),"Signing a guestbook","");
      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\">";
      $crdate = time();
      //$uid = getuid_sid($sid);
      $res = false;

      if(trim($msgtxt)!="")
      {
        
      $res = mysql_query("INSERT INTO ibwf_gbook SET gbowner='".$who."', gbsigner='".$uid."', dtime='".$crdate."', gbmsg='".$msgtxt."'");
      }
      if($res)
      {
        echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Message Posted Successfully";
      }else{
        echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error Posting Message";
      }
      
      echo "<br/><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>";

}

and in index

//////////////////////////////////////////Guestbook

else if($action=="signgb")
{
$who=$_GET["who"];
addonline(getuid_sid($sid),"Signing Users guestbook","");
if(!cansigngb(getuid_sid($sid), $who))
    {
    echo "<head>";
    echo "<title>Firma Guestbook</title>";
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo "</head>";
    echo "<body>";
      echo "<p align=\"center\">";
      echo "Puoi firmare questo guestbook<br/><br/>";
      echo "<a href=\"index.php?action=main&sid=$sid\">Home</a>";
      echo "</p>";
      echo "</body>";
      echo "</html>";
      exit();
    }
    

    echo "<head>";
    echo "<title>Firma Guestbook</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=signgb&sid=$sid\" method=\"post\">";
    echo "<input type=\"hidden\" name=\"who\" Value=\"$who\">";
    echo "Testo:<input name=\"msgtxt\" maxlength=\"500\"/><br/>";
    echo "<input type=\"Submit\" name=\"Add\" Value=\"Add\"></form>";

  echo "<br/><br/><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>";
}

Thanks in advance for your interest in my post wap king 🙂

....silence please....

wap_king Developer · 126 posts #12

no problem 🙂 just replace ur genproc with this one

else if($action=="signgb") 
{ 
    $who = $_POST["who"]; 
    
if(!cansigngb(getuid_sid($sid), $who)) 
    { 
      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\">"; 
      echo "You cant Sign this user guestbook<br/><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>"; 
      echo "</html>"; 
      exit(); 
    } 
  $msgtxt = $_POST["msgtxt"]; 
  //$qut = $_POST["qut"]; 
  addonline(getuid_sid($sid),"Signing a guestbook",""); 
      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\">"; 
      $crdate = time(); 
      //$uid = getuid_sid($sid); 
      $res = false; 

      if(trim($msgtxt)!="") 
      { 
         
      $res = mysql_query("INSERT INTO ibwf_gbook SET gbowner='".$who."', gbsigner='".$uid."', dtime='".$crdate."', gbmsg='".$msgtxt."'"); 
      } 
      if($res) 
      { 
      $user = getnick_sid($sid);
      
      $msg = " $user signed your guestbook: $msgtxt";
      
       mysql_query("INSERT INTO ibwf_private SET text='".$msg."', byuid='$uid', touid='".$who."', unread='1', timesent='".time()."'");
        
        echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Message Posted Successfully"; 
      }else{ 
        echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error Posting Message"; 
      } 
       
      echo "<br/><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>"; 

}
thanatos Senior · 261 posts #13

wap_king, she cant get it coz she stop trying. failure comes when u give up. and i did help her. i gave her advice that will help her alot in the future. its for her own sake.

wap_king Developer · 126 posts #14

thats bull am sure you didnt learn everything on your own she didnt give either she just needs help i dont see the sense stuck on one something for too long and not getting it..!

LadyEnigma Developer · 71 posts #15

It works perfectly! I am very grateful wap_king with your example I did also automatic messages even for blog comment, thanks wap_king, my best regard for you 🙂

....silence please....

thanatos Senior · 261 posts #16

@wapking, LoLz.. yeah ur free to tolerate laziness..

wap_king Developer · 126 posts #17

yup i dnt have any problems cuz am like that some times you people are too stucked up i dont like that

thanatos Senior · 261 posts #18

dont worry i dnt like u either 😛

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