Hey guys,
I am from stackideas.com the developers of both EasyBlog and EasyDiscuss. We actually have some integrations with Community Builder and we are actually trying to pull the avatars from Community Builder. However, we were having some issues whenever we try to call the following API,
Code:
$user->getField( 'avatar', null, 'php', 'none', 'list' );
The following block of javascript codes somehow get's outputted and causing the AJAX calls to fail,
Code:
<script type="text/javascript" src="/<a href="http://****.org/components/com_comprofiler/js/jquery-1.5.2/jquery-1.5.2.min.js?v=5dc11eced412cdd6" ><="" script><script"="">http://****.org/components/com_comprofiler/js/jquery-1.5.2/jquery-1.5.2.min.js?v=5dc11eced412cdd6"></script><script</a> type="text/javascript"><!--
jQuery.noConflict();
--></script>
<script type="text/javascript" src="/<a href="http://****.org/components/com_comprofiler/js/tabpane.min.js?v=5dc11eced412cdd6" ><="" script>"="">http://****.org/components/com_comprofiler/js/tabpane.min.js?v=5dc11eced412cdd6"></script></a>
<script type="text/javascript"><!--
jQuery(document).ready(function($){
var cbshowtabsArray = new Array();
function showCBTab( sName ) {
if ( typeof(sName) == 'string' ) {
sName = sName.toLowerCase();
}
for (var i=0;i<cbshowtabsArray.length;i++) {
for (var j=0;j<cbshowtabsArray[i][0].length;j++) {
if (cbshowtabsArray[i][0][j] == sName) {
eval(cbshowtabsArray[i][1]);
return;
}
}
}
}});
--></script>
The solution which I have used to fix this is to call the following method instead. Although this seems to work, it seems like in the source itself, this method will be deprecated in the future versions of Community Builder.
Code:
$user->avatarFilePath();
Any advise?