This forum is for assistance with theme development.

Adding web site source and time ago to aggregator block

Hi,
I guess this should be rather simple, but I can't figure it.

In template.php I added this aggregator theme override:


/**
 * Format an individual feed item for display in the block.
 *
 * @ingroup themeable
 */
function Nanovip_aggregator_block_item($item, $feed = 0) {
  global $user;

  if ($user->uid && module_exist('blog') && user_access('edit own blog')) {
    if ($image = theme('image', 'misc/blog.png', t('blog it'), t('blog it'))) {
      $output .= '<div class="icon">'. l($image, 'node/add/blog', array('title' => t('Comment on this news item in your personal blog.'), 'class' => 'blog-it'), "iid=$item->iid", NULL, FALSE, TRUE) .'</div>';
    }
  }

  // Display the external link to the item.
   $output .= '<a href="'. check_url($item->link) .'" target=\"_blank\">'. check_plain($item->title) ."</a>\n";

  return $output;
}

this is what formats the aggregator block link.

Looking in the aggregator code, I found these codes:


<span class="age">'. t('%age old', array('%age' => format_interval(time() - $item->timestamp))) .'</span>

Which output age old since fetched.

And:


<div class=\"feed-item-meta\">$source <span class=\"feed-item-date\">$source_date</span></div>

which (i think) adds a link to source.

I try to add these code to

<?php

$output .= 'link) .'" target=\"_blank\">'. check_plain($item->title) ."\n";

displaying blocks in the header region with the bidi theme.

on a development site I am working on using drupal 4.7 and the bidi theme, I don't seem to be able to position blocks in the header or the footer regions although this option is enabled in administer / blocks. any ideas why this is the case?

the site url is: www.nattiq.info

note that switching to a different theme does solve the problem.

Following is the code to do with the header from page.tbl.php from the mentioned theme:

<body <?php print theme("onload_attribute"); ?>>
<div id="header">
  <?php if ($search_box): ?>
	<form action="<?php print $search_url ?>" method="post">
		<div id="search">
			<input class="form-text" type="text" size="15" value="" name="edit[keys]" /><input class="form-submit" type="submit" value="<?php print $search_button_text ?>" />
		</div>
	</form>
  <?php endif; ?>
  <?php if ($logo) : ?>
  <a href="<?php print url() ?>" title="Index Page"><img src="<?php print($logo) ?>" alt="Logo" /></a>
  <?php endif; ?>
  <?php if ($site_name) : ?>
    <h1 id="site-name"><a href="<?php print url() ?>" title="Index Page"><?php print($site_name) ?></a></h1>
  <?php endif;?>
  <?php if ($site_slogan) : ?>
    <span id="site-slogan"><?php print($site_slogan) ?></span>
  <?php endif;?>
  <br class="clear" />
</div>

would putting something like: <?php print($header) ?> directly before <br class="clear" /> be of use? or it only would worsen things.

custom comment form

I need to make custom comment form for a specific node type, created with flexinode. And also a custom layout for these comments. There must be more fields next to the text field - a way to enter a score and to upload 1 to 3 images with the comment.
Do you have any ideas hot to accomplish this? Is there a way to do it without wtiting new module? The existing modules for (book|film|something) reviews are unusable in my scenario (or need a lot of hacking, AFAIsaw). Something with flexinode + cusom template.php code maybe?
Ideas?

[eCommerce module] thumbnails in shopping cart list view?

Hello,

Would it be possible to add a thumbnail in the shopping cart next to the products that are put in there? It seems to be supported by the cart module in gallery (http://gallery.menalto.com/). Howerver, I would prefer not to install gallery only for this. I prefer to just use the modules that come with drupal.

Thanks for your help,

How to theme image_attach images?

Is there a way to override the default theming built into the image_attach module without rewriting the module itself? I'm using the PHPTemplate engine for my theme, and have tried all of the template names I can think of; none of them has worked. If someone has an example of a template that would get picked up by the theme function, I'd be grateful if you could post it here.

Otherwise, if you can't use theme templates, what's the next best way to do it?

Thanks in advance.

making $base_url and $directory available to the body content of a block?

Is this possible? I need to build a path for an IMG in this block I have here:

Pages

Subscribe with RSS Subscribe to RSS - Theme development