Lyften Bloggie - lyften bloggie & jcomments - Forums

Items per page:

Showing 1-10 of 14 items

Hi guys,

 

I was trying to use Lyften Bloggie on my website and used Jcomments for the comment part, because I want to allow unregistered users to comment to the blog arcticles.

The commenting itself is working.

unfortunatly the comment counter on the blog overview always says "0" comments.

I chcked all settings but haven't found any error yet.

Can anyone help?

 Thanks,

Lara

Hi,

I have exactly the same problem. In combination with jcomments, no comment count is shown at preview.

Tried to find the code problem but could not find it yet.

I am wondering why this could happen, especially because of this post from daniel :

http://www.lyften.com/support/forums/lyften-bloggie/1-0-4-new-theme-and-jomcoment.html

Please, help me and all the other user suffering from this problem.

Thanx,

Peter

 

Sorry for my poor english

 

When using jcomments, you need to modify the sql query in file components/com_lyftenbloggie/models/lyftenbloggie.php

There is a method called _buildQuery in line 82, change the query as the following

$query = 'SELECT e.*, COUNT(c.id) AS comcount,'
                .' CASE WHEN CHAR_LENGTH(e.alias) THEN CONCAT_WS(":", e.id, e.alias) ELSE e.id END as slug,'
                .' CASE WHEN CHAR_LENGTH(cat.slug) THEN cat.slug ELSE 0 END as catslug'
                .' FROM #__bloggies_entries AS e'
                .' LEFT JOIN #__jcomments AS c ON c.object_id = e.id '
                .' LEFT JOIN #__bloggies_categories AS cat ON cat.id = e.catid'
                .$tags
                .$where
                .' GROUP BY e.id'               
                .' ORDER BY e.created DESC'
                ;

 which join the table to jcomment to select correct comments.

Finally, if you are using  "anemoi" theme,  comment out following code at line 23 

<?php if ($this->params->get('typeComments', '1') == '1') {
                                $comcount     = ($entry->comcount)?$entry->comcount:'0';
                            }else{
                                $comcount     = '0';
                            }
$jump     = ($entry->allowComments) ? '#comment' : '';  ?>

which set you comment count to 0 when not using lyftenbloggie default comment.

use  ($entry->comcount)?$entry->comcount:'0' to display the correct comment count

 


I tried the first step: making the changes in the lyftenbloggie.php.

Unfortunatly this didn't work. Now I'm getting some strange php errors :(

could you please describe the solution in a little bit more detail, that even a not so technical woman can understand ? :)

 

Thanks,

Lara


Hello,

sorry for my poor english...

 

I tried the first step and works for me. But the second step dont work. I dont found anything in the line 23.

Can you explain it?

Thanks in advance.

iago.

 

Thank you very much, you are a lifesaver! For others who don't understand his unwritten words, which are obviously not written so there is nothing to understand.. anyway, here is explanation. I guess that the first step is easy, and all of you could do it. But he forgot to mention that second correction is in file entries.php located in folder com_lyftenbloggie/addons/themes/anemoi. Open it, and on line 22 you will find this code. I simply replaced all code on lines 22-26, including 26th line, with this code:

<?php $comcount     = ($entry->comcount)?$entry->comcount:'0';

Or if you want it this way, delete italic code leaving bolded, starting on line 22nd:

<?php if ($this->params->get('typeComments', '1') == '1') {
                                $comcount     = ($entry->comcount)?$entry->comcount:'0';
                            }else{
                                $comcount     = '0';
                            }


Voila! It works now...


[Cyril Leung 01 Feb 2010 05:14:27]

Sorry for my poor english

 

When using jcomments, you need to modify the sql query in file components/com_lyftenbloggie/models/lyftenbloggie.php

There is a method called _buildQuery in line 82, change the query as the following

$query = 'SELECT e.*, COUNT(c.id) AS comcount,'
                .' CASE WHEN CHAR_LENGTH(e.alias) THEN CONCAT_WS(":", e.id, e.alias) ELSE e.id END as slug,'
                .' CASE WHEN CHAR_LENGTH(cat.slug) THEN cat.slug ELSE 0 END as catslug'
                .' FROM #__bloggies_entries AS e'
                .' LEFT JOIN #__jcomments AS c ON c.object_id = e.id '
                .' LEFT JOIN #__bloggies_categories AS cat ON cat.id = e.catid'
                .$tags
                .$where
                .' GROUP BY e.id'               
                .' ORDER BY e.created DESC'
                ;

 which join the table to jcomment to select correct comments.

Finally, if you are using  "anemoi" theme,  comment out following code at line 23 

<?php if ($this->params->get('typeComments', '1') == '1') {
                                $comcount     = ($entry->comcount)?$entry->comcount:'0';
                            }else{
                                $comcount     = '0';
                            }
$jump     = ($entry->allowComments) ? '#comment' : '';  ?>

which set you comment count to 0 when not using lyftenbloggie default comment.

use  ($entry->comcount)?$entry->comcount:'0' to display the correct comment count

 

Hi all,

I've tried this fix with jcomments and have run into issues...  I fix the code in the lyftenbloggie.php and the code in the anemoi theme, but get 3 errors showing on the blog frontpage.  I have enabled jcomments as the commenting tool in Lyften.  What am I missing?
Woops...

Here are the errors I'm getting after 'fixing' the code...

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in .../joomla/database/database/mysql.php on line 344

Warning: array_walk() [function.array-walk]: The argument should be an array in .../components/com_lyftenbloggie/models/lyftenbloggie.php on line 73

Warning: Invalid argument supplied for foreach() in .../components/com_lyftenbloggie/addons/themes/anemoi/entries.php on line 14
No blog entries found
In the new beta release the jcomments ARE working.  So I wouldn't tinker with the old one and jsut wait for the new release...

Now to get those page breaks to work.

Nevermind the new release Page Breaks do not work either... I will refrain from upgradnig on my main site until the bugs are worked out. (thought that is what Beta testing was for)

i am extremely confused.


[Artie 07 Jul 2010 03:59:12]

In the new beta release the jcomments ARE working.  So I wouldn't tinker with the old one and jsut wait for the new release...

Now to get those page breaks to work.

Items per page:

Showing 1-10 of 14 items