News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Removing default smflogo

Started by houston, October 12, 2005, 03:31:05 PM

Previous topic - Next topic

houston

I have been trying to remove the smflogo code from the index.template.php file and keep getting parseing errors. Which code do I need to remove. My goal is to replace the logo with the shoutbox in the default theme.

Thanks

Elmacik

this is the whole forum name and logo codes. if you remove it from the original file,
you wont be getting any parse errors.
// This part is the logo and forum name.  You should be able to change this to whatever you want...
echo '
<img src="', $settings['images_url'], '/smflogo.gif" style="width: 250px; float: ', !$context['right_to_left'] ? 'right' : 'left', ';" alt="" />';
if (empty($settings['header_logo_url']))
echo '
<span style="font-family: Georgia, sans-serif; font-size: xx-large;">', $context['forum_name'], '</span>';
else
echo '
<img src="', $settings['header_logo_url'], '" alt="', $context['forum_name'], '" border="0" />';
Home of Elmacik

houston

Quote from: elmacik on October 12, 2005, 03:36:52 PM
this is the whole forum name and logo codes. if you remove it from the original file,
you wont be getting any parse errors.
// This part is the logo and forum name.  You should be able to change this to whatever you want...
echo '
<img src="', $settings['images_url'], '/smflogo.gif" style="width: 250px; float: ', !$context['right_to_left'] ? 'right' : 'left', ';" alt="" />';
if (empty($settings['header_logo_url']))
echo '
<span style="font-family: Georgia, sans-serif; font-size: xx-large;">', $context['forum_name'], '</span>';
else
echo '
<img src="', $settings['header_logo_url'], '" alt="', $context['forum_name'], '" border="0" />';


That would remove the forum name which I have replaced with my own banner. All I want to remove is the code for the default logo and replace it with the code for the shoutbox. Thanks for your quick response.

Elmacik

then replace this code with yours:
echo '
<img src="', $settings['images_url'], '/smflogo.gif" style="width: 250px; float: ', !$context['right_to_left'] ? 'right' : 'left', ';" alt="" />';

and dont forget to echo your codes before you put there
i mean you have to use a structure like this:
echo '     your codes    ';
Home of Elmacik

houston


houston

It did not work. This is what I get when I refresh my forum page.

Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in .../Themes/default/index.template.php on line 153

144:          <tr>
145:             <td colspan="2" valign="bottom" style="padding: 5px; white-space: nowrap;">';
146:
147:    // This part is the logo

Elmacik

can you please send the codes you want to put there?
or the whole file which gives the error ?
Home of Elmacik

houston

Here it is.

// This part is the logo and forum name.  You should be able to change this to whatever you want...
   echo '
               <img src="', $settings['images_url'], '/smflogo.gif" style="width: 250px; float: ', !$context['right_to_left'] ? 'right' : 'left', ';" alt="" />';
   if (empty($settings['header_logo_url']))
      echo '
               <span style="font-family: Georgia, sans-serif; font-size: xx-large;"><img src="', $settings['images_url'], '/Banner3.gif" style="width: 450px; border="0"></span>';
   else
      echo '
               <img src="', $settings['header_logo_url'], '" alt="', $context['forum_name'], '" border="0" />';
      
      
   echo '
            </td>

This is what I would like to replace the forum logo with.

// The "Shout " box.
   if (function_exists('smfshout'))
  smfshout();

   echo '

Elmacik

in my opinion, you should firstly change your index.template.php with an original one and
find this:
echo '
<img src="', $settings['images_url'], '/smflogo.gif" style="width: 250px; float: ', !$context['right_to_left'] ? 'right' : 'left', ';" alt="" />';

and replace with this:
// The "Shout " box.
   if (function_exists('smfshout'))
  smfshout();

this is the error:
you are removing the end of an echo and putting an extra echo start.
Home of Elmacik

houston

Thanks I will give that at try as well. But I need to go offline right now. Thanks for your advice.

;)

houston

Was able to get it to work by inserting this code.

';
if (function_exists('smfshout'))
  smfshout();
echo '

Over top of this code

echo '
               <img src="', $settings['images_url'], '/smflogo.gif" style="width: 250px; float: ', !$context['right_to_left'] ? 'right' : 'left', ';" alt="" />';

But it puts the shoutbox right at the top of the page and pushes everything down.

Advertisement: