Jeremy
in memoriam 1991-2020
I looked at it after xfrocks post. Hadn't noticed it before.well thanks for pointing it out sooner
I looked at it after xfrocks post. Hadn't noticed it before.well thanks for pointing it out sooner
Oh I just tested it, it does a completely announce, even in the homepage, is there a way to set it up to be sticky inside the forums & sub-forums only?
I just want to add a global form rules and have it inside every forum. just not the homepage forum
Oh and when I have sub-forums, the announcement goes under the sub-forums, should be above
<?php
class PHCannouncements_Listener_Hook
{
public static function listen($hookName, &$contents, array $hookParams, XenForo_Template_Abstract $template)
{
if ($hookName == 'forum_list_nodes' || $hookName == 'forum_view_pagenav_before')
{
$globalModel = XenForo_Model::create('PHCannouncements_Model_Threads');
$threads = $globalModel->Announcements();
$hookParams['announcements'] = $threads;
$contents = $template->create('PHCannouncements', $hookParams) . $contents;
}
}
}
?>
right?if ($hookName == 'forum_list_nodes' || $hookName == 'forum_view_pagenav_before')
if ($hookName == 'forum_list_nodes' || $hookName == 'forum_view_pagenav_before')
if ($hookName == 'forum_view_pagenav_before')
Woops! indeed, it works amazingly! you're like a magicianTo remove from the homepage change
PHP:if ($hookName == 'forum_list_nodes' || $hookName == 'forum_view_pagenav_before')
to
PHP:if ($hookName == 'forum_view_pagenav_before')
WOW THIS IS SO COOL!!!!!! 5 STARS BROlmao. Home page of admin panel -> Announcements on the side bar.
Only thing I can think of at the moment is the phrase that says 'Announcement Title' I wish it just said 'Announcement: Please Read' or let us configure the phrase through admincp.Thanks man
I'm going to be doing any update soon. Are there any changes anyone would like to see?
We use essential cookies to make this site work, and optional cookies to enhance your experience.