HDJuegos
Active member
Hi, i'm creating a new LikeHandler to allow my users to "Like" more things than Posts and ProfilePosts. Objective: A likehandler for a new content in my forum (like videos in video-directory):
To do it, i create a new content_type:
Data in xf_content_type (content_type,addon_id,fields)
	
	
	
		
Data in xf_content_type_fields:
 
	
	
	
		
I do the new likehandler class and put it in LikeHandler folder but i have a problem in my controllerpublic with the next code in actionLike function:
	
	
	
		
This code returns false and don't create a new like because the next code in Model -> Like.php returns false:
	
	
	
		
So XenForo don't find the new content_type, althought all fields are filled in DataBase.
I'm doing something wrong?. Thanks in advance
				
			To do it, i create a new content_type:
Data in xf_content_type (content_type,addon_id,fields)
		Code:
	
	'myContentType', 'MyAddon', 'a:1:{s:18:"like_handler_class";s:30:"MyAddon_LikeHandler_MyContent";}'
	Data in xf_content_type_fields:
		Code:
	
	 'myContentType', 'like_handler_class', 'MyAddon_LikeHandler_MyContent'
	I do the new likehandler class and put it in LikeHandler folder but i have a problem in my controllerpublic with the next code in actionLike function:
		Code:
	
	$latestUsers = $likeModel->likeContent('myContentType', $mycontentid, $contentuserid);
	This code returns false and don't create a new like because the next code in Model -> Like.php returns false:
		Code:
	
	$likeHandler = $this->getLikeHandler($contentType)
	So XenForo don't find the new content_type, althought all fields are filled in DataBase.
I'm doing something wrong?. Thanks in advance