#######################################################################################
#                                                            			      #
#                          Welcome to the Installation of                             #
#                                                                                     #
#               Last-Posts-On-Index_2.1 - Advanced (wBB2.2x + wBB 2.3x)               #
#                           ---------------------------                               #
#                                                          			      #
#######################################################################################

#######################################################################################
#                                                                                     #
# DISCLAIMER:                                                                         #
#                                                                           #
# Author: ShadowByte ( www.it-4all.org )                                              #
# Translated by: skdb ( www.wbbmods.com )                                             #
# The Author holds no responsibility or liability of damages caused from this         #
# software.                                                                           #
# (With this in mind, It would be very wise before you install this software, to make #
# a complete backup).                                                                 #
#                                                                                     #
#######################################################################################

#######################################################################################
#                                                                                     #
# COPYRIGHT:                                                                          #
#                                                                            #
# The Copyright / Copyrighting lies by the Author of this Software. Any removal,      #
# variation or any other alteration of the copyrighting / copyright is strichtly      #
# forbidden, and notices can and will be served.                                      #
#                                                                                     #
#######################################################################################

#######################################################################################
#                                                                                     #
# DOWNLOAD:                                                                           #
#                                                                             #
# This Software version may only be obtained from wbbmods.com		              #
# (English version) and www.it-4all.org (German version). If you have obtained this   #
# software other that which has been stipulated, please inform the Author or myself   #
# at wbbmods.com.	                                                              #
#                                                                                     #
#######################################################################################

#######################################################################################
#									              #
# HACK STATS:                                                                         #
#                                                                           #
# Hack/Addon           : The Hack Shows on the StartPage the Last 5 / 10 Posts from   #
#			 your Forums.						      #
#			 Optionally, the Announcements can also be seperated	      #
#			 Also integrating Forum Permissions			      #
#										      #
# Support / Questions  : http://www.wbbmods.com		     		              #
# 			 http://www.it-4all.org/support-forum/                	      #
#										      #
#######################################################################################

#######################################################################################
#										      #
# Files to change      : Board Templates -> index.tpl				      #
#                        Board Files     -> index.php				      #
#									              #
# New Files            : Templates 	 -> index_lastannounce_bit.tpl		      #
#				  	    index_lastpost_bit.tpl		      # 
#					    index_lastpost_noannounce_bit.tpl	      #
#					    index_lastposts.tpl			      #
#                        Files     	 -> lastposts.php	                      #
#									              #
#           !!! Before you start the Installation, make a Board Backup !!!            #
#                               #
#									              #
#######################################################################################

                                                  
##### From the Upload folder in your zip, Upload all files in their appropriate Server folders.
		
##### In your Browser, enter the URL to the Installation - 
	http://www.urltoyourboard.com/board/acp/lastp_install.php
	
      Follow the instructions and when finished, delete the:
/acp/lastp_install.php + /acp/lastp_uninstall.php + /acp/lastposts_en.lng and the /acp/lastposts_de.lng files.

##### In your ACP, select the ACP Menu "Import/Export Templates" and import
      the 2 new Templates into your desired Template Pack. Not forgetting 
      to Cache them.
     
##### Download your index.php file and open with a Text Editor
##### Search for:

/* ############## EVENTS ############## */
unset($eventbit);
if ($showevents == 1 && $wbbuserdata['can_view_calendar'] != 0) {
  $currentdate = date("Y-m-d");
  $result = $db->unbuffered_query("SELECT eventid, subject, public FROM bb".$n."_events WHERE eventdate = '$currentdate' AND (public=2 OR (public=1 AND groupid = '$wbbuserdata[groupid]') OR (public=0 AND userid = '$wbbuserdata[userid]')) ORDER BY public ASC, subject ASC");
  while ($row = $db->fetch_array($result)) {
    $row['subject'] = htmlconverter($row['subject']);
    if (isset($eventbit)) eval("\$eventbit .= \"".$tpl->get("index_eventbit")."\";");
    else eval("\$eventbit = \"".$tpl->get("index_eventbit")."\";");
  }
}

##### Insert below it with:

/* ############## LAST POSTS ON INDEX 2.1 advanced by ShadowByte www.IT-4all.org ############## */
if ($showlastpost > 0) {
  require_once("./lastposts.php");
}
/* ############## LAST POSTS ON INDEX 2.1 advanced by ShadowByte www.IT-4all.org ############## */

##### Save the file and upload back to your Server

##### Log into your Boards ACP and edit the index.tpl template
##### Search for:

<table cellpadding="{$style['tableincellpadding']}" cellspacing="{$style['tableincellspacing']}" border="{$style['tableinborder']}" style="width:{$style['tableinwidth']}" class="tableinborder">
 <tr>
  <td class="tabletitle"><span class="smallfont">&nbsp;</span></td>
  <td class="tabletitle" style="width:<if($hide_modcell==0)><then>80</then><else>100</else></if>%" align="left"><span class="smallfont"><b>{$lang->items['LANG_START_BOARDS']}</b></span></td>
  <td class="tabletitle" align="center"><span class="smallfont"><b>{$lang->items['LANG_START_POSTS']}</b></span></td>
  <td class="tabletitle" align="center"><span class="smallfont"><b>{$lang->items['LANG_START_THREADS']}</b></span></td>
  <td class="tabletitle" align="center" nowrap="nowrap"><span class="smallfont"><b>{$lang->items['LANG_START_LASTPOST']}</b></span></td>
  <if($hide_modcell==0)><then><td class="tabletitle" style="width:20%" align="center"><span class="smallfont"><b>{$lang->items['LANG_START_MODERATORS']}</b></span></td></then></if>
 </tr>
 
 $boardbit

##### Insert above this with:

 $lastposts

##### Save the Template.

##### NOTE:
      The option to either "deactivate", "Top 5" or "Top 10" the Last Posts and Announcments on your Main Page
      can be found in your ACP - "Settings" - "Main Page" at the very bottom.
      
      
##### Finished, Enjoy !!

skdb
The wBBMods Team