The Arcive of vBulletin Modifications Site. | 
    |
| 
		 
			 
			#1  
			
			
			
			
			
		 
		
	 | 
||||
		
		
  | 
||||
| 
		
	
		
		
			
			 
			
			hello, 
		
		
		
		
		
		
		
		
	
	I just tried to add a new block (Forum Blocks Manager) with PHP content type but there is always error. just tried: PHP Code: 
	
			
	 | 
| 
		 
			 
			#2  
			
			
			
			
			
		 
		
	 | 
||||
		
		
  | 
||||
| 
		
	
		
		
			
			 
			
			And the error is?
		 
		
		
		
		
		
		
		
		
	
	 | 
| 
		 
			 
			#3  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 
			
			Is this the only code you're using? 
		
		
		
		
		
		
		
		
	
	That wount work ![]() 1. You have to use vB::$db-> instead of $vbulletin->db 2. You'll need to fetch the query. 3. You'll need to add the results to an array or to a template 4. You'll need to return it  | 
| 
		 
			 
			#4  
			
			
			
			
			
		 
		
	 | 
||||
		
		
  | 
||||
| 
		
	
		
		
			
			 
			
			Can you please give me an example? Thank you
		 
		
		
		
		
		
		
		
		
	
	 | 
| 
		 
			 
			#5  
			
			
			
			
			
		 
		
	 | 
||||
		
		
  | 
||||
| 
		
	
		
		
			
			 
			
			If you want to see an example, here's a real simple block that just spits out the user's username: 
		
		
		
		
		
		
		
		
	
	PHP Code: 
	
			
	 | 
| 
		 
			 
			#6  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 
			
			I've done things in a slightly different way.... 
		
		
		
		
		
		
		
		
	
	I was making widget (not sure how these differ from sidebar blocks) But I made completely blank template, with just {vb:raw output} in it, and in my php area just include() an external file and have the out stored in $output. Means I can edit the included file however I want, and I can re-use that template too.  | 
![]()  | 
	
	
		
  | 
	
		
  | 
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
						
  | 
				|
  More Information | 
				|
| 
						 Template Usage: 
						
 Phrase Groups Available: 
						
  | 
					
						 Included Files: 
						
 Hooks Called: 
						
  |