Cupara
Well-known member
Ok, after much reading I have discovered the use of this listener. The problem I run into is that I need to call models and pass information so it can be displayed within a linksTemplate.
 
I'm trying this:
	
	
	
		
 
Now as I have found out $this is not allowed. Is there a way around it? If I have to use another method then I'm open to suggestions, just give me an example run down of setting it up.
 
Thanks
				
			I'm trying this:
		PHP:
	
	public static function params(array &$params, XenForo_Dependencies_Abstract $dependencies)
        {
            // Build the Model for caching
        $feedModel = $this->getModelFromCache('NewsReader_Model_Feed');
        
        // Unique for testing only.
        $visitor = XenForo_Visitor::getInstance();
        $visitor_id = $visitor->getUserId();
        $userName = $visitor['username'];
        
        // Lets paginate the results
        $page = max(1, $this->_input->filterSingle('page', XenForo_Input::UINT));
        $perPage = $options->nr_limit;
        $allFeeds = $feedModel->getPrefixFeedLog(array('perPage' => $perPage, 'page' => $page), $prefixId);
        $count = $feedModel->getPrefixFeedAllCount($prefixId);
        
            $params = array(
                'allFeeds' => $allFeeds,
                'count' => $count
            );
        }
	Now as I have found out $this is not allowed. Is there a way around it? If I have to use another method then I'm open to suggestions, just give me an example run down of setting it up.
Thanks