Cotonti / Open Source PHP Content Management FrameworkContent Management Framework

Форумы / Cotonti / General / How do I make pages "created" in future visible for the guests?

#40493 30.01.2015 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']})";

Отредактировано: staleo (31.01.2015 16:26, 6 лет назад)