Hello/Hi/Greetings,
Where is index.php?/recent_pics tpl located ?
Piwigo 13.4 Boostrap Darkroom
Piwigo URL: http://
Last edited by BigIsland270972 (2023-01-17 14:00:27)
Offline
Hi,
looks like it's the same template for several page types among category, recent_pics, ... etc.
Give a try to /themes/default/template/thumbnails.tpl
Offline
Let me explain further. I need to change the recent pics database query to the same as plugins/PWG_Stuffs/modules/Recent/main.inc.php: ENTRY: i.date_metadata_update instead of date_available
to code: $query ='
SELECT DISTINCT(i.id)
FROM '.IMAGES_TABLE.' AS i
INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON i.id = ic.image_id
INNER JOIN '.CATEGORIES_TABLE.' AS c ON ic.category_id = c.id';
if (!isset($datas['recent_period_only']) or
$datas['recent_period_only'])
{
$query .= '
WHERE i.date_metadata_update >= SUBDATE(
CURRENT_DATE,INTERVAL '.$user['recent_period'].' DAY)
';
}
if (isset($page['category']))
{
$query .= '
AND ( c.uppercats LIKE \''.$page['category']['uppercats'].',%\' OR c.id = '.$page['category']['id'].' )
';
}
Last edited by BigIsland270972 (2023-01-17 18:49:23)
Offline
FOUND IT! in /include/section_init.inc.php
// +-----------------------------------------------------------------------+
// | recent pictures section |
// +-----------------------------------------------------------------------+
else if ($page['section'] == 'recent_pics')
{
if ( !isset($page['super_order_by']) )
{
$conf['order_by'] = str_replace(
'ORDER BY ',
'ORDER BY date_metadata_update DESC,', ===CHANGE
$conf['order_by']
);
}
$query = '
SELECT DISTINCT(id)
FROM '.IMAGES_TABLE.'
INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id = ic.image_id
WHERE '
.get_recent_photos_sql('date_metadata_update').' ===CHANGE
'.$forbidden
.$conf['order_by'].'
;';
$page = array_merge(
$page,
array(
'title' => '<a href="'.duplicate_index_url(array('start'=>0)).'">'
.l10n('Recent photos').'</a>',
'items' => query2array($query,null, 'id'),
)
);
}
Offline