PM blog coments

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

13 replies · 1,482 views · started 17 years ago · 1 min read

6 participants
srecnica Developer · 174 posts #1

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 ..

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&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&sid=$sid\">Back to blog</a><br/>";
      echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
echo "HAPPY</a>";
      echo "</p>";
      echo "</card>";

}
 

instead of a blog ownaru message comes singer blog.....

ozziemale31 Lead · 861 posts #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 = "".$did." ".$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."'");

External image (may be gone) External image (may be gone)

External image (may be gone)

*****

**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 ***

srecnica Developer · 174 posts #4
$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?:(

srecnica Developer · 174 posts #6

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

metulj Super moderator Principal · 1,726 posts #10

srecnica wrote:

$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

$did = "$who";

instead of

$did = "1";

and

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

instead of

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

😕

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ノ刀ノイリ!

srecnica Developer · 174 posts #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 ...

srecnica Developer · 174 posts #13

yeeeee🥳 I managed!! Here's the code that is ok

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&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&sid=$sid\">Nazad u blog</a><br/>";
      echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
echo "HAPPY</a>";
      echo "</p>";
      echo "</card>";

}

for touid I made this

$bnick = mysql_fetch_array(mysql_query("SELECT bname, bowner FROM ibwf_blogs WHERE id='".$who."'"));

and the touid=$bnick[1]... 😛 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

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