TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 206
  • Total: 206

Trying to change banner

Started by Takeelah, October 17, 2009, 05:05:08 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Takeelah

with no luck.. here is what i tried:

// 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 = ', empty($options['collapse_header']) ? 'false' : 'true', ';

      function shrinkHeader(mode)
      {';

   // Guests don't have theme options!!
   if ($context['user']['is_guest'])
      echo '
         document.cookie = "upshrink=" + (mode ? 1 : 0);';
   else
      echo '
         smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "', $context['session_id'], '");';

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

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

         current_header = mode;
      }
   // ]]></script>';

   // the routine for the info center upshrink
   echo '
      <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
         var current_header_ic = ', empty($options['collapse_header_ic']) ? 'false' : 'true', ';

         function shrinkHeaderIC(mode)
         {';

   if ($context['user']['is_guest'])
      echo '
            document.cookie = "upshrinkIC=" + (mode ? 1 : 0);';
   else
      echo '
            smf_setThemeOption("collapse_header_ic", mode ? 1 : 0, null, "', $context['session_id'], '");';

   echo '
            document.getElementById("upshrink_ic").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");

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

            current_header_ic = mode;
         }
      // ]]></script>
<script type="text/javascript"
src="http://www.wardb.com/js/exguilds.js"></script>
</head>
<body>';
   echo '
         <div align="center"/>
       <div id="widthControl"/>
     <div id="topside-l">
   <div id="topside-r">

      <div id="navbar" style="text-align: center;">', template_menu(), '</div>
  <div id="header_bg">
     <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td class="header_bg"><a href="', $scripturl, '"><img src="http://i105.photobucket.com/albums/m206/Takeelah/Project20199920Banner1.jpg">, $settings['images_url'], '/basic.png" style="float:left; margin-left: 0px; margin-bottom: 0px;" border="0" alt="', $context['forum_name'], '" /></a></td>
     </tr>
  </table>';

   // The main content should go here.
   echo '
<div align="center">
   <div class="page" style="width:100%; text-align:left">
      <div style="padding:0px 0px 0px 0px" align="left"><br />
<table class="tborder" cellpadding="1" 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">';
   if ($context['user']['is_logged'])
   {
    echo '<b>', $txt['hello_member_ndt'], ' ', $context['user']['name'], '</b><br />';

      // Only tell them about their messages if they can read their messages!
      if ($context['allow_pm'])
         echo $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a>', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'] , '.<br />';
   echo '
         <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 />';

   }

      echo '
      </div></td>
   </tr>
</table><br />';
}


Thanks in advance!

IchBin

Would be nice if you would provide some info. Like what is the image you are trying to put in the code? What did you try? Why not post the code you changed, instead of the whole index.template.php file? Would probably help if you told what theme this is too, as it's most likely already been done if it's one of our themes.

Takeelah

I didn't post the whole index just a part of it where I changed the banner. But here is the part of that that I changed to make it easier:

<td class="header_bg"><a href="', $scripturl, '"><img src="http://i105.photobucket.com/albums/m206/Takeelah/Project20199920Banner1.jpg">, $settings['images_url'], '/basic.png" style="float:left; margin-left: 0px; margin-bottom: 0px;" border="0" alt="', $context['forum_name'], '" /></a></td>
     </tr>
  </table>';


I changed the url address.

IchBin

Try this:
<td class="header_bg"><a href="', $scripturl, '"><img src="http://i105.photobucket.com/albums/m206/Takeelah/Project20199920Banner1.jpg" style="float:left; margin-left: 0px; margin-bottom: 0px;" border="0" alt="', $context['forum_name'], '" /></a></td>
     </tr>
  </table>';

Takeelah

Yes, that worked perfectly! Thank you.  If it isn't too much trouble could you tell me how to center it?

IchBin

<td class="header_bg" align="center"> might do it.

This website is proudly hosted on Crocweb Cloud Website Hosting.