Related Topics


[Video CMS v4]How to show date added?  (Read 490 times) Print

1 B


SonicSync  March 19, 2014, 10:13:07 AM

How to display video submission date next to thumbs on main home page?


Logged


Alexander  March 19, 2014, 01:57:40 PM

In tpl/main/home.php

Replace

Code
$options =

with

Code
$options = DB_PREFIX."videos.date, ".

and to show date:

Code
$video->date
or time ago
Code
time_ago($video->date)

BUT this will make all your other pages have an error.

So copy video-loop.php to home-loop.php and change in
home.php

Code
include(TPL.'/video-loop.php');

to

Code
include(TPL.'/home-loop.php');

and now you can work in home-loop.php and add the time.

Logged

SonicSync  March 23, 2014, 09:29:06 AM

Thanks that helped!

Logged