The Arcive of vBulletin Modifications Site. | 
    |
| 
		 
			 
			#1  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 
			
			I have a custom code named 
		
		
		
		
		
		
		
		
	
	Quote: 
	
 which works good but problem is Number of posts in some cases comes with Comma "," like 1,298 where it fails How can I simply convert to Integer in Template  | 
| 
		 
			 
			#2  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 
			
			This is something that never really occurred to me until recently, and I'm afraid I've probably suggested to many people that they use $posts['post'] as an integer. In any case, I don't think there's any way to use that value in a conditional.  What you could do is create a plugin using hook postbit_display_start and save the value to another name, like maybe: 
		
		
		
		
		
		
		
		
	
	Code: 
	$post['numposts'] = $post['posts']; The of course you'd use $posts['numposts'] in your template conditional.  | 
| 
		 
			 
			#3  
			
			
			
			
			
		 
		
	 | 
||||
		
		
  | 
||||
| 
		
	
		
		
			
			 
			
			Good stuff kh99 ! lol..I found the thread you were talking about !
		 
		
		
		
		
		
		
		
		
	
	 | 
| 
		 
			 
			#4  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 Quote: 
	
  | 
![]()  | 
	
	
		
  | 
	
		
  | 
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
						
  | 
				|
  More Information | 
				|
| 
						 Template Usage: 
						
 Phrase Groups Available: 
						
  | 
					
						 Included Files: 
						
 Hooks Called: 
						
  |