Author is gone in articles

GK User
Mon Jun 11, 2012 10:16 pm
After I updated to version 2.9.1 of the template the autorhs name is missing from all articles.

It just says "Written by" but no name after that. You can see it here:

http://www.fotoforalla.se/artiklar/mer/ ... temkameran

Written by is "Skriven av" in Swedish.
User avatar
Platinum Boarder

Konrad M
Tue Jun 12, 2012 8:26 am
Hi,
Please go to html/com_content/article/default.php and find
Code: Select all
<?php if (!empty($this->item->contactid) && $params->get('link_author') == true): ?>
              <?php
             $needle = 'index.php?option=com_contact&view=contact&id=' . $this->item->contactid;
               $menu = JFactory::getApplication()->getMenu();
               $item = $menu->getItems('link', $needle, true);
               $cntlink = !empty($item) ? $needle . '&Itemid=' . $item->id : $needle;
              ?>

change it to:
Code: Select all
 <?php $author = $this->item->created_by_alias ? $this->item->created_by_alias : $this->item->author; ?>
               <?php if (!empty($this->item->contactid) && $params->get('link_author') == true): ?>
              <?php
             $needle = 'index.php?option=com_contact&view=contact&id=' . $this->item->contactid;
               $menu = JFactory::getApplication()->getMenu();
               $item = $menu->getItems('link', $needle, true);
               $cntlink = !empty($item) ? $needle . '&Itemid=' . $item->id : $needle;
              ?>
User avatar

GK User
Tue Jun 12, 2012 2:22 pm
I can´t seem to find it in the file, I can find some of the code you refer to but not all of it in one place. Could you please attache a fixed file instead?
User avatar
Platinum Boarder

Konrad M
Tue Jun 12, 2012 2:35 pm
Add this
Code: Select all
<?php $author = $this->item->created_by_alias ? $this->item->created_by_alias : $this->item->author; ?>


Before this line
Code: Select all
<?php if (!empty($this->item->contactid) && $params->get('link_author') == true): ?>

Should work.
User avatar

GK User
Tue Jun 12, 2012 3:20 pm
But I can´t find this line:

<?php if (!empty($this->item->contactid) && $params->get('link_author') == true): ?>

Notepad++ doesn´t find anything when I search for it.
User avatar
Platinum Boarder

Konrad M
Tue Jun 12, 2012 6:10 pm
Please send me your default.php file to [email protected]
User avatar


cron