PDA

View Full Version : Conditional for what error (STANDARD_ERROR template)


Dr.CustUmz
11-26-2020, 06:56 AM
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:
<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:
<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.


<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 :
<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)
<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/forumdisplay.php?f=465465456