0

I have Author Pane installed along with D7 Advanced forum. I am wondering how to shorten the display format of 'Join' and how to remove 'Last seen:' from the pane? I could not see any guidelines in the module's docs or issues about this.

2 Answers 2

1

Author Pane module contains appropriate templates files which control output. author-pane.tpl.php is something that will help.

Just copy it in your theme directory, flush cache and do whatever you like with this file to customize Auth Pane block.

To remove 'Last seen:' from the pane comment or remove from the file

<?php /* Last active */ ?>
<?php if (!empty($last_active)): ?>
    <div class="author-pane-line author-last-seen">
       <span class="author-pane-label"><?php print t('Last seen'); ?>:</span> <?php print t('!time ago', array('!time' => $last_active)); ?>
    </div>
<?php endif; ?>

To shorten the display format of 'Join' find appropriate admin page (/admin/config/regional/date-time) and change Short date format to the format you prefer.

 * - $joined: Date the post author joined the site. (Uses shortdate format)
3
  • I copied author-pane.tpl.php into my theme's template page. Remove the 'Last active' part and flushed the cash. No effect.I even deleted the 'Last active' from the module's author-pane.tpl.php. No effect either. Really got confused. Any clues?
    – alfish
    Commented May 28, 2014 at 4:52
  • For example you use theme called MY THEME (theme's machine name my_theme). So the proper directory to copy .tpl files will be /sites/all/themes/my_theme/ for most cases. Path to tpl file will be either /sites/all/themes/my_theme/author-pane.tpl.php or /sites/all/themes/my_theme/templates/author-pane.tpl.php. Clear cache after you copy file. Let me know if you have any troubles or don't see changes. Commented May 28, 2014 at 11:02
  • I did that. no effect :(
    – alfish
    Commented May 30, 2014 at 7:37
0

Indeed, following this guide solved my problem. That is,

I copied

function THEMENAME_preprocess_author_pane(&$variables) {
  $variables['show_template_location'] = TRUE;
}

To THEMENAME/template.php and it showed the respective template path which in my case was in all/modules/advanced_forum/styles/naked/advanced-forum.naked.author-pane.tpl.php

Then I just edited the template and flushed cache.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.