By Edwin Cruz on Saturday, 04 March 2017
Replies 11
Likes 0
Views 650
Votes 0
hi stackideas team, i want retrieving the user avatar, but with that code
require_once(JPATH_ADMINISTRATOR . '/components/com_easysocial/includes/easysocial.php');
$id = 445;
$my = ES::user();
$avatar = $my->getAvatar($id);
but give me this error:

Notice: Use of undefined constant JPATH_ADMINISTRATOR - assumed 'JPATH_ADMINISTRATOR' in C:\xampp\htdocs\prefix\recuperaavatar.php on line 2

Warning: require_once(JPATH_ADMINISTRATOR/components/com_easysocial/includes/easysocial.php): failed to open stream: No such file or directory in C:\xampp\htdocs\prefix\recuperaavatar.php on line 2

Fatal error: require_once(): Failed opening required 'JPATH_ADMINISTRATOR/components/com_easysocial/includes/easysocial.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\prefix\recuperaavatar.php on line 2

can you help me please.
Hello Edwin,

The code that you are using requires to be accessed via Joomla. If you are not accessing via Joomla, then the constant's like JPATH_ADMINISTRATOR wouldn't exist.
·
Saturday, 04 March 2017 16:02
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you Mark, I have solved it, but now I would like to be able to extract the toolbar only to put it in another position, i do with this code:
require_once(JPATH_ADMINISTRATOR . '/components/com_easysocial/includes/easysocial.php');
$tool = ES::toolbar();
$toolbar = $tool->render();
echo $toolbar;
but don't show me the format from select theme, can you help me please
·
Monday, 06 March 2017 00:29
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Edwin,

Actually we got module to display EasySocial toolbar in page that you want it to display
However, if you want to display it with custom code above you need to add id="es" as example below:

<div id="es">
<?php echo $toolbar; ?>
</div>

But if you use this, it doesn't display the styling fully correct.
·
Monday, 06 March 2017 13:48
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you Muhammad Fadhli, but don't display me the css style in the toolbar, other idea? please
·
Tuesday, 07 March 2017 00:33
·
0 Likes
·
0 Votes
·
0 Comments
·
Can you attach some screenshot how that toolbar look like now?
·
Tuesday, 07 March 2017 00:38
·
0 Likes
·
0 Votes
·
0 Comments
·
The toolbar looks like this
·
Tuesday, 07 March 2017 00:59
·
0 Likes
·
0 Votes
·
0 Comments
·
What I want to do is just extract the toolbar from a php file to send it calling from asp.net and place it inside an iframe
·
Tuesday, 07 March 2017 01:03
·
0 Likes
·
0 Votes
·
0 Comments
·
I am sorry for the delay of this reply,

Since we can't reproduce this, can you update your following details at http://stackideas.com/dashboard/site so we can better have a check?

1. Joomla backend access
2. FTP access
3. Which file you customise on this .
·
Tuesday, 07 March 2017 17:40
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post