Foren / National / Russian / Модули и плагины / [Plugin] Pagelist

Build customized page list widgets

foxhound
#38987 16. Januar 2014, 17:52

Wow, thank you both very much! That has been very helpfull.
I decided to use Kort's approach as he used the available tag and I read if thats available it is adviced to use that instead of a php global. But I really appreciate you both posted different approaches.

And, just to show I am not only asking questions I used this plugin to output random newspages (20 items) from the last 3 months, except the current page like this: 

{PHP|pagelist('pagelist.random_news',20,'RAND()','UNIX_TIMESTAMP() < (page_date + 7889231)','news','','','TRUE','','TRUE')}

 

And this gives you all most read pages from the last month of a certain category (and sub categories) (10 items per page): 

{PHP|pagelist('pagelist.popular_news',10,'page_count DESC','UNIX_TIMESTAMP() < (page_date + 2629743)','mycat','','','true','','FALSE')}

I know most of you wont have any use for it, but maybe it helps someone like me someday ;)

 

Added 17 hours later:

Is it possible to also make this work with comments? I tried things like this: 

{PAGE_ROW_COMMENTS_COUNT|pagelist('pagelist.authorpage','5','$this DESC','','news','','','TRUE','','')}

But it keeps giving sql errors.
I also tried to add a condition to only list when "$this > 0" but it seems its ignoring anything.
 

I also tried this plugin: http://www.cotonti.com/extensions/navigation-structure/581 but it seems to no longer work.
I guess/fear the pagelist plugin can not create any output based on comments as comments are just an additional plugin?

<img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />

Dieser Beitrag wurde von foxhound (am 17. Januar 2014, 10:54, vor 10 Jahre) bearbeitet