The Arcive of vBulletin Modifications Site. | 
    |
| 
		 
			 
			#1  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 
			
			I have a question - If I make a while or for loop in a plugin, how could I include it in a template? 
		
		
		
		
		
		
		
		
	
	What I want to do? I want to make a table with all users and some custom fields with a mysql query. Or could I make it ready in the plugin and then include it in the template? If so, how?  | 
| 
		 
			 
			#2  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 
			
			Hi BaussDesigns,  
		
		
		
		
		
		
		
		
	
	i hope i understood u in the right way, here is an example of my code how I am solving that issue: PHP Code: 
	
			
	hope it helps you at least in getting an idea!  | 
| 
		 
			 
			#3  
			
			
			
			
			
		 
		
	 | 
||||
		
		
  | 
||||
| 
		
	
		
		
			
			 
			
			Rendering very small templates (that are used nowhere else) in a loop is kinde wasting resources. 
		
		
		
		
		
		
		
		
	
	It would be a lot more efficient to use <vb:each> in the parent template.  | 
![]()  | 
	
	
		
  | 
	
		
  | 
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
						
  | 
				|
  More Information | 
				|
| 
						 Template Usage: 
						
 Phrase Groups Available: 
						
  | 
					
						 Included Files: 
						
 Hooks Called: 
						
  |