Cotonti / Open Source PHP Content Management FrameworkContent Management Framework

Forums / Cotonti / Extensions / Comlist - Commented resources list for Siena

Generates commented resources list

Uch
#1 2012-11-22 18:18


Members
Thanked: 5 times

Comlist Plugin is a PageList clone. It shows commented pages, polls etc. (Siena)

You can use it to generate last commented pages/polls/etc. list, most commented pages/polls/etc. list and so on.

Download

As a Pagelist Plugin, Comlist is available via {PHP|comlist} callback from TPL file with the following settings:

$tpl - Template code (TPL file name without ".php" at the end)
$items - Number of items to show. 0 - all items
$order - Sorting order (SQL)
$condition - Custom selection filter (SQL)
$area - Custom comments areas list semicolon separated (both pages and polls by default)
$bwlist_cat - White and black lists of page categories. Mark categories with + or - to include them to the white or black list and separate with semicolon symbol. (+white_cat_1;...;+white_cat_N;-black_cat_1;...;-black_cat_Y;) Order does not matter.
$sub - Include subcategories in to the black and white lists of pages categorys TRUE/FALSE
$pagination - Pagination parameter name for the URL, e.g. 'pcm'. Make sure it does not conflict with other paginations. Leave it empty to turn off pagination

return string Parsed HTML

Examples:

{PHP|comlist('comlist', '10', 'com_maxdate DESC', '', 'page;polls', '', 'true')}

shows 10 last commented pages and polls in all pages categorys without pagination

{PHP|comlist('comlist', '5', 'com_maxdate DESC', '', 'page', '+news;-sport', 'TRUE', 'pcl')}

shows 5 last commented pages in 'news' categorys without pages in 'news/sport' category with pagination

{PHP|comlist('comlist', '5', 'com_count DESC', '', '', '', 'TRUE', 'pcl')}

shows 5 most commented resources (pages,polls, etc.) in all availible areas with pagination

{PHP|comlist('comlist', '5', 'com_count DESC', '', '', '+articles', 'FALSE')}

shows 5 most commented pages of the root articles category without pagination

You can turn on/turn off caching and caching for authorized users in administration panel.

Cache is sensitive to TPL code, location, language and page number.

pieter
#2 2012-11-22 18:22


Team
Thanked: 8 times

Nice, can you add this in downloads?

... can we help you ...
Uch
#3 2012-11-22 18:25


Members
Thanked: 5 times

done

foxhound
#4 2014-01-17 23:33


Donator
Thanked: 2 times

I am trying to use this plugin but it keeps giving me errors, like this:

SQL error 42000: Syntax error or access violation: 1064 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 'As pl ON c.com_code=pl.poll_id AND c.com_area = 'polls' #0 cot_diefatal(SQL error 42000: Syntax error or access violation: 1064 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 'As pl ON c.com_code=pl.poll_id AND c.com_area = 'polls') called at [D:\Dropbox\Xampp\htdocs\site\system\database.php:568] #1 CotDB->query(SELECT c.com_id, c.com_code, c.com_area, c.com_date as com_maxdate, c.com_author, c.com_authorid, c.com_text, p.*, pl.*, (SELECT COUNT(*) FROM cot_com AS ccc WHERE ccc.com_code = c.com_code) AS com_count FROM cot_com AS c LEFT JOIN cot_pages As p ON c.com_code=p.page_id AND c.com_area = 'page' AND p.page_state='0' LEFT JOIN As pl ON c.com_code=pl.poll_id AND c.com_area = 'polls' WHERE c.com_date = (SELECT MAX(com_date) FROM cot_com AS cc WHERE c.com_code = cc.com_code GROUP BY cc.com_area) AND com_area IN ('news') GROUP BY c.com_area, c.com_code ORDER BY com_maxdate DESC LIMIT 0, 5) called at [D:\Dropbox\Xampp\htdocs\site\plugins\comlist\comlist.global.php:110] #2 comlist(comlist, 5, com_maxdate DESC, , news, , TRUE, pcl) #3 call_user_func_array(comlist, Array ([0] => comlist,[1] => 5,[2] => com_maxdate DESC,[3] => ,[4] => news,[5] => ,[6] => TRUE,[7] => pcl)) called at [D:\Dropbox\Xampp\htdocs\site\system\cotemplate.php:1675]

I am getting the idea the problem is with how this plugin works with the poll comments, but I have no idea what needs to change and how. Maybe the author is still around and can take a look or maybe someone else knows how to fix this?