AndyB
Well-known member
I'm creating an add-on which is extending the DataWriter_preSave().
When a member is creating a new thread, I would like to be able to throw a error message if they are in the incorrect forum, so I need to get the forum number from the URI.
I can do this using the PHP command:
	
	
	
		
After I get $var I parse for the forum number, but this is messy.
It would be great if I could use an existing XF command designed for this purpose. I have tried the following without success:
	
	
	
		
Thank you.
				
			When a member is creating a new thread, I would like to be able to throw a error message if they are in the incorrect forum, so I need to get the forum number from the URI.
I can do this using the PHP command:
		PHP:
	
	$var = $_SERVER['REQUEST_URI'];After I get $var I parse for the forum number, but this is messy.
It would be great if I could use an existing XF command designed for this purpose. I have tried the following without success:
		PHP:
	
	$nodeId = $this->_input->filterSingle('node_id', XenForo_Input::UINT);Thank you.
 
 
		 
 
		
 (not everybody is including the node_id in the url)
 (not everybody is including the node_id in the url)