comment on fourm post (quote shout) for lava

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

    comment on fourm post (quote shout) for lava

    i made it for mobilezonez you can use this and make .... small chages and use for any edit of lava.....

    again i have to say is
    . since im not a good coder i cant make thiks small and perfecrt ...
    ....
    plzzz experiance ppl show me mistake i made and help me out ....


    the think in genpro should b made lil more exact ... its working ... but there is too much uselss thinks in it plzz remove it ... and share

    1.Go to phpmyadmin and add these one row under ibwf_posts

    `opostid` int(100) NOT NULL,

    2..Open index.php and find ($action=="viewtpc") page and replace with this

    PHP Code:
    else if($action=="viewtpc"){
    gettimebar();
    getnewmsg($sid);
    getalert($sid);
    $tid $_GET["tid"];
    $go $_GET["go"];
    $tfid mysql_fetch_array(mysql_query("SELECT fid FROM ibwf_topics WHERE id='".$tid."'"));
    $fname getfname($tfid[0]);
    if (
    isforumblocked($uid)){
                
    boxstart("Error!");
            echo 
    "<img src=\"notok.gif\"/>";
    echo 
    "Your forum access has been blocked by a moderator!!!<br/><br/>";
    echo 
    "<a href=\"index.php?action=main&amp;sid=$sid\">Main Menu</a>";
    boxend();
    echo 
    "</font></body></html>";
    exit();    
    }
    if(!
    canaccess($uid$tfid[0])){
                
    boxstart("Error!");
            echo 
    "<img src=\"notok.gif\"/>";
    echo 
    "This post belongs to $fname forum which is not available to you presently. To read this post, join $fname club.<br/><br/>";
    echo 
    "<a href=\"index.php?action=main&amp;sid=$sid\">Main Menu</a>";
    echo 
    "</font></body></html>";
    exit();
    }
    if(
    $go!="") {
            
    $page=getpage_go($go,$tid,$sid);
    }
    $tinfo mysql_fetch_array(mysql_query("SELECT name, text, authorid, crdate, views, fid, pollid from ibwf_topics WHERE id='".$tid."'"));
    $tnm htmlspecialchars($tinfo[0]);
    $namewa mysql_fetch_array(mysql_query("SELECT name FROM ibwf_forums WHERE id = $tinfo[5]"));
    $namewa1 htmlspecialchars($namewa[0]);
    $indiatime time() + (addhours());
    addonline($uid,"Reading post <i>$tnm</i> in $fname forum","index.php?action=$action&amp;tid=$tid");
    boxstart("$tnm");
    $vws $tinfo[4]+1;
    $num_pages getnumpages($tid$sid);
    echo 
    "Subject: $tnm<br/>Viewed: $vws times<br/>Topic # $tid<br/>Page # $page of $num_pages<br/>";

      echo 
    "Page:";
    $pagewa 1;
    while (
    $pagewa<=$num_pages)
    {
            echo 
    "[<a href=\"index.php?action=viewtpc&amp;page=$pagewa&amp;sid=$sid&amp;tid=$tid\">$pagewa</a>]";
            
    $pagewa $pagewa+1;
    };
    if(
    $page==""||$page<1) {
            
    $page=1;
    }
    $posts_per_page getppp($uid);
    if(
    $page>$num_pages) {
    $page=$num_pages
    }
    $limit_start $posts_per_page *($page-1);
    $rpls mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts WHERE tid='".$tid."'"));
    ///fm here
    if($page==1){
    mysql_query("UPDATE ibwf_topics SET views='".$vws."' WHERE  id='".$tid."'");
    $ttext mysql_fetch_array(mysql_query("SELECT authorid, text, crdate, pollid FROM ibwf_topics WHERE id='".$tid."'"));
    $unick getnick_uid($ttext[0]);
    if(
    isonline($ttext[0])){
    $iml "<img src=\"images/onl.gif\" alt=\"+\"/>";
    }else{
    $iml "<img src=\"images/ofl.gif\" alt=\"-\"/>";
    }
    if(
    isadmin($ttext[0]))
    {
    $usl "$iml<a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$ttext[0]\"><font color='green'>$unick</font></a>";}
    else if(
    isheadadd($ttext[0]))
    {
    $usl "$iml<a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$ttext[0]\"><font color='brown'>$unick</font></a>";}
    else if(
    isowner($ttext[0]))
    {
    $usl "$iml<a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$ttext[0]\"><font color='red'>$unick</font></a>";}
    else if(
    isvip($ttext[0]))
    {
    $usl "$iml<a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$ttext[0]\"><font color='lightgreen'>$unick</font></a>";}
    else if(
    ismod($ttext[0]))
    {
    $usl "$iml<a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$ttext[0]\"><font color='darkviolet'>$unick</font></a>";}
    else if(
    isbanned($ttext[0]))
    {
    $usl "$iml<a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$ttext[0]\"><strike>$unick</strike></a>";}
    else
    {
    $usl "$iml<a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$ttext[0]\">$unick</a>";}
    $topt "<a href=\"index.php?action=tpcopt&amp;sid=$sid&amp;tid=$tid\">[*]</a>";
    $rep "<a href=\"index.php?action=addrep&amp;sid=$sid&amp;tid=$tid\">[R]</a>";
    $pst parsemsg($ttext[1],$sid);
    echo 
    "<br/>Post from $usl$topt $rep<br/>";
    $indiatime $ttext[2] + (addhours());
    $dtot date("d/m/Y h:i:s A",$indiatime);
    echo 
    $dtot."<br/>";                           
    echo 
    "<br/>$pst<br/><br/>";
    if(
    $ttext[3]>0){
    echo 
    "<a href=\"index.php?action=viewtpl&amp;sid=$sid&amp;who=$tid\">POLL</a><br/>";
    }
    }
    if(
    $page>1){
    $limit_start--;
    }
    $sql "SELECT id, text, uid, dtpost, opostid FROM ibwf_posts WHERE tid='".$tid."' ORDER BY dtpost LIMIT $limit_start$posts_per_page";

    $posts mysql_query($sql);
    while(
    $post mysql_fetch_array($posts)){
    $unick getnick_uid($post[2]);
    if(
    isonline($post[2])){
    $iml "<img src=\"images/onl.gif\" alt=\"+\"/>";
    }else{
    $iml "<img src=\"images/ofl.gif\" alt=\"-\"/>";
    }
    $nopl mysql_fetch_array(mysql_query("SELECT id, text, uid, dtpost FROM ibwf_posts WHERE id = '".$post[4]."'"));
    $shnickos getnick_uid($nopl[2]);
    $shdtos date("d/m/Y h:i:s A"$nopl[3]+(addhours()));
    if(
    isadmin($post[2]))
    {
    $usl "$iml<a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$post[2]\"><font color='green'>$unick</font></a>";}
    else if(
    isheadadd($post[2]))
    {
    $usl "$iml<a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$post[2]\"><font color='brown'>$unick</font></a>";}
    else if(
    isowner($post[2]))
    {
    $usl "$iml<a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$post[2]\"><font color='red'>$unick</font></a>";}
    else if(
    isvip($post[2]))
    {
    $usl "$iml<a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$post[2]\"><font color='lightgreen'>$unick</font></a>";}
    else if(
    ismod($post[2]))
    {
    $usl "$iml<a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$post[2]\"><font color='darkviolet'>$unick</font></a>";}
    else if(
    isbanned($post[2]))
    {
    $usl "$iml<a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$post[2]\"><strike>$unick</strike></a>";}
    else
    {
    $usl "$iml<a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$post[2]\">$unick</a>";}
    $pst parsemsg($post[1], $sid);
    $opst parsemsg($nopl[1], $sid);
    $topt "<a href=\"index.php?action=pstopt&amp;sid=$sid&amp;pid=$post[0]&amp;page=$page&amp;fid=$tinfo[5]\">*</a>";
    echo 
    "<br/>Reply from $usl$topt<br/>";
    $indiantime $post[3] + (addhours());
    $dtot date("d/m/Y h:i:s A",$indiantime);
    echo 
    $dtot."<br/>";
     if (
    $post[4]=="0"){
    echo 
    "<br/>$pst<br/>";
    }else{
    echo 
    "<i>Originally posted By $shnickos at $shdtos <br/> Orginal Post<b>:</b> $opst</i><br/>--------";
    echo 
    "<br/><b>$pst</b><br/>";
    }
     
     
    $osid $post[0];
          
          
    $whose getnick_uid($post[2]);
    $fpmtext removebb($post[1], $sid);
    echo 
    "<form action=\"index.php?action=commentp&amp;sid=$sid\" method=\"post\"><input type=\"hidden\" name=\"osid\" value=\"$osid\"/><input type=\"hidden\" name=\"tid\" value=\"$tid\"/><input type=\"hidden\" name=\"oshdt\" value=\"$dtot\"/><input type=\"hidden\" name=\"shoutm\" value=\"$fpmtext\"/><input type=\"hidden\" name=\"shouter\" value=\"$whose\"/><input id=\"inputButton\" type=\"submit\" value=\"Comment\"/></form>";
    echo 
    "<br/><br/>";




    }
    boxend();
    echo 
    "<center>";
    if(
    $page<$num_pages){
    $npage $page+1;
    echo 
    "<a href=\"index.php?action=viewtpc&amp;page=$npage&amp;sid=$sid&amp;tid=$tid\">Next»</a><br/>";
    }
    if(
    $page>1){
    $ppage $page-1;
    echo 
    "<a href=\"index.php?action=viewtpc&amp;page=$ppage&amp;sid=$sid&amp;tid=$tid\">«Previous</a>";
    }
    echo 
    "<br/>Add reply:<br/><form action=\"genproc.php?action=post&amp;sid=$sid\" method=\"post\"><textarea id=\"inputText\" name=\"reptxt\"></textarea><br/>";
    echo 
    "
    <input type=\"hidden\" name=\"tid\" value=\"
    $tid\"/>
    <input type=\"hidden\" name=\"qut\" value=\"\"/>
    <input id=\"inputButton\" type=\"submit\" value=\"Send\"/>
    </form></center>"
    ;
    echo 
    "<p align=\"center\">Page $page of $num_pages<br/>";
    $fid $tinfo[5];
    $fname getfname($fid);
    echo 
    "<a href=\"index.php?action=viewfrm&amp;sid=$sid&amp;fid=$fid\">Back To $fname Forum</a><br/><br/></p>";
    getfooter($sid);

    3.add another action in index.php

    PHP Code:
    ////////////////////////////////////////////comment post
    else if($action=="commentp"){
    addonline(getuid_sid($sid),"Forwarding a text msg","");
    $osid $_POST["osid"];
    $tid $_POST["tid"];
    $shoutm $_POST["shoutm"];
    $oshdt $_POST["oshdt"];
    $shouter $_POST["shouter"];
    boxstart("Comment on post");
    echo 
    "<p>";
    $whonick getnick_uid($who);
    echo 
    "This feature is currently in test phase, please report if you see errors.<br/>";
    echo 
    "Originally posted by:<b>$shouter </b>At<b> $oshdt</b><br/>";
    echo 
    "post <b>$shoutm</b><br/>";
    echo 
    "<br/> <form action=\"genproc.php?action=commentp&amp;sid=$sid\" method=\"post\">";
    echo 
    "Comment:<br/> <textarea id=\"inputText\" name=\"pmtext\"></textarea><br/>";
    echo 
    "<input type=\"hidden\" name=\"tid\" value=\"$tid\"/>";
    echo 
    "<input type=\"hidden\" name=\"osid\" value=\"$osid\"/>";
    echo 
    "<input id=\"inputButton\" type=\"submit\" value=\"Add\"/>";
    echo 
    "</form></p>";
    boxend();
    getfooter($sid);


    4. then in genproc.php add the action ...... there is bit useless thinks ... plzz any one knows how to make it perfect help me and outhrs to remove the junk also
    PHP Code:
    ///////////////////////comment on post
    ///////////////////////comment

    else if($action=="commentp"){
    echo 
    "<p align=\"center\">";
    $pmtou $_POST["pmtou"];
    $fmsg $_POST["fmsg"];
    $tid $_POST["tid"];
    $whose $_POST["whose"];
    $orgtime $_POST["osid"];
    addonline(getuid_sid($sid),"Adding Comment to Shout","");
    $who getuid_nick($pmtou);
    if(
    $tid ==0){
    echo 
    "<img src=\"images/notok.gif\" alt=\"x\"/>topic dont exist<br/>";
    }else{
    $whonick getnick_uid($who);
    $byuid getuid_sid($sid);
    $pmtext removebb($pmtext);
    $tm time();
    $lastpm mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM ibwf_private WHERE byuid='".$byuid."'"));
    $pmfl $lastpm[0]+getpmaf();
    if(
    $pmfl<$tm){
    if(!
    isblocked($pmtext,$byuid)){
    if((!
    isignored($byuid$who))&&(!istrashed($byuid))){
    $res mysql_query("INSERT INTO ibwf_posts SET text='".$pmtext."', tid='".$tid."', uid='".$byuid."', dtpost='".$tm."', opostid='".$orgtime."'");
    }else{
    $res false;
    }
    if(
    $res){
    echo 
    "<img src=\"images/ok.gif\" alt=\"O\"/>";
    echo 
    "Message from $whose was forwarded successfully to $whonick<br/><br/>";
    echo 
    parsepm($pmtext$sid);
    }else{
    echo 
    "<img src=\"images/notok.gif\" alt=\"X\"/>";
    echo 
    "Your message wasn't sent because either $whonick has put you in his/her ignore list or your outgoing messaging has been barred by an admin!<br/><br/>";
    }
    }else{
    $bantime time() + (7*24*60*60);
    echo 
    "<img src=\"images/notok.gif\" alt=\"X\"/>";
    echo 
    "Can't Send PM to $whonick<br/><br/>";
    echo 
    "You just sent a link to one of the crappiest sites on earth<br/> The members of these sites spam here a lot, so go to that site and stay there if you don't like it here<br/> as a result of your stupid action:<br/>1. you have lost your sheild<br/>2. you have lost all your plusses<br/>3. You are BANNED for 7 days!";
    mysql_query("INSERT INTO ibwf_penalties SET uid='".$byuid."', penalty='1', exid='1', timeto='".$bantime."', pnreas='Banned: Automatic Ban for spamming for a crap site'");
    mysql_query("UPDATE ibwf_users SET plusses='0', shield='0' WHERE id='".$byuid."'");
    mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$byuid."', touid='2', timesent='".$tm."', reported='1'");
    }
    }else{
    $rema $pmfl $tm;
    echo 
    "<img src=\"images/notok.gif\" alt=\"X\"/>";
    echo 
    "Flood control: $rema Seconds<br/><br/>";
    }
    }
        echo 
    "<br/><a href=\"index.php?action=viewtpc&amp;sid=$sid&amp;tid=$tid&amp;go=last\">";

    echo 
    "Back To Topic</a><br/>"

    echo 
    "</p>";



    its 100% working if you want you can chek it in my site ...
    Last edited by love_444; 08.03.11, 10:43. Reason: coz of the complain that .... its not working with mobilezonce coz i add a SQl think wich was not in mobilezonse

    #2
    plzzz comment on my post and tell me if its ok or if it have mistakes its my second time im posting or sharing something .....
    i mean to ask is many time i have seen in post that if script is not proper it will har the server and over load it .....
    so plzzz help me to remove the unnessery thinks in the code .....

    Comment


      #3
      its not working i m also using mobilezone script
      LoveForum.BiZ

      Comment


        #4
        Originally posted by bigboss View Post
        its not working i m also using mobilezone script

        Bro its working you can chek the demo at my site and if you find any error tell me i will help you to solve it out

        may n its not working coz of the option subscribe that i added .... now i remove that 2 lines and im sur it will work good ... chek it
        Last edited by love_444; 08.03.11, 10:45.

        Comment


          #5
          I already didnt use that option. I dnt face reply of previous post.
          LoveForum.BiZ

          Comment


            #6
            Originally posted by bigboss View Post
            I already didnt use that option. I dnt face reply of previous post.
            i dont understand what did you mean plzzz explain it to

            Comment


              #7
              I m facing original post by other poster but i don't get new comment of old post with ur code.
              LoveForum.BiZ

              Comment


                #8
                Originally posted by bigboss View Post
                I m facing original post by other poster but i don't get new comment of old post with ur code.
                bro that problem may b coz the place where you added `opostid` row in the table add it in the last after the Quote row ...in ibwf_posts post and if you want to c the demo you can chek it in my site bro you can c how it works

                Comment


                  #9
                  I already used in last row of ibwf_posts though not facing new reply of old post.
                  LoveForum.BiZ

                  Comment


                    #10
                    Originally posted by bigboss View Post
                    I already used in last row of ibwf_posts though not facing new reply of old post.
                    PHP Code:
                    if ($post[4]=="0"){
                    echo 
                    "<br/>$pst<br/>";
                    }else{
                    echo 
                    "<i>Originally posted By $shnickos at $shdtos <br/> Orginal Post<b>:</b> $opst</i><br/>--------";
                    echo 
                    "<br/><b>$pst</b><br/>";

                    this is the think wich shows the reply hmmm as i know im using there is not mistake can you show me in your site so that i can c how it exactly give output

                    Comment


                      #11
                      check in my site i have pm you
                      Last edited by bigboss; 11.03.11, 11:55.
                      LoveForum.BiZ

                      Comment

                      Working...
                      X