vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Conditional for what error (STANDARD_ERROR template) (https://vborg.vbsupport.ru/showthread.php?t=328369)

Dr.CustUmz 11-26-2020 06:56 AM

Conditional for what error (STANDARD_ERROR template)
 
Inside the STANDARD_ERROR template the no permission error has its own condition, yet every other error is simply defined by $errormessage

does anyone know any of the conditional for the other error pages?

This is the no permission one:
HTML Code:

<if condition="$show['permission_error']">
(not authorized)

I need:
- Invalid Forum
- Sorry not accepting post
- And any other error messages

So that I am able to differentiate between them within the STANDARD_ERROR template.

Things I have tried:
Code:

<if condition="$show['badlocation']">
badlocation
</if>
<if condition="$errormessage = $vbphrase[invalidid]">
invalidid
</if>


lange 11-26-2020 12:56 PM

I am not sure I understand what you want to do. Maybe a mix of the following conditionals can do the job. I used them for my vB3.8.11 forum.

Code:

<if condition="is_member_of($bbuserinfo, 2,4,5,6,7,9,10,11,12,13,14)">
<if condition="is_member_of($vbulletin->userinfo, 1,2,5,6,7,9,10,11,12,13,14)">
<if condition="in_array($forumid, array(16,17,19,21,23,24,25))">
 <if condition="$onlinestatus==0 AND !in_array($user['userid'] , array(14,5,8,10)) ">
<if condition="!in_array($forumid, array(64,62)) AND  is_member_of($bbuserinfo, 1)">
!in_array($forumid, array(64,62))

.
.

Tested this one and it's working :
Code:

<if condition="is_member_of($bbuserinfo, 1,2,4,5,6,7,9,10,11,12,13,14)">
blabla 
            <div style="margin: 10px">$errormessage</div>
 </if>
<else /> invalidid
</if>


Dr.CustUmz 11-26-2020 02:10 PM

Im trying to find the error type, so I can customize the template based on which error occurs.

an better example would be

(not a working code)
Code:

<if condition="$errormessage == '$vbphrase[invalid_forum_specified]'">
My Custom Error styling for a forum not existing.
</if>

this error can be seen here for example:
https://vbulletin.org/forum/forumdis...hp?f=465465456


All times are GMT. The time now is 08:36 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02064 seconds
  • Memory Usage 1,718KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (1)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete