[Theme] Neptune (SMF 1.0.5 - SMF 1.1RC2 )

Started by bloc, June 29, 2005, 09:43:31 AM

Previous topic - Next topic

dave

Nope i just used that code
here is my indextemplate.php
i ended up putting it on the bottom to fix the issue :)
----------------------------------------------------------------------

<?php
// Version: 1.1 Beta 3 Public; 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 Beta 3';
}

// 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', $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="bass fishing forum, bass lure reviews, lure reviews, bass, smallmouth bass, largemouth bass" />
        <script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/script.js?beta1"></script>
        <script language="JavaScript" type="text/javascript"><!--
                var smf_theme_url = "', $settings['theme_url'], '";
                var smf_images_url = "', $settings['images_url'], '";
                var smf_scripturl = "', $scripturl, '";
                var smf_session_id = "', $context['session_id'], '";
        // --></script>
        <title>', $context['page_title'], '</title>';

        // This is here because Gecko browsers properly support white-space....
        if ($context['browser']['is_gecko'])
                echo '
        <style type="text/css"><!--
                .code
                {
                        white-space: pre;
                }
        --></style>';

        // The ?rc1 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?beta1" />';

        /* 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, '?prev_next=prev;topic=', $context['current_topic'], '.0" />
        <link rel="next" href="', $scripturl, '?prev_next=next;topic=', $context['current_topic'], '.0" />';

        // 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 . '?action=;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">
                var current_leftbar = ', empty($options['collapse_leftbar']) ? 'false' : 'true', ';

                function shrinkHeaderLeftbar(mode)
                {';

        // Guests don't have theme options!!
        if ($context['user']['is_guest'])
                echo '
                        document.cookie = "upshrink=" + (mode ? 1 : 0);';
        else
                echo '
                        document.getElementById("upshrinkTempLeftbar").src = "', $scripturl, '?action=jsoption;var=collapse_leftbar;val=" + (mode ? 1 : 0) + ";sesc=', $context['session_id'], ';" + (new Date().getTime());';

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

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

                        current_leftbar = mode;
                }
         // --></script>
        <script language="JavaScript" type="text/javascript"><!--
                var current_rightbar = ', empty($options['collapse_rightbar']) ? 'false' : 'true', ';

                function shrinkHeaderRightbar(mode)
                {';

        // Guests don't have theme options!!
        if ($context['user']['is_guest'])
                echo '
                        document.cookie = "upshrink=" + (mode ? 1 : 0);';
        else
                echo '
                        document.getElementById("upshrinkTempRightbar").src = "', $scripturl, '?action=jsoption;var=collapse_rightbar;val=" + (mode ? 1 : 0) + ";sesc=', $context['session_id'], ';" + (new Date().getTime());';

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

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

                        current_rightbar = mode;
                }
       // --></script>

        <script language="JavaScript" type="text/javascript"><!--
                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);';

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

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

                        current_header = mode;
                }
        // --></script>
</head>
<body>';

        echo '<div id="mainarea">
                   <table style="border-left: solid 2px black; border-right: solid 2px black;" align="center" width="80%" cellpadding="0" cellspacing="0" border="0">
                     <tr><td colspan="2" id="headerarea" valign="bottom">';
                        template_menu();
        echo '</td></tr>
                     <tr>
                         <td valign="top" id="leftarea" width="150">
                         <div style="width: 150px;">';
                         leftbar();


                         echo '</div></td>
                        <td valign="top" id="bodyarea">';

        if (!empty($settings['enable_news']))
                     echo '<div style="background-color: #658090; ">' , centerbar() , '</div>';
        else
                     echo '<div style="background-color: #658090; ">' , centerbar2() , '</div>';

                  echo '<div style="background-color: #B4C7D2;padding: 10px;">';
}

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

                echo '</div></td></tr>
                      <tr><td colspan="2" id="footerarea">';
        // Show the "Powered by" and "Valid" logos, as well as the copyright.  Remember, the copyright must be somewhere!
        echo '

        <div style="text-align: center; padding-bottom: 1ex;', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' : '', '">
                <script language="JavaScript" type="text/javascript"><!--
                        function smfFooterHighlight(element, value)
                        {
                                element.src = smf_images_url + "/" + (value ? "h_" : "") + element.id + ".gif";
                        }
                // --></script>
                <table> <td valign="middle" align="center"  cellspacing="0" cellpadding="3" border="0" align="center" width="100%">
                        <tr>
                                <td class="blockmain" width="80%" valign="middle" align="', !$context['right_to_left'] ? 'right' : 'left', '">
                                        <a href="http://www.basslurereviews.com/" target="_blank"><img id="powered-mysql" src="', $settings['images_url'], '/logonew.jpg" alt="', $txt['basslurereviews homepage'], '" border="0"  /></a>
                                                                       </td></table>

                         <table>  <td valign="middle" align="center" style="white-space: nowrap;" class="blockmain">
                                       <span class="smalltext"> ', theme_copyright(), ' <br /><b>Neptune</b> design by <a href="http://www.bloczone.net" target="_blank">Bloc</a></span>
                                </td>
                               
                        </tr>
                </table>';

        // Show the load time?
        if ($context['show_load_time'])
                echo '
                <span class="blockmain" style="font-size: smaller;">', $txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</span>';

        echo '
                </div>';

                echo '</td></tr>
                    <tr><td colspan="2" id="bottomarea" valign="bottom">&nbsp;</td></tr>
                   </table></div>';


        // 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.className == "code" || codeFix.className == "post" || codeFix.className == "signature") && codeFix.offsetHeight < 20)
                                                codeFix.style.height = (codeFix.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 = codeFix.length - 1; i > 0; i--)
                                {
                                        if (codeFix.currentStyle.overflow == "auto" && (codeFix.currentStyle.height == "" || codeFix.currentStyle.height == "auto") && (codeFix.scrollWidth > codeFix.clientWidth || codeFix.clientWidth == 0) && (codeFix.offsetHeight != 0 || codeFix.className == "code"))
                                                codeFix.style.height = (codeFix.offsetHeight + 36) + "px";
                                }

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

                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;

        // Folder style or inline?  Inline has a smaller font.
        echo '<span class="nav"', $settings['linktree_inline'] ? ' style="font-size: smaller;"' : '', '>';

        // Each tree item has a URL and name.  Some may have extra_before and extra_after.
        foreach ($context['linktree'] as $link_num => $tree)
        {
                // Show the | | |-[] Folders.
                if (!$settings['linktree_inline'])
                {
                        if ($link_num > 0)
                                echo str_repeat('<img src="' . $settings['images_url'] . '/icons/linktree_main.gif" alt="| " border="0" />', $link_num - 1), '<img src="' . $settings['images_url'] . '/icons/linktree_side.gif" alt="|-" border="0" />';
                        echo '<img src="' . $settings['images_url'] . '/icons/folder_open.gif" alt="+" border="0" />&nbsp; ';
                }

                // 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 $settings['linktree_inline'] ? ' &nbsp;|&nbsp; ' : '<br />';
        }

        echo '</span>';
}

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

     $tempe=$settings['use_image_buttons'];
     $settings['use_image_buttons']=false;
     $context['menu_separator']='&nbsp;&nbsp;';

     // Show the [home] and [help] buttons.
       echo '<div id="menuarea"><a href="', $scripturl, '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/home.gif" alt="' . $txt[103] . '" style="margin: 2px 0;" border="0" />' : $txt[103]), '</a>', $context['menu_separator'];
       echo '       <a href="', $scripturl, '?action=help" target="_blank">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/help.gif" alt="' . $txt[119] . '" style="margin: 2px 0;" border="0" />' : $txt[119]), '</a>', $context['menu_separator'];

        // How about the [search] button?
        if ($context['allow_search'])
                echo '
                                <a href="', $scripturl, '?action=search">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/search.gif" alt="' . $txt[182] . '" style="margin: 2px 0;" border="0" />' : $txt[182]), '</a>', $context['menu_separator'];

      // Is the user allowed to administrate at all? ([admin])
        if ($context['allow_admin']){
                echo '
                                <a href="', $scripturl, '?action=admin">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/admin.gif" alt="' . $txt[2] . '" style="margin: 2px 0;" border="0" />' : $txt[2]), '</a>', $context['menu_separator'];

        }

        // Edit Profile... [profile]
        if ($context['allow_edit_profile'])
                echo '
                                <a href="', $scripturl, '?action=profile">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/profile.gif" alt="' . $txt[79] . '" style="margin: 2px 0;" border="0" />' : $txt[467]), '</a>', $context['menu_separator'];

        // The [calendar]!
        if ($context['allow_calendar'])
                echo '
                                <a href="', $scripturl, '?action=calendar">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/calendar.gif" alt="' . $txt['calendar24'] . '" style="margin: 2px 0;" border="0" />' : $txt['calendar24']), '</a>', $context['menu_separator'];

        // If the user is a guest, show [login] and [register] buttons.
        if ($context['user']['is_guest'])
        {
                echo '
                                <a href="', $scripturl, '?action=login">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/login.gif" alt="' . $txt[34] . '" style="margin: 2px 0;" border="0" />' : $txt[34]), '</a>', $context['menu_separator'], '
                                <a href="', $scripturl, '?action=register">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/register.gif" alt="' . $txt[97] . '" style="margin: 2px 0;" border="0" />' : $txt[97]), '</a>';
        }
        // Otherwise, they might want to [logout]...
        else
                echo '
                                <a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/logout.gif" alt="' . $txt[108] . '" style="margin: 2px 0;" border="0" />' : $txt[108]), '</a>';

     $settings['use_image_buttons']=$tempe;
     echo '</div>';

}

// search
function searchbox()
{
    global $context, $settings, $options, $txt , $scripturl;

   echo '   <form action="', $scripturl, '?action=search2" method="post" style="margin: 0; margin-bottom: 5px;">
                      <br /><input type="text" name="search" value="" style="width: 90%;" /><br />
                      <input type="submit" name="submit" value="', $txt[182], '" style="width: 8ex; margin: 4px;" /><br /><span class="smalltext">
                      <a href="', $scripturl, '?action=search;advanced">', $txt['smf298'], '</a></span>
                     <input type="hidden" name="advanced" value="0" />';

        echo '</form>';

}




function sidebartop($title)
{
   global $context , $scripturl , $txt;

     echo '<div>';
     echo '<div class="blocktitle" style="padding: 4px; font-weight: bold;">&nbsp;&nbsp;', $title, '</div>';

     echo '<div class="blockmain" style="padding: 4px;">';


}

function sidebarbot()
{
   global $context , $scripturl;

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




// leftblocks
function leftbar()
{
      global $txt, $settings;

// check extra boxes
     if(isset($settings['bar1']) && isset($settings['bar1title']) && $settings['bar1']!='' && isset($settings['bar1top'])){
      sidebartop($settings['bar1title']);
      echo '<div class="blockmain" style="padding: 4px;">'.$settings['bar1'].'</div>';
      sidebarbot();
     }
     if(isset($settings['bar2']) && isset($settings['bar2title']) && $settings['bar2']!='' && isset($settings['bar2top'])){
      sidebartop($settings['bar2title']);
      echo '<div class="blockmain" style="padding: 4px;">'.$settings['bar2'].'</div>';
      sidebarbot();
     }
     if(isset($settings['bar3']) && isset($settings['bar3title']) && $settings['bar3']!='' && isset($settings['bar3top'])){
      sidebartop($settings['bar3title']);
      echo '<div class="blockmain" style="padding: 4px;">'.$settings['bar3'].'</div>';
      sidebarbot();
     }

      sidebartop('User');
      userbox();
      sidebarbot();

      sidebartop('Search');
      searchbox();
      sidebarbot();

      sidebartop('Stats');
      statsbox();
      sidebarbot();

// check extra boxes
     if(isset($settings['bar1']) && isset($settings['bar1title']) && $settings['bar1']!='' && !isset($settings['bar1top'])){
      sidebartop($settings['bar1title']);
      echo '<div class="blockmain" style="padding: 4px;">'.$settings['bar1'].'</div>';
      sidebarbot();
     }
     if(isset($settings['bar2']) && isset($settings['bar2title']) && $settings['bar2']!='' && !isset($settings['bar2top'])){
      sidebartop($settings['bar2title']);
      echo '<div class="blockmain" style="padding: 4px;">'.$settings['bar2'].'</div>';
      sidebarbot();
     }
     if(isset($settings['bar3']) && isset($settings['bar3title']) && $settings['bar3']!='' && !isset($settings['bar3top'])){
      sidebartop($settings['bar3title']);
      echo '<div class="blockmain" style="padding: 4px;">'.$settings['bar3'].'</div>';
      sidebarbot();
     }

}

// centerbar
function centerbar()
{
      global $txt;

      sidebartop('News');
      newsbox();
      sidebarbot();
}

function centerbar2()
{
      global $txt;

     echo '<div class="blocktitle" style="padding: 4px; font-weight: bold;">&nbsp;&nbsp;', $title, '</div>';
}

// userbox
function userbox()
{
          global $context, $settings, $options, $scripturl, $txt, $modSettings;


         echo'      <table width="99%" cellpadding="0" cellspacing="5" border="0"><tr>';


        echo '<td width="100%" valign="top" class="smalltext" style="font-family: verdana, arial, sans-serif;">';

        if (!empty($context['user']['avatar']))
                echo $context['user']['avatar']['image'] . '<br />';

         $bullet='<img src="'.$settings['images_url'].'/TPdivider2.gif" alt="" border="0" style="margin: 0 2px;" />';
         $bullet2='<img src="'.$settings['images_url'].'/TPdivider.gif" alt="" border="0" style="margin: 0 2px;" />';

        // If the user is logged in, display stuff like their name, new messages, etc.
        if ($context['user']['is_logged'])
        {

                echo '<span class="normaltext">
                                                        ', $txt['hello_member'], ' <b>', $context['user']['name'], '</b></span>';

                echo '<div id="navcontainerb"><ul id="navlistb">';
                // Only tell them about their messages if they can read their messages!
                if ($context['allow_pm']){
                        echo '<li ><a href="', $scripturl, '?action=pm">' .$bullet.$txt['tp-pm'].' ', $context['user']['messages'], '</a></li>';
                   if($context['user']['unread_messages']>0)
                        echo '<li><a style="font-weight: bold; " href="', $scripturl, '?action=pm">' .$bullet2.$txt['tp-pm2'].' ',$context['user']['unread_messages'] , '</a></li>';

                 }
                // Are there any members waiting for approval?
                if (!empty($context['unapproved_members']))
                        echo '<li><a href="', $scripturl, '?action=regcenter">'.$bullet2.$txt['tp_unapproved_members'].'<b> '. $context['unapproved_members']  . '</b></a></li>';

                      echo '<li><a href="', $scripturl, '?action=unread">' .$bullet.$txt['tp-unread'].'</a></li>
                     <li><a href="', $scripturl, '?action=unreadreplies">'.$bullet.$txt['tp-replies'].'</a></li>';

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

                // Show the total time logged in?
                if (!empty($context['user']['total_time_logged_in']) )
                {
                        echo '<li>'.$bullet2.$txt['tp-loggedintime'] . ' ';

                         echo '<br /> &nbsp;&nbsp;&nbsp;'.$context['user']['total_time_logged_in']['days'] . 'd ';
                         echo $context['user']['total_time_logged_in']['hours'] . 'h ';
                         echo $context['user']['total_time_logged_in']['minutes'] . 'min</li>';
                }
               echo '<li>'.$bullet2. $context['current_time'].'</li>';


               echo '</ul></div>';
        }
        // Otherwise they're a guest - so politely ask them to register or login.
        else
        {
                echo ' <span class="blockmain">
                                                        ', $txt['welcome_guest'], '<br />
                                                        ', $context['current_time'], '<br /> </span>

                                                        <form class="blockmain" action="', $scripturl, '?action=login2" method="post" >
                                                                <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="302400">', $txt['smf49'], '</option>
                                                                        <option value="-1" selected="selected">', $txt['smf50'], '</option>
                                                                </select>
                                                                <input type="submit" value="', $txt[34], '" /><br />
                                                                ', $txt['smf52'], '
                                                        </form>';
        }

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

}

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

        // Show a random news item? (or you could pick one from news_lines...)
        if (!empty($settings['enable_news']))
                echo ' <div style="padding: 5px;" >', $context['random_news_line'], '</div>
                                        ';
}

function statsbox()
{
       global $context, $settings, $options, $scripturl, $txt, $modSettings;
       echo '
                  <div style="padding: 5px;" class="smalltext">
                                           <b>', $modSettings['totalMessages'], '</b> ', $txt[95], ' ', $txt['smf88'], ' <b>', $modSettings['totalTopics'], '</b> ', $txt[64], ' ', $txt[525], ' <b>', $context['common_stats']['total_members'], '</b> ',  $txt[19], '<br />

                                                        ', $txt[656], ': <b> <a href="', $scripturl, '?action=profile;u=', $modSettings['latestMember'], '">', $modSettings['latestRealName'], '</a></b>
                                                </div>
                  ';
}



?>

Tercel

@bloc

I meant the Radio Buttons "Show on Top" for the 3 User Boxes on the left Table in Index.
The allwas shown "on Top". I changed the index.template.php for now. Maybe it´s a problem of the "MK Portal" integration. The Theme also don´t want to show the menu as Images. (? don't know why - but it´s all right like this)
(see it on www.fanprojekt-icedome.de ) Think this is a nice commercial for your theme ;)

THX & CU

Tercel

bloc

Very nice! The "MKPortal-look" is also less prominent here, I like it. :)

As for making the menu with images, I have "forced" it to only use links, but there is a easy "fallback". Simply open index.template.php and search for
     $settings['use_image_buttons']=false;

Set it to true instead, and images will appear. I think the needed images are in the archive, if not let me know and I will update it with them.

Tercel

@bloc

>:( :shame on me: should have seen this  :P
I commented line out, but as i thought before - Text looks better for menu  ;)

Now i´ll look for the line, where "Show on top" is defaulted "on"  ;D
But its a wonderfull theme. I´m thinkin about changing my forums theme ( www.ihoc.de )
to one of yours or maybe make a sort of clone from both - if so i´ll let you know - and sure, your name will be in the footer too  :) Hoping for some spare time...

Cu, Tercel

sewell123uk

i want a banner at the top and bottom of the forum i tried adding the code i normaly use but with no luck
left brackets outs here to show my code

url=http://www.c....s.com/cachet/ img http://www.c....s.com/Animation1b.gif/img /url

is that the wrong code or am i adding to wrong line in index.template?



bloc

You can't use BBC code in the templates , only HTML.

sewell123uk

i tried html kept crashing could you let me know what line to add the html for top and bottom please :D

bloc

ah, you need to enclose it like this:

echo 'htmlcodehere';

For the top and bottom, try to find <body>'; and just add the code like above there. Likewise, find echo '</body... and add same thing BEFORE that line, then you should be fine. You might need to adjust margins and such on your code though.

sewell123uk

Thanks for the help i will give that a try tonight :)

Oldiesmann

Looks great. One suggestion though:

The "sidebox" stuff should be moved to the "Settings" template instead of being placed in the "Themes" template. This will make it much better because:

You can change that information without having to use the Neptune theme
When using the Neptune theme, this stuff will only show up for the Neptune theme and not for every theme you have installed
Michael Eshom
Christian Metal Fans

bloc

#50
It should not show for every theme? It will just show it for Neptune..unless you overwrite the default Themes.template with it of course...reason for using Themes instead of Settings is that it allow more freedom in regards to default values as well as the layout.(i can use other form elements like textareas - its easier to read html code in that than in a single input box.)

And as I found out in the Simplicity thread, the language strings do not get transferred...so its still problematic to see what settings it is from another theme.

EDIT: ah, I see now really does show Neptune things if you are on any other theme..hm. Maybe I should expand the possible form elements in Themes instead...

bloodmonkey

Hi... I use  theme in my site, but avatar show with scrollbars, check out in this link http://www.underzine.com.ve/foros/index.php?topic=27.0 [nofollow]... how i can resolve this?

Lillie

I just installed this theme and it looks wonderful! The sidebar is fabilous thing. I have only one problem: whenever I try answer topics or create a new topic, none of the smilies will work or any of the text modification buttons. When I click on a smiley or for example the "bold" button, nothing happens. I'm using the SMF 1.1.beta3 board and I installed the right theme for it but still it won't work :/ What can I do to make it work?
If you're afraid of the dark, you've never seen what the light can do.

bloc

That is a problem with your forum in general I think, because the Neptune theme does not have its own Post.template - it just use the default theme instead.

Do you use any mods?

Lillie

Only few mods.. "Livejournal" and "Skype name" mods plus "Zodiac signs" and "Member Color link". Should I remove some of those to make the post template work?
If you're afraid of the dark, you've never seen what the light can do.

bloc

I am not sure which one is causing trouble..or if its one of them even. Do you possibly have a link?

Lillie

I do have a link but I don't know if it's any help since my board is in finnish.. http://midnight-passion.net/sohvaperuna
If you're afraid of the dark, you've never seen what the light can do.

Lillie

Ok new problem :) I'm using 100x100 pixel avatars at my board and now we all have annoying horizontal scroll under our avatars. How do I get rid of it?  ::)
If you're afraid of the dark, you've never seen what the light can do.

bloc

Have you set a bigger width + height allowed for avatars? In admin section?

Lillie

Yes I have, I even tried to set it a bit bigger (150 pixels) but it didn't work :/
If you're afraid of the dark, you've never seen what the light can do.

Advertisement: