News:

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

Main Menu

Moving Navigation Buttons

Started by d3v, May 31, 2005, 08:24:21 PM

Previous topic - Next topic

d3v

Hi. The SS is pretty self explanatory. I would like to move the buttons to the right a bit so that they will end up in the "center" of my forum's header:




Pretty sure this can be fixed with a single line of code in index.template. Just wish that I knew PHP better ( much better).

[Unknown]

What theme are you using?

-[Unknown]

d3v

SMFOne_Grey by A.M.A. .... I would post in the relating topic, but I think we bothering A.M.A there too much already.

A.M.A

Could you please post 30 lines starting from line no. 294 form index.template.php
Really sorry .. real life is demanding my full attention .. will be back soon hopefully :)

d3v

#4
Sadly I don't own a computer and do all my work from everywhere possible. Another reason why you can catch me  asking so many questions on this board even thou I could've figured most of them out myself. I really appreciate you guys putting up with this and helping out. I'm at the library right now and this PC lacks any editing software with GO TO LINE function, so my only choice really is attaching the file in it's entirety as copied from index.template.php If you don't have time to look at this, I will probably have a chance to get to a normal PC sooner or later so that I can paste just lines needed. Thank you once again.

Here's my file with a couple of bugs:

http://d3v.clanhq.net/img/index.template.php

If that doesn't work: http://www.megaupload.com/?d=122MAIT7

[Unknown]

Notepad has such functionality.  Place Ctrl-G (I think) or Ctrl-L.

-[Unknown]

d3v

#6
Know how I can run Notepad without access to C drive and Start Menu (RUN). Shortcut from IE maybe?

EDIT: file:///C:/windows/system32/notepad.exe didn't work either. so no go

d3v

Here we go. finally got to dreamweaver.:

// 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'])
{
// 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"><!--';

// 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].offsetHeight < 20)
codeFix[i].style.height = (codeFix[i].offsetHeight + 20) + "px";
}
}';
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 = 0; i < codeFix.length; 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].style.height = (codeFix[i].offsetHeight + 36) + "px";
}

if (window_oldOnload)
window_oldOnload();
}';
}

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

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

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



since my index.template is customized, there's a bit more than 30 lines

A.M.A

It seems that you have modified the theme heavily :) that is not what am looking for .. anyhow if you could email me the whole index.template.php I'll try to fix it.
Really sorry .. real life is demanding my full attention .. will be back soon hopefully :)

d3v


A.M.A

I still cant download the file. Anyhow looking at you live demo,
    <td width="0"></td>
    <td style="background-image: url(http://catchmydr1ft.com/smf/Themes/SMFone_gray/images/re_top_6.gif);" width="10%"></td>
    <td width="60%">

should changed to:
    <td width="0"></td>
    <td style="background-image: url(http://catchmydr1ft.com/smf/Themes/SMFone_gray/images/re_top_6.gif);" width="1%"></td>
    <td width="100%" align="center">


You will find them in in index.template.php just above:
// Show the menu here, according to the menu sub template.
template_menu();
Really sorry .. real life is demanding my full attention .. will be back soon hopefully :)

d3v

#11
You know what it didn't work. Here's the portion of the original code thou:

<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td width="0">
    <td width="10%" style="background-image: url(', $settings['images_url'], '/re_top_6.gif);"></td>
    <td width="0%"><img src="', $settings['images_url'], '/re_top_5.gif" alt="" /></td>
    <td width="60%" style="background-image: url(', $settings['images_url'], '/re_top_4.gif);" align="left">';

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


d3v

nvm. i should've actually looked before blindly inserting. my mistake. Thank you AMA once again

Advertisement: