aowow/template/bricks/announcement.tpl.php
Sarjuuk 9b281f45cb Zone:
* added customFlags to infoBox
Misc:
 * moved no-cache header to separate utility function
 * pages may now require the user to be authed as he can be authed AND
   have no userGroups simultaneously
 * minor changes to announcements
2014-11-09 19:10:52 +01:00

13 lines
No EOL
426 B
PHP

<?php
foreach ($this->announcements as $id => $data):
$data = json_encode($data, JSON_NUMERIC_CHECK);
// json_encode does not recognize variables
$data = preg_replace('/"\$((.+?)([^\\\\]))"/i', '$1', $data);
?>
<div id="announcement-<?php echo $id; ?>"></div>
<script type="text/javascript">
new Announcement(<?php echo $data; ?>);
</script>
<?php
endforeach;
?>