<?php
if(!defined("e107_INIT")){ exit; }

/*

Author: Mickey Cheong
Author URI: http://www.mangoorange.com/about/

This theme was designed by Nick La, customized by Mickey Cheong Kah Meng.

By downloading and using this theme, you agree to the following terms:
		- You may NOT resell this theme
		- A link back to N.Design Studio and MangoOrange™ must be retained in the footer (either modified or unmodified)
		- You may use this theme for personal or commercial projects
		- You may modify, translate or distribute


Ported to e107 by batboy.net.

--

e107 Theme
--------------
©2009 batboy
batboy.net
j [at] batboy [dot] net

*/

/* language */
@include_once(e_THEME."i3theme/languages/".e_LANGUAGE.".php");
@include_once(e_THEME."i3theme/languages/English.php");

/* theme */
$themename = "i3theme";
$themeversion = "1.0";
$themeauthor = "batboy";
$themeemail = "j@batboy.net";
$themewebsite = "http://batboy.net/";
$themedate = "2009-02-27";
$themeinfo = "<a href='http://www.i3theme.com'>i3Theme</a> is designed by <a href='http://www.ndesign-studio.com'>N.Design Studio</a>, customized by <a href='http://www.mangoorange.com/'>MangoOrange&trade;</a>, <br/> Ported to <a href ='http://e107.org/'>e107</a> by <a href='http://batboy.net/'>batboy.net</a>.";
$xhtmlcompliant = TRUE;
$csscompliant = TRUE;
$no_core_css = TRUE;
define("IMODE", "lite");
define("THEME_DISCLAIMER", "<br /><i>".LAN_THEME_1."</i>");
define("STANDARDS_MODE", TRUE);
define('BULLET', "bullet-orange.gif");

/* layout */
$layout = "_default";

function theme_head() {
	echo "<!-- Sidebar docking boxes (dbx) by Brothercake - http://www.brothercake.com/ -->
<script type='text/javascript' src='".THEME_ABS."dbx.js'></script>
<script type='text/javascript' src='".THEME_ABS."dbx-onload.js'></script>
<link rel='stylesheet' type='text/css' href='".THEME_ABS."e_dbx.css' media='screen, projection' />";
}

$HEADER_1 = 
"<div id='page'>
  <div id='wrapper'>
    <div id='header'>
    <!-- <div style='position:absolute;top:40px;left:250px'>{adsense_468x60}</div> -->
      <h1>{SITENAME}</h1>
      <div class='description'>{SITETAG}</div>
      <form method='get' id='sform' action='".e_HTTP."search.php'>
				<div>
				<input type='text' value='".LAN_THEME_12."' name='q' id='s' onfocus=\"if (this.value == '".LAN_THEME_12."') {this.value = '';}\" onblur=\"if (this.value == '') {this.value = '".LAN_THEME_12."';}\" />
				<input type='hidden' value='0' name='r'/>
				<input name='s' type='submit' id='searchsubmit' value='Go' />
				</div>
			</form>
    </div><!-- /header -->
<div class='dbx-group' id='sidebar-left'>
{MENU=1}
</div><!--/sidebar-left -->";
$HEADER_2 = 
"<div id='left-col'> <!-- main -->";
$HEADER_2_CUST = 
"<div id='left-col-custom'> <!-- main -->";
$HEADER_3 = 
"<div id='nav'>";
$HEADER_3_CUST = 
"<div id='nav-custom'>";
$HEADER_4 = 
"{LINKSTYLE=topbar}
	{SITELINKS}
  </div><!-- /nav -->
  <div id='subnav'>
  {LINKSTYLE=topbar}
	{SITELINKS=flat:2} 
	</div><!-- /subnav -->";
$HEADER_5 = 
"<div id='content'>";
$HEADER_5_CUST = 
"<div id='content-custom'>";

$HEADER = $HEADER_1.$HEADER_2.$HEADER_3.$HEADER_4.$HEADER_5;
$CUSTOMHEADER = $HEADER_1.$HEADER_2_CUST.$HEADER_3_CUST.$HEADER_4.$HEADER_5_CUST;


$FOOTER_1 = "
</div><!--/content -->";
$FOOTER_2 = 
"<div id='footer'>";
$FOOTER_2_CUST = 
"<div id='footer-custom'>";
$FOOTER_3 = 
"<span class='mangoorange'>
	{SITEDISCLAIMER}<br />".LAN_THEME_1."
</span>
</div>
</div><!--/left-col -->";
$FOOTER_4 = 
"<div class='dbx-group' id='sidebar-right'>
{MENU=2}
</div><!--/sidebar -->";
$FOOTER_5 = 
"<hr class='hidden' />
</div><!--/wrapper -->
</div><!--/page -->";

$FOOTER = $FOOTER_1.$FOOTER_2.$FOOTER_3.$FOOTER_4.$FOOTER_5;
$CUSTOMFOOTER = $FOOTER_1.$FOOTER_2_CUST.$FOOTER_3.$FOOTER_5;

$CUSTOMPAGES = "/locator/ forum.php forum_post.php forum_viewforum.php forum_viewtopic.php user.php submitnews.php download.php links.php stats.php usersettings.php signup.php";


// definitions
define("ICONSTYLE", "float: left; border:0");
define("COMMENTLINK", LAN_THEME_2);
define("COMMENTOFFSTRING", LAN_THEME_3);
define("PRE_EXTENDEDSTRING", "<br />");
define("EXTENDEDSTRING", LAN_THEME_4);
define("POST_EXTENDEDSTRING", "<br /><br />");
define("TRACKBACKSTRING", LAN_THEME_5);
define("TRACKBACKBEFORESTRING", " | ");
define('ICONMAIL', 'email_16.png');
define('ICONPRINT', 'print_16.png');
define('ICONPDF', 'pdf_16.png');


// newsstyle
function news_style($news) {
$mydate  = explode(" ", strftime("%b %d", $news['news_datestamp']));
$NEWSSTYLE = "
<div class='post'>
		  <div class='date'><span>$mydate[0]</span> $mydate[1]</div>
		  <div class='title'>
          <span style='float:right;margin-top:3px;'>{EMAILICON}&nbsp;{PRINTICON}&nbsp;{PDFICON}&nbsp;{ADMINOPTIONS}</span><h2>{NEWSTITLELINK=extend}</h2>
          <div class='postdata'><span class='category'>{NEWSCATEGORY}</span> <span class='comments'>{NEWSCOMMENTS}</span></div>
      </div>
      <div class='entry'>
      	{NEWSBODY}
				{EXTENDED}
        <p class='submeta'>".LAN_THEME_6." <strong>{NEWSAUTHOR}</strong></p>
			</div><!--/entry -->
</div><!--/post -->
";
return $NEWSSTYLE;
}

// newsliststyle
$sc_style['NEWSSUMMARY']['pre'] = "<p>";
$sc_style['NEWSSUMMARY']['post'] = "</p>";
$NEWSLISTSTYLE = "
{NEWSTITLELINK}<br />
<span class='postdata'>{NEWSDATE}</span><br />
{NEWSSUMMARY}
"; 

$sc_style['REPLY']['pre'] = "<span class='smalltext'>";
$sc_style['REPLY']['post'] = "</span>";
$sc_style['COMMENTEDIT']['pre'] = "<span style='float:right'>";
$sc_style['COMMENTEDIT']['post'] = "</span>";
$COMMENTSTYLE = "
<div class='commentlist'>
<div class='alt'>
{COMMENTEDIT}
<cite>{USERNAME}</cite>
".LAN_THEME_13."
<br/>
<small class='commentmetadata'>
{TIMEDATE=long}
</small>
<p>{COMMENT}</p>
{REPLY}
</div>
</div>
";

// menustyle
// http://wiki.e107.org/?title=Category:Themeing:Styling_individual_menus
function tablestyle($caption, $text, $mode){
//print_r($mode);  /* echo menu ID */
is_array($mode) ? $switch=$mode[0] : $switch=$mode;
switch ($switch) {
	case 'default':
	case '':
	case 'news_cat':
	case 'news_archive':
	case 'comment':
	case 'nfp':
	case 'contact':
	case 'login_page':
	case 'forum':
	case 'forum_viewforum':
	case 'forum_viewtopic':
	case 'PM':
	case 'wm':
	echo "
	<!-- content start -->
	<div class='post'>
		<h2>$caption</h2>
		<div class='entry'>
			$text
		</div>
	</div>
	<!-- content end -->
	";
	break;
	default:	
	echo "
	<!--sidebox start -->
  <div class='dbx-box'>
  <h3 class='dbx-handle'>$caption</h3>
  	<div class='dbx-content'>
    $text
    </div>
  </div>
	<!--sidebox end -->
		";
break;
	}
}


// linkstyle
// http://wiki.e107.org/?title=Styling_Individual_Sitelink_Menus
function linkstyle($np_linkstyle) {
// Common to all styles (for this theme)
  $linkstyleset['linkdisplay']      = 1;  /* 1 - along top, 2 - in left or right column */
  $linkstyleset['linkalign']        = "left";

// Common sublink settings
// NOTE: *any* settings can be customized for sublinks by using
//       'sub' as a prefix for the setting name. Plus, there's "subindent"
//  $linkstyleset['sublinkclass'] = "mysublink2;
//  $linkstyleset['subindent']    = " ";

// Now for some per-style setup
  switch ($np_linkstyle)
  {
  case 'topbar':
	$linkstyleset['prelink'] = "<ul>";
	$linkstyleset['postlink'] = "</ul>";
  $linkstyleset['linkstart'] = "<li>";
	$linkstyleset['linkend'] = "</li>";
  $linkstyleset['linkstart_hilite'] = "<li class='current_page_item'>";
	$linkstyleset['linkclass_hilite'] = "";
	$linkstyleset['linkseparator'] = "";
  break;
  default: // if no LINKSTYLE defined
  $linkstyleset['prelink'] = "";
	$linkstyleset['postlink'] = "";
  $linkstyleset['linkstart'] = "";
  $linkstyleset['linkend'] = "";
  $linkstyleset['linkstart_hilite'] = "";
  $linkstyleset['linkclass_hilite'] = "";
  $linkstyleset['linkclass'] = "";
  $linkstyleset['sublinkclass'] = "";
  }
return $linkstyleset;
}

?>