"hidden", "name"=>"image_id", "value"=>$image->id]),
INPUT(["type"=>"hidden", "name"=>"favorite_action", "value"=>$name]),
INPUT(["type"=>"submit", "value"=>$label]),
);
}
public function display_people($username_array)
{
global $page;
$i_favorites = count($username_array);
$html = "$i_favorites people:";
reset($username_array); // rewind to first element in array.
foreach ($username_array as $row) {
$username = html_escape($row);
$html .= "
$username";
}
$page->add_block(new Block("Favorited By", $html, "left", 25));
}
public function get_help_html()
{
return '
Search for posts that have been favorited a certain number of times, or favorited by a particular individual.
favorites=1
Returns posts that have been favorited once.
favorites>0
Returns posts that have been favorited 1 or more times
Can use <, <=, >, >=, or =.
favorited_by:username
Returns posts that have been favorited by "username".
favorited_by_userno:123
Returns posts that have been favorited by user 123.