test
Viewing 1 post (of 1 total)
  • Author
    Posts
  • arucardx Friend
    #181461

    Was looking through the code in K2 2.6.1 against JA Wall for changes and saw this interesting piece of code. It looks like it controls whether the name of the author should be hyperlink or not. Currently, it’s hyperlink by default according to the existing code. Still not very sure if this code change has no use since I don’t use author info but here you go anyway =)

    Existing code in JA Wall: html/com_k2/ja_wall/category_item.php

    <strong><?php echo K2HelperUtilities::writtenBy($this->item->author->profile->gender); ?>: </strong> <a rel="author" href="<?php echo $this->item->author->link; ?>"><?php echo $this->item->author->name; ?></a>

    New code from K2 2.6.1 and slightly modified in JA Wall

    <strong><?php echo K2HelperUtilities::writtenBy($this->item->author->profile->gender); ?></strong>
    <?php if(isset($this->item->author->link) && $this->item->author->link): ?>
    <a rel="author" href="<?php echo $this->item->author->link; ?>"><?php echo $this->item->author->name; ?></a>
    <?php else: ?>
    <?php echo $this->item->author->name; ?>
    <?php endif; ?>

Viewing 1 post (of 1 total)

This topic contains 1 reply, has 1 voice, and was last updated by  arucardx 12 years, 1 month ago.

We moved to new unified forum. Please post all new support queries in our New Forum