Support Forums

Support Offline : Mon - Fri / 10am - 6pm (GMT +6)

Your Time: Our Time:

Add an author box top on single article view

Featured Lock Resolved Task
Hi, I need your help to add an author box top on single article view as you see in the picture which I attached.
Please tell me how can I do that.
Thanks.
Best.

Attachments (1)

  • Untitled-1.png
    Untitled-1.png 572.4 KB

10 Answers

Rifat Wahid Alif - Staff

More than a month ago #Permalink
Hi,
You can replace the attached file in the following location /templates/shaper_strings/html/layouts/joomla/content/info_block/.

NB: Please keep a backup old file before replacing and you have to write css.

- Thanks

Attachments (1)

  • author.zip 1.3 KB

Ahmad

More than a month ago #Permalink
Hi,
You can replace the attached file in the following location /templates/shaper_strings/html/layouts/joomla/content/info_block/.

NB: Please keep a backup old file before replacing and you have to write css.

- Thanks

Thank you so much Rifat for your answer,
I add this code to the template.css it works. Kindly tell me everything is correct?
CSS
.pull-left img {
display: inline-block;
border-radius: 50%;
height: 50px;
line-height: 50px;
border: 4px solid;
border-color: #e5e5e5;

}
.article-info >dd.createdby span {
font-weight: 700;
padding: 8px;
}
body.rtl .pull-left {
float: right !important;
height: 50px;
line-height: 50px;
}
.article-info >dd {
display: inline-flex;
color: #0b1523;
text-transform: none;
font-size: 12px !important;
margin: 0 4px;
}
.view-article article.item .content-wrap .entry-header {
margin-bottom: 20px;
}
.author-socialmedia {
padding-top: 16px;
padding-left: 5px;
padding-right: 5px;
font-size: 13px;
}
.author-socialmedia .fa {
padding: 5px;
color: #337ab7;
}


PHP

defined('JPATH_BASE') or die;

?>
<dd class="createdby" itemprop="author" itemscope itemtype="http://schema.org/Person">

<div class="author-img pull-left">
<?php if ($displayData['item']->contact_link) { ?>
<a href="/<?php echo $displayData['item']->contact_link; ?>" class="entry-author-link">
<img itemprop="name" data-toggle="tooltip" title="<?php echo JText::sprintf('COM_CONTENT_WRITTEN_BY', '') . ' ' . $displayData['item']->author; ?>" alt="<?php echo $displayData['item']->author; ?>" src="/http://www.gravatar.com/avatar/<?php echo md5(strtolower(trim($displayData['item']->author_email))); ?>?s=100">
<?php $author = ($displayData['item']->created_by_alias ? $displayData['item']->created_by_alias : $displayData['item']->author); ?>
</a>
<?php } else { ?>
<img itemprop="name" data-toggle="tooltip" title="<?php echo JText::sprintf('COM_CONTENT_WRITTEN_BY', '') . ' ' . $displayData['item']->author; ?>" alt="<?php echo $displayData['item']->author; ?>" src="/http://www.gravatar.com/avatar/<?php echo md5(strtolower(trim($displayData['item']->author_email))); ?>?s=100">
<?php $author = ($displayData['item']->created_by_alias ? $displayData['item']->created_by_alias : $displayData['item']->author); ?>
<?php } ?>
</div> <!-- //.author-img -->
<div class="author-details pull-left">
<?php $author = ($displayData['item']->created_by_alias ? $displayData['item']->created_by_alias : $displayData['item']->author); ?>
<?php $author = '<span itemprop="name" data-toggle="tooltip" title="' . JText::sprintf('COM_CONTENT_WRITTEN_BY', '') . '">' . $author . '</span>'; ?>
<?php if (!empty($displayData['item']->contact_link ) && $displayData['params']->get('link_author') == true) : ?>
<?php echo JHtml::_('link', $displayData['item']->contact_link, $author, array('itemprop' => 'url')); ?>
<?php else :?>
<?php echo $author; ?>
<?php endif; ?>
</div> <!-- /.author-details -->
<!-- //.author-socialmedia -->
<div class="author-socialmedia">
<a href="#"target="_blank">
<i class="fa fa-facebook"></i>
</a>
<a href="#"target="_blank">
<i class="fa fa-twitter"></i>
</a>
<a href="#"target="_blank">
<i class="fa fa-instagram"></i>
</a>
<a href="#"target="_blank">
<i class="fa fa-google-plus"></i>
</a>
<a href="#"target="_blank">
<i class="fa fa-linkedin-square"></i>
</a>
</div> <!-- /.author-socialmedia -->

</dd>


Thank you for your attention.

Rifat Wahid Alif - Staff

More than a month ago #Permalink
Hi,
PHP code was correct :) if you can share your URL then I can see if there is anything else.

- Thanks

Ahmad

More than a month ago #Permalink
Hi,
PHP code was correct :) if you can share your URL then I can see if there is anything else.

- Thanks

http://milanimedspa.lucdream.com/index.php/blog

Rifat Wahid Alif - Staff

More than a month ago #Permalink
Hi,
Here need to write some more css to align social icons.


- Thanks

Ahmad

More than a month ago #Permalink
Hi,
Here need to write some more css to align social icons.


- Thanks
Can you check one more time please?
thanks.

Rifat Wahid Alif - Staff

More than a month ago #Permalink
yes now everything is good :)

Ahmad

More than a month ago #Permalink
yes now everything is good :)
Than you so much for your support
Best.

Rifat Wahid Alif - Staff

More than a month ago #Permalink
You are always welcome :)


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Leaderboard (30 days)

Sifat

Sifat

Total Accepted Answers: 137
Paul Frankowski

Paul Frankowski

Total Accepted Answers: 123
Toufiq

Toufiq

Total Accepted Answers: 64
Pavel

Pavel

Total Accepted Answers: 5
Mohammed Ahmed

Mohammed Ahmed

Total Accepted Answers: 2

100+

Templates

200,000+

Community Users

Newsletter

Don’t miss any updates of our new templates and extensions and all the astonishing offers we bring for you.
We never spam

Joomla! ® name is used under a limited license from Open Source Matters in the United States and other countries. JoomShaper.com is not affiliated with or endorsed by Open Source Matters or the Joomla! Project.

Connect Us