Author Topic: Rocket theme fire - forestfire  (Read 5380 times)

Offline tomekent

Rocket theme fire - forestfire
« on: December 08, 2006, 04:25:23 pm »
Board Address: http://tomekent.com
Theme Name: rocket theme fire - forest fire
Link to Theme: <http://www.rockettheme.com/Templates/Available_Templates/Fire_-_May_06_Joomla_Templates/>

Ok this is a paid theme. So i dont know if is possible.
Its a really nice them, and its a shame that it doesnt show the shop.
I was thinking that the calender button could be edited so it links to the shop, as i dont use the calender at all.
If you need the files they are at -
http://tomekent.com/fire.zip
i hope you can get it to work. The amount you own doesnt show up next to a users post either.

thanks in advance

Offline Daniel15

Re: Rocket theme fire - forestfire
« Reply #1 on: December 08, 2006, 05:33:11 pm »
Hi,
 Please paste the code from the Calendar button here (from the Index.template.php file), and I'll do the code for a shop button for you.
To show the amount of credits a user has next to their posts, see the stickeyed topic 'How to get shop working in other themes'.

Offline tomekent

Re: Rocket theme fire - forestfire
« Reply #2 on: December 09, 2006, 07:46:05 am »
Code: [Select]
<?php
// Version: 1.1 RC2; Calendar

// The main calendar - January, for example.
function template_main()
{
global $context$settings$options$txt$scripturl$modSettings;

echo '
<div style="padding: 3px;">'
theme_linktree(), '</div>

<table cellspacing="1" cellpadding="2" width="100%" class="bordercolor">
<tr class="titlebg"><td style="font-size: x-large;" align="center" colspan="7">'
$txt['months_titles'][$context['current_month']], ' '$context['current_year'], '</td></tr>
<tr>'
;

// Show each day of the week.
foreach ($context['week_days'] as $day)
echo '
<td class="titlebg2" width="14%" align="center">'
$txt['days'][$day], '</td>';
echo '
</tr>'
;

/* Each week in weeks contains the following:
days (a list of days), number (week # in the year.) */
foreach ($context['weeks'] as $week)
{
echo '
<tr>'
;

/* Every day has the following:
day (# in month), is_today (is this day *today*?), is_first_day (first day of the week?),
holidays, events, birthdays. (last three are lists.) */
foreach ($week['days'] as $day)
{
// If this is today, make it a different color and show a border.
echo '
<td valign="top" style="height: 100px; padding: 2px;" class="'
$day['is_today'] ? 'calendar_today' 'windowbg' '">';

// Skip it if it should be blank - it's not a day if it has no number.
if (!empty($day['day']))
{
// Should the day number be a link?
if (!empty($modSettings['cal_daysaslink']) && $context['can_post'])
echo '
<a href="'
$scripturl'?action=calendar;sa=post;month='$context['current_month'], ';year='$context['current_year'], ';day='$day['day'], '">'$day['day'], '</a>';
else
echo '
'
$day['day'];

// Is this the first day of the week? (and are we showing week numbers?)
if ($day['is_first_day'])
echo '<span class="smalltext"> - '$txt['calendar51'], ' '$week['number'], '</span>';

// Are there any holidays?
if (!empty($day['holidays']))
echo '
<div class="smalltext" style="color: #'
$modSettings['cal_holidaycolor'], ';">'$txt['calendar5'], ' 'implode(', '$day['holidays']), '</div>';

// Show any birthdays...
if (!empty($day['birthdays']))
{
echo '
<div class="smalltext">
<span style="color: #'
$modSettings['cal_bdaycolor'], ';">'$txt['calendar3'], '</span> ';

/* Each of the birthdays has:
id, name (person), age (if they have one set?), and is_last. (last in list?) */
foreach ($day['birthdays'] as $member)
echo '
<a href="'
$scripturl'?action=profile;u='$member['id'], '">'$member['name'], isset($member['age']) ? ' (' $member['age'] . ')' '''</a>'$member['is_last'] ? '' ', ';
echo '
</div>'
;
}

// Any special posted events?
if (!empty($day['events']))
{
echo '
<div class="smalltext">
<span style="color: #'
$modSettings['cal_eventcolor'], ';">'$txt['calendar4'], '</span>';
/* The events are made up of:
title, href, is_last, can_edit (are they allowed to?), and modify_href. */
foreach ($day['events'] as $event)
{
// If they can edit the event, show a star they can click on....
if ($event['can_edit'])
echo '
<a href="'
$event['modify_href'], '" style="color: #FF0000;">*</a> ';

echo '
'
$event['link'], $event['is_last'] ? '' ', ';
}
echo '
</div>'
;
}
}

echo '
</td>'
;
}

echo '
</tr>'
;
}

echo '
</table>

<form action="'
$scripturl'?action=calendar" method="post">
<table cellspacing="0" cellpadding="3" width="100%" class="tborder" style="border-top: 0;">
<tr class="titlebg2">
<td>'
;

// Is there a calendar for last month to look at?
if (isset($context['previous_calendar']))
echo '
<b><a href="'
$context['previous_calendar']['href'], '">&#38;#171; '$txt['months_short'][$context['previous_calendar']['month']], ' '$context['previous_calendar']['year'], '</a></b>';
echo '
</td>
<td align="center">'
;
// Show a little "post event" button?
if ($context['can_post'])
echo '
<a href="'
$scripturl'?action=calendar;sa=post;month='$context['current_month'], ';year='$context['current_year'], '"><img src="'.$settings['images_url'].'/'.$context['user']['language'].'/'.$context['templatestyle'] . '/calendarpe.gif" alt="'.$txt['calendar23'].'" /></a>';
echo '
</td>
<td align="center">
<select name="month">'
;
// Show a select box with all the months.
foreach ($txt['months'] as $number => $month)
echo '
<option value="'
$number'"'$number == $context['current_month'] ? ' selected="selected"' '''>'$month'</option>';
echo '
</select>&nbsp;
<select name="year">'
;
// Show a link for every year.....
for ($year $modSettings['cal_minyear']; $year <= $modSettings['cal_maxyear']; $year++)
echo '
<option value="'
$year'"'$year == $context['current_year'] ? ' selected="selected"' '''>'$year'</option>';
echo '
</select>&nbsp;
<input type="submit" value="'
$txt[305], '" />
</td>
<td align="center">'
;
// Show another post button just for symmetry.
if ($context['can_post'])
echo '
<a href="'
$scripturl'?action=calendar;sa=post;month='$context['current_month'], ';year='$context['current_year'], '"><img src="'.$settings['images_url'].'/'.$context['user']['language'].'/'.$context['templatestyle'] . '/calendarpe.gif" alt="'.$txt['calendar23'].'" /></a>';
echo '
</td>
<td align="'
, !$context['right_to_left'] ? 'right' 'left''">';

// Is there a calendar for next month?
if (isset($context['next_calendar']))
echo '
<b><a href="'
$context['next_calendar']['href'], '">' $txt['months_short'][$context['next_calendar']['month']] . ' ' $context['next_calendar']['year'] . ' &#38;#187;</a></b>';
echo '
</td>
</tr>
</table>
</form>'
;
}

// Template for posting a calendar event.
function template_post()
{
global $context$settings$options$txt$scripturl$modSettings;

// Start the javascript for drop down boxes...
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var monthLength = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];

function generateDays()
{
var days = 0, selected = 0;
var dayElement = document.getElementById("day"), yearElement = document.getElementById("year"), monthElement = document.getElementById("month");

monthLength[1] = 28;
if (yearElement.options[yearElement.selectedIndex].value % 4 == 0)
monthLength[1] = 29;

selected = dayElement.selectedIndex;
while (dayElement.options.length)
dayElement.options[0] = null;

days = monthLength[monthElement.value - 1];

for (i = 1; i <= days; i++)
dayElement.options[dayElement.length] = new Option(i, i);

if (selected < days)
dayElement.selectedIndex = selected;
}
function toggleLinked(form)
{
form.board.disabled = !form.link_to_board.checked;
}
// ]]></script>

<form action="'
$scripturl'?action=calendar;sa=post" method="post" onsubmit="submitonce(this);" style="margin: 0;">
<table width="55%" align="center" cellpadding="0" cellspacing="3">
<tr>
<td valign="bottom" colspan="2">
'
theme_linktree(), '
</td>
</tr>
</table>'
;

if (!empty($context['event']['new']))
echo '
<input type="hidden" name="eventid" value="'
$context['event']['eventid'], '" />';

// Start the main table.
echo '
<table border="0" width="55%" align="center" cellspacing="1" cellpadding="3" class="bordercolor">
<tr class="titlebg">
<td>'
$context['page_title'], '</td>
</tr>
<tr>
<td class="windowbg">
<table border="0" cellpadding="3" width="100%">'
;

if (!empty($context['post_error']['messages']))
{
echo '
<tr>
<td></td>
<td>
'
$context['error_type'] == 'serious' '<b>' $txt['error_while_submitting'] . '</b>' '''
<div style="color: red; margin: 1ex 0 2ex 3ex;">
'
implode('<br />'$context['post_error']['messages']), '
</div>
</td>
</tr>'
;
}
echo '
<tr>
<td align="right">
<b'
, isset($context['post_error']['no_event']) ? ' style="color: red;"' '''>'$txt['calendar12'], '</b>
</td>
<td class="smalltext">
<input type="text" name="evtitle" maxlength="30" size="30" value="'
$context['event']['title'], '" style="width: 90%;" />
</td>
</tr><tr>
<td></td>
<td class="smalltext">
<input type="hidden" name="calendar" value="1" />'
$txt['calendar10'], '&nbsp;
<select name="year" id="year" onchange="generateDays();">'
;

// Show a list of all the years we allow...
for ($year $modSettings['cal_minyear']; $year <= $modSettings['cal_maxyear']; $year++)
echo '
<option value="'
$year'"'$year == $context['event']['year'] ? ' selected="selected"' '''>'$year'</option>';

echo '
</select>&nbsp;
'
$txt['calendar9'], '&nbsp;
<select name="month" id="month" onchange="generateDays();">'
;

// There are 12 months per year - ensure that they all get listed.
for ($month 1$month <= 12$month++)
echo '
<option value="'
$month'"'$month == $context['event']['month'] ? ' selected="selected"' '''>'$txt['months'][$month], '</option>';

echo '
</select>&nbsp;
'
$txt['calendar11'], '&nbsp;
<select name="day" id="day">'
;

// This prints out all the days in the current month - this changes dynamically as we switch months.
for ($day 1$day <= $context['event']['last_day']; $day++)
echo '
<option value="'
$day'"'$day == $context['event']['day'] ? ' selected="selected"' '''>'$day'</option>';

echo '
</select>
</td>
</tr>'
;

// If events can span more than one day then allow the user to select how long it should last.
if (!empty($modSettings['cal_allowspan']))
{
echo '
<tr>
<td align="right"><b>'
$txt['calendar54'], '</b></td>
<td class="smalltext">
<select name="span">'
;

for ($days 1$days <= $modSettings['cal_maxspan']; $days++)
echo '
<option value="'
$days'"'$context['event']['span'] == $days ' selected="selected"' '''>'$days'</option>';

echo '
</select>
</td>
</tr>'
;
}

// If this is a new event let the user specify which board they want the linked post to be put into.
if ($context['event']['new'])
{
echo '
<tr>
<td align="right"><b>'
$txt['calendar_link_event'], '</b></td>
<td class="smalltext">
<input type="checkbox" class="check" name="link_to_board" checked="checked" onclick="toggleLinked(this.form);" />
</td>
</tr>
<tr>
<td align="right"><b>'
$txt['calendar13'], '</b></td>
<td class="smalltext">
<select id="board" onchange="this.form.submit();">'
;

foreach ($context['event']['boards'] as $board)
echo '
<option value="'
$board['id'], '"'$board['id'] == $context['event']['board'] ? ' selected="selected"' '''>'$board['cat']['name'], ' - '$board['prefix'], $board['name'], '</option>';

echo '
</select>
</td>
</tr>'
;
}

echo '
<tr align="center">
<td colspan="2">
<input type="submit" value="'
, empty($context['event']['new']) ? $txt[10] : $txt[105], '" />';
// Delete button?
if (empty($context['event']['new']))
echo '
<input type="submit" name="deleteevent" value="'
$txt['calendar22'], '" onclick="return confirm(\''$txt['calendar_confirm_delete'], '\');" />';

echo '
<input type="hidden" name="sc" value="'
$context['session_id'], '" />
<input type="hidden" name="eventid" value="'
$context['event']['eventid'], '" />
</td>
</tr>'
;

echo '
</table>
</td>
</tr>
</table>
</form>'
;
}

?>


Offline Daniel15

Re: Rocket theme fire - forestfire
« Reply #3 on: December 09, 2006, 11:52:47 am »
No, not that file, the Index.template.php file ;)

Offline tomekent

Re: Rocket theme fire - forestfire
« Reply #4 on: December 10, 2006, 07:13:11 am »
Code: [Select]
<?php
// Version: 1.1 RC2; index

/* This template is, perhaps, the most important template in the theme. It
contains the main template layer that displays the header and footer of
the forum, namely with main_above and main_below. It also contains the
menu sub template, which appropriately displays the menu; the init sub
template, which is there to set the theme up; (init can be missing.) and
the linktree sub template, which sorts out the link tree.

The init sub template should load any data and set any hardcoded options.

The main_above sub template is what is shown above the main content, and
should contain anything that should be shown up there.

The main_below sub template, conversely, is shown after the main content.
It should probably contain the copyright statement and some other things.

The linktree sub template should display the link tree, using the data
in the $context['linktree'] variable.

The menu sub template should display all the relevant buttons the user
wants and or needs.

For more information on the templating system, please see the site at:
http://www.simplemachines.org/
*/

// Initialize the template... mainly little settings.
function template_init()
{
global $context$settings$options$txt;

/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';

/* What document type definition is being used? (for font size and other issues.)
'xhtml' for an XHTML 1.0 document type definition.
'html' for an HTML 4.01 document type definition. */
$settings['doctype'] = 'xhtml';

/* The version this template/theme is for.
This should probably be the version of SMF it was created for. */
$settings['theme_version'] = '1.1 RC2';

/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = false;

/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = true;
$settings['use_image_buttons'] = true;
/* Show sticky and lock status seperate from topic icons? */
$settings['seperate_sticky_lock'] = true;

//load font style
if (isset($_SESSION['font-style'])) {
$options['fontstyle'] = $_SESSION['font-style'];
} elseif (isset($_COOKIE['font-style'])) {
$options['fontstyle'] = $_COOKIE['font-style'];
}

//load width style
if (isset($_SESSION['width-style'])) {
$options['widthstyle'] = $_SESSION['width-style'];
} elseif (isset($_COOKIE['width-style'])) {
$options['widthstyle'] = $_COOKIE['width-style'];
}

if (isset($_GET['widthstyle'])) {
$options['widthstyle'] = $_GET['widthstyle'];
$_SESSION['width-style'] = $options['widthstyle'];
setcookie ('width-style'$options['widthstyle'], time()+31536000'/'false);
}
if (isset($_GET['fontstyle'])) {
$options['fontstyle'] = $_GET['fontstyle'];
$_SESSION['font-style'] = $options['fontstyle'];
setcookie ('font-style'$options['fontstyle'], time()+31536000'/'false);
}


}

// The main sub template above the content.
function template_main_above()
{
global $context$settings$options$scripturl$txt$modSettings;

// test for joomla integration
global $wrapped$jsmfConfig;

if(isset($wrapped) && $wrapped==true)
$context['joomla_wrapped']=true;
elseif(isset($wrapped) && $wrapped==false)
$context['joomla_wrapped']=false;
elseif(isset($jsmfConfig) && $jsmfConfig->wrapped)
$context['joomla_wrapped']=true;
elseif(isset($jsmfConfig) && !$jsmfConfig->wrapped)
$context['joomla_wrapped']=false;
else
$context['joomla_wrapped']=false;

// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"'
$context['right_to_left'] ? ' dir="rtl"' '''><head>
<meta http-equiv="Content-Type" content="text/html; charset='
$context['character_set'], '" />
<meta name="description" content="'
$context['page_title'], '" />
<meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/script.js?rc2p"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "'
$settings['theme_url'], '";
var smf_images_url = "'
$settings['images_url'], '";
var smf_scripturl = "'
$scripturl'";
// ]]></script>
<title>'
$context['page_title'], '</title>';

// The ?rc2 part of this link is just here to make sure browsers don't cache it wrongly.

// use Firefrog,SnowFire or ForestFire?
if(!empty($settings['fire_version'])){
switch($settings['fire_version']){
case 0:
$templstyle='firefrog';
break;
case 1:
$templstyle='forestfire';
break;
case 2:
$templstyle='snowfire';
break;
default:
$templstyle='firefrog';
break;
}
}
else
$templstyle='firefrog';

    
$context['templatestyle']=$templstyle;

if(!empty($options['fontstyle']))
$fontstyle=$options['fontstyle'];
else
$fontstyle='f_default';

if(!empty($options['widthstyle']))
$widthstyle=$options['widthstyle'];
else
$widthstyle='w_wide';

    
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/css/template_css.css?rc2" />';

    if(
$context['browser']['is_ie'])
    
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/css/template_ie.css?rc2" />';

echo '
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/css/style_'.$templstyle.'.css?rc2" />';
 echo 
'
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/style.css?rc2" />
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/print.css?rc2" media="print" />';


/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
Standards compliance mode happens when you use xhtml... */
if ($context['browser']['needs_size_fix'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/fonts-compat.css" />';

// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="'
$scripturl'?action=help" target="_blank" />
<link rel="search" href="' 
$scripturl '?action=search" />
<link rel="contents" href="'
$scripturl'" />';

// If RSS feeds are enabled, advertise the presence of one.
if (!empty($modSettings['xmlnews_enable']))
echo '
<link rel="alternate" type="application/rss+xml" title="'
$context['forum_name'], ' - RSS" href="'$scripturl'?type=rss;action=.xml" />';

// If we're viewing a topic, these should be the previous and next topics, respectively.
if (!empty($context['current_topic']))
echo '
<link rel="prev" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=prev" />
<link rel="next" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=next" />';

// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
echo '
<link rel="index" href="' 
$scripturl '?board=' $context['current_board'] . '.0" />';

// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
$options['collapse_header'] = !empty($_COOKIE['upshrink']);

// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '

<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header = '
, empty($options['collapse_header']) ? 'false' 'true'';

function shrinkHeader(mode)
{'
;

// Guests don't have theme options!!
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);'
;
else
echo '
smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "'
$context['session_id'], '");';

echo '
document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";
document.getElementById("upshrinkHeader2").style.display = mode ? "none" : "";

current_header = mode;
}
// ]]></script>'
;

// the routine for the info center upshrink
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header_ic = '
, empty($options['collapse_header_ic']) ? 'false' 'true'';

function shrinkHeaderIC(mode)
{'
;

if ($context['user']['is_guest'])
echo '
document.cookie = "upshrinkIC=" + (mode ? 1 : 0);'
;
else
echo '
smf_setThemeOption("collapse_header_ic", mode ? 1 : 0, null, "'
$context['session_id'], '");';

echo '
document.getElementById("upshrink_ic").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");

document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";

current_header_ic = mode;
}
// ]]></script>
</head>'
;

if(!$context['joomla_wrapped'])
{
echo '
<body class="'
.$widthstyle.' '.$fontstyle.' '.$templatestyle.'">';

echo '
<div class="hide">Another great <b>RocketTheme Joomla Template</b> brought to you by the <a href="http://www.rockettheme.com" title="RocketTheme">RocketTheme Joomla Template Club</a>.</div>
<div id="wrapper">
<div id="shadow">
<div id="header">
<a href="index.php"><span id="logo"></span></a>

<div id="tabarea">'
;

template_menu2();

echo '
</div>
<div id="access">
<a href="'
,$scripturl,'?fontstyle=f_larger" title="Increase size" id="larger"><span class="button"></span></a>
<a href="'
,$scripturl,'?fontstyle=f_default" title="Default size" id="medium"><span class="button"></span></a>
<a href="'
,$scripturl,'?fontstyle=f_smaller" title="Decrease size" id="smaller"><span class="button"></span></a>

<a href="'
,$scripturl,'?widthstyle=w_wide" title="Wide width" id="wide"><span class="button"></span></a>
<a href="'
,$scripturl,'?widthstyle=w_narrow" title="Narrow width" id="narrow"><span class="button"></span></a>
</div>
</div>
<div id="graphic">
<div id="spotlight">
<div id="quote">
</div>
</div>
</div>
<div class="clr"></div>
<table class="nopad">
<tr valign="top">
<td id="left-col">
<div id="left">
<div class="shadow"></div>
<div class="padding">
<div class="moduletable">'
;

// personal info etc.
echo '
<h3>User</h3>'
;
if (!empty($context['user']['avatar']))
echo '<div>'$context['user']['avatar']['image'], '</div>';

// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '<div style="font-weight: bold; margin: 1ex 0 0 1ex;">'$txt['hello_member_ndt'], ' <b>'$context['user']['name'], '</b></div>';


Offline tomekent

Re: Rocket theme fire - forestfire
« Reply #5 on: December 10, 2006, 07:13:47 am »
Code: [Select]
echo '<ul id="useropts">';
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo '<li>', $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a> ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'];
echo '.</li>';

// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '<li><b>', $txt[616], '</b></li>';

// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '<li>', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '</li>';

// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']))
{
echo '<li>
', $txt['totalTimeLogged1'];

// If days is just zero, don't bother to show it.
if ($context['user']['total_time_logged_in']['days'] > 0)
echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];

// Same with hours - only show it if it's above zero.
if ($context['user']['total_time_logged_in']['hours'] > 0)
echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];

// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '</li>';
}

echo '<li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>
<li>', $context['current_time'],'</li>
     </ul>';
}
// Otherwise they're a guest - so politely ask them to register or login.
else
{
echo '<div class="leftbox">
', $txt['welcome_guest'], '
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/sha1.js"></script>

<form action="', $scripturl, '?action=login2" method="post" style="margin: 4px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<input type="text" name="user" style="margin-bottom: 4px;" size="10" />
<input type="password" name="passwrd" style="margin-bottom: 4px;" size="10" />
<select name="cookielength">
<option value="60">', $txt['smf53'], '</option>
<option value="1440">', $txt['smf47'], '</option>
<option value="10080">', $txt['smf48'], '</option>
<option value="302400">', $txt['smf49'], '</option>
<option value="-1" selected="selected">', $txt['smf50'], '</option>
</select>
<input type="submit" value="', $txt[34], '" />

<input type="hidden" name="hash_passwrd" value="" />
</form>', $txt['smf52'], '<br /><br />
     </div>';
}


echo '<h3>', $txt[182],'</h3><div class="leftbox">
<form action="', $scripturl, '?action=search2" method="post" style="margin: 4px 0;">
<input type="text" name="search" value="" size="10" style="margin-bottom: 4px;"  />&nbsp;
<input type="submit" name="submit" value="', $txt[182], '" style="margin-bottom: 4px;"  /><br />
<a href="', $scripturl, '?action=search;advanced">', $txt['smf298'], '</a>
<input type="hidden" name="advanced" value="0" />
';

// Search within current topic?
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="topic" value="', $context['current_topic'], '" />';

// If we're on a certain board, limit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd[', $context['current_board'], ']" value="', $context['current_board'], '" />';

echo '
</form>
</div>';

// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '<h3>News</h3><div class="leftbox">
', $context['random_news_line'], '<br /><br />
</div>';

// The "key stats" box.
echo '<h3>Stats</h3><div class="leftbox">
<b>', $context['common_stats']['total_posts'], '</b> ', $txt[95], ' ', $txt['smf88'], ' <b>', $context['common_stats']['total_topics'], '</b> ', $txt[64], '<br /> ', $txt[525], ' <span style="white-space: nowrap;"><b>', $context['common_stats']['total_members'], '</b> ', $txt[19], '</span><br />
', $txt[656], ': <b> ', $context['common_stats']['latest_member']['link'], '</b>
</div>';

echo ' </div>
</div>
</div>
</td>
<td id="middle-col">
<div id="middle">
<div class="shadow_1">
<div class="shadow_2">
<div class="padding">';
}
// linktree
echo ' <div id="pathway">';

theme_linktree2();

echo '
</div>';

if($context['joomla_wrapped'])
echo '<div id="tempmenu">'. template_menu().'</div>';

echo '
<div id="top">
<div class="corner_1">
<div class="corner_2">
<div class="moduletable">';
}

function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;

    echo ' </div>
</div>
</div>
</div>';

if(!$context['joomla_wrapped'])
echo ' </div>
</div>
</div>
</div>
</td>
</tr>
</table>';

    echo '
<div style="padding: 5px; text-align: center;">
<div class="smalltext">' ,theme_copyright(),'<br />
Theme by <a href="http://www.rockettheme.com">RocketTheme</a>
</div>';
if(!$context['joomla_wrapped'])
echo '
</div>
</div>
<div class="clr"></div>
</div>';

echo '
</body></html>';
}

function theme_linktree(){
return;
}
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree2()
{
global $context, $settings, $options;

echo '<span class="pathway">';
// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];

// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
// Show the link, including a URL if it should have one.
echo $settings['linktree_link'] && isset($tree['url']) ? '<a href="' . $tree['url'] . '" class="pathway">' . $tree['name'] . '</a>' : $tree['name'];
else
echo $tree['name'];

// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];

}

echo '</span>';
}

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;


echo '
<ul id="navsmf">';


// Show the [home] button.
echo '<li><a href="', $scripturl, '">' , $txt[103] , '</a></li>';

// Show the [help] button.
echo '<li><a href="', $scripturl, '?action=help">' , $txt[119] , '</a></li>';

// How about the [search] button?
if ($context['allow_search'])
echo '<li><a href="', $scripturl, '?action=search">' , $txt[182] , '</a></li>';

// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '<li><a href="', $scripturl, '?action=admin">' , $txt[2] , '</a></li>';

// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '<li><a href="', $scripturl, '?action=profile">' , $txt[79] , '</a></li>';

// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo '<li><a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a></li>';


// The [calendar]!
if ($context['allow_calendar'])
echo '<li><a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a></li>';

// the [member] list button
if ($context['allow_memberlist'])
echo '<li><a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a></li>';


// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo '<li><a href="', $scripturl, '?action=login">' , $txt[34] , '</a></li>';


// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo '<li><a href="', $scripturl, '?action=register">' , $txt[97] , '</a></li>';


// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo '<li><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a></li>';

echo '</ul>';


}
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu2()
{
global $context, $settings, $options, $scripturl, $txt;


echo '
<ul id="nav">';


// Show the [home] button.
echo '<li><a href="', $scripturl, '">' , $txt[103] , '</a></li>';

// Show the [help] button.
echo '<li><a href="', $scripturl, '?action=help">' , $txt[119] , '</a></li>';

// How about the [search] button?
if ($context['allow_search'])
echo '<li><a href="', $scripturl, '?action=search">' , $txt[182] , '</a></li>';

// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '<li><a href="', $scripturl, '?action=admin">' , $txt[2] , '</a></li>';

// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '<li><a href="', $scripturl, '?action=profile">' , $txt[79] , '</a></li>';

// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo '<li><a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a></li>';


// The [calendar]!
if ($context['allow_calendar'])
echo '<li><a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a></li>';

// the [member] list button
if ($context['allow_memberlist'])
echo '<li><a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a></li>';


// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo '<li><a href="', $scripturl, '?action=login">' , $txt[34] , '</a></li>';


// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo '<li><a href="', $scripturl, '?action=register">' , $txt[97] , '</a></li>';


// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo '<li><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a></li>';

echo '</ul>';


}

// Generate a strip of buttons.
function template_button_strip($button_strip, $direction = 'top', $force_reset = false, $custom_td = '')
{
global $settings, $buttons, $context, $txt, $scripturl;

echo '<div>';
// Create the buttons...
foreach ($button_strip as $key => $value)
{
if (isset($value['test']) && empty($context[$value['test']]))
{
unset($button_strip[$key]);
continue;
}
elseif (!isset($buttons[$key]) || $force_reset)
$buttons[$key] = '<a href="' . $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>'. ($custom_td!='' ? '<'.$custom_td.'>' : '') . '<img src="'.$settings['images_url'].'/'.$context['user']['language'].'/'.$context['templatestyle'].'/'.$value['image'].'" alt="" />' . ($custom_td!='' ? '</'.$custom_td.'>' : '') .'</a>';

$button_strip[$key] = $buttons[$key];
}

if (empty($button_strip))
return '&nbsp;';

echo implode(' &nbsp;|&nbsp; ', $button_strip);
echo '</div>';
}
// Generate a strip of buttons.
function template_button_strip_mill($button_strip, $direction = 'top', $force_reset = false, $custom_td = '')
{
global $settings, $buttons, $context, $txt, $scripturl;

echo '<div>';
// Create the buttons...
foreach ($button_strip as $key => $value)
{
if (isset($value['test']) && empty($context[$value['test']]))
{
unset($button_strip[$key]);
continue;
}
elseif (!isset($buttons[$key]) || $force_reset)
$buttons[$key] = '<a href="' . $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>'. ($custom_td!='' ? '<'.$custom_td.'>' : '') . '<img src="'.$settings['images_url'].'/'.$context['user']['language'].'/'.$context['templatestyle'].'/'.$value['image'].'" alt="" />' . ($custom_td!='' ? '</'.$custom_td.'>' : '') .'</a>';

$button_strip[$key] = $buttons[$key];
}

if (empty($button_strip))
return '&nbsp;';

echo implode(' &nbsp;|&nbsp; ', $button_strip);
echo '</div>';
}

?>

Is that it lol, I got it to appear next to the posts too, thanks!

Offline Daniel15

Re: Rocket theme fire - forestfire
« Reply #6 on: December 10, 2006, 10:28:56 am »
All I really needed was the buttons bit ;)
Anyways, find:
Code: [Select]
if ($context['allow_calendar'])
echo '<li><a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a></li>';
Add after:
Code: [Select]
echo '<li><a href="', $scripturl, '?action=shop">Shop</a></li>';

Offline tomekent

Re: Rocket theme fire - forestfire
« Reply #7 on: December 10, 2006, 11:56:38 pm »
thanks so much, its a great shop! i love it