how to costumize this..

Started by Henri563, July 25, 2008, 04:04:36 PM

Previous topic - Next topic

Henri563

Hi. this is my site: hxxp:biketrials.din.ee/ [nonactive]

How do i remove 'this'?


<?php

$ssi_gzip
= false;
$ssi_ban = true;
$ssi_theme = '5';
$ssi_layers = array('main');

ob_start();

require(
"foorum/SSI.php");

?>

<b>Hiliseimad postitused:</b>
<br>
<br>

<?php

require("foorum/SSI-Extra.php");

$array = ssi_latestPosts(10, array(2, 3, 5, 6, 7, 9, 8, 13), 'array');

foreach (
$array as $news)

 

{

 

 

echo
'

 

 

 

<table border="0" width="700" align="center" class="ssi_table"><tr>
<td width="20">'
, $news['icon'], '</td>
<td width="275"><b><a href="'
, $news['href'], '">', $news['subject'], '</b></td>
<td width="125">'
,$news['poster']['link'], '</td>
<td>'
, $news['time'], '</td>
 

 

</tr>


</table>'
;

 

}

?>

<br><b>Shoutbox! :</b>
<br>
<br>

<?php ssi_shout(); ?>

<br><b>Hiliseimad Ost/Myyk postitused:</b>
<br>
<br>

<?php

$array
= ssi_latestPosts(5, array(11, 12), 'array');

foreach (
$array as $news)

 

{

 

 

echo
'

 

 

 

<table border="0" width="700" align="center" class="ssi_table"><tr>
<td width="20">'
, $news['icon'], '</td>
<td width="275"><b><a href="'
, $news['href'], '">', $news['subject'], '</b></td>
<td width="125">'
,$news['poster']['link'], '</td>
<td>'
, $news['time'], '</td>
 

 

</tr>


</table>'
;

 

}

?>

<br>


And also if i go into the forum.. there will be the SMF logo. Where can I change the link on the pic. atm it goes where 'Home' is, but i want it to go to my website index.

cme1st2302

This might be defined in your CSS file.
SMF Version: 1.1.11
SimplePortal Version: 2.3.2

Admin

He who waits for perfect conditions sees nothing!!
If you need help adding a button or tab PM me!!

Henri563


Deaks

post the themes index.template.php please (use the code tags)
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Henri563

Ok. I found out how to change the url on the smf logo, and how to change the logo. But still how do i remove the thingy on my website index. It would be ok if only the part remains where "Biketrials.ee" is written and the login screen is.

<?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/
*/

// 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.
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'], '" />', empty($context['robot_no_index']) ? '' : '
<meta name="robots" content="noindex" />'
, '
<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?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 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_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>'
;

echo '
<div id="side_borders_inner">
<table border="0" width="100%" cellpadding="0" cellspacing="0" align="center">
<tr>
<td width="100%" class="logo_bg">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="logo_bg"><a href="http://biketrials.din.ee/index.php"><img src="'
, $settings['images_url'], '/header.png" border="0" alt="', $context['page_title'], '" /></a></td>
<td class="logo_bg">&nbsp;</td>
</tr>
<tr>
<td height="31" colspan="2" class="meny_bg" style="background-image: url('
, $settings['images_url'], '/sub.gif)">
<table cellpadding="6" cellspacing="0" border="0" width="100%" align="center" style="border-top-width:0px">
<tr align="center">
'
, template_menu(), '
</tr>
</table>
</td>
</tr>
<tr>
<td height="17" colspan="2" class="meny_bg_bottom" style="background-image: url('
, $settings['images_url'], '/menu_bottom_bg.gif)">&nbsp;</td>
</tr>
</table>
</td>
</tr>
</table>
<div align="center">
<div class="page" style="width:100%; text-align:left">
<div style="padding:0px 15px 0px 15px" align="left"><br />
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<tr>
<td class="windowbg" width="100%">'
, theme_linktree1(), '</td>
<td class="windowbg2" nowrap="nowrap"><div class="smalltext">'
;
$guest = $context['user']['is_guest'];
if (!$guest)
{
echo '
<strong>'
, $txt['hello_member_ndt'], ' ', $context['user']['name'] , '</strong><br />
<a href="'
, $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
<a href="'
, $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<b>'
, $txt[616], '</b><br />';
// 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 />';
}
}
if ($guest)
{
echo '
<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'] . '\');"' : '', '>
<table cellpadding="0" cellspacing="3" border="0">
<tr>
<td class="smalltext">'
, $txt[35], '</td>
<td><input type="text" class="bginput" style="font-size: 11px" name="user" size="10" value="'
, $txt[35], '" onfocus="if (this.value == \'', $txt[35], '\') this.value = \'\';" /></td>
<td class="smalltext" nowrap="nowrap">&nbsp;</td>
</tr>
<tr>
<td class="smalltext">'
, $txt[36], '</td>
<td><input type="password" class="bginput" style="font-size: 11px" name="passwrd" size="10" /></td>
<td><input type="submit" class="button" value="'
, $txt[34], '" /></td>
</tr>
</table>
<input type="hidden" name="hash_passwrd" value="" />
</form>'
;
}
echo '
</div></td>
</tr>
</table><br />'
;
}

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

echo '
<br />
<br />
<div align="center">
<div class="smalltext" align="center">
'
, theme_copyright(), '<br />
Style by: <a href="http://www.kreativfantasy.com" target="_blank">kreativfantasy.com</a>&nbsp;|&nbsp;Ported to SMF by <a href="http://Www.genclup.net/" target="_blank">cakal93</a><br />'
;
// Show the load time?
if ($context['show_load_time'])
echo '
'
, $txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'];
echo '
</div><br/>
<div class="smalltext" align="center">
<a href="http://www.mysql.com/" target="_blank">MySQL</a>&nbsp;|&nbsp;
<a href="http://www.php.net/" target="_blank">PHP</a>&nbsp;|&nbsp;
<a href="http://validator.w3.org/check/referer" target="_blank">Valid XHTML</a>&nbsp;|&nbsp;
<a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank">Valid CSS</a>
</div>
</div>
<br />
</div>
</div>
</div>
<table cellpadding="6" cellspacing="0" border="0" width="100%" class="page" align="center">
<tr>
<td class="tfoot">&nbsp;</td>
<td class="tfoot" align="right" width="100%">
<div class="smalltext"><strong>
<a href="'
, $scripturl, '">', $context['forum_name'], '</a>
</strong></div>
</td>
</tr>
</table>'
;

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

// 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>
</div>
</body></html>'
;
}

// Don't show this linktree for this theme.
function theme_linktree() { }

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

       
// Folder style or inline?  Inline has a smaller font.
       
echo '<div class="navbar" style="font-size:10pt">';

echo '<img class="inlineimg" src="' . $settings['images_url'] . '/icons/folder_open.gif" alt="+" border="0" />&nbsp;';

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

               if ((
$link_num == count($context['linktree']) - 1) && count($context['linktree'])>1)
                       echo
'<br />
<img class="inlineimg" src="'
. $settings['images_url'] . '/icons/linktree_side.gif" alt="|-" border="0" />&nbsp;';

               
// Show the link, including a URL if it should have one.
               
echo '<b>', $settings['linktree_link'] && isset($tree['url']) ? '<a href="' . $tree['url'] . '">' . $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']) - 2)
                       echo
'&nbsp;&raquo;&nbsp;';

       }

       echo
'</div>';
}

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

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

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

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

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

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

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

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

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


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


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


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

}

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

// 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'] : '') . '>' . $txt[$value['text']] . '</a>';

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

if (empty($button_strip))
return '<td>&nbsp;</td>';

echo '
<td class="'
, $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '">&nbsp;</td>
<td class="'
, $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' &nbsp;|&nbsp; ', $button_strip) , '</td>
<td class="'
, $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '">&nbsp;</td>';
}

?>[code]


Deaks

            <tr>
               <td class="logo_bg"><a href="http://biketrials.din.ee/index.php"><img src="', $settings['images_url'], '/header.png" border="0" alt="', $context['page_title'], '" /></a></td>
               <td class="logo_bg">&nbsp;</td>
            </tr>



just need to remove that :)
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Henri563

But it makes it also disappear on my forum index. I only want to remove it on my website frontpage. The code i posted before is the code for the frontpage.

Deaks

that header isnt called on front page only the forum, so only way to remove it is to remove it from forum
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Henri563

ok. is there a way to only display some parts of the template on my website front page? if i use $ssi_layers = array('main'); then it displays the whole main_above.

Gary

I think using
if(define('SMF'))
{
echo'
stuff for SMF here';
}

might work. I cant test it on a PSP :P
Gary M. Gadsdon
Do NOT PM me unless I say so
War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

Advertisement: