• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

[XFR] BoardNotices - advanced notice system

Wow, you read my mind. This is the ONE thing that I was missing from my previous system... and now life is complete! Thanks!
 
I got this error:

Code:
Error Info Zend_Db_Statement_Mysqli_Exception: Mysqli prepare error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 2 - library/Zend/Db/Statement/Mysqli.php:77

Stack Trace

#0 /public_html/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('????DELETE FROM...')
#1 /public_html/library/Zend/Db/Adapter/Mysqli.php(381): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), '????DELETE FROM...')
#2 /public_html/library/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('????DELETE FROM...')
#3 /public_html/library/XfRu/BoardNotices/Model/Notice.php(254): Zend_Db_Adapter_Abstract->query('????DELETE FROM...')
#4 /public_html/library/XfRu/BoardNotices/Model/Notice.php(229): XfRu_BoardNotices_Model_Notice->deleteDismissionsByNoticeIds(Array)
#5 /public_html/library/XfRu/BoardNotices/CronEntry/Archive.php(19): XfRu_BoardNotices_Model_Notice->archiveExpiredNotices()
#6 [internal function]: XfRu_BoardNotices_CronEntry_Archive::archiveNotices()
#7 /public_html/library/XenForo/Model/Cron.php(353): call_user_func(Array)
#8 /public_html/library/WhoHasReadAThread/Model/Cron.php(30): XenForo_Model_Cron->runEntry(Array)
#9 /public_html/library/XenForo/Cron.php(29): WhoHasReadAThread_Model_Cron->runEntry(Array)
#10 /public_html/library/XenForo/Cron.php(64): XenForo_Cron->run()
#11 /public_html/cron.php(12): XenForo_Cron::runAndOutput()
#12 {main}

Request State
 
            array(3) {
  ["url"] => string(46) "http://www.site.com/cron.php?1304727210"
  ["_GET"] => array(1) {
    [1304727210] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}
 
If you want to display the notice system in the portal (Xen Porta), edit​
EWRporta_Portal template (Admin control panel -> appearance -> Templates -> appropriate style -> template EWRporta_Portal -> double click):​

Search (near the beginning, line 10):​
PHP:
<xen:if is="{$blocks.top}">
<div class="sidebar topBlocks">
<xen:foreach loop="$blocks.top" value="$block">
{xen:raw $block}
</xen:foreach>
</div>
</xen:if>

And change it for:
PHP:
<xen:hook name="forum_list_nodes">

<xen:if is="{$blocks.top}">
<div class="sidebar topBlocks">
<xen:foreach loop="$blocks.top" value="$block">
{xen:raw $block}
</xen:foreach>
</div>
</xen:if>

</xen:hook>

An alternative is:

PHP:
<xen:hook name="forum_list_nodes">
</xen:hook>


<xen:if is="{$blocks.top}">
<div class="sidebar topBlocks">
<xen:foreach loop="$blocks.top" value="$block">
{xen:raw $block}
</xen:foreach>
</div>
</xen:if>

Also be on the portal and work fine.​

1.webp​

Salud2​
 
Fantastic one!!! Just a question. Is it possible to show a notice when a user subscription is ended? Since XF does not send any warning or email, I would like to use your addon to make a notice appear when the subscription is ended.

Thank you!
 
In xfr_bn_acp_notice_edit template don´t exist phrase from in
PHP:
                {xen:phrase from}: <xen:textbox type="date" name="start_date" value="{xen:if $notice.start_date, {xen:date $notice.start_date, picker}, ''}" />

Please, put it.

Salud2
 
Another suggestion with regards to displays. I'm liking the global option but I think it would be very nice option to add in the display settings if you can check and select a forum index only display. For me especially it would save cluttering other notices in specific areas whilst still reaching out to members for the time limited notices. :)
 
If you want to display the notice system in the portal (Xen Porta), edit​
EWRporta_Portal template (Admin control panel -> appearance -> Templates -> appropriate style -> template EWRporta_Portal -> double click):​

Also be on the portal and work fine.​


Salud2​

Just what I needed. Thank you!
 
Installed! Great addon but I would like to have something more customizable including also, for example

Birthdate of a user
End of subscription

Anyway thanks a lot...
 
Awesome addon, love it, was a feature I had been gravely missing from when we converted from VB to XenForo. Donation on it's way.
 
Very useful addon, especially for those whom are constantly working on different things within their community.
 
Back
Top Bottom