LPH
Well-known member
Yesterday I worked on getting the latest resources from the site, today I'd like to get a script for pulling a particular notice. For example, notice 23. However, I'm not sure how to actually display the notice. Now, I know what is below just posts "array" but this is because I wasn't sure of the echo.
Update: This code has been updated to show what works. Thank you Chris.
PHP:
<div class="scrollContainer">
<div class="PanelContainer">
<?php
/* Script to pull a notice from the XF */
/** @var $notModel XenForo_Model_Notice */
$notModel = XenForo_Model::create('XenForo_Model_Notice');
$notices = $notModel->getNoticeById(23);
echo $notices['message'];
?>
</div> <!-- End PanelContainer -->
</div> <!-- End scrollContainer -->
Update: This code has been updated to show what works. Thank you Chris.