News:

Wondering if this will always be free?  See why free is better.

Main Menu

Poll/SSI

Started by ehoffman73, August 17, 2007, 02:04:57 PM

Previous topic - Next topic

ehoffman73

Probably I am doing something very wrong.   But you can see on my site on the right side of the forum, I added the latest poll.   But you cannot vote...try...it goes to a white screen.  What did I screw up?

www.purplepride.org/forums

H

I think the problem may be because you're using SSI on a forum page.

If possible please post the code for the page (?index.template.php)
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

ehoffman73

#2
here we go..thanks...you will note the right side stuff futher down where I am including stuff.

<?php
// Version: 1.1; 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/
*/
require("C:\\Inetpub\\wwwroot\\savvyPPO\\forums\\SSI.php");
// 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';

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

/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = true;

/* Show sticky and lock status seperate from topic icons? */
$settings['seperate_sticky_lock'] = true;
}

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

// Show right to left and the character set for ease of translating.

if (!defined('_VALID_MOS')){
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="" />
<meta name="keywords" content="" />
<script language="JavaScript" type="text/javascript" src="'
, $settings['default_theme_url'], '/script.js?fin11"></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, '";
var smf_iso_case_folding = '
, $context['server']['iso_case_folding'] ? 'true' : 'false', ';
var smf_charset = "'
, $context['character_set'], '";
// ]]></script>
<title>'
, $context['page_title'], '</title>';

// The ?fin11 part of this link is just here to make sure browsers don't cache it wrongly.
echo '
<link href="http://www.purplepride.org/primarytemplatefiles/style2.css" rel="stylesheet" type="text/css" />


<!--<link href="http://www.purplepride.org/actionfiles/dnav/cssmenus/css/horizontal.css" rel="stylesheet" type="text/css" />-->
<link href="http://www.purplepride.org/actionfiles/dnav/cssmenus/css/vertical.css" rel="stylesheet" type="text/css" />
<!--<link href="http://www.purplepride.org/actionfiles/dnav/cssmenus/css/horizontal2.css" rel="stylesheet" type="text/css" />-->
<script src="http://www.purplepride.org/actionfiles/dnav/cssmenus/js-common/base.js" type="text/javascript" language="javascript"></script>
<script src="http://www.purplepride.org/actionfiles/dnav/cssmenus/js-common/utility.js" type="text/javascript" language="javascript"></script>
<script src="http://www.purplepride.org/actionfiles/dnav/cssmenus/js/cssmenus.js" type="text/javascript" language="javascript"></script>


<link rel="stylesheet" type="text/css" href="'
, $settings['theme_url'], '/style.css?fin11" />
<link rel="stylesheet" type="text/css" href="'
, $settings['default_theme_url'], '/print.css?fin11" 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>

<body id="page_bg">
   <div class="center">
     <table width="95%" align="center" border="0" cellpadding="0" cellspacing="0">
       <tr>
<td background="/images/middle.jpg" height="146" align="left"><a href="/"><img src="/images/left.jpg" border="0" height="146"></a></td>
          <td background="/images/middle.jpg" height="146"><a href="/"><img src="/images/middle.jpg" alt="Minnesota Vikings Purple pride" width="7" height="146" border="0"></a></td>
<td background="/images/middle.jpg" height="146" align="right"><img src="/images/right.jpg" border="0" height="146" usemap="#Map" alt="NFL Vikings Metrodome"></td>
</tr>
</table>

       <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
           <tr>
<td width="6" background="/images/leftside.jpg"><img src="/images/spacer.gif" width="6"></td>
              <td width="170" valign="top">
<img src="/images/spacer.gif" width="170" height="1">
<!--NAV OBJECT-->


<link href="http://www.purplepride.org/actionfiles/dnav/cssmenus/skins/modern_purple/menus.css" rel="stylesheet" type="text/css" /><div  class="ktcssmenu savvynav_modern_purple"><div class="ktvertical ktopts_showtimeout_100 ktopts_hidetimeout_100 ktopts_imgreplace_no ktopts_imgreplacestyle_img ktopts_imgdir_ ktopts_imgnames_">
<ul><li><a href="/index.cfm" target="_self">Home</a></li>
<li class="selected"><a href="/fans/index.cfm" target="_self">Fan Line</a><ul><li><a href="/forums/" target="_self">Fan Forums</a></li>
<li><a href="/fans/email.cfm" target="_self">Free PPO Email!</a></li>
<li><a href="/fans/pillageplunder.cfm" target="_self">Pillage & Plunder</a></li>
<li><a href="http://www.purplepride.org/forums/index.php?action=calendar" target="_self">Calendar of Events</a></li>
<li><a href="http://www.purplepride.org/forums/index.php?action=gallery" target="_self">Fan Photo Gallery</a></li>
<li><a href="/fans/chat.cfm" target="_self">Live Chat</a></li>
</ul></li>
<li><a href="/contests/index.cfm" target="_self">Contests</a><ul><li><a href="http://football20.myfantasyleague.com/2007/home/38089" target="_new">2007 Fantasy Football</a></li>
<li><a href="/contests/pool.cfm" target="_self">2007 Football Pool</a></li>
<li><a href="/contests/index.cfm" target="_self">PP.O Contests</a></li>
<li><a href="/contests/mvc.cfm" target="_self">MVC Survivor 2007</a></li>
</ul></li>
<li><a href="/vikings/mckinnie.cfm" target="_self">Player Blogs</a></li>
<li><a href="/fans/blogs.cfm" target="_self">PP.O Bloggers</a></li>
<li><a href="/news/index.cfm" target="_self">News & Stats</a><ul><li><a href="/news/index.cfm" target="_self">News Center</a></li>
<li><a href="/news/roster.cfm" target="_self">Roster</a></li>
<li><a href="/news/ostats.cfm" target="_self">Offensive Stats</a></li>
<li><a href="/news/dstats.cfm" target="_self">Defensive Stats</a></li>
<li><a href="/news/sstats.cfm" target="_self">Special Teams Stats</a></li>
<li><a href="http://www.covers.com/sports/power-ranking/nfl-power-ranking.aspx" target="_new">Power Rankings</a></li>
</ul></li>
<li><a href="/packers/index.cfm" target="_self">Packers Suck!</a><ul><li><a href="/packers/warp.cfm" target="_self">Warp-a-Packer</a></li>
<li><a href="/packers/fanapplication.cfm" target="_self">Packer Fan Application</a></li>
<li><a href="/packers/radio.cfm" target="_self">Packer Radio</a></li>
<li><a href="/packers/shame.cfm" target="_self">Packers Hall of Shame</a></li>
</ul></li>
<li><a href="/multimedia/index.cfm" target="_self">Multimedia</a></li>
<li><a href="/vikings/index.cfm" target="_self">Vikings Info</a><ul><li><a href="/vikings/trivia.cfm" target="_self">Vikings Trivia</a></li>
<li><a href="/vikings/history.cfm" target="_self">Vikings History</a></li>
<li><a href="/vikings/year1.cfm" target="_self">History by Year</a><ul><li><a href="/vikings/yeartackles.cfm" target="_self">Tackle Leaders</a></li>
<li><a href="/vikings/yearscoring.cfm" target="_self">Scoring Leaders</a></li>
<li><a href="/vikings/yearsack.cfm" target="_self">Sack Leaders</a></li>
<li><a href="/vikings/yearrushing.cfm" target="_self">Rushing Leaders</a></li>
<li><a href="/vikings/yearreceiving.cfm" target="_self">Receiving Leaders</a></li>
<li><a href="/vikings/yearpassing.cfm" target="_self">Passing Leaders</a></li>
<li><a href="/vikings/yearinterception.cfm" target="_self">Interception Leaders</a></li>
</ul></li>
<li><a href="/vikings/staff.cfm" target="_self">Coaching Staff</a></li>
<li><a href="/vikings/office.cfm" target="_self">Front Office</a></li>
<li><a href="/vikings/players.cfm" target="_self">Former Players</a></li>
</ul></li>
<li><a href="/downloads/index.cfm" target="_self">Downloads</a><ul><li><a href="http://ppo.myforumtoolbar.com/" target="_new">PP.O News Toolbar</a></li>
</ul></li>
<li><a href="/gameday/index.cfm" target="_self">Gameday</a><ul><li><a href="/gameday/listen.cfm" target="_self">Listen Online</a></li>
<li><a href="/gameday/radio.cfm" target="_self">Radio Feeds</a></li>
<li><a href="/gameday/overview.cfm" target="_self">Next Game Overview</a></li>
<li><a href="/gameday/tailgating.cfm" target="_self">Tailgating Maps</a></li>
<li><a href="/gameday/tickets.cfm" target="_self">Dome/Ticket Info</a></li>
<li><a href="/fans/chat.cfm" target="_self">Live Game Chat</a></li>
<li><a href="/gameday/guide.cfm" target="_self">T.C. Visitor Guide</a></li>
<li><a href="/gameday/bars.cfm" target="_self">vikings Bars</a></li>
<li><a href="http://www.covers.com/sports/nfl/nfl_lines.aspx" target="_new">Live Odds</a></li>
<li><a href="http://www.covers.com/sports-scores/football-scores-matchups.aspx" target="_new">Live Scores</a></li>
</ul></li>
<li><a href="/gear/index.cfm" target="_self">Shop 4 Gear</a><ul><li><a href="http://www.footballfanatics.com/?partner_id=110" target="_new">Get Vikings Gear</a></li>
<li><a href="http://www.purplepride.org/forums/index.php?action=store" target="_self">PP.O Store</a></li>
</ul></li>
<li><a href="/learn/index.cfm" target="_self">Learning Center</a><ul><li><a href="/learning/qb.cfm" target="_self">QB Rating Formula</a></li>
<li><a href="/learning/terms.cfm" target="_self">Football Terms</a></li>
<li><a href="/learning/positions.cfm" target="_self">Team Positions</a></li>
<li><a href="/learning/penalties.cfm" target="_self">NFL Penalty Guide</a></li>
</ul></li>
<li><a href="/relax/index.cfm" target="_self">Links</a><ul><li><a href="/relax/links.cfm" target="_self">NFL Links</a></li>
<li><a href="/relax/vikings.cfm" target="_self">Vikings Links</a></li>
<li><a href="/relax/f2fa.cfm" target="_self">Fan2Fan Alliance</a></li>
<li><a href="/relax/players.cfm" target="_self">Player Websites</a></li>
<li><a href="/relax/packersblow.cfm" target="_self">Packer Bashing Sites</a></li>
<li><a href="/relax/rivals.cfm" target="_self">Rival Team Sites</a></li>
<li><a href="/relax/gear.cfm" target="_self">Vikings Gear</a></li>
<li><a href="/relax/blogs.cfm" target="_self">Fan Blogs</a></li>
</ul></li>
<li><a href="/about/index.cfm" target="_self">About PP.O</a><ul><li><a href="/about/index.cfm" target="_self">Contact PP.O</a></li>
<li><a href="/about/support.cfm" target="_self">Support PP.O</a></li>
<li><a href="/about/sitemap.cfm" target="_self">Site Map</a></li>
<li><a href="/about/advertise.cfm" target="_self">Advertise With Us</a></li>
</ul></li>
</ul></div></div>
<br>
<h3>Search the Web</h3><!-- SiteSearch Google --><form action="http://www.google.com/custom" method="get" target="google_window"><table border="0">
<tbody>
 <tr>
   <td align="left" height="32" valign="top"><a href="http://www.google.com/"><img alt="Google" border="0" src="http://www.google.com/logos/Logo_25blk.gif"/> </a><br/><input type="hidden" value="purplepride.org" name="domains" /> <input maxlength="255" name="q" size="8"/> <input class="button" name="sa" type="submit" value="Search"/> </td>
 </tr>
 <tr>
   <td><table>
   <tbody>
     <tr>
       <td><input checked="true" name="sitesearch" type="radio"/> <font color="#ffffff" size="-2">Web</font> </td>
       <td><input name="sitesearch" type="radio" value="purplepride.org"/> <font color="#ffffff" size="-2">purplepride.org</font> </td>
     </tr>
   </tbody>
   </table><input type="hidden" value="pub-8161725415764125" name="client" /> <input type="hidden" value="1" name="forid" /> <input type="hidden" value="ISO-8859-1" name="ie" /> <input type="hidden" value="ISO-8859-1" name="oe" /> <input type="hidden" value="GALT:#FFCC00;GL:1;DIV:#FFCC00;VLC:FF66FF;AH:center;BGC:2B0C45;LBGC:000033;ALC:FFFFFF;LC:FFFFFF;T:CCCCCC;GFNT:999999;GIMP:999999;LH:86;LW:100;L:http://www.purplepride.org/banners/vikings.gif;S:http://www.purplepride.org/vikes;LP:1;FORID:1;" name="cof" /> <input type="hidden" value="en" name="hl" /> </td>
 </tr>
</tbody>
</table></form><!-- SiteSearch Google --><div align="center"> </div>
   </td>
<td align="left" width="100%" valign="top">
<!--UNIQUE CONTENT OBJECT WITH BACKGROUND COLOR-->


'
;

}

echo '
<div class="tborder" '
, $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' : '', '>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="catbg" height="32">'
;

if (empty($settings['header_logo_url']))
echo '
<span style="font-family: Verdana, sans-serif; font-size: 140%; ">'
, $context['forum_name'], '</span>';
else
echo '
<img src="'
, $settings['header_logo_url'], '" style="margin: 4px;" alt="', $context['forum_name'], '" />';

echo '
</td>
<td align="right" class="catbg">
</td>
</tr>
</table>'
;


// display user name
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0" >
<tr>'
;

if($context['user']['is_logged'])
echo '
<td class="titlebg2" height="32">
<span style="font-size: 130%;"> '
, $txt['hello_member_ndt'], ' <b>', $context['user']['name'] , '</b></span>
</td>'
;

// display the time
echo '
<td class="titlebg2" height="32" align="right">
<span class="smalltext">'
, $context['current_time'], '</span>';

// this is the upshrink button for the user info section
echo '
<a href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="'
, $settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" align="bottom" style="margin: 0 1ex;" /></a>
</td>
</tr>
<tr id="upshrinkHeader"'
, empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
<td valign="top" colspan="2">
<table width="100%" class="bordercolor" cellpadding="8" cellspacing="1" border="0" style="margin-top: 1px;">
<tr>'
;

if (!empty($context['user']['avatar']))
echo '
<td class="windowbg" valign="middle">'
, $context['user']['avatar']['image'], '</td>';

echo '
<td colspan="2" width="100%" valign="top" class="windowbg2"><span class="middletext">'
;

// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
<a href="'
, $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
<a href="'
, $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';

}
// Otherwise they're a guest - send them a lovely greeting...
else
echo $txt['welcome_guest'];

// Now, onto our second set of info, are they logged in again?
if ($context['user']['is_logged'])
{
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<b>'
, $txt[616], '</b><br />';
if (isset($context['user']['awaiting_mod']))
echo '<br />' . $context['user']['awaiting_mod'];

// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '
'
, $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'], '<br />';

// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']))
{
echo '
'
, $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'], '<br />';
}

// --- Begin FlashChat Integration ---
// Do we need to display a list of the users in the chat?
// Are there users online?
if (!empty($modSettings['fc_showUsers']) && !empty($context['users_chat']))
echo '
'
, $txt['fc_users_online'], ': ', implode(', ', $context['list_users_chat']), '<br />';
// --- End FlashChat Integration ---
echo ' </span>';
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo ' </span>
<script language="JavaScript" type="text/javascript" src="'
, $settings['default_theme_url'], '/sha1.js"></script>

<form action="'
, $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" class="middletext" style="margin: 3px 1ex 1px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" 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="43200">'
, $txt['smf49'], '</option>
<option value="-1" selected="selected">'
, $txt['smf50'], '</option>
</select>
<input type="submit" value="'
, $txt[34], '" /><br />
<span class="middletext">'
, $txt['smf52'], '</span>
<input type="hidden" name="hash_passwrd" value="" />
</form>'
;
}

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

echo '
<table id="upshrinkHeader2"'
, empty($options['collapse_header']) ? '' : ' style="display: none;"', ' width="100%" cellpadding="4" cellspacing="0" border="0">
<tr>'
;

// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<td width="90%" class="titlebg2">
<span class="smalltext"><b>'
, $txt[102], '</b>: ', $context['random_news_line'], '</span>
</td>'
;
echo '
<td class="titlebg2" align="right" nowrap="nowrap" valign="top">
<form action="'
, $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">
<a href="'
, $scripturl, '?action=search;advanced"><img src="'.$settings['images_url'].'/filter.gif" align="middle" style="margin: 0 1ex;" alt="" /></a>
<input type="text" name="search" value="" style="width: 190px;" />&nbsp;
<input type="submit" name="submit" value="'
, $txt[182], '" style="width: 11ex;" />
<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>
</td>
</tr>
</table>
</div>'
;


// Show the menu here, according to the menu sub template.
template_menu();


// The main content should go here.
echo '
<div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">'
;
}

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

echo '
</div>'
;

// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '

<div id="footerarea" style="text-align: center; padding-bottom: 1ex;'
, $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' : '', '">
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function smfFooterHighlight(element, value)
{
element.src = smf_images_url + "/" + (value ? "h_" : "") + element.id + ".gif";
}
// ]]></script>
<table cellspacing="0" cellpadding="3" border="0" align="center" width="100%">
<tr>
<td width="28%" valign="middle" align="'
, !$context['right_to_left'] ? 'right' : 'left', '">

</td>
<td valign="middle" align="center" style="white-space: nowrap;">
'
, theme_copyright(), '
<span class="smalltext" style="display: inline; visibility: visible; font-family: Verdana, Arial, sans-serif;"> | <a href="'
.$scripturl.'?action=sitemap">Sitemap</a></span>
</td>
<td width="28%" valign="middle" align="'
, !$context['right_to_left'] ? 'left' : 'right', '">

</td>
</tr>
</table>'
;

// Show the load time?
if ($context['show_load_time'])
echo '
<span class="smalltext">'
, $txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</span>';

// This is an interesting bug in Internet Explorer AND Safari. Rather annoying, it makes overflows just not tall enough.
if (($context['browser']['is_ie'] && !$context['browser']['is_ie4']) || $context['browser']['is_mac_ie'] || $context['browser']['is_safari'] || $context['browser']['is_firefox'])
{
// The purpose of this code is to fix the height of overflow: auto div blocks, because IE can't figure it out for itself.
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA['
;

// Unfortunately, Safari does not have a "getComputedStyle" implementation yet, so we have to just do it to code...
if ($context['browser']['is_safari'])
echo '
window.addEventListener("load", smf_codeFix, false);

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if ((codeFix[i].className == "code" || codeFix[i].className == "post" || codeFix[i].className == "signature") && codeFix[i].offsetHeight < 20)
codeFix[i].style.height = (codeFix[i].offsetHeight + 20) + "px";
}
}'
;
elseif ($context['browser']['is_firefox'])
echo '
window.addEventListener("load", smf_codeFix, false);
function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if (codeFix[i].className == "code" && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0))
codeFix[i].style.overflow = "scroll";
}
}'
;
else
echo '
var window_oldOnload = window.onload;
window.onload = smf_codeFix;

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = codeFix.length - 1; i > 0; i--)
{
if (codeFix[i].currentStyle.overflow == "auto" && (codeFix[i].currentStyle.height == "" || codeFix[i].currentStyle.height == "auto") && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0) && (codeFix[i].offsetHeight != 0 || codeFix[i].className == "code"))
codeFix[i].style.height = (codeFix[i].offsetHeight + 36) + "px";
}

if (window_oldOnload)
{
window_oldOnload();
window_oldOnload = null;
}
}'
;

echo '
// ]]></script>'
;
}

echo '
</div>'
;

// The following will be used to let the user know that some AJAX process is running
echo '
<div id="ajax_in_progress" style="display: none;'
, $context['browser']['is_ie'] && !$context['browser']['is_ie7'] ? 'position: absolute;' : '', '">', $txt['ajax_in_progress'], '</div>
'
;
if (!defined('_VALID_MOS')){
echo'
</td>
<td width="150" valign="top" align="left" style="padding-left: 3px; padding-right: 3px;">
<img src="/images/spacer" width="150" height="1" alt="Brad Childress"><br />
<h3>F2fA</h3>
<p align="center"><a href="http://www.footballfanatics.com/?partner_id=110" target="_blank"><img align="center" alt="Fan 2 Fan Alliance (F2FA) NFL Football Fan Sites Fan2Fan" border="0" height="60" hspace="2" src="/images/F2FAlogo.jpg" style="MARGIN: 0px" title="Fan 2 Fan Alliance (F2FA) NFL Football Fan Sites Fan2Fan" width="120"/></a><br /><br />
<a href="http://www.f2fa.com/" target="_blank"><img align="center" alt="Purplepride Gear" border="0" height="60" hspace="2" src="/images/vikings12060.jpg" style="MARGIN: 0px" title="Support Purplepride" width="120" /></a></p>
<h3>From the Huddle</h3>'
;
ssi_recentTopics();
echo '<br /><h3>Fans Online</h3>';
ssi_whosOnline();
echo '</td>
<td width="6" background="/images/rightside.jpg"><img src="/images/spacer.gif" width="6"></td>
          </tr>
</table>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
<td align="left" background="/images/botmiddle.jpg"><img src="/images/botleft.jpg"></td>
         <td align="center" background="/images/botmiddle.jpg">
         <font face="Verdana" color="#ffffff" size="1">Site © 1998-2007&nbsp; All Rights Reserved</font> </p> </td>
</td>
<td align="right" background="/images/botmiddle.jpg"><img src="/images/rightbot.jpg"></td>
</tr>
</table>
<div class="designer" align="center" width="500">
purplepride.org is an independent fan site and not associated with the Minnesota Vikings or the NFL (National Football League). All content within this purplepride fan page is provided by, and for, purplepride fans. It represents opinions of the fans who frequent the site and in no way reflect the views of the NFL, Minnesota Vikings, or associated properties.  
<br /><br />
We are not responsible for comments posted by our users, as they are the property of the poster.
</p>
<map name="Map" id="Map"><area shape="rect" coords="90,91,170,120" href="/" />
<area shape="rect" coords="174,91,281,120" href="#" /><area shape="rect" coords="284,90,413,120" href="/news/" />
<area shape="rect" coords="418,91,539,120" href="/forums/" />
</map>


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

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

echo '<div class="nav" style="font-size: smaller; margin-bottom: 2ex; margin-top: 2ex;">';

// 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'];

// Show the link, including a URL if it should have one.
echo '<b>', $settings['linktree_link'] && isset($tree['url']) ? '<a href="' . $tree['url'] . '" class="nav">' . $tree['name'] . '</a>' : $tree['name'], '</b>';

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

// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
echo '&nbsp;>&nbsp;';
}

echo '</div>';
}

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

// Work out where we currently are.
$current_action = 'home';
if (in_array($context['current_action'], array('admin', 'managegames', 'arcadesettings', 'arcadecategory','managegames', 'arcadesettings', 'arcadecategory', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers')))
$current_action = 'admin';
if (in_array($context['current_action'], array('tags','staff','arcade','store','gallery','tags','staff','search', 'bookmarks','admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm','arcade',)))
$current_action = $context['current_action'];
if ($context['current_action'] == 'search2')
$current_action = 'search';
if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';

if ($context['current_action'] == 'chat')
$current_action = 'chat';

// Are we using right-to-left orientation?
if ($context['right_to_left'])
{
$first = 'last';
$last = 'first';
}
else
{
$first = 'first';
$last = 'last';
}

// Show the start of the tab section.
echo '
<table cellpadding="0" cellspacing="0" border="0" style="margin-left: 10px;">
<tr>
<td class="maintab_'
, $first , '">&nbsp;</td>';

// Show the [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_'
, $current_action == 'home' ? 'active_back' : 'back' , '">
<a href="'
, $scripturl, '">' , $txt[103] , '</a>
</td>'
, $current_action == 'home' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';
/*
// Show the [help] button.
echo ($current_action == 'help' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'help' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=help">' , $txt[119] , '</a>
</td>' , $current_action == 'help' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';
*/
// How about the [search] button?
if ($context['allow_search'])
echo ($current_action == 'search' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_'
, $current_action == 'search' ? 'active_back' : 'back' , '">
<a href="'
, $scripturl, '?action=search">' , $txt[182] , '</a>
</td>'
, $current_action == 'search' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';
// The [bookmarks] button
if ($context['user']['is_logged'])
echo ($current_action == 'bookmarks' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_'
, $current_action == 'bookmarks' ? 'active_back' : 'back' , '">
<a href="'
, $scripturl, '?action=bookmarks">' , $txt['bookmarks'] , '</a>
</td>'
, $current_action == 'bookmarks' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo ($current_action == 'admin' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_'
, $current_action == 'admin' ? 'active_back' : 'back' , '">
<a href="'
, $scripturl, '?action=admin">' , $txt[2] , '</a>
</td>'
, $current_action == 'admin' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo ($current_action == 'profile' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_'
, $current_action == 'profile' ? 'active_back' : 'back' , '">
<a href="'
, $scripturl, '?action=profile">' , $txt[79] , '</a>
</td>'
, $current_action == 'profile' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo ($current_action == 'pm' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_'
, $current_action == 'pm' ? 'active_back' : 'back' , '">
<a href="'
, $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]&nbsp;&nbsp;<img src="' . $settings['images_url'] . '/msg.gif" border="0" />' : '' , '</a>


</td>'
, $current_action == 'pm' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

// The [calendar]!
if ($context['allow_calendar'])
echo ($current_action == 'calendar' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_'
, $current_action == 'calendar' ? 'active_back' : 'back' , '">
<a href="'
, $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a>
</td>'
, $current_action == 'calendar' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

// FlashChat!
global $modSettings;
if ($context['user']['is_logged'])
echo ($current_action == 'chat' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_'
, $current_action == 'chat' ? 'active_back' : 'back' , '">
<a href="'
, $scripturl, '?action=chat"', (!empty($modSettings['fc_newWindow']) ? ' target="_blank"' : ''), '>', $txt['fc_chat'], (!empty($modSettings['fc_showUserCount']) && !empty($context['num_chat']) ? ' [<strong>' . $context['num_chat'] . ' ' . ($context['num_chat'] == 1 ? $txt['user'] : $txt['users']) . '</strong>]' : ''), '</a>
</td>'
, $current_action == 'chat' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

// the [member] list button
//if ($context['allow_memberlist'])
// echo ($current_action == 'mlist' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
// <td valign="top" class="maintab_' , $current_action == 'mlist' ? 'active_back' : 'back' , '">
// <a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a>
// </td>' , $current_action == 'mlist' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

// the [SMF Gallery] button
if ($context['allow_smfgallery_view'])
echo ($current_action == 'gallery' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_'
, $current_action == 'gallery' ? 'active_back' : 'back' , '">
<a href="'
, $scripturl, '?action=gallery">' , $txt['smfgallery_menu']  , '</a>
</td>'
, $current_action == 'gallery' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


// the [tags] button
echo ($current_action == 'tags' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_'
, $current_action == 'tags' ? 'active_back' : 'back' , '">
<a href="'
, $scripturl, '?action=tags">' , $txt['smftags_menu']  , '</a>
</td>'
, $current_action == 'tags' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


// the [staff list] button
if ($context['allow_view_stafflist'])
echo ($current_action == 'staff' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_'
, $current_action == 'staff' ? 'active_back' : 'back' , '">
<a href="'
, $scripturl, '?action=staff">' , $txt['smfstaff_stafflist']  , '</a>
</td>'
, $current_action == 'staff' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


// the [SMF Store] button
//if ($context['allow_smfstore_view'])
// echo ($current_action == 'store' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
// <td valign="top" class="maintab_' , $current_action == 'store' ? 'active_back' : 'back' , '">
// <a href="', $scripturl, '?action=store">' , $txt['smfstore_menu']  , '</a>
// </td>' , $current_action == 'store' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

SleePy

Is this issue solved or do you still require assistance?

Why do you have this in your template?
require("C:\\Inetpub\\wwwroot\\savvyPPO\\forums\\SSI.php");

Since you are in SMF you shouldn't need to include the SSI file but actually do the work itself.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

ehoffman73

I figured I would need it to get those things to work...but you are right, I can probably kill it.   Let me try that.

codenaught

#5
Quote from: ehoffman73 on August 29, 2007, 11:45:45 PM
I figured I would need it to get those things to work...but you are right, I can probably kill it.   Let me try that.
What I would suggest would be take out the call to SSI.php you currently have inside your forum, and to take the functions you are using on your forum in the file SSI.php, copy them into a fresh php file in the Sources directory, and then use:


// If you decide to use this in the template, the global $sourcedir; line is needed.
global $sourcedir;
require_once($sourcedir . 'ForumFunctions.php');


Be sure that the Sources/ForumFunctions.php file has <?php as the first line and ?> as the last line.

The problem you may be having is with all the additional code in SSI.php (code at the top that is not in functions). Basically SSI does stuff SMF is better off doing exclusively itself.

And just to be safe you may want to rename the functions in the file, just in case SSI.php ever gets loaded somehow. Because then you would get errors with redefining functions.
Dev Consultant
Former SMF Doc Coordinator

Advertisement: