AndyB
Well-known member
I would like to extend FindNew, but I cannot seam to pass the variable to the find_new_posts template.
What is incorrect with this PHP code?
	
	
	
		
Thank you.
				
			What is incorrect with this PHP code?
		PHP:
	
	<?php
class Andy_ShowModeration_ControllerPublic_FindNew extends XFCP_Andy_ShowModeration_ControllerPublic_FindNew
{
	public function actionPosts()
	{
		// get parent		
		$parent = parent::actionPosts();
		
		// declare variable
		$showModeration = 0;
		
		// get cookie
		$showModeration = XenForo_Helper_Cookie::getCookie('show_moderation');
		// set params
		$parent->params['showModeration'] = $showModeration;			
		// return parent
		return $parent;		
    }
}
	Thank you.