Xen Notices [Deleted]

Also, an option to target notifications to user agent would be good. I'd like to show more compact notifications to mobile users.
 
Both are beyond the scope of this add-on, really.

What makes a notification appear or not is the criteria, and the criteria is the same criteria which XenForo uses for Notices, Promotions and Trophies.

What you really need is an add-on that adds your desired criteria to the standard XF criteria. That will then work across Notifications, Notices, Trophies, Promotions etc.

I'd like to show more compact notifications to mobile users.
That's just CSS, it can be done using media queries. Doesn't require any user agent checks.
 
Only a really minor thing but in the user preferences overlay there's a section for "Notifications" which lets the user restore dismissed ones. This section has it's own heading.

If I add new custom fields they show up below this heading, rather than under Options. Is that something this addon is causing or something I need to do differently?
 
Yeah you're right, that's not quite right.

I'm not sure if this was a mistake or if something else in the template changed. but basically the Template Modification replacement code is:

upload_2014-10-9_11-14-42.webp

But it should be:

upload_2014-10-9_11-15-35.webp

That would make the Notifications stuff appear after the Custom field stuff.
 
How do you make it so this doesnt show on registration page?
It's not possible to hide a Notification (or XF Notice for that matter) by exclusion with the Page Criteria so it's a case of leaving it as it is, or using CSS to hide it.

EXTRA.css:

Code:
.register_form .GritterContainer
{
    display: none;
}

That should hide all Notifications from the register_form template.
 
It's not possible to hide a Notification (or XF Notice for that matter) by exclusion with the Page Criteria so it's a case of leaving it as it is, or using CSS to hide it.

EXTRA.css:

Code:
.register_form .GritterContainer
{
    display: none;
}

That should hide all Notifications from the register_form template.

Well then.. if sombody registers they have to see the sign the whole time? So what do people do? just dismiss it?
 
Well then.. if sombody registers they have to see the sign the whole time? So what do people do? just dismiss it?
What are you trying to achieve? What is the notification that you are wanting to hide only on the registration page? Is it just the Guest notification about signing up? If so, I wouldn't worry as guests will just dismiss it.

You need to sort out that horrible banner with the ticker at the bottom of your website too. Not only is it ghastly, it partially hides the notification and completely obscures the chat bar. It's not immediately obvious that it can be minimised and my first thought was to just simply leave your site, I only persisted due to wanting to respond to you here.
 
I know but people who dont know how to do the css .. that jsut installed the product.. i mean
People know how to contact me if they need support. Just as you have done. I will happily give them the same answer.

This isn't exclusive to my add-on. It would be the same if you used the default Notices system.
 
New question:

I am trying to get the Google login to work with this but it appears it needs some variables that the others do not. Is there a way in a future update, that the following would be able to work within the notification? Facebook and Twitter do work.

Code:
            <li><span class="googleLogin GoogleLogin JsOnly" tabindex="110" data-client-id="{$xenOptions.googleClientId}" data-redirect-url="{xen:link register/google, '', 'code=__CODE__', 'csrf={$session.sessionCsrf}'}"><span>{xen:phrase login_with_google}</span></span></li>

How I have it setup now, with the Google button not working: https://www.dropbox.com/s/xmyxwzuai0c813v/Screenshot 2014-10-09 08.23.07.png?dl=0
 
Is this the actual code you used in the Notification text?

Code:
<li><span class="googleLogin GoogleLogin JsOnly" tabindex="110" data-client-id="{$xenOptions.googleClientId}" data-redirect-url="{xen:link register/google, '', 'code=__CODE__', 'csrf={$session.sessionCsrf}'}"><span>{xen:phrase login_with_google}</span></span></li>

If so, it's not going to be possible really. One small issue is the xen: syntax code isn't going to work anyway. Nothing in the Notification is compiled, it will just be raw HTML so it would need to be valid, e.g. using an actual URL instead of {xen:link and actual text instead of {xen:phrase.

The variables are probably the biggest sticking point. At least the sessionCsrf is anyway. You could manually input your Google Client ID because it's static, but the sessionCsrf is dynamic.

As a future suggestion is it likely I'll ever delve into compiling these into template objects and passing that compiled HTML through? Maybe... It's a bit of a stretch though. It would have its uses. But it'd be a pretty big change so would likely be for a major version.

I might have a solution but I think because of the way it is executed it triggers a pop up blocker...

Try this code:

Code:
<li><span class="googleLogin JsOnly" tabindex="110" onclick="$('.GoogleLogin').click();"><span>Log in with Google</span></span></li>
 
Code:
.quickReply .messageUserInfo .helper {display:none;}
.messageUserInfo .helper  {
  display: block;
  position: absolute;
  top: -4px;
  left: -4px;
  background: url("@imagePath/xenforo/icons/starter.png") no-repeat  transparent;
  height: 56px;
  width: 56px;

}


.nodeInfo.unread .nodeTitle:after
{
background-color: #ac1212;
content: "NEW";
color: white;
border-radius: 2px;
margin-left: 5px;
padding: 1px 5px;
font-size: 9px; }





/* START - HIGHLIGHT RESOURCE TABS */
.tabs .resourceTabDescription {
    background: url("@imagePath/xenforo/gradients/form-button-white-25px.png") repeat-x;
    background-color: @primaryLighter;
    border-top-right-radius: 5px;
    border-top-left-radius: 5px;
}

.tabs .resourceTabDiscussion {
    background: url("@imagePath/xenforo/gradients/form-button-white-25px.png") repeat-x;
    background-color: @primaryLighter;
    border-top-right-radius: 5px;
    border-top-left-radius: 5px;
}

.tabs li a, .tabs.noLinks li {
    background: none;
}

.tabs .resourceTabUpdates {
    background: url("@imagePath/xenforo/gradients/form-button-white-25px.png") repeat-x;
    background-color: @primaryLighter;
    border-top-right-radius: 5px;
    border-top-left-radius: 5px;
}

.tabs .resourceTabHistory {
    background: url("@imagePath/xenforo/gradients/form-button-white-25px.png") repeat-x;
    background-color: @primaryLighter;
    border-top-right-radius: 5px;
    border-top-left-radius: 5px;
}

.tabs .resourceTabReviews {
    background: url("@imagePath/xenforo/gradients/form-button-white-25px.png") repeat-x;
    background-color: @primaryLighter;
    border-top-right-radius: 5px;
    border-top-left-radius: 5px;
}



/* START - HIGHLIGHT RESOURCE TABS */


/*Hightlight serch mod */

.highlight
{
    color: @secondaryMedium;
}

/*END - HIGHTLIGHT RESOURCE TABS */


/ Start of Jazz up your bullet list /

.message ol{
    counter-reset: li; /* Initiate a counter */
    list-style: none; /* Remove default numbering */
    *list-style: decimal; /* Keep using default numbering for IE6/7 */
    font: 15px 'trebuchet MS', 'lucida sans';
    padding: 0;
    margin-bottom: 4em;
    text-shadow: 0 1px 0 rgba(255,255,255,.5);
}

.message ol ol{
    margin: 0 0 0 2em; /* Add some left margin for inner lists */
}
.message .baseHtml ol li {
position: relative;
    display: block;
    padding: .4em .4em .4em 2em;
    *padding: .4em;
    margin: .5em 0;
        background: #ddd;
    color: #444;
    text-decoration: none;
    border-radius: .3em;
    transition: all .3s ease-out;
}
.message .baseHtml ol li hover{
    background: #eee;
}
.message .baseHtml ol li:hover:before{
    transform: rotate(360deg);
}
.message .baseHtml ol li:before {
    content: counter(li);
    counter-increment: li;
    position: absolute;
    left: -1.3em;
    top: 50%;
    margin-top: -1.3em;
    background: #87ceeb;
    height: 2em;
    width: 2em;
    line-height: 2em;
    border: .3em solid #fff;
    text-align: center;
    font-weight: bold;
    border-radius: 2em;
    transition: all .3s ease-out;
}
.message .baseHtml ul li {
position: relative;
    display: block;
    padding: .4em .4em .4em 2em;
    *padding: .4em;
    margin: .5em 0;
        background: #ddd;
    color: #444;
    text-decoration: none;
    border-radius: .3em;
    transition: all .3s ease-out;
}
.message .baseHtml ul li hover{
    background: #eee;
}
.message .baseHtml ul li:hover:before{
    transform: rotate(360deg);
}
.message .baseHtml ul li:before {
    content: '*';
    position: absolute;
    left: -1.3em;
    top: 50%;
    margin-top: -1.3em;
    background: #87ceeb;
    height: 2em;
    width: 2em;
    line-height: 2em;
    border: .3em solid #fff;
    text-align: center;
    font-weight: bold;
    border-radius: 2em;
    transition: all .3s ease-out;
}


/ End of jazz up your bullet list /


/* SIGN UP BOX */
@-webkit-keyframes redPulse {
from { background-color: #136cc5 -webkit-box-shadow: 0 0 9px #333; }
          50% { background-color: #e33100; -webkit-box-shadow: 0 0 18px #e33100; }
          to { background-color: #136cc5; -webkit-box-shadow: 0 0 9px #333; }
        }
@-moz-keyframes redPulse {
from { background-color: #136cc5; -moz-box-shadow: 0 0 9px #333; }
          50% { background-color: #e33100; -moz-box-shadow: 0 0 18px #e33100; }
          to { background-color: #136cc5; -moz-box-shadow: 0 0 9px #333; }
        }
@-o-keyframes redPulse {
from { background-color: #136cc5; -o-box-shadow: 0 0 9px #333; }
          50% { background-color: #e33100; -o-box-shadow: 0 0 18px #e33100; }
          to { background-color: #136cc5; -o-box-shadow: 0 0 9px #333; }
        }
@keyframes redPulse {
from { background-color: #136cc5; box-shadow: 0 0 9px #333; }
          50% { background-color: #e33100; box-shadow: 0 0 18px #e33100; }
          to { background-color: #136cc5; box-shadow: 0 0 9px #333; }
        }
#SignupButton {
border: none !important;
background: transparent !important;
}
#SignupButton .inner {
-webkit-animation-name: redPulse;
-webkit-animation-duration: 2s;
-webkit-animation-iteration-count: infinite;
-moz-animation-name: redPulse;
-moz-animation-duration: 2s;
-moz-animation-iteration-count: infinite;
-o-animation-name: redPulse;
-o-animation-duration: 2s;
-o-animation-iteration-count: infinite;
animation-name: redPulse;
animation-duration: 2s;
animation-iteration-count: infinite;
background: none repeat scroll 0% 0% #750606 !important;
}
#SignupButton:hover .inner {
  background: #e33100 !important;
}
/* END SIGN UP BUTTON */


/* START NO NOTIFICATION REGISTER */
.register_form .GritterContainer
{
    display: none;
}
/* END NO NOTIFICATION REGISTER */
 
It wasn't in there, but it is now.

Also, there is a mistake (my fault):

Code:
.register_form #GritterContainer
{
    display: none;
}
 
It wasn't in there, but it is now.

Also, there is a mistake (my fault):

Code:
.register_form #GritterContainer
{
    display: none;
}
Nice thanks man it works. man thats why I hate php .. if you forget one little symbol it dont work. Honestly php looks like alien gibberish to me.. I could never learn that coding.
 
Top Bottom