This repository has been archived on 2024-09-05. You can view files and clone it, but cannot push or open issues or pull requests.
shimmie2/ext/emoticons/theme.php

22 lines
565 B
PHP
Raw Normal View History

2009-08-08 16:43:18 +00:00
<?php
class EmoticonListTheme extends Themelet {
2017-09-19 17:55:43 +00:00
public function display_emotes(array $list) {
2009-08-08 16:43:18 +00:00
global $page;
$data_href = get_base_href();
$html = "<html><head><title>Emoticon list</title></head><body>";
$html .= "<table><tr>";
$n = 1;
foreach($list as $item) {
$pathinfo = pathinfo($item);
$name = $pathinfo["filename"];
$html .= "<td><img src='$data_href/$item'> :$name:</td>";
if($n++ % 3 == 0) $html .= "</tr><tr>";
}
$html .= "</tr></table>";
$html .= "</body></html>";
$page->set_mode("data");
$page->set_data($html);
}
}