Hello,

I notice there is no option to enable / disable submitted by in the theme settings.

I uploaded a picture to my admin account, but even though I have enabled User pictures in posts it is not showing.

Any tips?

Comments

giorgio79’s picture

Title: Submitted by and user picture not showing » "Submitted by" and "user picture" not showing

Clarifying title. I notice on the screenshot of the theme, these info show fine.

giorgio79’s picture

I notice this is in node.tpl.php

* - $display_submitted: whether submission information should be displayed

and then later on

    <?php //if ($display_submitted): ?>
      <div class="meta">
        <span class="submitted"><?php print t('Submitted by !username on !datetime', array('!username' => $name, '!datetime' => $date)); ?></span>
      </div>
    <?php //endif; ?>
  </div> <!-- /.node-header -->

But not sure where this setting is coming from, as it is not shown on the theme settings page.

Also, there is no user picture in this snippet...

Jeff Burnz’s picture

"Display author and date information." is a per content type setting on the content type edit page.

Your template is modified, the user picture is normally printed, the standard template looks like this:

<div id="node-<?php print $node->nid; ?>" class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>>

  <div class="node-header">
    <?php print render($title_prefix); ?>
    <?php if (!$page): ?>
      <h2 class="node-title" <?php print $title_attributes; ?>><a href="<?php print $node_url; ?>"><?php print $title; ?></a></h2>
    <?php endif; ?>
    <?php print render($title_suffix); ?>

    <?php if ($display_submitted): ?>
      <div class="meta">
        <span class="submitted"><?php print t('Submitted by !username on !datetime', array('!username' => $name, '!datetime' => $date)); ?></span>
      </div>
    <?php endif; ?>
  </div> <!-- /.node-header -->

  <div class="content clearfix" <?php print $content_attributes; ?>>
    <?php print $user_picture; ?>
    <?php
      // We hide the comments and links now so that we can render them later.
      hide($content['comments']);
      hide($content['links']);
      print render($content);
    ?>
  </div>

  <div class="links-wrapper">
    <?php print render($content['links']); ?>
  </div>
  <?php print render($content['comments']); ?>

</div>
giorgio79’s picture

Thanks Jeff, yes, I only commented out the "//if ($display_submitted):" as I cannot get it to show up. After commenting it out, the display submitted showed fine.

On the content type edit screen "Display author info" is on by default, I am using a default Article content type, still the submittedo does not show for me.

I uploaded a user pic for my admin acc, and that does not show either.

This is an out of the box D7.7 and Corolla 7.1.21

Jeff Burnz’s picture

Hmmm, not really sure in that case, do other images show up in the site? Maybe its a permissions issue (on the files directory or where you are saving images), although that still doesn't account for the submitted info not showing up. Sorry, but it works for me just fine on my local setup and I can't see any obvious bug or code that would affect this - maybe a contrib module you have installed?

giorgio79’s picture

Status: Active » Postponed

Thanks Jeff for checking, the user picture shows fine on the user page so it wont be a file permission issue.

Let's wait and see if others have this issue as well.

Anonymous’s picture

I'm not sure if this is helpful, but I found that the only way to get rid of the user picture was to turn off the "submitted by" checkbox when editing the content type. Turning off "user pictures in posts" in both admin/appearance/settings/corolla and admin/appearance/settings had no effect.

I wanted to have the "submitted by...." statement without the user picture, so I eventually just removed the call for user picture in the node.tpl.php file. Not ideal at all.

Perhaps there is statement missing in node.tpl.php to check for the status of "User pictures in posts"?

seise’s picture

I have the very same problem as well.