Xen Notices [Deleted]

Chris

Is there any way to get a notice to show if a custom user field has no value in it. What I would like to do is pop up a notification to prompt users to add their real name to their profile. All I get (as with most text fields in XF, is the option to have *something* in the field instead on *not* in the field.

Screen shot 2013-05-13 at 11.19.02 AM.webp

Cheers
 
I was testing some notification styling and I seem to have made the notification stop showing and resetting it doesn't bring it back. Any ideas happened? I didn't click the dismiss link but I've tried resetting it anyway.

Creating a new notification shows fine.
 
Log out and log back in again.

You must have closed it which sets a cookie to stop it from showing temporarily.

Logging out of XenForo clears any XenForo related cookies so it should reappear afterwards.
 
Log out and log back in again.

You must have closed it which sets a cookie to stop it from showing temporarily.

Logging out of XenForo clears any XenForo related cookies so it should reappear afterwards.

Ah that's exactly what it was, thanks. Is that a permanent cookie for the session or on a timer?
 
As an aside, I know Shelley has some great notification styling examples but have you collected any others together? Would be really nice to see some more examples.
 
Ah that's exactly what it was, thanks. Is that a permanent cookie for the session or on a timer?
It relates to this option which can be set for each Notification:

RxumQHS.png


Default is 0 which is a session cookie - I just didn't know if you'd set it to a higher number. If you'd set it to 3 then restarting your browser wouldn't help, it wouldn't show again for 3 days.

If it's set to 0 then restarting your browser will bring it back.

Or you can just delete the particular cookie.

As an aside, I know Shelley has some great notification styling examples but have you collected any others together? Would be really nice to see some more examples.
Only Shelley has been awesome enough as far as I know! :)
 
Do you think it'd be a big edit?

Ideally there'd be an option to set a notification as "requiring acceptance" which would change "dismiss" to "accept" but I doubt you'd want to add that unless a lot of people wanted it.
 
It's probably more work than it's worth right now, but one thing I would say is you can change the "Dismiss" phrase to anything you like as per a normal phrase.

So you could change it to "I agree" or even just "OK".

So, maybe there's a phrase you can think of that fits both types of Notification?
 
It's probably more work than it's worth right now, but one thing I would say is you can change the "Dismiss" phrase to anything you like as per a normal phrase.

So you could change it to "I agree" or even just "OK".

So, maybe there's a phrase you can think of that fits both types of Notification?

Yeah I thought something like that but couldn't come up with a good phrase to cover both. It might just have to be that we include in the "rules" one that by "clicking dismiss you accept the above rules".
 
Is it possible when a user deletes a notification to not be redirected to a specific page? I only want to close the confirmation pop-up and stay on the same page.

Code:
if ($this->isConfirmedPost())
{
    $notificationModel->dismissNotification($notificationId);
   
    XenForo_Application::getSession()->set('dismissedNotifications',
    $notificationModel->getDismissedNotificationIdsForUser(XenForo_Visitor::getUserId())
);
   
return $this->responseRedirect(
    XenForo_ControllerResponse_Redirect::SUCCESS,
    XenForo_Link::buildPublicLink('index'),
    new XenForo_Phrase('notification_dismissed')
    );
}
 
After the upgrade I had a server error pop up in the log. Suggestions:

Code:
Error Info
XenForo_Exception: Invalid model 'GritterNotifications_Model_Notification' specified - library/XenForo/Model.php:192
Generated By: Unknown Account, Today at 4:27 AM
Stack Trace
 
#0 public_html/forum/library/GritterNotifications/Listener.php(8): XenForo_Model::create('GritterNotifica...')
#1 [internal function]: GritterNotifications_Listener::templateHook('page_container_...', '???????????????...', Array, Object(XenForo_Template_Public))
#2 public_html/forum/library/XenForo/CodeEvent.php(54): call_user_func_array(Array, Array)
#3 public_html/forum/library/XenForo/Template/Abstract.php(285): XenForo_CodeEvent::fire('template_hook', Array)
#4 public_html/forum/library/XenForo/Template/Abstract.php(265) : eval()'d code(1759): XenForo_Template_Abstract->callTemplateHook('page_container_...', '???????????????...', Array)
#5 public_html/forum/library/XenForo/Template/Abstract.php(265): eval()
#6 public_html/forum/library/XenForo/Template/Abstract.php(191): XenForo_Template_Abstract->_renderInternal('$__output = '';...', Array)
#7 public_html/forum/library/XenForo/Template/Public.php(110): XenForo_Template_Abstract->render()
#8 public_html/forum/library/XenForo/ViewRenderer/HtmlPublic.php(135): XenForo_Template_Public->render()
#9 public_html/forum/library/XenForo/FrontController.php(565): XenForo_ViewRenderer_HtmlPublic->renderContainer('No results foun...', Array)
#10 public_html/forum/library/XenForo/FrontController.php(156): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_Message), Object(XenForo_ViewRenderer_HtmlPublic), Array)
#11 public_html/forum/index.php(13): XenForo_FrontController->run()
#12 {main}
 
Request State
 
array(3) {
  ["url"] => string(47) "http://.../forum/find-new/6400/threads"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
Then it's nothing to worry about.

It's likely that it was the brief seconds between the files being uploaded, the XML being imported. Etc
 
Chris,

I have the following option unchecked: Notification is dismissible
to me, that means the user/group is unable to close the notice....
I have been able so far to dismiss the notice every which way....
I have also unchecked: Enable temporary dismissal
but as it says, it is just a temporary dismissal....
I would like for the user/group not to be able to dismiss at all.
am I doing something wrong?

Thanks
 
Top Bottom