Recent Topics

1 Jun 28, 2006 01:16    

Hey, I've had isaac's recent.php running for awhile now on my blog autodogmatic.com. However, the comment numbering has always ceased working on any blog but the main blogall. Here is the code from the _recent file:

 // comment number stuff 
     if($recent_ShowCommentNumber) 
     { 
         echo '&npsp;<span class="dimmed">'; 
         echo '(' . generic_ctp_number($BItem->ID, 'feedbacks') . ')'; 
         echo '</span>'; 
     } 

Any ideas why this is happening? I've been fooling with it for the longest time and can't figure it out. I'm running 0.9.1. If you know the problem and can help, many, many thanks.

2 Jun 28, 2006 11:09

I'd try adding an echo to make sure that $recent_ShowCommentNumber is set ;)

 // comment number stuff
echo $recent_ShowCommentNumber;
     if($recent_ShowCommentNumber)

¥

3 Jun 28, 2006 20:56

Hmm ... that didn't work - it just put a 1 in front of the parentheses. Also, I'm getting an SQL error on my comments page - any other thoughts?

Warning: Invalid argument supplied for foreach() in /usr/local/4admin/apache/vhosts/autodogmatic.com/httpdocs/b2evocore/_functions_comments.php on line 41

MySQL error!

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') GROUP BY comment_post_ID, comment_type' at line 3(Errno=1064)

Your query: 


SELECT comment_post_ID, comment_type, COUNT(*) AS type_count 
              FROM evo_comments 
              WHERE comment_post_ID IN () 
              GROUP BY comment_post_ID, comment_type

4 Jun 29, 2006 09:43

Are you sure that $BItem is set? Your sql error is caused because the query isn't being given a post_ID.

¥

5 Jun 29, 2006 18:49

I'm not sure if the $BItem is set - how would I check?

6 Jun 29, 2006 18:56

replace the echo from the previous post and see if you get a screenfull of garbage ;)

 // comment number stuff
print_r( $BItem );
     if($recent_ShowCommentNumber)


¥

7 Jun 29, 2006 19:13

Recently
Jesus Loves You: Meaningful Love, Part IIitem Object ( [ID] => 163

*edit*
Removed bits to do with your DB

9 Jun 30, 2006 11:51

Ok, try this :-

 // comment number stuff
$savedItem = $Item;
$Item = $BItem;
     if($recent_ShowCommentNumber)
     {
         echo '&npsp;<span class="dimmed">';
         echo '(' . generic_ctp_number($Item->ID, 'feedbacks') . ')';
         echo '</span>';
     }
$Item = $savedItem;

¥

10 Jun 30, 2006 21:42

Hmm ... still getting this error:

MySQL error!

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') GROUP BY comment_post_ID, comment_type' at line 3(Errno=1064)

Your query: 


SELECT comment_post_ID, comment_type, COUNT(*) AS type_count 
              FROM evo_comments 
              WHERE comment_post_ID IN () 
              GROUP BY comment_post_ID, comment_type

11 Jun 30, 2006 23:07

[offtopic]
NealO, Is there any reason you decided not to inlcude a linkback to b2evolution in your blog skin? A linkback is not required, but it is considerate. Most skins include it by default. And many people in the forum like to see that link before they start giving you free tech support ([url=http://forums.b2evolution.net/viewtopic.php?t=7063]including YaBBa[/url].) Surely you have room for a b2evolution button at the bottom of your page with all fof the other badges. Every linkback helps promote the project.
[/offtopic]

12 Jul 01, 2006 02:37

personman wrote:

... Most skins include it by default ...

ALL skins include it, meaning everyone without it chose to remove it. Add me to the list of forum players who don't help those who can't give a little link-love to b2evolution.net.

13 Jul 01, 2006 11:36

the offtopic personman wrote:

NealO, Is there any reason you decided not to inlcude a linkback to b2evolution in your blog skin? A linkback is not required, but it is considerate. Most skins include it by default. And many people in the forum like to see that link before they start giving you free tech support (including YaBBa.) Surely you have room for a b2evolution button at the bottom of your page with all fof the other badges. Every linkback helps promote the project.

Damn, I'm getting old :p

As it happens, this one's got me stumped so I can't be of further use anyway.

¥

14 Jul 05, 2006 02:04

Personman,

Yeah I took that off way back when I first started tweaking b2e - I pretty much just wiped the footer clean. That said, I definitely owe some link love back to b2e and shouldn't have removed all homage to b2e. Thanks for pointing out my sloth - I'll get on fixing it.

15 Jul 05, 2006 16:15

Added it back - now all the world knows that the power behind autoDogmatic is b2e!

16 Jul 06, 2006 11:06

As it happens, this one's got me stumped so I can't be of further use anyway.

Unfortunately having a link hasn't unstumped me.

¥

17 Jul 06, 2006 23:41

Yeah I didn't expect that to change


Form is loading...