Adding the Date the media was uploaded to the medias view page

Howdy!

I noticed when viewing a users photos or videos, it doesnt tell me the date it was uploaded. It only seems to do this if you have the Lightbox enabled.

Is there a snippet of code to add to the template to display the date that the video/photo was uploaded? I’m going to guess it would go in the media-single.php template, I just cant seem to nail down the right php for it.

Thanks!

I asked too soon.

<?php echo get_rtmedia_date_gmt();?>

…was the answer. I found that function in the template file, however, it doesnt actually display anywhere. If you visit the tweak play site you’ll notice it doesnt output that or the privacy symbol anywhere on the pages. I changed it to:

<div class="rtm-time-privacy rt-clear">
                            HELLO!  <?php echo get_rtmedia_date_gmt();?> <?php echo get_rtmedia_privacy_symbol(); ?>
</div>

And didnt see the HELLO! text either. :smile:

Perhaps you can submit this as a bug? :slight_smile:

Hi @illusionsglass,

You are in the right direction but it’s not where you should put this code. All the code inside this condition check if ( $rt_ajax_request ) is for lightbox and else part is for single media view. We are using same template for both lightbox and for single media view.

Put your code here instead -> https://github.com/rtCamp/rtMedia/blob/master/templates/media/media-single.php#L104