Jeg
Fri Apr 15, 2022 5:38 pm
phpbb2
Prerequisites
Activate the Portal
Admin PanelDeactivate the Last Threads widget scrolling
Admin PanelClick the on the Settings icon under Recent Topics
Activate the topics scrolling : No & hit Save.
In the mod_recent_topics template (Portal tab of the templates list), replace everything with:
- Code:
<!-- BEGIN scrolling_row -->
{MARQUEE_JS_SRC}
<table class="forumline genmed" width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td class="catLeft" height="25">
<span class="genmed module-title">
{L_RECENT_TOPICS}
</span>
</td>
</tr>
<tr>
<td class="row1" style="height:{SCROLL_HEIGHT}px;">
<div class="marquee" align="{ALIGN_DIRECTION}" data-direction='{SCROLL_WAY}' data-duration='{SCROLL_DELAY}' data-pauseOnHover="true" style="overflow:hidden;height:{SCROLL_HEIGHT}px;">
<!-- BEGIN recent_topic_row -->
» <a href="{scrolling_row.recent_topic_row.U_TITLE}" title="{scrolling_row.recent_topic_row.L_TITLE}" >{scrolling_row.recent_topic_row.L_TITLE}</a><br />
<img src="{ICON_TIME}" alt="" />{scrolling_row.recent_topic_row.S_POSTTIME} {BY}
<!-- BEGIN switch_poster -->
<a href="{scrolling_row.recent_topic_row.switch_poster.U_POSTER}" >{scrolling_row.recent_topic_row.switch_poster.S_POSTER}</a><br /><br />
<!-- END switch_poster -->
<!-- BEGIN switch_poster_guest -->
{scrolling_row.recent_topic_row.switch_poster_guest.S_POSTER}<br /><br />
<!-- END switch_poster_guest -->
<!-- END recent_topic_row -->
</div>
</td>
</tr>
</table>
<script>
$(".marquee").marquee();
</script>
<!-- END scrolling_row -->
<!-- BEGIN classical_row -->
<table class="forumline recents" width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td class="catHead" height="25"><span class="genmed"><b><center>
{L_RECENT_TOPICS}
</center></b></span></td>
</tr>
<tr>
<td class="row1" align="{ALIGN_DIRECTION}"><span class="gensmall">
<!-- BEGIN recent_topic_row --><div class="recent_topic">
» <a href="{classical_row.recent_topic_row.U_TITLE}" >{classical_row.recent_topic_row.L_TITLE}</a> {BY}
<!-- BEGIN switch_poster -->
<a href="{classical_row.recent_topic_row.switch_poster.U_POSTER}" >{classical_row.recent_topic_row.switch_poster.S_POSTER}</a>
<!-- END switch_poster -->
<!-- BEGIN switch_poster_guest -->
{classical_row.recent_topic_row.switch_poster_guest.S_POSTER}
<!-- END switch_poster_guest -->
<br /><span class="last-message_date"><img src="{ICON_TIME}" alt="" /> {ON} {classical_row.recent_topic_row.S_POSTTIME}</span>
<!--
<a href="{classical_row.recent_topic_row.U_POSTER}">{classical_row.recent_topic_row.S_POSTER}</a> {ON} {classical_row.recent_topic_row.S_POSTTIME}
--></div>
<!-- END recent_topic_row -->
</span></td>
</tr>
</table>
<!-- END classical_row -->
In your index_body template, find:
- Code:
{CHATBOX_TOP}
{BOARD_INDEX}
Add right before:
- Code:
<div class="last-messages"></div>
<script type="text/javascript">$('.last-messages').load('/portal .recents');</script>
Finally, add the following CSS to your stylesheet; don't hesitate customizing it:
- Code:
table.forumline.recents {
border: none;
background-color: transparent;
}
.recents td.catHead {
background-image: none;
background-color: ghostwhite;
border: 1px solid #e9e9e9;
font-family: Arial, sans-serif;
}
.recents td.catHead span b {
font-size: 10pt;
}
.last-messages td.row1 {
background-color: #fafafa;
text-align: center;
}
span.last-message_date {
margin-top: 3px;
display: block;
}
.recent_topic {
border: 1px solid #e5e5e5;
margin: 3px 1%;
padding: 5px;
background-color: #fff;
display: inline-block;
width: 46%;
text-align: left;
vertical-align: middle;
}
.recent_topic a[href^="/u"] {
text-decoration: none;
}
|
|