Is there any way for the body field not to be displayed as a collapsable box?
That is, can it just be displayed in-line above the ipaper embed?
This is an aesthetics thing, but it means a lot to me to have static text for each ipaper content node displayed over each ipaper (like a description of the file!) and not have it collapsable.

Also, is there any way to add in default text?
Like if I wanted instructions on how to use ipaper displayed on each ipaper content node but I didn't want to type it each time, could that be put in somehow?

thanks!

Comments

rares’s picture

Status: Active » Fixed

to not make the body collapsible, edit ipaper.module around:

    $fs = array(
      '#collapsible' => TRUE,
      '#collapsed' => TRUE,
      '#title' => $type->body_label,
      '#value' => $node->content['body']['#value'],

and set the two that are TRUE to FALSE.
Also remember that you can change the title of the body field.

If there are more people wanting to change this in the code, make it a feature request and I will consider it.

to add 'default' text you could consider adding a block that displays only on ipaper node pages (for instance, by telling it to display only on pages like content/ipaper/*, and then configure pathauto to create content/ipaper/[title-raw] aliases), maybe right above the node, if your theme supports that.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

rstryker’s picture

Status: Closed (fixed) » Active

I'd like appreciate this option also, as well as an option for hiding the "Body" label.

rares’s picture

If I have time, I will try to include this, but in the meantime you could achieve these things easily by editing CSS.
Also, remember that you can change the body label from the content type settings /admin/content/node-type/ipaper. Or you can remove it, and then the body field is not shown when editing or viewing.

MatthijsG’s picture

Here's a fix, but i didn't test it (so the're be maybe some bugs in it)
around line 394 in ipaper.module

  if ($type->has_body && $node->content<b>['body']</b>['#value']!='') {
      $node->content['body']['#value'] = theme('fieldset', $fs);
    }

Remove the first ['body'] (now line 394) and the collapsible 'body'-field would not show up. However, the text is visible!

brynbellomy’s picture

Or just make a helper module for your site, give it a weight of 2 or higher (either manually in the db or using the Util module), and include the following:


function mysite_helper_nodeapi(&$node, $op, $a1 = '', $a2 = '') {
  if($node->type == 'ipaper' && $op == 'view') {
    $node->content['body']['#value'] = $node->body;
  }
}