PM blog coments

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

    PM blog coments

    Hello guys I have a problem with this code for the PM to blog comment. Automtic PM not coming blog owner .. can not make it ... help ..
    PHP Code:
    else if($action=="signblogcomment")
    {
        
    $who $_POST["who"];
      
    if(!
    cansignblogcomment(getuid_sid($sid), $who))
    {
            echo 
    "<card id=\"main\" title=\"$sitename\">";
          echo 
    "<p align=\"center\">";
          echo 
    "Error <br/><br/>";
          echo 
    "<a href=\"index.php?action=main&amp;sid=$sid\">HAPPY</a>";
          echo 
    "</p>";
          echo 
    "</card>";
          echo 
    "</wml>";
          exit();
        }

    $bid $_GET["bid"];


      
    $msgtxt $_POST["msgtxt"];
      
    //$qut = $_POST["qut"];
      
    addonline(getuid_sid($sid),"<b>Add blog coment</b>","");
      echo 
    "<card id=\"main\" title=\"$sitename\">";
          echo 
    "<p align=\"center\">";
          
    $crdate time();
          

          
    $res false;

          if(
    trim($msgtxt)!="")
          {
            
          
    $res mysql_query("INSERT INTO ibwf_blogcomment SET blogowner='".$who."', blogsigner='".$uid."', dtime='".$crdate."', blogmsg='".$msgtxt."'");

          }
          if(
    $res)
          {

            echo 
    "<img src=\"../images/ok.gif\" alt=\"O\"/>Add blog coment";
    $byuid getuid_sid($sid);
      
    $pmtext "Commented by 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='".$byuid."', touid='".$uid."', timesent='".$tm."'");


          }else{
            echo 
    "<img src=\"../images/notok.gif\" alt=\"X\"/>error ";
          }
          
          echo 
    "<br/><br/>";
    echo 
    "<a href=\"lists.php?action=allbl&amp;sid=$sid\">Back to blog</a><br/>";
          echo 
    "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
    echo 
    "HAPPY</a>";
          echo 
    "</p>";
          echo 
    "</card>";


    instead of a blog ownaru message comes singer blog.....
    Last edited by metulj; 18.04.09, 09:30.
    sigpichttp://happy.srecnica.com/web

    #2
    re

    try using

    $res = mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$who."', touid='".$uid."', timesent='".$tm."'");









    Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer..
    Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free

    Comment


      #3
      see your code works like this

      blogsigner='".$uid."'

      blogowner='".$who."',

      so you need to use the same values for auto pm to work

      byuid='".$byuid."', touid='".$uid."' wont work as .$uid. calls the blog signers name

      you need to change those functions to you pm alert code

      byuid='".$uid."', touid='".$who."' this changes it so it sends the alert by the blog signer
      to the blog owner

      or u could do it this way

      $did = "1";/// the value 1 being your user id number
      $byuid = getuid_sid($sid);
      $pmtext = "<b>".$did."</b></u><br/><b>".$uid." Commented by 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."'");
      Last edited by ozziemale31; 17.04.09, 16:23.









      Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer..
      Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free

      Comment


        #4
        Code:
        $did = "1";/// the value 1 being your user id number       
        $byuid = getuid_sid($sid);
        $pmtext = "<b>".$did."</b></u><br/><b>".$uid." Commented by 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."'");
        with this code PM get Id1... but how to get the PM blogowner??..blogowner=$who does not work ... what should be put instead of who?
        sigpichttp://happy.srecnica.com/web

        Comment


          #5
          the code you posted is not full, post the mysql table for blog
          Advertise your mobile site for FREE with AdTwirl

          Comment


            #6
            Originally posted by GumSlone View Post
            the code you posted is not full, post the mysql table for blog
            -- Table structure for table `ibwf_blogcomment`
            --

            DROP TABLE IF EXISTS `ibwf_blogcomment`;
            SET @saved_cs_client = @@character_set_client;
            SET character_set_client = utf8;
            CREATE TABLE `ibwf_blogcomment` (
            `id` int(100) NOT NULL AUTO_INCREMENT,
            `blogowner` int(100) NOT NULL DEFAULT '0',
            `blogsigner` int(100) NOT NULL DEFAULT '0',
            `blogmsg` blob NOT NULL,
            `dtime` int(100) NOT NULL DEFAULT '0',
            PRIMARY KEY (`id`)
            ) ENGINE=MyISAM AUTO_INCREMENT=49 DEFAULT CHARSET=latin1;
            SET character_set_client = @saved_cs_client;

            --
            -- Dumping data for table `ibwf_blogcomment`

            --
            -- Table structure for table `ibwf_blogs`
            --

            DROP TABLE IF EXISTS `ibwf_blogs`;
            SET @saved_cs_client = @@character_set_client;
            SET character_set_client = utf8;
            CREATE TABLE `ibwf_blogs` (
            `id` int(100) NOT NULL AUTO_INCREMENT,
            `bowner` int(100) NOT NULL DEFAULT '0',
            `bname` varchar(30) NOT NULL DEFAULT '',
            `btext` varchar(500) NOT NULL,
            `bgdate` int(100) NOT NULL DEFAULT '0',
            PRIMARY KEY (`id`),
            UNIQUE KEY `bname` (`bname`)
            ) ENGINE=MyISAM AUTO_INCREMENT=14 DEFAULT CHARSET=latin1;
            SET character_set_client = @saved_cs_client;


            Here's the SQL for the blog and blog coment
            sigpichttp://happy.srecnica.com/web

            Comment


              #7
              you need the blogowner function in that code 2









              Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer..
              Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free

              Comment


                #8
                re

                post the whole code so we know what functions gets the ids of who is doing what ill post you the result later 2nights that will work









                Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer..
                Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free

                Comment


                  #9
                  I understand that we need another code for a blog owner, but Unfortunately I do not know to do
                  sigpichttp://happy.srecnica.com/web

                  Comment


                    #10
                    Originally posted by srecnica View Post
                    Code:
                    $did = "1";/// the value 1 being your user id number       
                    $byuid = getuid_sid($sid);
                    $pmtext = "<b>".$did."</b></u><br/><b>".$uid." Commented by 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."'");
                    with this code PM get Id1... but how to get the PM blogowner??..blogowner=$who does not work ... what should be put instead of who?
                    shouldnt this be like

                    PHP Code:
                    $did "$who"
                    instead of
                    PHP Code:
                    $did "1"
                    and
                    PHP Code:
                    $res mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$uid."', touid='".$who."', timesent='".$tm."'"); 
                    instead of
                    PHP Code:
                    $res mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$did."', touid='".$who."', timesent='".$tm."'"); 
                    :confused:
                    Last edited by metulj; 18.04.09, 09:36.
                    It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt.
                    ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ !
                    ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
                    キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

                    Comment


                      #11
                      nece... problem je je sto je u tabli blogcomment blogowner u stvari id bloga a ne vlasnika bloga.. u tabli blogcomment jednostavno nemam wlasnika bloga... to je problem kako to da uklopim?? da iz table blog pozovem vlasnika bloga?... a problem je sto su i vlasnik bloga i blogsinger u blogcomment tabli $uid, i to pravi zbrku.. e sad ti prevodi ovo.. ja ne mogu da im objasnim na engleskom...
                      $res = mysql_query("INSERT INTO ibwf_blogcomment SET blogowner='".$who."', blogsigner='".$uid."', dtime='".$crdate."', blogmsg='".$msgtxt."'");
                      ovde je blogowner u stvari id bloga a ne vlasnika bloga.. i tu je problem...


                      sorry... Here's translate in english

                      not ... the problem is that the panel blogcomment blogowner in fact id blog and not the owner of the blog .. in the panel blogcomment simply do not have owner blog ... to the problem is how to fit? from the table to call the owner of a blog a blog ... a problem is that the owner of the blog and blogsinger in panel blogcomment $ uid, and real confusion ..

                      $res = mysql_query("INSERT INTO ibwf_blogcomment SET blogowner='".$who."', blogsigner='".$uid."', dtime='".$crdate."', blogmsg='".$msgtxt."'");
                      here is in fact id blogowner blog and not the owner of the blog .. and there is a problem ...
                      Last edited by srecnica; 18.04.09, 12:36.
                      sigpichttp://happy.srecnica.com/web

                      Comment


                        #12
                        :D:D:D
                        thats how i code:D
                        rofl
                        stop hammering your head and make new code for blogs comment.
                        sigpic

                        Comment


                          #13
                          yeeeee I managed!! Here's the code that is ok
                          Code:
                          else if($action=="signblogcomment")
                          {
                              $who = $_POST["who"];
                            
                          if(!cansignblogcomment(getuid_sid($sid), $who))
                          {
                                  echo "<card id=\"main\" title=\"$sitename\">";
                                echo "<p align=\"center\">";
                                echo "Ne mozes upisati komentar <br/><br/>";
                                echo "<a href=\"index.php?action=main&amp;sid=$sid\">HAPPY</a>";
                                echo "</p>";
                                echo "</card>";
                                echo "</wml>";
                                exit();
                              }
                          
                          $bid = $_GET["bid"];
                          
                          
                            $msgtxt = $_POST["msgtxt"];
                            //$qut = $_POST["qut"];
                            addonline(getuid_sid($sid),"<b>Upisuje komentar bloga</b>","");
                            echo "<card id=\"main\" title=\"$sitename\">";
                                echo "<p align=\"center\">";
                                $crdate = time();
                                
                          
                                $res = false;
                          
                                if(trim($msgtxt)!="")
                                {
                                        $res = mysql_query("INSERT INTO ibwf_blogcomment SET blogowner='".$who."', blogsigner='".$uid."', dtime='".$crdate."', blogmsg='".$msgtxt."'");
                          
                                }
                                if($res)
                                {
                          $bnick = mysql_fetch_array(mysql_query("SELECT bname, bowner FROM ibwf_blogs WHERE id='".$who."'"));
                          
                          
                                  echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Komentar je uspesno upisan";
                          $byuid = getuid_sid($sid);
                          $pmtext = "Je upisao/la komentrar tvoga bloga [br/][br/][small][B][I]Ovo je automatska poruka i nemoj odgovarati na nju[/I][/B] [/small]";
                          $tm = time();
                          $res = mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$uid."', touid='".$bnick[1]."', timesent='".$tm."'");
                          
                                }else{
                                  echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Greska pri upisu komentara";
                                }
                                
                                echo "<br/><br/>";
                          echo "<a href=\"lists.php?action=allbl&amp;sid=$sid\">Nazad u blog</a><br/>";
                                echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
                          echo "HAPPY</a>";
                                echo "</p>";
                                echo "</card>";
                          
                          }
                          for touid I made this
                          Code:
                          $bnick = mysql_fetch_array(mysql_query("SELECT bname, bowner FROM ibwf_blogs WHERE id='".$who."'"));
                          and the touid=$bnick[1]...
                          :p opticalpigion
                          do not have that right in other ... I think that this can be done at the gallery and comment because it is similar


                          and here, and that in addition to, and am now to be the name of the blog that is coment

                          $pmtext = "Je upisao/la komentrar tvoga bloga [blog=$who]$bnick[0] [/blog] [br/][br/][small]Ovo je automatska poruka i nemoj odgovarati na nju [/small]";
                          Guys thank you for assistance and ideas that have helped
                          Last edited by srecnica; 18.04.09, 15:17.
                          sigpichttp://happy.srecnica.com/web

                          Comment


                            #14
                            not working 4 mr that boy
                            com site: http://vampist.net
                            download site: http://wapdloads.net
                            fb: http://www.facebook.com/pmplx

                            Comment

                            Working...
                            X