I started a little work on this and came out succesful.. I think anyway.
My starting point was a thread on the user blog mod site
How to display blog entries on a different phpBB3 page
I basically took the instructions and worked around them.
Start by
opening portal.php and making the edits EXreaction suggests to make on index.php
FIND
ADD BEFORE
Code: Select all
// Output Blog Entries
$blog_limit = 5;
$user->add_lang(array('mods/blog/common', 'mods/blog/view'));
include($phpbb_root_path . 'blog/functions.' . $phpEx);
$blog_data = new blog_data();
$recent_blog_ids = $blog_data->get_blog_data('recent', 0, array('limit' => $blog_limit));
$blog_data->get_user_data(false, true);
update_edit_delete();
if ($recent_blog_ids !== false)
{
foreach ($recent_blog_ids as $id)
{
$template->assign_block_vars('recent_blogs', array_merge($blog_data->handle_user_data(blog_data::$blog[$id]['user_id']), $blog_data->handle_blog_data($id, $config['user_blog_text_limit'])));
}
}
Then I
created a new file called blog_block.html and put in the following content.
Code: Select all
<div class="navbar">
<div class="inner"><span class="corners-top"><span></span></span>
<!-- IF .recent_blogs -->
<div class="post bg3" style="text-align: center;">
<span><span></span></span>
<strong>{L_RECENT_BLOGS}</strong>
<span><span></span></span>
</div>
<!-- BEGIN recent_blogs -->
<div class="post bg1<!-- IF recent_blogs.S_REPORTED or recent_blogs.S_UNAPPROVED --> reported<!-- ENDIF --><!-- IF recent_blogs.S_DELETED --> deleted<!-- ENDIF -->" <!-- IF recent_blogs.POST_COLOR and not recent_blogs.S_REPORTED and not recent_blogs.S_UNAPPROVED and not recent_blogs.S_DELETED -->style="background-color: {recent_blogs.POST_COLOR}"<!-- ENDIF -->>
<div class="inner"><span class="corners-top"><span></span></span>
<div class="postbody" style="width: 100%;">
<!-- IF recent_blogs.S_UNAPPROVED or recent_blogs.S_REPORTED -->
<p class="rules">
<!-- IF recent_blogs.S_UNAPPROVED -->{UNAPPROVED_IMG} <a href="{recent_blogs.U_APPROVE}"><strong>{L_UNAPPROVED}</strong></a><!-- ENDIF -->
<!-- IF recent_blogs.S_REPORTED -->{REPORTED_IMG} <a href="{recent_blogs.U_REPORT}"><strong>{L_REPORTED_SHORT}</strong></a><!-- ENDIF -->
</p>
<!-- ENDIF -->
<dl>
<dt>
<strong><!-- IF recent_blogs.S_HAS_POLL --><img src="{T_THEME_PATH}/images/blog/icon_poll.gif" style="float: right;" alt="" /> <!-- ENDIF --><a href="{recent_blogs.U_VIEW}">{recent_blogs.TITLE}</a></strong> {L_POST_BY_AUTHOR} <strong>{recent_blogs.USER_FULL}</strong> {L_POSTED_ON_DATE} {recent_blogs.DATE} <br />
<div class="content" style="width: 95%; padding: 4px;">{recent_blogs.MESSAGE}</div>
<!-- IF recent_blogs.S_HAS_ATTACHMENTS -->
<dl class="attachbox">
<dt>{L_ATTACHMENTS}</dt>
</dl>
<!-- ENDIF -->
<br clear="all" />
<div>
<span class="num_replies">{recent_blogs.REPLIES}</span>
{recent_blogs.VIEWS}
</div>
</dt>
</dl>
</div><span class="corners-bottom"><span></span></span>
</div>
</div>
<!-- END recent_blogs -->
<!-- ENDIF -->
<span class="corners-bottom"><span></span></span></div></div>
<br style="clear:both" />
These were the edits for index_body.html suggested by Exreaction, combined with some code from the _sample_block_design.html included in the styles/prosilver/portal/block to get an appropriate look to the block.
Im still not happy with the block style itself, but I intend to work more on this by mucking around with different styles available in the _sample_block_design.html.
FYI - the block styling is the first 2 and last 2 lines below.
Then I uploaded this file to the /styles/
STYLE NAME/template/portal/block
Finally I added the following line to /styles/
STYLE_NAME/template/portal/portal_body.html where I wanted the block to appear.
Code: Select all
<!-- INCLUDE portal/block/blog_block.html -->
Refresh the templates, Clear the Cache and hey presto. All worked well.
You can see a sample of this at
http://www.irishfishforum.com (I moved the portal credits to overall_footer I hope that this is OK).
Finally
EXreaction wrote:The main things you may like to change are the number of items displayed, and that can be changed by altering the $blog_limit in the code added to PORTAL.php, and how the blog entries are displayed. If you want them displayed in a different way you'll have to figure that out for yourself, but you can put the template code pretty much anywhere on the index_body you would like.
I hope this works for you, It was a bit of a learning process for me, but I am enjoying it so far.