params = new JRegistry( $plugin->params ); parent::__construct($subject, $config); } function onCommentsAlbum($album_id) { $width = $this->params->get('width_album',507) ; $this->displayTemplate($width) ; } function onCommentsSong($song_id) { $width = $this->params->get('width_song',507) ; $this->displayTemplate($width) ; } function onCommentsArtist($song_id) { $width = $this->params->get('width_artist',507) ; $this->displayTemplate($width) ; } function onCommentsPlaylist($song_id) { $width = $this->params->get('width_playlist',507) ; $this->displayTemplate($width) ; } function displayTemplate($width){ $uri = JFactory::getURI(); $url = $uri->__toString(); require (dirname(__FILE__).DS.'facebook'.DS.'template.php'); } } // end class