Announcement

Collapse
No announcement yet.

Forum-specific error messages?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Forum-specific error messages?

    We have a few forums that we've setup through the Promotions area, that only allows users to post if they've met a certain post/time requirement. No problems there. We even posted an announcement in those forums explaining the access requirements.

    We're getting the occasional "Why can't I post in this forum now" feedback, and I'd like to be able to setup an error message, specific to those forums, that adds additional text to the default "access denied" error message.

    Is this possible?

  • #2
    I would think you could do it by creating a new phrase then calling the phrase via a conditional in the STANDARD_ERROR template.

    Comment


    • #3
      Originally posted by MegaHertz
      I would think you could do it by creating a new phrase then calling the phrase via a conditional in the STANDARD_ERROR template.
      I'll check that out... thanks!

      UPDATE: So far, it looks promising, but what condition/variable to I use to determine if the Forum that has been accessed is one of the ones that requires that extra access, and thus needs the special error message?
      Last edited by bannoy; Thu 17 Jun '04, 12:28pm.

      Comment


      • #4
        I can tell you how to add it to what is already there, but I am still not familiar enough with conditionals to tell you how to replace the entire message based on the forum being accessed. Hopefully someone who is more familiar can give you a hand with that.

        Comment


        • #5
          Hmmm... hurdle time.

          I've created the custom phrase "post_number_requirement" which says "Some forums have a special post count requirement in order to post/reply. Please refer this forum's announcements for more information."

          I then added
          PHP Code:
          <li class="smallfont">$vbphrase[post_number_requirement]</li
          to the existing snippet of
          PHP Code:
          <li class="smallfont">$vbphrase[not_logged_in_fill_in_form]</li>
          <
          li class="smallfont">$vbphrase[may_not_have_sufficient_privileges]</li>
          <
          li class="smallfont">$vbphrase[administrator_may_disabled_account]</li
          to both the STANDARD_ERROR and STANDARD_ERROR_LITE templates, yet the new message fails to appear. It should appear on any and all pages where I receive the access error (I want to get that part to work before I concern myself with a particular forum and conditional), right?

          Comment


          • #6
            AFIAK that is all you need to do. I will have to play with it on my test forum a little later to see why it isn't working.

            Comment


            • #7
              I just tested this on my forum and it worked perfectly (see screenshot).

              Not sure why it is not working for you.
              Attached Files

              Comment


              • #8
                Yeah, it should be an easy thing, from all appearances. I've applied the changes to both templates in both the forum style that the board uses, as well as the overall vb3 template that the style is based off and still no luck.

                I'm sure it's some small detail that I'm overlooking.. maybe a missing semicolon (ala "Office Space")

                Comment


                • #9
                  The only thing I did different was use a different name.

                  FYI I used post_requirement as the name.

                  Comment


                  • #10
                    I deleted my original phrase name, used your "post_requirement" name, changed the templates to match the new name and it still doesn't show.

                    Thanks for all your advice, though... I'm sure it's something at my end; I just need to search further...

                    Comment


                    • #11
                      Why don't you just type the text directly into the template, assuming you aren't using multiple languages. If you want to use the phrase make sure you have it in the GLOBAL phrase group.

                      Comment


                      • #12
                        Originally posted by Freddie Bingham
                        Why don't you just type the text directly into the template, assuming you aren't using multiple languages.
                        I'd like to use the phrase system, rather than making template changes if/when that message needs to be changed. 6 in one, half-dozen in another, I know, but I like the phrase concept, and there's no chance of jacking up the entire page with that method. A missed close bracket in the template, on the other hand, and...

                        Originally posted by Freddie Bingham
                        If you want to use the phrase make sure you have it in the GLOBAL phrase group.
                        It is in the global group. When I do a phrase search for "post_requirement", it comes back with:

                        GLOBAL Phrases Containing 'post_requirement'
                        post_requirement Custom Phrase
                        Some forums have a special post count requirement in order to post/reply. Please refer this forum's announcements for more information.

                        Comment


                        • #13
                          Well, I just tried hardcoding the message into the HTML, to at least get it up there and displayed, and THAT isn't even showing up.. now I'm really stumped.

                          Comment


                          • #14
                            What exactly are you using?

                            Comment


                            • #15
                              What do you mean.. What text am I using? Or what vB version? (3.0.0)

                              Comment

                              Related Topics

                              Collapse

                              Working...
                              X