Esempio n. 1
0
function h2_render_text($template, $actors = array())
{
    $find = array();
    $repl = array();
    foreach ($actors as $actor) {
        $act++;
        $find[] = '$actor' . $act;
        $repl[] = HubbubEntity::link($actor);
    }
    return str_replace($find, $repl, $template);
}
Esempio n. 2
0
function tmpl_friendlist($list, $rowCallback2 = '')
{
    ?>
<table width="100%"><?php 
    foreach ($list as $ds) {
        ?>
<tr class="drow_<?php 
        echo $ds['_key'];
        ?>
">
      <td colspan="10"><div style="width: 100%; border-top: 1px solid #aaa;"></div></td>
    </tr class="drow_<?php 
        echo $ds['_key'];
        ?>
"><tr>
      <td valign="top" width="60"><img src="<?php 
        echo getDefault($ds['pic'], 'img/anonymous.png');
        ?>
" width="48" style="max-height: 48px"/></td>
      <td valign="top" width="50%">
        <div><?php 
        echo HubbubEntity::link($ds);
        ?>
</div>
        <div class="smalltext"><?php 
        echo htmlspecialchars($ds['url']);
        ?>
</div>
      </td>
			<td valign="top">
				<?
				if($rowCallback2 != '') $rowCallback2($ds);
				?>
			</td>
    </tr><?php 
    }
    ?>
</table><?php 
}