Support

  1. messagedj
  2. Support
  3. Monday, November 23 2015, 03:19 PM
I am running a Crowdfunding component from ITPrism.

Is there a way to pull the Username and Avatar and show it in the crowdfunding template? The Content plugin is not working for this.
admin Accepted Answer
Admin
Hi,
content plugin works only where are triggered Joomla content plugins, you may think to use out API, read docs at http://docs.easy-profile.com/index.php/article/jsnuser-object
  1. more than a month ago
  2. Support
  3. # 1
messagedj Accepted Answer
i tried that... but i am not an expert, i was hoping you could help me on this
  1. more than a month ago
  2. Support
  3. # 2
admin Accepted Answer
Admin
Hi,
add this to your template to show user info
require_once(JPATH_SITE.'/components/com_jsn/helpers/helper.php');
$user=JsnHelper::getUser();
// show avatar
echo $user->getField('avatar');
// show entire name
echo $user->getField('name');
// show firstname
echo $user->getField('firstname');
// show lastname
echo $user->getField('lastname');
  1. more than a month ago
  2. Support
  3. # 3
messagedj Accepted Answer
hmmmzz... nothing shows if i use this:

<div>

<?php

require_once(JPATH_SITE.'/components/com_jsn/helpers/helper.php');
$user=JsnHelper::getUser();
// show avatar
echo $user->getField('avatar');
// show entire name
echo $user->getField('name');
// show firstname
echo $user->getField('firstname');
// show lastname
echo $user->getField('lastname');
?>

</div>
  1. more than a month ago
  2. Support
  3. # 4
messagedj Accepted Answer
ohhhh.. wait... sorry it does... i was not logged in...

i need to have the info from the user who owns the article...
  1. more than a month ago
  2. Support
  3. # 5
admin Accepted Answer
Admin
Hi,
same previous way but you need to specify the user ID to load: $user=JsnHelper::getUser( $user_id );

you need to get $user_id var from ITPrism author article
  1. more than a month ago
  2. Support
  3. # 6
messagedj Accepted Answer
Content Protected
  1. more than a month ago
  2. Support
  3. # 7
admin Accepted Answer
Admin
Yes,
with our api will be:

require_once(JPATH_SITE.'/components/com_jsn/helpers/helper.php');
$user=JsnHelper::getUser( $article->user_id );

$html.= '<div class="pull-right">';
$html.= '<a href="'.$user->getLink().'">';
$html.= $user->getField('avatar');
$html.= '</a>';
$html.= '</div>';


to set style you can use CSS like
.cf-details-block img.avatar{width:80px;height:80px;border-radius:1000;}
  1. more than a month ago
  2. Support
  3. # 8
messagedj Accepted Answer
Content Protected
  1. more than a month ago
  2. Support
  3. # 9
messagedj Accepted Answer
Content Protected
  1. more than a month ago
  2. Support
  3. # 10
admin Accepted Answer
Admin
Hi,
sorry but I not see var $article in your last code to get user id.
  1. more than a month ago
  2. Support
  3. # 11
messagedj Accepted Answer
any idea what i should add instead of $article, or do you know any way we can fix this?
  1. more than a month ago
  2. Support
  3. # 12
admin Accepted Answer
Admin
hi,
sorry we not have experience with this component, you may ask at their support how to get ID of author from article.
  1. more than a month ago
  2. Support
  3. # 13
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.
Sorry, the discussion is currently locked. You will not be able to post a reply at the moment.

Request Support

Support is currently Offline

Support Availability

Working days: Monday to Friday. The support staff is not available on weekends; in the most of cases tickets will not be answered during that time.

Reply time: Depending on the complexity of your support issue it's usually between a few minutes and 24 hours for paid members and about one week for free members. When we expect longer delays we will notify you.

Guidelines

Before you post: read the documentation and search the forums for an answer to your question.

When you post: include Site Details if you request a support (you can use the form below the reply in Site Details tab).

Auto Solved Question: If after a week the author of the post does not reply to a request by moderator, the question will be marked as resolved.

Language: only English

Search Users

Easy Profile® is not affiliated with or endorsed by Open Source Matters or the Joomla Project. Joomla is Free Software released under the GNU/GPL License.