***********************************
Hack Name: Latest 10 Posts Marquee v1.0

DESCRIPTION: This modification creates a table above the welcome member table or newsticker to display the 10 Latest Posts in a scrolling marquee.

Compatability: XMB 1.9.8 Engage SP3

Original Code Designed By: Snowfall

New Code Designed By: Mowaffak Ragas ( mowaffakr@yahoo.com )

Updated Code By: WormHole @ XMB Garage

Notes:
This modification is released under the GPL license. You should have received a copy of it with this software package.

Please backup your files before installing this modification. Neither XMB Garage nor the author can be held responsible if your board stops functioning properly due to you installing this modification.
You can obtain support for this modification from XMB Garage.

***********************************
=============================================================================================================================
=======
Step 1.
=======
================
Edit File: index.php
================
======
Find:
======

eval('echo "'.template('header').'";');

===========
Add Below:
===========

// Latest 10 Posts Marquee Mod Begin
$latest = '';
$query = $db->query("SELECT t.lastpost, t.replies, t.author, t.tid, t.subject, t.fid, f.fid, f.userlist, f.private FROM ".X_PREFIX."threads t LEFT JOIN ".X_PREFIX."forums f ON t.fid=f.fid ORDER BY t.lastpost DESC LIMIT 0, 10 ");
    $adjTime = ($timeoffset * 3600) + ($addtime * 3600);
    while($last = $db->fetch_array($query)) {
        $lpdate = gmdate("$dateformat", $last['lastpost'] + ($timeoffset * 3600));
        $lptime = gmdate("$timecode", $last['lastpost'] + ($timeoffset * 3600));
        $thislast = "<strong>$lang[lpoststats]</strong> $lang[lastreply1] <strong>$lpdate</strong> $lang[textat] <strong>$lptime</strong>";
        $last_subject = stripslashes($last['subject']);
        $last_replies = stripslashes(censor($last['replies']));
        $last_author = stripslashes(censor($last['author']));
    if (privfcheck($last['private'], $last['userlist'])) {
        $latest .= "<strong>[</strong>&nbsp;<a href=\"./viewthread.php?tid=$last[tid]\" target=\"_self\"><font class=\"smalltxt\"><strong>$lang[topictitle]</strong> $last_subject - <strong>$lang[textauthor]</strong> $last_author - <strong>$lang[textreplies] ( $last_replies )</font></a>&nbsp;$thislast ]</strong>";
    }
}
// Latest 10 Posts Marquee Mod End

=============================================================================================================================
=======
Step 2.
=======
================
Edit Template: index
================
=========================================
Insert the code at the top of the template and click submit
=========================================

<center>
<table border="0" cellpadding="0" cellspacing="0" width="$THEME[tablewidth]" align="center">
<tr>
<td bgcolor="$THEME[bordercolor]">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td class="tablerow" colspan="2" width="100%">
<table cellspacing="1" cellpadding="$THEME[tablespace]" border="0" width="100%" align="center">
<tr>
<td class="category"><strong><font color="$THEME[cattext]">$lang[latest10marquee] $lang[lastreply1] $bbname</strong></font></td>
</tr>
<tr>
<td bgcolor="$THEME[altbg2]"> <marquee onmouseover=this.stop() onmouseout=this.start() SCROLLDELAY=200 direction="left">$latest</marquee></td>
</tr>
</table>
</td></tr>
</table>
</td>
</tr>
</table></center><br />

=============================================================================================================================
=======
Step 3:
=======
=======================
Edit File: lang/English.lang.php
============================
Add Code To End Of File Above ?>
============================

// Latest 10 Posts Marquee Mod Begin
$lang['latest10marquee'] = "Latest 10 Posts";
$lang['topictitle'] = "Topic Title:";
// Latest 10 Posts Marquee Mod End

=============================================================================================================================
Enjoy!