МОД Дневники - блоги на форум.
В инете растет интерес к ним, это сейчас модно и престижно.
index.php
находим -// Output page
page_header($user->lang['INDEX']);
$template->set_filenames(array(
'body' => 'index_body.html')
);
page_footer();
// A Output Blog Entries
$blog_limit = 1;
$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, 'cache_time' => 3600*6));
$blog_data->get_user_data(false, true, 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'], true)));
}
}
index_body.html
<!-- INCLUDE indexs_bloks_body.html -->
indexs_bloks_body.html
<!-- IF .recent_blogs -->
<div class="post bg3" style="text-align: center;">
<span class="corners-top"><span></span></span>
<strong>{L_RECENT_BLOGS}</strong>
<span class="corners-bottom"><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 -->
<div class="forumbg">
<div class="inner"><span class="corners-top"><span></span></span>
<table class="table1" cellspacing="1">
<thead>
<tr>
<th align="center">
{L_BLOGS} • {L_RECENT_BLOGS}
</th>
</tr>
</thead>
<tbody>
<tr class="bg2">
<td>
<!-- IF .recent_blogs -->
<!-- BEGIN recent_blogs -->
<div class="postbody" style="width: 100%;">
<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>
<div class="clear">
</div>
</div>
<!-- END recent_blogs -->
<!-- ENDIF -->
</td>
</tr>
</tbody>
</table>
</div><span class="corners-bottom"><span></span></span></div>
<div class="bg7">
<!-- IF .recent_blogs -->
<div style="text-align: center"><h4>{L_BLOGS} • {L_RECENT_BLOGS}</h4></div>
<!-- BEGIN recent_blogs -->
<table>
<tr>
<td>
<div style="font: bold 14px Arial,sans-serif; color:#000066;">
• <strong><a href="{recent_blogs.U_VIEW}">{recent_blogs.TITLE}</a></strong> {L_AUTHOR} {L_POST_BY_AUTHOR} <strong>{recent_blogs.USER_FULL}</strong> {L_POSTED_ON_DATE} {recent_blogs.DATE} {recent_blogs.REPLIES} {recent_blogs.VIEWS}
</div>
</td>
</tr>
</table>
<!-- END recent_blogs -->
<!-- ENDIF -->
</div>
bg7
.bg7 {
background: #e1ebf2;
margin-top: 1.2em;
padding: 4px 4px 2px;
position: relative;
border: 1px solid #000066;
border-radius: 5px;
box-shadow: 4px 4px 10px #000066;
}
Вернуться в 450 модов движка форумов phpBB (до версии 3.0.14)