2021-12-14 18:32:47 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
2020-05-15 10:22:54 +03:00
|
|
|
|
|
|
|
class ImageViewCounterTheme extends Themelet
|
|
|
|
{
|
|
|
|
public function view_popular($images)
|
|
|
|
{
|
|
|
|
global $page, $config;
|
|
|
|
$pop_images = "";
|
|
|
|
foreach ($images as $image) {
|
2020-10-24 22:33:29 +01:00
|
|
|
$pop_images .= $this->build_thumb_html($image) . "\n";
|
2020-05-15 10:22:54 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
$nav_html = "<a href=".make_link().">Index</a>";
|
|
|
|
|
|
|
|
$page->set_heading($config->get_string(SetupConfig::TITLE));
|
|
|
|
$page->add_block(new Block("Navigation", $nav_html, "left", 10));
|
2020-10-24 22:33:29 +01:00
|
|
|
$page->add_block(new Block(null, $pop_images, "main", 30));
|
2020-05-15 10:22:54 +03:00
|
|
|
}
|
|
|
|
|
2021-03-14 23:43:50 +00:00
|
|
|
public function get_help_html(): string
|
2020-05-15 10:22:54 +03:00
|
|
|
{
|
2020-10-26 10:13:28 -05:00
|
|
|
return '<p>Search for posts that have received views by users.</p>';
|
2020-05-15 10:22:54 +03:00
|
|
|
}
|
|
|
|
}
|