k2 user avatar in minik2 simple template
- Posted by erwinschro (1034) Offline
Also you don't need to add anything in helper.php as the codes already available in lines 507-541
11 years 10 months ago #7
by erwinschro
Please Log in or Create an account to join the conversation.
- Posted by david (6) Offline
I corrected but it always returns blank page,
I am wrong in helper.php?
11 years 10 months ago #8
by david
I am wrong in helper.php?
//Autore
if ($params->get('itemAuthor')) {
$item->itemAuthor = $model->getItemAuthor($item->itemAuthor);
}
Please Log in or Create an account to join the conversation.
- Posted by erwinschro (1034) Offline
As I said above
So try to remove what you've done in helper.php and see if that helps.
11 years 10 months ago #9
by erwinschro
you don't need to add anything in helper.php as the codes already available in lines 507-541
So try to remove what you've done in helper.php and see if that helps.
Please Log in or Create an account to join the conversation.
- Posted by david (6) Offline
ok we're almost there
but now it does not display image item will avatar image, but only displays links authorName
this is html
in src"undefined"
you are very patient
11 years 10 months ago #10
by david
but now it does not display image item will avatar image, but only displays links authorName
this is html
<div id="minik2271" class="minik2 masonry" style="position: relative; height: 711px;">
<div class="k2item block masonry-brick" style="position: absolute; top: 0px; left: 0px; opacity: 1;">
<div class="thumbs-wrapper">
<div class="thumbs">
<a href="/component/k2/item/181-congelatore-orizzontale-204-l">
<img class="box-img" alt="Congelatore orizzontale 204 L" src="undefined">
</a>
</div>
</div>
<h2 class="title">
<a href="/component/k2/item/181-congelatore-orizzontale-204-l">Congelatore orizzontale 204 L</a>
</h2>
<span class="itemDateCreated"> 2 Visite </span>
<div class="clr"></div>
<div class="moduleItemExtraFields">
<div class="clr"></div>
<a class="k2Avatar moduleItemAuthorAvatar" href="/component/k2/itemlist/user/721-mordàelettronica" rel="author">
<img style="width:190px;height:auto;" alt="Mordà Elettronica" src="undefined">
</a>
</div>
in src"undefined"
you are very patient
Please Log in or Create an account to join the conversation.
- Posted by david (6) Offline
I solved
I deleted "/"
these lines
you've been a great help
thanks
11 years 10 months ago #11
by david
I deleted "/"
these lines
<a class="k2Avatar moduleItemAuthorAvatar" rel="author" href="/<?php echo $item->authorLink; ?>">
<img src="/<?php echo $item->authorAvatar; ?>" alt="<?php echo K2HelperUtilities::cleanHtml($item->author); ?>" style="width:190px;height:auto;" />
</a>
you've been a great help
thanks
Please Log in or Create an account to join the conversation.
- Posted by erwinschro (1034) Offline
As you can see in the html you post
the image source is undefined.
What I can guess is either you still doesn't have an avatar for that user or your user doesn't have avatar from Gravatar services. Please check them out inside K2 User Management.
11 years 10 months ago #12
by erwinschro
<img style="width:190px;height:auto;" alt="Mordà Elettronica" src="/undefined">
the image source is undefined.
What I can guess is either you still doesn't have an avatar for that user or your user doesn't have avatar from Gravatar services. Please check them out inside K2 User Management.
Please Log in or Create an account to join the conversation.