boardom Forum Index boardom
b2 message board
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

b2comments -- Notify Me/Subscription Options (FINAL)
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    boardom Forum Index -> Hacks
View previous topic :: View next topic  
Author Message
Cyberian75



Joined: 26 Sep 2002
Posts: 1267
Location: Oregon

PostPosted: Tue Feb 10, 2004 8:45 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
rmaathuis



Joined: 05 Jan 2004
Posts: 7
Location: The Netherlands

PostPosted: Wed Feb 11, 2004 12:54 am    Post subject: Reply with quote

Hi Michael,

thanks for the fast response, however even with these suggestions I get no result Sad and I really would like this feature in my blog.

Can you think of something else?

Regards,

Rene
Back to top
View user's profile Send private message Visit poster's website
Cyberian75



Joined: 26 Sep 2002
Posts: 1267
Location: Oregon

PostPosted: Wed Feb 11, 2004 1:00 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
rmaathuis



Joined: 05 Jan 2004
Posts: 7
Location: The Netherlands

PostPosted: Wed Feb 11, 2004 1:16 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
turtelina



Joined: 25 Jan 2002
Posts: 42
Location: Austria

PostPosted: Tue Jun 29, 2004 9:41 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Cyberian75



Joined: 26 Sep 2002
Posts: 1267
Location: Oregon

PostPosted: Tue Jun 29, 2004 10:32 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
turtelina



Joined: 25 Jan 2002
Posts: 42
Location: Austria

PostPosted: Tue Jun 29, 2004 11:06 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Cyberian75



Joined: 26 Sep 2002
Posts: 1267
Location: Oregon

PostPosted: Wed Jun 30, 2004 3:17 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
turtelina



Joined: 25 Jan 2002
Posts: 42
Location: Austria

PostPosted: Sun Jul 04, 2004 11:00 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Cyberian75



Joined: 26 Sep 2002
Posts: 1267
Location: Oregon

PostPosted: Sun Jul 04, 2004 10:23 pm    Post subject: Reply with quote

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! Smile
_________________
Michael P.

Back to top
View user's profile Send private message AIM Address
turtelina



Joined: 25 Jan 2002
Posts: 42
Location: Austria

PostPosted: Sat Jul 10, 2004 11:52 am    Post subject: Reply with quote

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

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
View user's profile Send private message Visit poster's website
Cyberian75



Joined: 26 Sep 2002
Posts: 1267
Location: Oregon

PostPosted: Sat Jul 10, 2004 8:56 pm    Post subject: Reply with quote

It's in the instruction. I just took a look at it.

Smile
_________________
Michael P.

Back to top
View user's profile Send private message AIM Address
turtelina



Joined: 25 Jan 2002
Posts: 42
Location: Austria

PostPosted: Sun Jul 11, 2004 8:48 am    Post subject: Reply with quote

Thank you Michael! I will try and figure it out. Have a brilliant Sunday!
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    boardom Forum Index -> Hacks All times are GMT + 1 Hour
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2 © 2001, 2002 phpBB Group