Cotonti / Open Source PHP Content Management FrameworkContent Management Framework

Forums / Cotonti / General / How do I make pages "created" in future visible for the guests?

#1 2015-01-30 21:01

Hi folks,

For one of my projects, i create lots of pages on a regular basis. Here's i asked a community on how do I extend BEGIN dates further than 2000, and i appreciate a good help with it. However, I'm now stuck with another issue.

As you can see in the post mentioned above, i dont use PAGEEDIT_FORM_BEGIN. Instead, i input a date in {PHP.pag.page_begin|cot_selectbox_date($this, 'long', 'rpagebegin', '2030', '1900')} and it's all set. Nonetheless, while creating a page, if i set any future date, the page will appear in a list only for the administrators, not for regular users.

Why so? And how do I make those pages "from the future" visible for everyone?

Thank you all in advance.

Добавлено 19 часов спустя:

All right, here's what worked for me. Find a /modules/page/inc/page.list.php, and than turn a string

$where['date'] = "page_begin <= {$sys['now']} AND (page_expire = 0 OR page_expire > {$sys['now']})";


$where['date'] = "(page_expire = 0 OR page_expire > {$sys['now']})";

This post was edited by staleo (2015-01-31 16:26, 6 years ago)
#2 2015-01-31 21:45

Yes your correct solution. But when updating your cotonti you need again repeat it. better if you do creat mini plugin which is only two file yourminiplug.setup.php and and that work on this file and contain Hook page.list.query only one line

$where['date'] = "(page_expire = 0 OR page_expire > {$sys['now']})";

Pavel Tkachenko aka Dayver. Гик и веб мастер который делает сайты, увлекается электроникой и очень любит смотреть кино.
О себе: Я злой и страшный серый волк, я в поросятах знааааюююю толк