public function shorten() { $link = JRequest::getVar( 'url', '' ); if( $link != '' ) { Komento::import( 'helper', 'social' ); $shortenlink = KomentoSocialHelper::shortenUrl( $link ); echo $shortenlink; } exit; }
function shortenLink() { $link = JRequest::getVar( 'url' ); if( $link != '' ) { Komento::import( 'helper', 'social' ); $link = KomentoSocialHelper::shortenUrl( $link ); } $ajax = Komento::getAjax(); $ajax->success( $link ); $ajax->send(); }