============================================================================================================================
Name: Latest 10 Posts Marquee

version: 1.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.5 SP1

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 v3. A copy is provided 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 Code:
==========

if ($gid == 0) {

===============
Add Code Above:
===============

// Latest 10 Posts Marquee Mod Begin
$query = $db->query("SELECT t.lastpost, t.replies, t.author, t.tid, t.subject, t.fid, f.fid, f.userlist, f.private FROM $table_threads t LEFT JOIN $table_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 = date("$dateformat", $last['lastpost'] + ($timeoffset * 3600));
        $lptime = date("$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]</strong> ( $last_replies )</font></a>&nbsp;</strong>$thislast<strong>]</strong>";
    }
}
// Latest 10 Posts Marquee Mod End

============================================================================================================================
=======
Step 2:
=======
===============================
Go To Administration Panel --> Templates
===============================
================
Edit Template: index
================
==============================================
Insert This Code at the Top of the Template and Submit Changes:
==============================================

<center>
<table border="0" cellpadding="0" cellspacing="0" width="$tablewidth" align="center">
<tr>
<td bgcolor="$bordercolor">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr class="tablerow">
<td colspan="2" width="100%">
<table cellspacing="1" cellpadding="$tablespace" border="0" width="100%" align="center">
<tr>
<td class="category"><strong><font color="$cattext">$lang[latest10marquee]</strong></font></td>
</tr>
<tr>
<td bgcolor="$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: 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!