Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.
Please keep in mind:
<a>This image will expire in <?php echo CHV\get_safe_post()['image_expiration'] : get_user()['image_expiration']);?> days</a>
How? I like the sound of thisFinally worked out how to do this
78
in /app/themes/Peafowl/views/image.php
, add:My code:
After line78
in/app/themes/Peafowl/views/image.php
, add:
[CODE lang="php" title="/app/themes/Peafowl/views/image.php" highlight="12"]<div class="breadcrum-item">
<?php
if (get_image()['expiration_date_gmt']) {
$date1=date_create(date());
$date2=date_create(get_image()['expiration_date_gmt']);
$diff=date_diff($date1,$date2);
echo $diff->format("This picture will expire in %a days");
// echo (get_image()['expiration_date_gmt']);
}
?>
<a href="https://domain.co.uk/chevereto/page/faq" rel="tooltip" data-tiptip="top" title="Find out more about our live rolling feed"> <small>Why?</small></a>
</div>[/CODE]
Will produce:
View attachment 2588
Under the image, in the image view. The 'why?' text (line 12 of code) links to a FAQ page that I have created for my needs.
Hope that helps.
Very good stuff sir πV4.0.0.beta.5 adds this.
Chevereto v4.0.0.beta.5 announcement
Hey there, I'm opening this topic to follow up the ongoing development for Chevereto V4.0.0.beta.5. π Stay tuned for updates and previews.chevereto.com
V4.0.0.beta.5 adds this.
Chevereto v4.0.0.beta.5 announcement
Hey there, I'm opening this topic to follow up the ongoing development for Chevereto V4.0.0.beta.5. π Stay tuned for updates and previews.chevereto.com
<?php
if (get_image()['expiration_date_gmt']) {
$date1=date_create(date());
$date2=date_create(get_image()['expiration_date_gmt']);
$diff=date_diff($date1,$date2);
echo $diff->format("This picture will expire in %a days");
// echo (get_image()['expiration_date_gmt']);
}
?>
Yes, it is a different version where the theme vars have been deprecated.Regardless of the beta, can you give me a hint why the code isn't working anymore?