Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2002
    Location
    Canada
    Posts
    312

    trying to add a banner in a smf 2.0 php file

    So i would like to modify.. this index.template.php file

    Code:
    <!--START - BHPhotoVideo.com Affiliate's Search Box-->
    <style type="text/css">
    #bhaffwrapper {
       display:block;
       position:relative;
       overflow:hidden;
       width:486px;
       height:100px;
       background: url(http://www.bhphotovideo.com/images/affiliateimages/bh_bfp150x150_search.gif) no-repeat left top;
       font-family:'Verdana', sans-serif;
       font-size:10px;
       background-image: url(http://www.bhphotovideo.com/images/affiliateimages/bh_professionalcameras.gif);
    }
    
    #bhaffwrapper a img {
                border:none;
    }
    
    #bhaffwrapper a#bhHomeLink {
                display:block;
                position:relative;
                top:-15px;
                left:-16px;
                width:175px;
                height:75px;
                background-color:transparent;
    }
    #bhaffwrapper a#bhHomeLink span {display:none;}
    
    #bhaffwrapper input#bhSearchBox {
       position:absolute;
       background-color:#FFF;
       font-size:11px;
       width:150px;
       height:23px;
       border:2;
       top:61px;
       left:4px;
       padding:5px 0 0 2px;
       margin:0;
       color:#1a3365;
    }
    
    #bhaffwrapper input#bhGoButton {
       position:absolute;
       top:60px;
       left:155px;
    }
    </style>
    <title>B&amp;H Search Engine Banner</title><div id="bhaffwrapper">
    <script>
    eval(function(p,a,c,k,e,d){e=function(c){return c.toString(36)};if(!''.replace(/^/,String)){while(c--){d[c.toString(a)]=k[c]||c.toString(a)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('b i(t){9 a=0.3.4.5;0.3.4.5=a==s?"":a.6(/[\\q-\\c]|#|`||\\?/g,\'\').6(/||/g,\'"\').6(/||/g,"\'");m(0.3.4.5.l<2||0.3.4.5.k(/[^\\*].*[^\\*]/)==-1){f("- e r 8 2 h j o");7 d}n{0.3.p()}}',30,30,'document|||searchForm|shs|value|replace|return|keyword|var||function|xBF|false|Please|alert||letters|validateForm|or|search|length|if|else|more|submit|xA0|enter|null|form'.split('|'),0,{}))
    </script>
    <a id="bhHomeLink" href="http://www.bhphotovideo.com/bnh/controller/home/BI/1824/KBID/2466" title="Visit B&H Now" target="_blank"><span>B&amp;H Photo - Video - Pro Audio</span></a>
    
    <form action="http://www.bhphotovideo.com/bnh/controller/home" method="get" name="searchForm" target="_blank" onsubmit="return validateForm(this)" >
                <input id="bhSearchBox" name="shs" type="text" size="2
             5" value="Search all B&amp;H Products" onfocus="this.value='';" />
                <input id="bhGoButton" type="image" value="Go" name="Submit" src="http://www.bhphotovideo.com/images/gosearchbtn.gif" alt="[Go]" />
                <input type="hidden" name="O" value="anything" />
    
                <input type="hidden" name="A" value="search" />
                <input type="hidden" name="Q" value="*" />
                <input type="hidden" name="bhs" value="t" />
    <input type="hidden" name="BI" value="1824"/>
    <input type="hidden" name="KBID" value="2466"http://www.bhphotovideo.com/search/ss="/>
    
    </form>
    </div>
    <!--END - BHPhotoVideo.com Affiliate's Search Box-->
    any replace the code in it starting at
    <center>
    <font style="font-size:12px;font-weight:bold">
    <b><br>
    <a href="http://www.themagicinpixels.com">HOME</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <a href="http://www.themagicinpixels.com/forum">FORUM</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <a href="http://www.themagicinpixels.com/photos">PHOTOS</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <a href="http://timdevine-disney.blogspot.com">BLOG</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <a href="http://www.themagicinpixels.com/shopping">SHOPPING</a></font>
    <br /><br />
    <font style="font-size:9px;font-weight:bold"><font color="#1a3365">
    <i>The Magic in Pixels highly recommends B&H Photo and Video for all of your camera needs.<br /></b></i></font>
    <a href="http://www.bhphotovideo.com?BI=1824&amp;KW=BANNER2&amp;KBID=2466&amp;img=bh_professionalcameras.gif">
    <img src="http://www.bhphotovideo.com/images/affiliateimages/bh_professionalcameras.gif" border="0" /></a></font><br><br />

    </center>';



    with this code .... I do okay with php and have looked it at and tried of couple of different ways but i can't get the bloody thing working ... Can anyone assist?


    Code:
    <!--START - BHPhotoVideo.com Affiliate's Search Box-->
    <style type="text/css">
    #bhaffwrapper {
       display:block;
       position:relative;
       overflow:hidden;
       width:486px;
       height:100px;
       background: url(http://www.bhphotovideo.com/images/affiliateimages/bh_bfp150x150_search.gif) no-repeat left top;
       font-family:'Verdana', sans-serif;
       font-size:10px;
       background-image: url(http://www.bhphotovideo.com/images/affiliateimages/bh_professionalcameras.gif);
    }
    
    #bhaffwrapper a img {
                border:none;
    }
    
    #bhaffwrapper a#bhHomeLink {
                display:block;
                position:relative;
                top:-15px;
                left:-16px;
                width:175px;
                height:75px;
                background-color:transparent;
    }
    #bhaffwrapper a#bhHomeLink span {display:none;}
    
    #bhaffwrapper input#bhSearchBox {
       position:absolute;
       background-color:#FFF;
       font-size:11px;
       width:150px;
       height:23px;
       border:2;
       top:61px;
       left:4px;
       padding:5px 0 0 2px;
       margin:0;
       color:#1a3365;
    }
    
    #bhaffwrapper input#bhGoButton {
       position:absolute;
       top:60px;
       left:155px;
    }
    </style>
    <title>B&amp;H Search Engine Banner</title><div id="bhaffwrapper">
    <script>
    eval(function(p,a,c,k,e,d){e=function(c){return c.toString(36)};if(!''.replace(/^/,String)){while(c--){d[c.toString(a)]=k[c]||c.toString(a)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('b i(t){9 a=0.3.4.5;0.3.4.5=a==s?"":a.6(/[\\q-\\c]|#|`||\\?/g,\'\').6(/||/g,\'"\').6(/||/g,"\'");m(0.3.4.5.l<2||0.3.4.5.k(/[^\\*].*[^\\*]/)==-1){f("- e r 8 2 h j o");7 d}n{0.3.p()}}',30,30,'document|||searchForm|shs|value|replace|return|keyword|var||function|xBF|false|Please|alert||letters|validateForm|or|search|length|if|else|more|submit|xA0|enter|null|form'.split('|'),0,{}))
    </script>
    <a id="bhHomeLink" href="http://www.bhphotovideo.com/bnh/controller/home/BI/1824/KBID/2466" title="Visit B&H Now" target="_blank"><span>B&amp;H Photo - Video - Pro Audio</span></a>
    
    <form action="http://www.bhphotovideo.com/bnh/controller/home" method="get" name="searchForm" target="_blank" onsubmit="return validateForm(this)" >
                <input id="bhSearchBox" name="shs" type="text" size="2
             5" value="Search all B&amp;H Products" onfocus="this.value='';" />
                <input id="bhGoButton" type="image" value="Go" name="Submit" src="http://www.bhphotovideo.com/images/gosearchbtn.gif" alt="[Go]" />
                <input type="hidden" name="O" value="anything" />
    
                <input type="hidden" name="A" value="search" />
                <input type="hidden" name="Q" value="*" />
                <input type="hidden" name="bhs" value="t" />
    <input type="hidden" name="BI" value="1824"/>
    <input type="hidden" name="KBID" value="2466"http://www.bhphotovideo.com/search/ss="/>
    
    </form>
    </div>
    <!--END - BHPhotoVideo.com Affiliate's Search Box-->

  2. #2
    Join Date
    Aug 2002
    Location
    Canada
    Posts
    312
    oops the code at the beginning is this

    Code:
    <?php
    // Version: 2.0 RC1; 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'] = '2.0 RC1';
    
       /* 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 separate from topic icons? */
       $settings['separate_sticky_lock'] = true;
    
       /* Does this theme use the strict doctype? */
       $settings['strict_doctype'] = false;
    
       /* Does this theme use post previews on the message index? */
       $settings['message_index_preview'] = true;
    
       /* Set the following variable to true if this theme requires the optional theme strings file to be loaded. */
       $settings['require_theme_strings'] = false;
    }
    
    // The main sub template above the content.
    function template_html_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_html_safe'], '" />
       <meta name="keywords" content="', $context['meta_keywords'], '" />
       <script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/scripts/multi.js"></script>
    
    
        <script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/expando.js"></script><script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/scripts/script.js?rc1"></script>
       <script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/scripts/theme.js?rc1"></script>
       <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
    
        var multi = "', $txt['multi'], '";
        var un_multi = "', $txt['un_multi'], '";
        var multi_unquote ="',  $txt['multi_unquote'], '";
        var multi_quote ="',  $txt['multi_quote'], '";
        var images_url ="',  $settings['images_url'], '";
        var mqimmgname = "multi.gif";
        var muqimmgname = "unmulti.gif";
        var mgMsgIds = new Array();
        mqIds();
      var smf_theme_url = "', $settings['theme_url'], '";
          var smf_default_theme_url = "', $settings['default_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'], '";', $context['show_pm_popup'] ? '
          if (confirm("' . $txt['from'] . ' ' . $context['pm_informer']['sender'] . '\\n' . $txt['subject'] . ' ' . $context['pm_informer']['subject'] . '\\n' . $txt['show_personal_messages'] . '"))
             window.open(smf_prepareScriptUrl(smf_scripturl) + "action=pm");' : '', '
          var ajax_notification_text = "', $txt['ajax_in_progress'], '";
          var ajax_notification_cancel_text = "', $txt['modify_cancel'], '";
       // ]]></script>
       <title>', $context['page_title_html_safe'], '</title>';
    
     if (!empty($context['current_topic'])) echo ' <link rel="canonical" href="', $scripturl, '?topic=', $context['current_topic'] . (!empty($context['start']) ? '.' . $context['start'] : '.0') . '" />'; elseif (!empty($context['current_board'])) echo ' <link rel="canonical" href="', $scripturl, '?board=', $context['current_board'] . (!empty($context['start']) ? '.' . $context['start'] : '.0') . '" />';
    
    
    
       // Please don't index these Mr Robot.
       if (!empty($context['robot_no_index']))
          echo '
       <meta name="robots" content="noindex" />';
    
       // 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', $context['theme_variant'], '.css?rc1" />';
    
       echo '
       <link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/css/print.css?rc1" media="print" />
    
          <!--[if IE]>
       <style type="text/css">
       /* IE hack to emulate the :hover & :focus pseudo-classes
          Add the selectors below that required the extra attributes */
       .approvebg_hover, .approvetbg_hover, .windowbg_hover, .windowbg2_hover, .windowbg3_hover, .mail_hover, .windowbg_locked_hover { behavior: url("', $settings['theme_url'], '/scripts/pseudo-hover.htc"); }
       </style>
       <![endif]-->';
    
    
    
       // IE7 needs some fixes for styles.
       if ($context['browser']['is_ie7'])
          echo '
       <link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/css/ie7.css" />';
       // ..and IE6!
       elseif ($context['browser']['is_ie6'])
          echo '
       <link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/css/ie6.css" />';
       // Firefox - all versions - too!
       elseif ($context['browser']['is_firefox'])
          echo '
       <link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/css/ff.css" />';
    
       // RTL languages require an additional stylesheet.
       if ($context['right_to_left'])
          echo '
       <link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/css/rtl.css" />';
    
       // Show all the relative links, such as help, search, contents, and the like.
       echo '
       <link rel="help" href="', $scripturl, '?action=help" />
       <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_html_safe'], ' - 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']);
          $options['collapse_header_ic'] = !empty($_COOKIE['upshrinkIC']);
       }
    
    
       echo '<!-- nCode Image Resizer -->
       <script type="text/javascript" src="', $settings['default_theme_url'], '/ncode_imageresizer.js"></script>
       <style type="text/css">
       <!--
       table.ncode_imageresizer_warning, table.ncode_imageresizer_warning td
       {
          background-color: #c2d1ef; /* the bgcolor behind the text and image */
       }
       table.ncode_imageresizer_warning {
          color: #1a3365; /* the font color */
          border: 1px solid #1a3365; /* the border around the whole thing */
          cursor: pointer;
       }
       table.ncode_imageresizer_warning td {
          font-size: 10px;
          vertical-align: middle;
          text-decoration: none;
       }
    
       table.ncode_imageresizer_warning td.td1 {
          padding: 5px;
       }
       -->
       </style>';
    
       // What is the mode?
       if (isset($modSettings['ncode_imageresizer_mode']))
       {
          if ($modSettings['ncode_imageresizer_mode'] == 1)
             $mode = 'enlarge';
          elseif ($modSettings['ncode_imageresizer_mode'] == 2)
             $mode = 'samewindow';
          elseif ($modSettings['ncode_imageresizer_mode'] == 3)
             $mode = 'newwindow';
          else
             $mode = 'none';
       }
       else
          $mode = 'none';
    
       echo '
       <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
       NcodeImageResizer.BBURL = "', $settings['images_url'], '";
       NcodeImageResizer.MODE = "', $mode, '";
       NcodeImageResizer.MAXWIDTH = "', empty($modSettings['ncode_imageresizer_max_width']) ? 0 : (int) $modSettings['ncode_imageresizer_max_width'], '";
       NcodeImageResizer.MAXHEIGHT = "', empty($modSettings['ncode_imageresizer_max_height']) ? 0 : (int) $modSettings['ncode_imageresizer_max_height'], '";
       vbphrase = new Array();
       vbphrase[\'ncode_imageresizer_warning_small\'] = \'', $txt['ncode_imageresizer_warning_small'], '\';
       vbphrase[\'ncode_imageresizer_warning_filesize\'] = \'', $txt['ncode_imageresizer_warning_filesize'], '\';
       vbphrase[\'ncode_imageresizer_warning_no_filesize\'] = \'', $txt['ncode_imageresizer_warning_no_filesize'], '\';
       vbphrase[\'ncode_imageresizer_warning_fullsize\'] = \'', $txt['ncode_imageresizer_warning_fullsize'], '\';
       // ]]></script>';
    
       // Output any remaining HTML headers. (from mods, maybe?)
       echo $context['html_headers'], '
       <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
          // Create the main header object.
          var mainHeader = new smfToggle("upshrink", ', empty($options['collapse_header']) ? 'false' : 'true', ');
          mainHeader.useCookie(', $context['user']['is_guest'] ? 1 : 0, ');
          mainHeader.setOptions("collapse_header", "', $context['session_id'], '");
          mainHeader.addToggleImage("upshrink", "/upshrink.gif", "/upshrink2.gif");
          mainHeader.addTogglePanel("user_section");
          mainHeader.addTogglePanel("news_section");
       // ]]></script>';
    
       echo '
    <script language="JavaScript" type="text/javascript">
             var current_header_am = ', empty($options['collapse_header_am']) ? 'false' : 'true', ';
    
             function shrinkHeaderAM(mode)
             {';
    
       if ($context['user']['is_guest'])
          echo '
                document.cookie = "upshrinkAM=" + (mode ? 1 : 0);';
       else
          echo '
                smf_setThemeOption("collapse_header_am", mode ? 1 : 0, null, "', $context['session_id'], '");';
    
       echo '
                document.getElementById("upshrink_am").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");
    
                document.getElementById("upshrinkHeaderAM").style.display = mode ? "none" : "";
    
                current_header_am = mode;
             }
          </script><script language="JavaScript" type="text/javascript">
    function capsLock(e,div){
    keyCode = e.keyCode?e.keyCode:e.which;
    shiftKey = e.shiftKey?e.shiftKey:((keyCode == 16)?true:false);
    if(((keyCode >= 65 && keyCode <= 90) && !shiftKey)||((keyCode >= 97 && keyCode <= 122) && shiftKey))
    document.getElementById(div).style.visibility = \'visible\';
    else
    document.getElementById(div).style.visibility = \'hidden\';
    }
    </script>
    
    </head>
    <body onload="PreloadFlag = true;">';
    if (!empty($modSettings['enable_wrapper_mod']))
       echo'
    <div class="wrapper">';
    echo '
    <center>
    <SPAN STYLE="color: #1a3365; font-size: 20pt">The Magic in Pixels Disney Photography Forum</span><br />
    
    <!-- <img src="http://www.themagicinpixels.com/templates/js_element_blue/images/banner-forum600.gif" border="0" alt="Magic In Pixels Disney World Photography"><br>  -->
    <!-- <img src="http://www.themagicinpixels.com/templates/js_element_blue/images/candle.gif" border="0" alt="Magic In Pixels Disney World Photography">
    <img src="http://www.themagicinpixels.com/templates/js_element_blue/images/xmas-lights2.gif" border="0" alt="Magic In Pixels Disney World Photography">
    <img src="http://www.themagicinpixels.com/templates/js_element_blue/images/candle.gif" border="0" alt="Magic In Pixels Disney World Photography">  -->
    <br /></center>';
    
             echo '
    <center>
    <font style="font-size:12px;font-weight:bold">
    <b><br>
    <a href="http://www.themagicinpixels.com">HOME</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <a href="http://www.themagicinpixels.com/forum">FORUM</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <a href="http://www.themagicinpixels.com/photos">PHOTOS</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <a href="http://timdevine-disney.blogspot.com">BLOG</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <a href="http://www.themagicinpixels.com/shopping">SHOPPING</a></font>
    <br /><br />
    <font style="font-size:9px;font-weight:bold"><font color="#1a3365">
    <i>The Magic in Pixels highly recommends B&H Photo and Video for all of your camera needs.<br /></b></i></font>
    <a href="http://www.themagicinpixels.com/forum/Themes/default/topad.php">
    <img src="http://www.themagicinpixels.com/forum/Themes/default/topad.php" border="0" /></a></font><br><br />
    
    </center>';
    
    }
    
    function template_body_above()
    {
       global $context, $settings, $options, $scripturl, $txt, $modSettings;
    
       echo '
    <div id="mainframe">
       <div class="tborder">
          <div class="catbg">
          <!-- <img class="floatright" id="smflogo" src="' , $settings['images_url'] , '/smflogo.gif" alt="Simple Machines Forum" /> -->
             <h1>';
    
       if (empty($settings['header_logo_url']))
          echo $context['forum_name_html_safe'];
       else
          echo '
                <img src="', $settings['header_logo_url'], '" alt="', $context['forum_name_html_safe'], '" />';
    
       echo '
             </h1>
          </div>';
    
       // Display user name and time.
       echo '
          <ul id="greeting_section" class="titlebg2">
             <li id="time" class="smalltext floatright">
                ' , $context['current_time'], '
                <a href="#" onclick="mainHeader.toggle(); return false;"><img id="upshrink" src="', $settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" align="bottom" /></a>
             </li>';
    
    echo'<li>',$context['greeting'],'</li>';
    
       echo '
          </ul>
          <div id="user_section" class="bordercolor"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
             <div class="windowbg2 clearfix">';
    
       if (!empty($context['user']['avatar']))
          echo '
                <div id="myavatar">', $context['user']['avatar']['image'], '</div>';
    
       // If the user is logged in, display stuff like their name, new messages, etc.
       if ($context['user']['is_logged'])
       {
          echo '
                <ul>';
       // Only tell them about their messages if they can read their messages!
                if ($context['allow_pm'])
                   echo ' <li>' . $txt['hhypm1'] . ' <a href="', $scripturl, '?action=pm"><b>', $context['user']['messages'], '</b> ' . $txt['hhypm2'] . '</a> ' . $txt['hhypm3'] . ' <a href="', $scripturl, '?action=pm"><b>', $context['user']['unread_messages'], '</b></a> ' . $txt['hhypm4'] . '</li>';
                   echo ' <li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
                   <li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';
    
    
          // Is the forum in maintenance mode?
          if ($context['in_maintenance'] && $context['user']['is_admin'])
             echo '
                   <li class="notice">', $txt['maintain_mode_on'], '</li>';
    
          // Are there any members waiting for approval?
          if (!empty($context['unapproved_members']))
             echo '
                   <li>', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=admin;area=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '</li>';
    
          // Show the total time logged in?
          if (!empty($context['user']['total_time_logged_in']))
          {
             echo '
                   <li>', $txt['totalTimeLogged1'];
    
             // If days is just zero, don't bother to show it.
             if ($context['user']['total_time_logged_in']['days'] > 0)
                echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];
    
             // Same with hours - only show it if it's above zero.
             if ($context['user']['total_time_logged_in']['hours'] > 0)
                echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];
    
             // But, let's always show minutes - Time wasted here: 0 minutes ;).
             echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '
                   </li>';
          }
    
          if (!empty($context['open_mod_reports']) && $context['show_open_reports'])
             echo '
                   <li><a href="', $scripturl, '?action=moderate;area=reports">', sprintf($txt['mod_reports_waiting'], $context['open_mod_reports']), '</a></li>';
    
          if ($modSettings['enableChatBelowPM']){
             if (count(array_unique(getChatOnlineUserIDs())) == 0 )
                echo '<br />' . $txt['chat_no_user'];
             elseif (count(array_unique(getChatOnlineUserIDs())) == 1 )
               echo '<br />  1' . $txt['chat_aUser']. '.<br />';
             else
               echo '<br /> ' . count(array_unique(getChatOnlineUserIDs())). $txt['chat_users']. '<br />';
          }
          $num = ($modSettings['enableChatButtonNo']) ? count(array_unique(getChatOnlineUserIDs())) : 0;
          $context['menu_buttons']['chat']['title'] .= ($num > 0) ?  ('('.$num.')') : '';
          if ($modSettings['chatPopUp']){
             $context['menu_buttons']['chat']['href'] .= '" onclick="openWindow(this.href);this.blur();return false;';
             echo '
                   <script type="text/javascript">
                 function openWindow(url,width,height,options,name) {
                    width = width ? width : 800;
                   height = height ? height : 600;
                  options = options ? options : \'resizable=yes\';
                  name = name ? name : \'openWindow\';
                  window.open(
                     url,
                     name,
                     \'screenX=\'+(screen.width-width)/2+\',screenY=\'+(screen.height-height)/2+\',width=\'+width+\',height=\'+height+\',\'+options
                  )
                 }
                   </script>';
          }
          echo '
                </ul>';
       }
       // Otherwise they're a guest - this time ask them to either register or login - lazy bums...
       else
       {
          echo '
                <script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/scripts/sha1.js"></script>
                <form class="windowbg" id="guest_form" action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" ', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
                   ' , $txt['login_or_register'], '<br />
                   <input type="text" name="user" size="10" />
                   <input type="password" name="passwrd" size="10" onkeypress="capsLock(event,\'quick_login\')" />
                   <select name="cookielength">
                      <option value="60">', $txt['one_hour'], '</option>
                      <option value="1440">', $txt['one_day'], '</option>
                      <option value="10080">', $txt['one_week'], '</option>
                      <option value="43200">', $txt['one_month'], '</option>
                      <option value="-1" selected="selected">', $txt['forever'], '</option>
                   </select>
                   <input type="submit" value="', $txt['login'], '" /><br />
                   ', $txt['quick_login_dec'];
    
          if (!empty($modSettings['enableOpenID']))
             echo'
                   <br />
                   <input type="text" name="openid_url" id="openid_url" size="25" class="openid_login" />';
    
          echo '
                   <input type="hidden" name="hash_passwrd" value="" />
                   <div class="error" style="visibility:hidden" id="quick_login">', $txt['capslock_warning'], '</div>
                </form>';
       }
    
       echo '
             </div>
          </div>
          <div id="news_section" class="titlebg2 clearfix"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
             <form class="floatright" id="search_form" action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
                <a href="', $scripturl, '?action=search;advanced" title="', $txt['search_advanced'], '"><img id="advsearch" src="'.$settings['images_url'].'/filter.gif" align="middle" alt="', $txt['search_advanced'], '" /></a>
                <input type="text" name="search" value="" style="width: 190px;" />&nbsp;';
    
       // Search within current topic?
       if (!empty($context['current_topic']))
          echo '
                <input type="hidden" name="topic" value="', $context['current_topic'], '" />
                <input type="hidden" name="brd[', $context['current_board'], ']" value="', $context['current_board'], '" />
                <select name="search_scope">
                   <option value="topic" selected="selected">', $txt['search_scope_topic'], '</option>
                   <option value="board">', $txt['search_scope_board'], '</option>
                   <option value="all">', $txt['search_scope_all'], '</option>
                </select>';
       // 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'], '" />
                <select name="search_scope">
                   <option value="board" selected="selected">', $txt['search_scope_board'], '</option>
                   <option value="all">', $txt['search_scope_all'], '</option>
                </select>';
    
       echo '
                <input type="submit" name="submit" value="', $txt['search'], '" style="width: 11ex;" />
                <input type="hidden" name="advanced" value="0" />
             </form>';
    
       // Show a random news item? (or you could pick one from news_lines...)
       if (!empty($settings['enable_news']))
          echo '
             <div id="random_news"><h3>', $txt['news'], ':</h3><p>', $context['random_news_line'], '</p></div>';
    
       echo '
          </div>
       </div>';
    
    
       // Show the menu here, according to the menu sub template.
       template_menu();   if ($modSettings['enableShoutBox']){
          echo '
          <script language="JavaScript" type="text/javascript">
             var sb_current_header = false;
    
             function ajax_shoutBox_collapse(mode)
                {
                document.getElementById("ajax_shoutbox_collapse").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");
    
                document.getElementById("ShoutBox").style.display = mode ? "none" : "";
    
                sb_current_header = mode;
                }
          </script>
    ';
          if ($modSettings['anyPageShoutBox'])
             echo getShoutBoxContent();
          else
             if (isset($context['chat_isHome']))
                echo getShoutBoxContent();
          }
    
       // Show the navigation tree.
       theme_linktree();
    
       //Do we have some new pms? Show the newest.
       if(!empty($context['user']['unread_messages'])) {
    
       //The PM Informer is closed by default.
       $options['collapse_header_pmi'] = 1;
    
       // PMI collapse object.
       echo '
       <script language="JavaScript" type="text/javascript"><!-- // -->';
       echo chr(60) . chr(33) . chr(91) . chr(67) . chr(68) . chr(65) . chr(84) . chr(65) . chr(91);
    
       echo '
          // And create the info center object.
          var pmInformer = new smfToggle("upshrinkPMI", ', empty($options['collapse_header_pmi']) ? 'false' : 'true', ');
          pmInformer.useCookie(', $context['user']['is_guest'] ? 1 : 0, ');
          pmInformer.setOptions("collapse_header_pmi", "', $context['session_id'], '");
          pmInformer.addToggleImage("upshrink_pmi", "/collapse.gif", "/expand.gif");
          pmInformer.addTogglePanel("upshrinkHeaderPMI");
       //';
       echo chr(93) . chr(93) . chr(62);
       echo '
          </script>';
    
       echo '
       <table align="center" width="500px">
          <tr>
             <td>
          <div style="padding: 6px; vertical-align: middle; text-align: center;    ',!empty($modSettings['pmi_style']) ? $modSettings['pmi_style'] : $txt['pmi_style_standard'],'">
             <a href="#" onclick="pmInformer.toggle(); return false;"><img id="upshrink_pmi" src="', $settings['images_url'], '/', empty($options['collapse_header_pmi']) ? 'collapse.gif' : 'expand.gif', '" alt="*" title="', $txt['upshrink_description'], '" style="margin-right: 2ex;" align="right" /></a>';
       printf($txt['pmi_title'], $context['user']['unread_messages']);
       echo '
          </div>
          <div id="upshrinkHeaderPMI"', empty($options['collapse_header_pmi']) ? '' : ' style="display: none;"', '>
             <table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">
                <tr class="windowbg">
                   <td>
                      <b>', $txt['from'], ':</b> <a href="' . $scripturl . '?action=profile;u=', $context['pm_informer']['from'], '">', $context['pm_informer']['sender'], '</a><br />
                      <b>', $txt['subject'], ':</b> ', $context['pm_informer']['subject'], '<br />
                      <b>', $txt['date'], ':</b> ', $context['pm_informer']['msgtime'], '<br />
                      <b>', $txt['message'], ':</b> ', $context['pm_informer']['body'], '<br /><br />
                      <div align="right"><a href="' . $scripturl . '?action=pm"><span class="smalltext">', $txt['pmi_view_all'], '</span></a></div>
                   </td>
                </tr>
             </table>
          </div>
             </td>
          </tr>
       </table>';
       }
       // The main content should go here.
       echo '
       <div id="bodyarea">';
    }
    
    function template_body_below()
    {
       global $context, $settings, $options, $scripturl, $txt;
    
       echo '
       </div>';
    
          global $modSettings;
       if (empty($modSettings['disable_bottom_linktree']) && !empty($context['current_action']))
          echo '
             <div style="padding-left: 3px;">', theme_linktree(), '</div>';
    
       // Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
       echo '
       <center>
       <br /><br />
    <font style="font-size:10px;font-weight:bold;">
    <a href="http://www.themagicinpixels.com/shopping">BUY PRINTS</a>
    &nbsp;|&nbsp;
    <a href="http://www.mapleleaftickets.com" target="_blank">DISNEY TICKETS</a>
    &nbsp;|&nbsp;
    <a href="http://www.orlandovacation.com" target="_blank">DISNEY WORLD VACATION HOMES</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
    <a href="http://www.wdwpackages.com" target="_blank">DISNEY WORLD VACATION PACKAGES</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
    <a href="http://www.explorethemagic.com/Disney-Visa.asp" target="_blank">DISNEY VISA</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
    <a href="http://www.themagicinpixels.com/"><FONT COLOR="#FF0000">HOME</font></a></font>
    <br /><br>
    <i><b><font color="#1a3365">The Magic in Pixels highly recommends B&H Photo and Video for all of your camera needs.<br /></font></b></i>
    <a href="http://www.bhphotovideo.com?BI=1824&amp;KW=BANNER2&amp;KBID=2466&amp;img=bh_professionalcameras.gif">
    <img src="http://www.bhphotovideo.com/images/affiliateimages/bh_professionalcameras.gif" border="0" /></a><br>
    </center>
    
    <div id="footerarea" class="headerpadding topmargin clearfix">
          <ul class="smalltext">
             <li class="copywrite">', theme_copyright() . get2by2host_copyright(), '</li>
             <li><a href="', $scripturl, '?action=sitemap"><span>', $txt['sitemap'] ,'</span></a></li>
             <li>', '<a href="http://www.ECRTcc.com" target="_blank" class="new_win">BH Mod &copy 2008</a>', '</li>
             <li><a id="button_xhtml" href="http://validator.w3.org/check/referer" target="_blank" class="new_win" title="', $txt['valid_xhtml'], '"><span>XHTML</span></a></li>
             <li><a id="button_rss" href="', $scripturl , '?type=rss;action=.xml" class="new_win"><span>RSS</span></a></li>
             <li class="last"><a id="button_wap2" href="', $scripturl , '?wap2" class="new_win"><span>WAP2</span></a></li>
          </ul>';
    
       // Show the load time?
       if ($context['show_load_time'])
          echo '
          <p class="smalltext" id="show_loadtime">', $txt['page_created'], $context['load_time'], $txt['seconds_with'], $context['load_queries'], $txt['queries'], '</p>';
    
       echo '
       </div>
    </div>';
    }
    
    function template_html_below()
    {
       global $context, $settings, $options, $scripturl, $txt, $modSettings;
    
       echo '
    </div>   <script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/scripts/reflection.js?b4"></script>
    </body></html>';
    }
    
    // Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
    function theme_linktree($force_show = false)
    {
    
       global $modSettings, $txt;
       global $context, $settings, $options, $shown_linktree;
    
       // If linktree is empty, just return - also allow an override.
       if (empty($context['linktree']) || (!empty($context['dont_default_linktree']) && !$force_show))
          return;
    
       if (empty($modSettings['disable_custom_linktree']))
       {
          echo '
          <div style="margin: 0.5em 0 0.5em 0;">
             <fieldset style="padding: 0 0 4px 5px; border: solid 1px #A6A6A6;">
                <legend class="windowbg2" style="padding: 0 2px 0 2px; border: solid #A6A6A6 1px; font-size: 7pt;">', $txt['custom_linktree'], '</legend>';
       }
    
       echo '
       <ul class="linktree"', empty($modSettings['disable_custom_linktree']) ? ' style="margin: 0;"' : '', '>';
    
       // 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'])
          {
             echo '<li>';
             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; </li>';
          }
          echo '
          <li', ($link_num == count($context['linktree']) - 1) ? ' class="last"' : '', '>';
          // 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 $settings['linktree_link'] && isset($tree['url']) ? '
             <a href="' . $tree['url'] . '"><span>' . $tree['name'] . '</span></a>' : '<span>' . $tree['name'] .'</span>';
    
          // 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;', empty($modSettings['disable_custom_linktree']) ? ($settings['linktree_inline'] ? '&#38;#171;&#38;#187;' : '') : ($settings['linktree_inline'] ? '>' : '');
    
          echo !$settings['linktree_inline'] ? '<br />' : '', '
          </li>';
       }
       echo '
       </ul>';
       if (empty($modSettings['disable_custom_linktree']))
       echo '
          </fieldset></div>';
    }
    
    // Show the menu up top. Something like [home] [help] [profile] [logout]...
    function template_menu()
    {
       global $context, $settings, $options, $scripturl, $txt, $modSettings;
    
       echo '
       <div id="main_menu">
          <ul class="clearfix">';
    
       foreach ($context['menu_buttons'] as $act => $button)
       {
          $classes = array();
          if (!empty($button['active_button']))
             $classes[] = 'active';
          if (!empty($button['is_last']))
             $classes[] = 'last';
          $classes = implode(' ', $classes);
    
          echo '
             <li id="button_', $act, '"', !empty($classes) ? ' class="' . $classes . '"' : '', '>
                <a title="', $act, '" href="', $button['href'], '">
                   <span>', ($button['active_button'] ? '<em>' : ''), $button['title'], ($button['active_button'] ? '</em>' : ''), '</span>
                </a>
             </li>';
       /* Begin SMF4iPhone Mod */
       $i++;
       if($i==count($context['menu_buttons'])&&(strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone') !== false ||
    strpos($_SERVER['HTTP_USER_AGENT'], 'iPod') !== false))
    
       echo '
             <li>
                <a title="Switch to iPhone Mode" href="index.php?action=iphone">
                   <span>Switch to iPhone</span>
                </a>
             </li>';
    
       /* End SMF4iPhone Mod */
       }
    
       echo '
          </ul>
       </div>';
    }
    
    // Generate a strip of buttons.
    function template_button_strip($button_strip, $direction = 'top', $custom_td = '')
    {
       global $settings, $context, $txt, $scripturl;
    
       // Create the buttons...
       $buttons = array();
       foreach ($button_strip as $key => $value)
          if (!isset($value['test']) || !empty($context[$value['test']]))
             $buttons[] = '<a href="' . $value['url'] . '"' . (isset($value['active']) ? ' class="active"' : '') . (isset($value['custom']) ? ' ' . $value['custom'] : '') . '><span>' . $txt[$value['text']] . '</span></a>';
    
       if (empty($buttons))
          return '';
    
       // Make the last one, as easy as possible.
       $buttons[count($buttons) - 1] = str_replace('<span>', '<span class="last">', $buttons[count($buttons) - 1]);
    
       echo '
          <div class="buttonlist', $direction != 'top' ? '_bottom' : '', '">
             <ul class="clearfix">
                <li>', implode('</li><li>', $buttons), '</li>
             </ul>
          </div>';
    }
    
    function tlist_bits($element)
    {
    global $txt, $settings, $scripturl;
    
       switch($element)
       {
          case 'container_open':
             $answ = '<table cellspacing="1" border="0" class="tlisttable">';
             break;
          case 'header':
             $answ ='<tr><th><div class="tlisttitleicon"><a name="tl_{JLABEL}">&nbsp;</a></div></th><th>{TITLE}</th></tr>';
             break;
          case 'topic_row':
             {
                $answ = '<tr><td class="tlistcol1"><img class="tlistfirsticon" src="{ICON}" alt="" /></td>';
                $answ .= '<td class="tlistcol2"><a href="'.$scripturl.'?topic={TOPIC_ID}">{TOPIC_TITLE}</a></td></tr>';
                break;
             }
          case 'container_close':
             $answ = '</table>';
             break;
          case 'no_topics':
             {
                $answ = '<tr><td class="tlistcol1"><img class="tlistfirsticon" src="'.$settings['images_url'].'/tlist_spacer.gif" alt="" width="20" /></td>';
                $answ .= '<td class="tlistcol2">-</td></tr>';
                break;
             }
          case 'index_container_open':
             $answ = '<div class="tlistindex">'.$txt['jump_to'];
             break;
          case 'index_bit':
             $answ = ' <a href="#tl_{TITLE}">{TITLE}</a>';
             break;
          case 'index_container_close':
             $answ = '</div>';
             break;
       }
       return $answ;
    }
    
    ?>

Similar Threads

  1. 1.com/file.php, 2.com/file.php where file.php is hosted on main.com/file.php?
    By zymic in forum Hosting Security and Technology
    Replies: 2
    Last Post: 05-26-2008, 11:41 AM
  2. SMF MultiForums - Run Your Own FREE SMF Forum Host!
    By P-nut in forum Other Offers & Requests
    Replies: 23
    Last Post: 05-12-2006, 07:12 AM
  3. SMF MultiForums - Run Your Own FREE SMF Forum Host!
    By P-nut in forum Other Offers & Requests
    Replies: 11
    Last Post: 03-31-2006, 02:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •