diff options
-rw-r--r-- | data/tpl/home | 8 | ||||
-rw-r--r-- | lib/VNDB/HomePages.pm | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/data/tpl/home b/data/tpl/home index eb73a1d9..f8dd692c 100644 --- a/data/tpl/home +++ b/data/tpl/home @@ -50,10 +50,10 @@ </ul> <ul class="home"> - <li><b>Recently added producers</b></li> - [[ for (@{$d{recentps}}) { ]]- - <li><a href="/p[[= $_->{iid} ]]" title="[[: $_->{ititle} ]]">[[: shorten $_->{ititle}, 30 ]]</a></li> - [[ } ]]- + <li><b>Random visual novels</b></li> + [[ for (@{$d{randomvns}}) { ]]- + <li><a href="/v[[= $_->{id} ]]" title="[[: $_->{title} ]]">[[: shorten $_->{title}, 30 ]]</a></li> +[[ } ]]- </ul> <ul class="home"> diff --git a/lib/VNDB/HomePages.pm b/lib/VNDB/HomePages.pm index 4907a7db..62cffe3b 100644 --- a/lib/VNDB/HomePages.pm +++ b/lib/VNDB/HomePages.pm @@ -19,7 +19,7 @@ sub HomePage { anpost => $self->DBGetPosts(tid => $an->{id}, num => 1)->[0], recentedits => scalar $self->DBGetHist( results => 10, what => 'iid ititle'), recentvns => scalar $self->DBGetHist( results => 10, what => 'iid ititle', edits => 0, type => 'v'), - recentps => scalar $self->DBGetHist( results => 10, what => 'iid ititle', edits => 0, type => 'p'), + randomvns => scalar $self->DBGetVN( results => 10, order => 'RANDOM()'), recentposts => scalar $self->DBGetThreads(results => 10, what => 'lastpost', order => 'tp2.date DESC'), # cache this shit when performance is going to be problematic upcomingrel => scalar $self->DBGetRelease(results => 10, unreleased => 1), |