| The Arcive of vBulletin Modifications Site. | |
| 
			 
			#1  
			
			
			
			
			
		 | |||
| 
 | |||
|  Conditional Statement in Ad Location Templates 
			
			I was trying to add a condition to the display of an ad: Code: <vb:literal>
<if condition="is_member_of($bbuserinfo, 1, 3, 4, 8, 31, 32)">
<div align="right"><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Team Buick, 300x250 -->
<ins class="adsbygoogle"
     style="display:inline-block;width:300px;height:250px"
     data-ad-client="ca-pub-5874277334279308"
     data-ad-slot="7439119065"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
</if>
</vb:literal>PHP Warning: Invalid argument supplied for foreach() in ..../includes/functions.php on line 3823 The following error occurred when attempting to evaluate this template: %1$s This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish. What did I do wrong Thanks! | 
| 
			 
			#2  
			
			
			
			
			
		 | ||||
| 
 | ||||
|   
			
			Your if conditions should be <vb:if  and </vb:if Code: <vb:literal>
<vb:if condition="is_member_of($bbuserinfo, 1, 3, 4, 8, 31, 32)">
<div align="right"><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Team Buick, 300x250 -->
<ins class="adsbygoogle"
     style="display:inline-block;width:300px;height:250px"
     data-ad-client="ca-pub-5874277334279308"
     data-ad-slot="7439119065"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
</vb:if>
</vb:literal> | 
| 2 благодарности(ей) от: | ||
| Kane@airrifle, MarkFL | ||
| 
			 
			#3  
			
			
			
			
			
		 | |||
| 
 | |||
|   
			
			That did it! I had been using information from this page: https://www.vbulletin.com/forum/foru...n-conditionals Thanks | 
| Благодарность от: | ||
| MarkFL | ||
| 
			 
			#4  
			
			
			
			
			
		 | ||||
| 
 | ||||
|   Quote: 
  ). | 
|  | 
| 
 | 
 | 
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
| 
 | |
|  More Information | |
| Template Usage: 
 Phrase Groups Available: 
 | Included Files: 
 Hooks Called: 
 |