Conditional for error case?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • briansol
    Senior Member
    • Apr 2006
    • 674
    • 3.6.x

    [Forum] Conditional for error case?

    Is there a template conditional available for when something throws an error and loads the standard_error template?

    I don't need anything super strict. I tried to make a condition in the strings:
    {vb:rawphrase vbulletin_message} == {vb:raw navbits.lastelement}
    to get 'vbulletin message' == 'vbulletin message' but that is out of scope and doesn't parse.

    Anything similar or an available variable i can use?

    Tried searching but "error" just doesn't get me anywhere....
  • Zachery
    Former vBulletin Support
    • Jul 2002
    • 59097

    #2
    Erm, how can there be a template conditional for when another template is called?
    You'd really just want to edit the STANDARD_ERROR template, unless I'm missing something?

    Comment

    • briansol
      Senior Member
      • Apr 2006
      • 674
      • 3.6.x

      #3
      Basically, i'm trying to turn off ads on error pages. ie, goto threadID 999999999999999999999999999 which doesn't exist and you get the "no thread specified error". On pages like this, it is against most ad networks TOS to display ads. Since navbar parses on these pages, i need to wrap my ads in something to not display them on these types of pages.

      This is actually a new in vb4 error for me. Using the same wrap in vb3, the ads did not show, as desired, on error pages.

      Comment

      • Zachery
        Former vBulletin Support
        • Jul 2002
        • 59097

        #4
        How are you displaying the ads?

        Comment

        • briansol
          Senior Member
          • Apr 2006
          • 674
          • 3.6.x

          #5
          Just standard DFP JS code wrapped in template conditionals.

          Basically, i need another match in this big conditional to meet the "none" display case based on some variable.


          Code:
          <vb:if condition="($forum[forumid] == 68) 
                  OR ($foruminfo[forumid] == 68) 
                  OR (THIS_SCRIPT == 'guestsearch') 
                  OR (THIS_SCRIPT == 'search') 
                  OR (THIS_SCRIPT == 'advertise')  
                  OR (THIS_SCRIPT == 'rules') 
                  OR (THIS_SCRIPT == 'showgroups')
                  OR (THIS_SCRIPT == 'login')
                  OR (THIS_SCRIPT == 'register')
                  OR (THIS_SCRIPT == 'blog_usercp')
                  OR (THIS_SCRIPT == 'blog_search')
                  OR (THIS_SCRIPT == 'blog_report')
                  OR (THIS_SCRIPT == 'blog_subscription')
                  OR (THIS_SCRIPT == 'blog_inlinemod')
                  OR (THIS_SCRIPT == 'usercp')
                  OR (THIS_SCRIPT == 'private')
                  OR (THIS_SCRIPT == 'subscription')
                  OR (THIS_SCRIPT == 'payments')
                  OR (THIS_SCRIPT == 'newthread')
                  OR (THIS_SCRIPT == 'newreply')
                  OR (THIS_SCRIPT == 'invites')
                  OR (THIS_SCRIPT == 'memberlist')
                  OR (THIS_SCRIPT == 'online')
                  OR (THIS_SCRIPT == 'member')
                  OR (THIS_SCRIPT == 'spiders')
                  OR (THIS_SCRIPT == 'profile')
                  OR (THIS_SCRIPT == 'faq')
                  OR (THIS_SCRIPT == 'sendmessage')
                  OR (THIS_SCRIPT == 'calendar')
                  OR (THIS_SCRIPT == 'itrader')
                  OR ((THIS_SCRIPT == 'calendar') AND $_REQUEST['do'] == 'add')
                  OR ((THIS_SCRIPT == 'misc') AND $_REQUEST['moderator_stats'] == '')                            
                  OR ((THIS_SCRIPT == 'gallery_search') AND $_REQUEST['searchid'] == '')
                  OR (THIS_SCRIPT == 'gallery_upload')
                  OR (THIS_SCRIPT == 'THIS_SCRIPT')
                  ">
                  <!-- none -->
          <vb:else />
          AD CODE
          </vb:if>

          Comment

          • briansol
            Senior Member
            • Apr 2006
            • 674
            • 3.6.x

            #6
            Anyone?

            Comment

            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
            Working...