View previous topic :: View next topic |
Author |
Message |
Cyberian75
Joined: 26 Sep 2002 Posts: 1267 Location: Oregon
|
Posted: Tue Feb 10, 2004 8:45 pm Post subject: |
|
|
Hi Rene;
Sorry it's not working for you. Have you edited the "b2comments.post.php" file as instructed?
As for the variable "$wxcvbn_c," I'd recommend you to change every instance of it to "$ccounter" in both b2comments and b2vomments.post files. You use it in the while loop to count the number of comments from your comments page which gets passed to b2comments.post file via the comments form.
Example (comments page):
Code: |
$ccounter=0;
while($rowc = mysql_fetch_object($resultc)) {
$ccounter++;
$commentdata = get_commentdata($rowc->comment_ID);
|
which gets passed via the comments form: Code: |
<form name="form" action="b2comments.post.php" method="post">
<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>">
<input type="hidden" name="redirect_to" value="<?php echo htmlspecialchars($HTTP_SERVER_VARS["REQUEST_URI"]); ?>">
<input type="hidden" name="ccounter" value="<?php echo $ccounter; ?>">
...
|
_________________ Michael P.
 |
|
Back to top |
|
 |
rmaathuis
Joined: 05 Jan 2004 Posts: 7 Location: The Netherlands
|
Posted: Wed Feb 11, 2004 12:54 am Post subject: |
|
|
Hi Michael,
thanks for the fast response, however even with these suggestions I get no result and I really would like this feature in my blog.
Can you think of something else?
Regards,
Rene |
|
Back to top |
|
 |
Cyberian75
Joined: 26 Sep 2002 Posts: 1267 Location: Oregon
|
Posted: Wed Feb 11, 2004 1:00 am Post subject: |
|
|
Rene;
Tell me what you have tried to test it...
And do you have the following line in your comments form?
Code: |
<input type="hidden" name="wxcvbn_c" value="<?php echo $wxcvbn_c; ?>" />
|
_________________ Michael P.
 |
|
Back to top |
|
 |
rmaathuis
Joined: 05 Jan 2004 Posts: 7 Location: The Netherlands
|
Posted: Wed Feb 11, 2004 1:16 pm Post subject: |
|
|
Hi Michael,
It Works!
Thank you very much, that line did the trick. I don't know how i could forget that line, I checked and even double checked if I did everything mentioned in the notify.txt file but overlooked it everytime
Sorry for the trouble i brought you.
Many thanks for this great hack!
Regards,
Rene |
|
Back to top |
|
 |
turtelina
Joined: 25 Jan 2002 Posts: 42 Location: Austria
|
Posted: Tue Jun 29, 2004 9:41 pm Post subject: |
|
|
Hi Michael,
I am trying it too, but I have problems with this step:
Quote: | Also, make sure the
variable $wxcvbn_c is defined in the loop to count the number of comments. |
I know you explained it to someone above, but I still dont understand it. What do we have to do exactly here?
Thanks Michael!
Connie |
|
Back to top |
|
 |
Cyberian75
Joined: 26 Sep 2002 Posts: 1267 Location: Oregon
|
Posted: Tue Jun 29, 2004 10:32 pm Post subject: |
|
|
Here's an example...
Code: |
...
$wxcvbn_c = 0; //define variable
while($rowc = mysql_fetch_object($resultc)) { //loop while there are data to be pulled
$wxcvbn_c++; //increment by 1
$commentdata = get_commentdata($rowc->comment_ID);
...
|
Basically, the variable "$wxcvbn_c" contains the number of comments. I've changed it to "$ccounter" in the instruction file, I believe. _________________ Michael P.
 |
|
Back to top |
|
 |
turtelina
Joined: 25 Jan 2002 Posts: 42 Location: Austria
|
Posted: Tue Jun 29, 2004 11:06 pm Post subject: |
|
|
I am really sorry Michael, but I still dont understand it.
Do I have to paste the code somewhere? Or do I have to replace every $wxcvbn_c with $ccounter? |
|
Back to top |
|
 |
Cyberian75
Joined: 26 Sep 2002 Posts: 1267 Location: Oregon
|
Posted: Wed Jun 30, 2004 3:17 am Post subject: |
|
|
I believe the file "b2comment.php" already has that variable in place partially. You still have to make it so that it gets passed by/through the form.
Like this:
Code: |
<input type="hidden" name="wxcvbn_c " value="<?php echo $wxcvbn_c ; ?>">
|
If the variable is "$wxcvbn_c" throughout other files, you might as well use that name. _________________ Michael P.
 |
|
Back to top |
|
 |
turtelina
Joined: 25 Jan 2002 Posts: 42 Location: Austria
|
Posted: Sun Jul 04, 2004 11:00 am Post subject: |
|
|
Hi Michael,
Thank you again for the reply!
I *THINK*, I might have understood you now.
There are the two files where I need to change something, right? b2comments and that b2comment.post file, right?
On those two files, are these form attributes, and I need to add the line you posted in your last reply in there. Is that it?
I am so dumb, sorry.
Have a great Sunday Michael!
Connie |
|
Back to top |
|
 |
Cyberian75
Joined: 26 Sep 2002 Posts: 1267 Location: Oregon
|
Posted: Sun Jul 04, 2004 10:23 pm Post subject: |
|
|
Hi Connie;
Yes, that's right. You've to add the form input tag for the "counter" variable in b2comments file so that its form can pass that variable on to b2comments.post file which has to process it.
I believe it's all in the instruction. Have fun!  _________________ Michael P.
 |
|
Back to top |
|
 |
turtelina
Joined: 25 Jan 2002 Posts: 42 Location: Austria
|
Posted: Sat Jul 10, 2004 11:52 am Post subject: |
|
|
Oh Michael,
Could I ask one more thing? I am going on a break from hacking my Weblog after this, so hopefully no more questions from me for a while.
In b2comments.php, that is where is pasted the code:
Quote: | <input type="hidden" name="comment_reply_ID" value="0" />
<input type="hidden" name="wxcvbn_c" value="<?php echo $wxcvbn_c; ?>" />
<input type="text" name="author" class="textarea" value="<?php echo $comment_author ?>" size="20" tabindex="1" /><br /> |
But I really have no idea where I should add the code in b2comments.post.php ?
Sorry. |
|
Back to top |
|
 |
Cyberian75
Joined: 26 Sep 2002 Posts: 1267 Location: Oregon
|
Posted: Sat Jul 10, 2004 8:56 pm Post subject: |
|
|
It's in the instruction. I just took a look at it.
 _________________ Michael P.
 |
|
Back to top |
|
 |
turtelina
Joined: 25 Jan 2002 Posts: 42 Location: Austria
|
Posted: Sun Jul 11, 2004 8:48 am Post subject: |
|
|
Thank you Michael! I will try and figure it out. Have a brilliant Sunday! |
|
Back to top |
|
 |
|