1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.1 Notices

Discussion in 'Have You Seen...?' started by Kier, Jul 29, 2011.

  1. twollert

    twollert Active Member

    Right, how can I do that? :)
     
  2. Fuhrmann

    Fuhrmann Well-Known Member

    There are many ways to do that. This is how I do:

    You can create a new notice and put the View Class in the tab Page Criteria to this:

    XenForo_ViewPublic_Forum_List
     
  3. Brogan

    Brogan XenForo Moderator Staff Member

    The simplest way is Page Criteria -> Content template: forum_list
     
    DSF likes this.
  4. twollert

    twollert Active Member

    Perfect, thanks! (y)
     
  5. Morgain

    Morgain Well-Known Member

    Kier said he was leaving it to admins to point out that you can Dismiss a Notice.

    Going on my experience of annoyance with feeling trapped by the current legal notice here on XF it would be helpful to place a default line of text after the Notice content something like

    You can end or Dismiss this notice so you do not see it again by clicking the X on it. See its top right corner.

    However for some types of Notices this would not be appropriate. So I suggest it needs to be an add-on.

    In Admincp:

    Dismiss information offered to user? Y/N default N.
    Current Dismiss text for editing:
    [text field] You can end or Dismiss this notice so you do not see it again by clicking the X on it. See its top right corner.
     
  6. Rudy

    Rudy Well-Known Member

    I wanted to say that the Notices system worked great for our recent donation drive--I was able to embed a specific PayPal button into the notice.

    Warning, though: I made an HTML error and put in two </div> tags instead of one, and it totally threw off the formatting on the entire page. I don't know if there is a way to trap this type of error, or we just have to be careful on our own. In a way, I'd almost wish we could have a "for dummies" version that would accept only BBCode, but then you could not embed items like I did with the PayPal button.

    Live and learn!
     
  7. EQnoble

    EQnoble Equilux NobiliterĂ 

    Well it is basic html so it would be best to like you said be careful when editing.

    good practice is to do your brackets and then fill in between them. example... in steps as I type it
    1. HTML:
      <div=class="rudy"></div>
      ___________________

    2. HTML:
      <div=class="rudy">
      </div>
      ___________________
    3. HTML:
      <div=class="rudy">
      
      </div>
      ___________________
    4. Code:
      <div=class="rudy">
          <a class="ppalButton"></a>
      </div>
      ___________________
    5. HTML:
      <div=class="rudy">
          <a class="ppalButton">
          </a>
      </div>
      ___________________
    6. HTML:
      <div=class="rudy">
          <a class="ppalButton">
                Click to pay me
          </a>
      </div>
    _______________________________________

    I was just trying to illustrate how I personally enter in code.

    It helps keep track of what I am doing and what tags I have closed which in this case doing it this way will ensure they are all closed so in the event of an error you know it is not one of the basics you have to check...then again everyone misses a tag once in a while.

    If you get notepad++ and you create a scrap file..call it rudys.html and save it.... it will highlight as you are typing and you will see errors most of the time even before running the code. Typing the info in the way I did makes sure you see the errors as your typing. if you don't close a set of tags you will see it right away as all of the colors of the text will change in the app.
    rudy1.png rud2y2.png
    hope that helps yah it bit...when I started doing that it helped me heaps
     
  8. Rudy

    Rudy Well-Known Member

    I was in a major rush that day, and a few things like that slipped past me. :D

    You'd think since I've been doing this since 1995 or so, that I would have been beyond stupid mistakes like that!
     
    GeeksChat likes this.
  9. EQnoble

    EQnoble Equilux NobiliterĂ 

    LOL it happens...no worries though...gods honest truth...yesterday I remembered what year I was born but without doing the math absolutely couldn't remember how old I was. How do we fail...let us count the ways :D

    My bad..I read into what you posted wrong and interpeted it differently than it actually is...ohh well, I'll leave that post up above for the people that actually need that info....I used to be one of them a very short time ago lol.
     
  10. Rudy

    Rudy Well-Known Member

    Oh jeez...I do the same thing, and I was on a phone interview last night and we both had to do that during the phone call! :D




    Let me put it this way: I've coded a ton of my own PHP, worked with hundreds (thousands?) of MySQL queries, messed with other languages, gotten knee deep in CSS and HTML...and it is always some stupid mistake that hits me up! In MySQL, I can miss one single quote character, and a whole large query bombs out on me. In PHP, I can miss a closing "endif;" statement (I don't use curly braces--too hard for me to see, and too difficult for me to follow) or have one too many in a block of code, and throw the whole script off. Even if I indent! Can't even tell how many times I've fought with a page of PHP code, only to find I didn't "include()" a file that I needed.

    Or to give you the short version: I take "...For Dummies" to a whole new level whenever I enter a room. [​IMG]
     
  11. EQnoble

    EQnoble Equilux NobiliterĂ 

    LOL I - Hear - YOU! :) I may have only been doing this for a short while...but I store almost every single thing I have ever saved..call it my time capsule (40tb and growing :) this is my insurance policy on my memory... and no H.M.O. is ever going to pay out the what the value of this array is to me ) and when I open the 2011/webs/standalone folder I see way too many documents of which I know don't work...the sad thing is when I open them...I see the mistakes I made and I laugh now. A year ago I was ready to loose my friggin mind trying to figure out how all this worked (html and css I am completely confident with now...js in general I get to a point which is odd because I can do just about anything given the time with jquery, php I am getting better with but with over 5000 individual entries in the manual, I am not quite there yet, I have managed to make some queries and use xenforo with a callback to create a table...but beyond that...mysql still kicks my ass) and now when I look at the errors and see the simplicity of their nature I remember feeling overwhelmed yet the solution to that and the feeling of knowing your getting somewhere was literally a few bits away. Either way I am glad I stuck with it...and I will continue to try and learn until something gives me a reason to use it.
     
  12. Rudy

    Rudy Well-Known Member

    You're on the right track for sure: keep files for reference, learn from the mistakes. I've made so many mistakes over the years, I should have earned a PhD by now. :D

    I'm still mostly unfamiliar with the way XF is coded, though. I need to learn more of that myself. I am good with PHP, but usually am best with anything I've written myself. And I'm no great coder either... ;)
     
    EQnoble likes this.
  13. RobParker

    RobParker Well-Known Member

    Anyone figured this out yet? Can you pass some sort of list/array?
     
  14. Brogan

    Brogan XenForo Moderator Staff Member

    Only a single template can be specified.
     
  15. RobParker

    RobParker Well-Known Member

    Cheers :)

    Is there a reason for that as it's a bit annoying as it means having to effectively create the same Notice several times and seems a bit inelegant compared to how nicely other things are done with the Notices.
     
    Steve F likes this.
  16. Steve F

    Steve F Formerly Qwk86gn

    I had to create the same Notice multiple times on my site, would be great if we could specify more than one template.
     
  17. The Dark Wizard

    The Dark Wizard Well-Known Member

    It would be nice if dismissed notices came back on their own after X amount of time instead of users having to do it through their profile.
     
  18. 3c

    3c Active Member

    Did this get moved or something? It's not in application in mine...and so far I haven't found it..


    Never mind...glad it wasn't a snake...LOL
     
  19. steven s

    steven s Well-Known Member

    Without reading 16 pages, is there a way to view notices using test permissions or some kind of preview?
     
  20. dieketzer

    dieketzer Well-Known Member

    make it viewable to the admin-group only.
     

Share This Page