Xen Notices [Deleted]

Thank You both! I checked permissions on the user group level but not there. Anyone know if it's possible to set two people as super admin?
stewart1champ has already given you the correct answer.

But remember, the usergroup permissions are all for front end stuff. User group permissions never control what you can do on the back end. Back end admin permissions are always set on a per administrator basis :)
 
Chris,
I have been eye balling this for a while to see how this develops. I have not used the stock XF notification system a lot but when I do, I usually face the limit of not being able to use variables from my custom addons. I usually have to make a sidebar widget using Widget framework.

I see that your latest update provides more than the standard variables so I'm going to purchase this today but I'm curious to see if it's technically feasible to support just any variables?

Thanks
 
Hi Andy,

Thanks for your interest.

It should be feasible for most variables but it takes work to pass them to the template.

If you let me know what the variables are and where they come from then I will help you work it out.

Chris
 
Hi Andy,

Thanks for your interest.

It should be feasible for most variables but it takes work to pass them to the template.

If you let me know what the variables are and where they come from then I will help you work it out.

Chris
Excellent.
Purchased. Going to have a go at it.

As long as I can get instruction on how to get a variable from a specific addon to show up, it will be terrific. I can use that to work out the rest.
The variables are available on any template so I hope it is easier to expose on the notification.
 
Presumably then, the variables are available in the PAGE_CONTAINER template too?

If so, we can probably extract them from the template params using the template hook. All the notices are hooked into the PAGE_CONTAINER template.

Then what we do is a string replace on the notification template, e.g. {variable} and then replace that with the contents of the actual variable.

Don't waste too much time if you can't work this out, just let me know the details I'm sure it'll be easy from there.

Thanks for purchasing (y)
 
Presumably then, the variables are available in the PAGE_CONTAINER template too?

If so, we can probably extract them from the template params using the template hook. All the notices are hooked into the PAGE_CONTAINER template.

Then what we do is a string replace on the notification template, e.g. {variable} and then replace that with the contents of the actual variable.

Don't waste too much time if you can't work this out, just let me know the details I'm sure it'll be easy from there.

Thanks for purchasing (y)
First thing first.
1) I notice that you use a close.png for the close button in the Styles folder. I'm a tickler for CSS3 over images whenever possible.
Is this possible to use?
http://alanhogan.com/files/CSS-only-close-button/demo.html
2) I don't think that variables are in the PAGE_CONTAINER.
I have a template that shows the members of a upgraded usergroup how many days left they have in their purchase. I don't if that's possible to use in the notification. It is A LOT better to have a floating notification instead of a static sidebar widget to nag them. Many people overlook this so we need a way to stress them.

Here is the template content
Code:
<xen:if is="{xen:helper qntquiz_daysleft, $visitor}">
<span style="padding-left: 10px; font-weight: bold; font-size: 24px; color: red">{xen:number {xen:helper qntquiz_daysleft, $visitor}}</span> days left to earn the certificate!
</xen:if>
 
You should be able to change the close.png for whatever you like.

There's a special template called GritterEXTRA.css which is deliberately blank and will remain so. You can add whatever you like into it. I won't be introducing the CSS only button into the core, but if you end up implementing it yourself it would be awesome if you shared the code so other users could benefit.

This should be straight forward...

Could you confirm for me the name of the helper as defined in the PHP file?

For example, the {xen:helper avatar has a helper name in the Template/Helper/Core.php file called helperAvatar.

Is your helper defined as helperQntquiz or similar?

Feel free to PM me the actual file if you're unsure. I can send you back a file that should pull this variable for you.
 
So far so good. Playing with the first notification.
1) What's the difference between Dark/Light notification style? They all look the same too me, black box with white text.
2) When I go to the Preference to reset notification, now there are Notifications and Notices. From an end user point of view, it's confusing. They won't know which is which. Maybe you can combine this with the Notices stock so they reset both?
3) I notice that if I use an image and put in the url, I have to use the full url instead /styles/bg.png and that it will scale down the image to fit the height of the notification text.

I'll send you a PC for the more advanced question that dealing with my custom variables. Thanks for pointing me to the right direction.
 
hey chris,

I seem to have run into an issue. Might be me needing to wake up more but I'm creating a custom notification and for the life of it, it just won't display.

I've put in the custom class, inserted the correct css in extra for it to show, path is correct to the image and I've upload the notification card to the correct folder but it just doesn't want to display.
All I'm getting is the standard black background-color, any reason why this is happening? I was thinking could there be a limit? I have currently 22 notifications created in my listings so I was wondering if some kind of limit was there prohibiting this from displaying once you reach a certain amount.

Any help on this would be appreciated :) I'm sure it's one of those silly mistakes we all make (that I'm making) that is causing this. :p I've checked, double checked and everything seems to be correct.

I've enabled the cards at bbsmiley on the chance you want to take a look. As you can see the red card displays fine, the green notification doesn't which is the standard black one showing.

EDIT: Yes, I'm a complete Idiot. I knew once I posted about the issue I would shortly find it afterwards if it was error on my part. Guess what it was chris? I know your curious? Typo in the css. *shakes fist* All sorted now, and fixed. :cry::LOL:
 
Chris,
Some wishlist for the next version
1) Fix the light style notification
2) Allow each notification to have a width variable. Some of the notifications I like to do would look better as a long rectangle than a tall rectangle. I can overwrite the css using the Extragritter.css but as each notification can use color picker, it's nice to control size as well.
 
You should be able to change the close.png for whatever you like.

There's a special template called GritterEXTRA.css which is deliberately blank and will remain so. You can add whatever you like into it. I won't be introducing the CSS only button into the core, but if you end up implementing it yourself it would be awesome if you shared the code so other users could benefit.
You can replace gritter-close section in the gritter.css template with or add this to the GritterExtra.css to replace the close button with CSS3.
Code:
.gritter-close {
  display: block;
  position: absolute;
  top: -8.88888888888889px;
  right: -8.88888888888889px;
  height: 0;
  width: 20px;
  padding: 20px 0 0 0;
  overflow: hidden;
  background: #000000 none;
  border: 2.27272727272727px solid #ffffff;
  -moz-border-radius: 20px;
  -webkit-border-radius: 20px;
  border-radius: 20px;
  box-shadow: 0 0 6px #000000, 1.63636363636364px 1.63636363636364px 1.63636363636364px rgba(0, 0, 0, 0.3), -1.63636363636364px 1.63636363636364px 1.63636363636364px rgba(0, 0, 0, 0.3), 1.63636363636364px -1.63636363636364px 1.63636363636364px rgba(0, 0, 0, 0.3), -1.63636363636364px -1.63636363636364px 1.63636363636364px rgba(0, 0, 0, 0.3);
  -ms-box-shadow: 0 0 6px #000000, 1.63636363636364px 1.63636363636364px 1.63636363636364px rgba(0, 0, 0, 0.3), -1.63636363636364px 1.63636363636364px 1.63636363636364px rgba(0, 0, 0, 0.3), 1.63636363636364px -1.63636363636364px 1.63636363636364px rgba(0, 0, 0, 0.3), -1.63636363636364px -1.63636363636364px 1.63636363636364px rgba(0, 0, 0, 0.3);
  -moz-box-shadow: 0 0 6px #000000, 1.63636363636364px 1.63636363636364px 1.63636363636364px rgba(0, 0, 0, 0.3), -1.63636363636364px 1.63636363636364px 1.63636363636364px rgba(0, 0, 0, 0.3), 1.63636363636364px -1.63636363636364px 1.63636363636364px rgba(0, 0, 0, 0.3), -1.63636363636364px -1.63636363636364px 1.63636363636364px rgba(0, 0, 0, 0.3);
  -webkit-box-shadow: 0 0 6px #000000, 1.63636363636364px 1.63636363636364px 1.63636363636364px rgba(0, 0, 0, 0.3), -1.63636363636364px 1.63636363636364px 1.63636363636364px rgba(0, 0, 0, 0.3), 1.63636363636364px -1.63636363636364px 1.63636363636364px rgba(0, 0, 0, 0.3), -1.63636363636364px -1.63636363636364px 1.63636363636364px rgba(0, 0, 0, 0.3);
  color: #ffffff;
  cursor: pointer;
  -moz-user-select: none;
  -webkit-user-select: none;
  user-select: none;
}
.gritter-close:before {
  content: "\D7";
  display: block;
  text-align: center;
  width: 20px;
  position: absolute;
  top: -2px;
  left: 0;
  font-size: 20px;
  line-height: 20px;
  font-family: "Helvetica Neue", Consolas, Verdana, Tahoma, Calibri, Helvetica, Menlo, "Droid Sans", sans-serif;
}
 
Chris,
Quick question. I notice that in the original Gritter implementation, the close button only shows when you hover the notification but in this addon, the close button is shown by default.
What changes I have to make to get the default behavior?
Thanks
 
Hi Andy,

Just add the following into GritterEXTRA.css:
Code:
.gritter-close {
display: none;
}

When you hover over the notification the close button will appear.
 
Hi Andy,

Just add the following into GritterEXTRA.css:
Code:
.gritter-close {
display: none;
}

When you hover over the notification the close button will appear.
Great. I modified the code I posted above for the CSS close button to use display:none instead of display:block and it works.
 
This is the visitor tab with the link showing:

RJedR.png
 
Since my switch to Chrome for mac, I'm no longer seeing the notification. I made sure I had the pop-up feature disabled but no luck so far pinning down the issue.

I did notice I hadn't upgraded to 1.5 so thought I would start there but lost the link to the download.

UPDATE: Must have been a browser issue as it's working fine now. Still need the link when you have a moment. Thanks.
 
Upgraded to 1.5 without any issues. Thanks again Chris for the time and effort you've put into this project highly appreciated. :thumbsup:
 
Top Bottom