The Arcive of vBulletin Modifications Site. | 
    |
| 
		 
			 
			#1  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 
			
			I've got this plugin: 
		
		
		
		
		
		
		
		
	
	Code: 
	ob_start();
   include('http://www.va-studios.com/forums/customphp/vigilance.php');
   $vigilance = ob_get_contents();
ob_end_clean();
vB_Template::preRegister('postbit_legacy',array('vigilance' => $vigilance));
Is there any way to get the poster's ID in my vigilance.php file so that I can do a db query on it or can I not access VB variables even if I include the global.php file in my script? Simply stated, I need to do an sql query on the database for the user in the postbit_legacy and display the custom field I added in the database.  | 
| 
		 
			 
			#2  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 
			
			Why don't you just execute your code in the plugin?
		 
		
		
		
		
		
		
		
		
	
	 | 
| 
		 
			 
			#3  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 
			
			I'm still unable to find out how to grab the userID of the poster in my script so that I can grab their custom profile field database entry. 
		
		
		
		
		
		
		
		
	
	I just need to be able to parse "fieldX" into my script when I execute it. Any ideas?  | 
| 
		 
			 
			#4  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 Quote: 
	
 Then you can just use $post['userid'].  | 
| 
		 
			 
			#5  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 
			
			How would I do something like this in the plugin, unsure how to get user variables in the plugins. 
		
		
		
		
		
		
		
		
	
	PHP Code: 
	
			
	PHP Code: 
	
			
	 | 
| 
		 
			 
			#6  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 
			
			Having the same question here... 
		
		
		
		
		
		
		
		
	
	Does anyone knows an answer?  | 
| 
		 
			 
			#7  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 Quote: 
	
  | 
| 
		 
			 
			#8  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 
			
			$post['fieldX'] does not get any data when loading the plugin.  I have it in global_start, do I need to be setting this somewhere else or delcaring any includes in the plugin?
		 
		
		
		
		
		
		
		
		
	
	 | 
| 
		 
			 
			#9  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 
			
			global_start is obsolete in the latest VB4 versions.  Use global_bootstrap_init_start instead
		 
		
		
		
		
		
		
		
		
	
	 | 
| 
		 
			 
			#10  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 Quote: 
	
 PHP Code: 
	
			
	 | 
![]()  | 
	
	
		
		
  | 
	
		
  | 
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
						
  | 
				|
  More Information | 
				|
| 
						 Template Usage: 
						
 Phrase Groups Available: 
						
  | 
					
						 Included Files: 
						
 Hooks Called: 
						
  |