• 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

Hey,

Just checking in after testing it out a bit, and have a few comments and suggestions..
  • Would you consider adding the ability to show a notice to someone if they haven't posted in X amount of days? I'd like to set a "post more often" notice but not to active members.
  • Maybe consider adjusting the active date selection display code, so I can put in a full date MANUALLY without using the popup and having to scroll forever to keep a notice permanently? Right now I just set it to some far off date in 2016, which requires a huge amount of clicks and is less than ideal.
  • Could you look into the possibility of calling the person's username in the text field (via something like {username} or similar), so you can say "Hello, Username". More personal.
  • How would I do a "Never Posted" before notice? I set posts count criteria to "0 to 0" but it still showed for every member even if they have thousands of posts. I want to have a message for those who are registered, but have 0 posts so far.

Thank you so much for your hard work on this, I hope these suggestions are useful.
 
'Send alert 'there are bug

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 3

  1. Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
  2. Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
  3. Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
  4. Zend_Db_Adapter_Abstract->query() in XenForo/Model.php at line 218
  5. XenForo_Model->fetchAllKeyed() in XfRu/BoardNotices/Model/Notice.php at line 181
  6. XfRu_BoardNotices_Model_Notice->sendAlert() in XfRu/BoardNotices/ControllerPublic/Notice.php at line 74
  7. XfRu_BoardNotices_ControllerPublic_Notice->actionAlert() in XenForo/FrontController.php at line 310
  8. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  9. XenForo_FrontController->run() in /home/xxx/public_html/index.php at line 13
 
I've uploded the XML file to the first post, wich fixes bugs with phrases.
Second bug: styling doesn't work. Something wrong with {$notice.type}. It always sets class as 'info'.
Can't reproduce this.

if the notice appeared above where it says "BBsmiley" the .titleBar h1 rather than below it. ... I also feel if you look at the "Send alert" text link if we can have the A in alert capitalised? ...
I also feel that the double border around the vatar is not needed (although this can be done through css styling) I feel the avatars work out better displayed at 48px rather than the smaller size.

About notice position - I'll look, what hooks we have, and probably I'll add ability to choose where notice should appear. Letter A is now capitalised. As for avatar, I'll leave this without changes for now, but this is not a problem to change this through styling. BTW, there are some things can be changed in styling options. But there can be problem with border color - I'm setting it with border-color as I'm later using it for child styles as xenforo style variable...
 

Attachments

  • sp.webp
    sp.webp
    43.9 KB · Views: 17
Hey,

Just checking in after testing it out a bit, and have a few comments and suggestions..
  • Would you consider adding the ability to show a notice to someone if they haven't posted in X amount of days? I'd like to set a "post more often" notice but not to active members.
  • Maybe consider adjusting the active date selection display code, so I can put in a full date MANUALLY without using the popup and having to scroll forever to keep a notice permanently? Right now I just set it to some far off date in 2016, which requires a huge amount of clicks and is less than ideal.
  • Could you look into the possibility of calling the person's username in the text field (via something like {username} or similar), so you can say "Hello, Username". More personal.
  • How would I do a "Never Posted" before notice? I set posts count criteria to "0 to 0" but it still showed for every member even if they have thousands of posts. I want to have a message for those who are registered, but have 0 posts so far.
Thank you so much for your hard work on this, I hope these suggestions are useful.
Your suggestions are good, I'll try to implement them into the next version. As for "Never Posted" - currently I'm afraid that this is not possible. I'll add a new option for this.
 
'Send alert 'there are bug

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 3

  1. Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
  2. Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
  3. Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
  4. Zend_Db_Adapter_Abstract->query() in XenForo/Model.php at line 218
  5. XenForo_Model->fetchAllKeyed() in XfRu/BoardNotices/Model/Notice.php at line 181
  6. XfRu_BoardNotices_Model_Notice->sendAlert() in XfRu/BoardNotices/ControllerPublic/Notice.php at line 74
  7. XfRu_BoardNotices_ControllerPublic_Notice->actionAlert() in XenForo/FrontController.php at line 310
  8. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  9. XenForo_FrontController->run() in /home/xxx/public_html/index.php at line 13

Can you provide your display criteria for this notice?
 
I chose "upgrade" to update with the XML to 1.0.1 and got this:

Server Error

Mysqli statement execute error : Duplicate entry 'xfr_bn_notice' for key 'PRIMARY'
  1. Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 297
  2. Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
  3. Zend_Db_Adapter_Abstract->query() in XfRu/BoardNotices/Install.php at line 122
  4. XfRu_BoardNotices_Install->installStep1000051() in XfRu/BoardNotices/Install.php at line 80
  5. XfRu_BoardNotices_Install::install()
  6. call_user_func() in XenForo/Model/AddOn.php at line 214
  7. XenForo_Model_AddOn->installAddOnXml() in XenForo/Model/AddOn.php at line 169
  8. XenForo_Model_AddOn->installAddOnXmlFromFile() in XenForo/ControllerAdmin/AddOn.php at line 226
  9. XenForo_ControllerAdmin_AddOn->actionUpgrade() in XenForo/FrontController.php at line 310
  10. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  11. XenForo_FrontController->run() in /home/****/****/forums/admin.php at line 13
 
I've uploded the XML file to the first post, wich fixes bugs with phrases.

Can't reproduce this.

About notice position - I'll look, what hooks we have, and probably I'll add ability to choose where notice should appear. Letter A is now capitalised. As for avatar, I'll leave this without changes for now, but this is not a problem to change this through styling. BTW, there are some things can be changed in styling options. But there can be problem with border color - I'm setting it with border-color as I'm later using it for child styles as xenforo style variable...

No problem and thanks for the placement consideration. :)
 
Just confirmation that you can style it. (shown here) http://www.bbsmiley.com/ if you just apply your css edits and move them to the extra.css template you'll be fine styling it. TBH I prefer that method it saves your style settings when the add-on is update unless they change the class which I see no reason why they should. :)
I keep forgetting about extra.css, DOH!

A suggestion Seen in the screenshot I think it would be nice if the notice appeared above where it says "BBsmiley" the .titleBar h1 rather than below it. Is this something you feel could be done? I also feel if you look at the "Send alert" text link if we can have the A in alert capitalised? it saves us editing the html templates and then re-editing when there's ever an upgrade. Thought I'd post these suggestion, exceptional work. (y)

I also feel that the double border around the vatar is not needed (although this can be done through css styling) I feel the avatars work out better displayed at 48px rather than the smaller size.


Liking the capital A in Send Alert and also with the double border, in your example screenshot the border is in keeping with your avatar in the sidebar so it kind of matches but in the original XF style it does have another box around it. But stirling work, with the other changes we've highlighted above this is a fantastic addon.
 
Ok yup, just upgraded to 1.01, excellent work there! Just one final thing, with the date selectors at the bottom, the text fields are quite large...

announce.webp

Maybe also make them respect the users locale i.e. Show the date in US or UK format...Don't know, just thinking out loud.
 
I receive the same error when attempting to UPGRADE from 1.0.0 to 1.0.1 (latest xml file):


Server Error

Mysqli statement execute error : Duplicate entry 'xfr_bn_notice' for key 'PRIMARY'
  1. Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 297
  2. Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
  3. Zend_Db_Adapter_Abstract->query() in XfRu/BoardNotices/Install.php at line 122
  4. XfRu_BoardNotices_Install->installStep1000051() in XfRu/BoardNotices/Install.php at line 80
  5. XfRu_BoardNotices_Install::install()
  6. call_user_func() in XenForo/Model/AddOn.php at line 214
  7. XenForo_Model_AddOn->installAddOnXml() in XenForo/Model/AddOn.php at line 169
  8. XenForo_Model_AddOn->installAddOnXmlFromFile() in XenForo/ControllerAdmin/AddOn.php at line 226
  9. XenForo_ControllerAdmin_AddOn->actionUpgrade() in XenForo/FrontController.php at line 310
  10. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  11. XenForo_FrontController->run() in /*****/****/******/forums/admin.php at line 13
 
Error fixed...

Apparently not just the xml file changed this time. ;) Full re-upload worked!
 
this is a great and it should be in the core of xf
anyway i would like to know if you can add an option where i can place 3+ images with links horizontal
just like ads but for my threads
:)
 
this is a great and it should be in the core of xf
anyway i would like to know if you can add an option where i can place 3+ images with links horizontal
just like ads but for my threads
:)
You can use html in notice message.
 
the date selectors at the bottom, the text fields are quite large...
Maybe also make them respect the users locale i.e. Show the date in US or UK format...Don't know, just thinking out loud.
Hmm, those date selectors in the Chrome are good... Yes, I'll fix this.

As for date format - I'm using XF date control unit, so question is: if there will be support of date format in default date unit ;)
 
Top Bottom