Posted by tsi on April 25, 2009 at 11:13pm
Jump to:
| Project: | Blog Information |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
this is not a support request, just sharing what I found using this module, If you are looking for a way to replace the blogs titles with the information from blog-info's block you can try this -
What I did is to replace <?php print $title; ?>
with this on page-blog.tpl.php :
<?php
$block = module_invoke('bloginfo', 'block', 'view', 0);
if ($block['subject']) {
$output = "<div class=\"bloginfo-block\">\n";
$output .= "<div id=\"bloginfo-block-title\">".$block['subject']."</div>\n";
$output .= "<div class=\"content\">".$block['content']."</div>\n";
$output .= "</div>\n";
print $output;}
else print $title;
?>On the user's blog page - this will give you the blog-info instead of the the normal title and the normal title if blog-info is empty.
and with this on page.tpl.php :
<?php if ($node->type == 'blog'): ?>
<div id="blog-title">
<?php
$block = module_invoke('bloginfo', 'block', 'view', 0);
if ($block['subject']) {
$output = "<div class=\"bloginfo-block\">\n";
$output .= "<div id=\"bloginfo-block-title\">".$block['subject']."</div>\n";
$output .= "<div class=\"content\">".$block['content']."</div>\n";
$output .= "</div>\n";
print $output;}
else print t("@username's blog", array('@username' => $node->name))
?>
</div>
<?php endif; ?>Here you replace the title with the blog-info only if the node type is blog, you might want to give it an alternative (else) for nodes that are not blogs.
Comments
#1
Thanks for sharing, unfortunately I was involved in other serious issues at the time and just got clear. At this moment I'm not sure if there's any point in taking this module any further but if I will certainly consider your contribution.