1.5.0 Rating Statistics and...

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

bakabaka
Posts: 15
Joined: Thu Mar 10, 2005 12:45 am
Location: USA
Contact:

1.5.0 Rating Statistics and...

Post by bakabaka »

Hi!

I just upgraded from 1.4.11 to 1.5.0. It appears that when an item has been given more than one type of rating, the ratings are split into separate entries rather than averaged. I'll look into it a bit more later, but is this a bug or a feature? :)

Also, I know this probably isn't the right forum for such requests, but have you considered making an option for logging into the FAQ outside of admin mode? Basically something that allows admins to mark an article as accessable for logged in users only, so articles could be stored that one might not want open to everyone. Admin mode doesn't display articles in the same way that a user would view them, otherwise that would be perfect. Perhaps the logged in accounts could even use SSL if the entire FAQ wasn't behind SSL.

I really like the way the FAQ works and the interface for creating articles, it would be great if it had this sort of functionality. Thank you again for such an excellent method for sharing information!
Thorsten
Posts: 15562
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

both things will be implemented in version 1.6 which I started some days ago. :-)

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
bakabaka
Posts: 15
Joined: Thu Mar 10, 2005 12:45 am
Location: USA
Contact:

Post by bakabaka »

Hi Thorsten,

Great! It sounds like the next version's going to be even better. The ability to place an article in more than one category is already an excellent improvement. Incidentally, here's a screen shot of the statistics behavior I was talking about earlier:

http://xyzzy.dyn.dhs.org/images/rating-statistics.png

It only seems to happen when there are different ratings for an item (that is, maybe one 75% and one 100%).
Thorsten
Posts: 15562
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

your page isn't available.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
bakabaka
Posts: 15
Joined: Thu Mar 10, 2005 12:45 am
Location: USA
Contact:

Post by bakabaka »

Hi Thorsten,

That's odd, it seems to work ok here. I'll try inserting it directly in the message.

Image
Thorsten
Posts: 15562
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

I'll take a look at it!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
bakabaka
Posts: 15
Joined: Thu Mar 10, 2005 12:45 am
Location: USA
Contact:

Post by bakabaka »

Hi Thorsten,

I had a bit of spare time and decided to look into the code that handles the grouping of the ratings in "admin/stat.ratings.php". I found that this works well enough for my purposes:

Code: Select all

 $result = $db->query('SELECT '.SQLPREFIX.'faqdata.id, '.SQLPREFIX.'faqdata.lang, '.SQLPREFIX.'faqdata.active, '.SQLPREFIX.'faqcategoryrelations.category_id, '.SQLPREFIX.'faqdata.thema, AVG('.SQLPREFIX.'faqvoting.vote) AS num, count(*) FROM '.SQLPREFIX.'faqvoting, '.SQLPREFIX.'faqdata LEFT JOIN '.SQLPREFIX.'faqcategoryrelations ON '.SQLPREFIX.'faqdata.id = '.SQLPREFIX.'faqcategoryrelations.record_id AND '.SQLPREFIX.'faqdata.lang = '.SQLPREFIX.'faqcategoryrelations.record_lang WHERE '.SQLPREFIX.'faqdata.id = '.SQLPREFIX.'faqvoting.artikel GROUP BY 
'.SQLPREFIX.'faqdata.id ORDER BY '.SQLPREFIX.'faqcategoryrelations.category_id' 
);

I won't pretend to be familiar enough with the code to know why the grouping was being done with all the other elements, but it seems to work ok once I changed it to this. For reference, this is what I removed from the select statement:

Code: Select all

, '.SQLPREFIX.'faqdata.lang, '.SQLPREFIX.'faqdata.active, '.SQLPREFIX
.'faqcategoryrelations.category_id, '.SQLPREFIX.'faqdata.thema, '.SQLPREFIX.'faqvoting.vote, '.SQLPREFIX.'faqvoting.usr 
I hope this helps! :)
Thorsten
Posts: 15562
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

thanks a lot, I'll fix this in 1.5.1!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Thorsten
Posts: 15562
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

it's fixed now in 1.5.1 and 1.6.0-dev.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
bakabaka
Posts: 15
Joined: Thu Mar 10, 2005 12:45 am
Location: USA
Contact:

Post by bakabaka »

Hi Thorsten,

Thanks for the quick fix! Version 1.5 is running great, the new features like XHTML export look very cool. :)
ljvd
Posts: 21
Joined: Tue Aug 17, 2004 8:53 am
Location: Paris , France
Contact:

Post by ljvd »

Thorsten wrote: it's fixed now in 1.5.1 and 1.6.0-dev.
i'have the same problem in 1.5.2
Laurent J.V. Dubois
Your French Sales Partner
Thorsten
Posts: 15562
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

I'' ll check it!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
bakabaka
Posts: 15
Joined: Thu Mar 10, 2005 12:45 am
Location: USA
Contact:

Post by bakabaka »

Hi Thorsten,

It looks like this is happening again in 1.5.3, although the grey and green percentage bars are gone now. The same solution posted before appears to work to allow grouping of ratings again... Is this perhaps a new feature in the works? :)
Thorsten
Posts: 15562
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

I'll fix this for 1.5.4!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Thorsten
Posts: 15562
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

please test a stable snapshot tomorrow. This bug should be fixed in this version.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply