Advertisement:

Author Topic: How to Change Title / Logo part in Default theme  (Read 154974 times)

Offline Ivan Minic

  • Full Member
  • ***
  • Posts: 513
  • Gender: Male
  • Owner: www.Burek.com
    • Burek Forum
How to Change Title / Logo part in Default theme
« on: August 01, 2005, 08:42:20 AM »
I see some people need help with this, so, here is a little tutorial.

Open /Themes/default/index.template.php

Part 1: Kill logo

Find:
Code: [Select]
// 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" width="250" style="float: right;" alt="" />
<span style="font-family: Georgia, sans-serif; font-size: xx-large;">', $context['forum_name'], '</span>';
Replace
Code: [Select]
// This part is the logo and forum name.  You should be able to change this to whatever you want...
echo '
<span style="font-family: Georgia, sans-serif; font-size: xx-large;">', $context['forum_name'], '</span>'


Part 2: Change color of title:

Find:
Code: [Select]
// 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" width="250" style="float: right;" alt="" />
<span style="font-family: Georgia, sans-serif; font-size: xx-large;">', $context['forum_name'], '</span>';
Replace
Code: [Select]
// This part is the logo and forum name.  You should be able to change this to whatever you want...
echo '
<span style="font-family: Georgia, sans-serif; font-size: xx-large;"><font color="#FF0000">', $context['forum_name'], '</font></span>';
This example is with Red
My suggestion is to use colors from Few colors that look very nice with SMF default template
Part 3: Center title:

Find:
Code: [Select]
// 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" width="250" style="float: right;" alt="" />
<span style="font-family: Georgia, sans-serif; font-size: xx-large;">', $context['forum_name'], '</span>';
Replace
Code: [Select]
// This part is the logo and forum name.  You should be able to change this to whatever you want...
echo '
<center><span style="font-family: Georgia, sans-serif; font-size: xx-large;">', $context['forum_name'], '</span></center>';


Offline tunedmagazine

  • Newbie
  • *
  • Posts: 7
Re: How to Change Title / Logo part in Default theme
« Reply #1 on: September 12, 2005, 04:04:48 PM »
i must really be doing sumtin wrong because i keep getting this white screen that pops up saying server error..what did i do if that happends??

Offline xenovanis

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,988
  • Gender: Female
Re: How to Change Title / Logo part in Default theme
« Reply #2 on: September 12, 2005, 04:05:42 PM »
i must really be doing sumtin wrong because i keep getting this white screen that pops up saying server error..what did i do if that happends??

A wild guess, but try this:

Having problems with mod_security?
"Insanity: doing the same thing over and over again and expecting different results."

Offline dtm.exe

  • SMF Hero
  • ******
  • Posts: 5,465
Re: How to Change Title / Logo part in Default theme
« Reply #3 on: September 12, 2005, 04:06:06 PM »
i must really be doing sumtin wrong because i keep getting this white screen that pops up saying server error..what did i do if that happends??

Server error or parse error?

Offline JayBachatero

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,562
  • Gender: Male
    • @jaycreations on Twitter
    • JayBachatero.com
Re: How to Change Title / Logo part in Default theme
« Reply #4 on: September 12, 2005, 04:06:08 PM »
What error do you get?
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Offline tunedmagazine

  • Newbie
  • *
  • Posts: 7
Re: How to Change Title / Logo part in Default theme
« Reply #5 on: September 14, 2005, 12:53:00 PM »
i keep getting the server error....??

Offline nokonium

  • Full Member
  • ***
  • Posts: 680
  • Gender: Male
  • TinyPortal Support Team
    • Our-Local
Re: How to Change Title / Logo part in Default theme
« Reply #6 on: September 14, 2005, 01:36:20 PM »
i keep getting the server error....??

Try tipping the waitress  ;)



Offline tunedmagazine

  • Newbie
  • *
  • Posts: 7
Re: How to Change Title / Logo part in Default theme
« Reply #7 on: September 15, 2005, 11:11:37 AM »
haha for real though..whats that mean..servor error

Offline xenovanis

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,988
  • Gender: Female
Re: How to Change Title / Logo part in Default theme
« Reply #8 on: September 15, 2005, 11:14:48 AM »
"Insanity: doing the same thing over and over again and expecting different results."

Offline abhikumar

  • Newbie
  • *
  • Posts: 1
Re: How to Change Title / Logo part in Default theme
« Reply #9 on: September 24, 2005, 07:01:21 AM »
i am facing some diffrent i try to make some chaneges in \Themes\default\index.template.php
for modifying top part of forum but its not working at all
even i tried to put error but its not showing any (something likke deleting ; )
but i guess control is not going there or thre may be some caching problem can anyone help me to stop caching and customising top part of this wonderful form
thanks in advance
best regards
AbhiKumar

Bern

  • Guest
Re: How to Change Title / Logo part in Default theme
« Reply #10 on: December 18, 2005, 04:40:33 AM »
Hello Ivan,
this didn't really help me. I changed the logo already, but would like to have it sanned over the entire page width and centered.
How do I do this?

Offline Confusimo

  • Jr. Member
  • **
  • Posts: 311
    • Teenlounge
Re: How to Change Title / Logo part in Default theme
« Reply #11 on: December 25, 2005, 09:10:04 PM »
I already have no logo, just a title.  But I tried  the first part to kill the title anyway.

I got the parse error.  I found the problem.  You say look for    blahbla...   '</span>';

and replace with     '</span>'

so you left out the ; symbol at the end od '</span>'

After adding ; it worked.

Thanks,
Confusimo

Offline clemenzo

  • Jr. Member
  • **
  • Posts: 117
  • Gender: Male
    • Voixbox.com
Re: How to Change Title / Logo part in Default theme
« Reply #12 on: February 18, 2006, 10:34:04 PM »
How can I add a banner into the blank space in the header of the 1.1RC2 default theme beside the 3 lines:

Show unread posts since last visit.
Show new replies to your posts.
Total time logged in: x hours and y minutes.

Offline Vinspire

  • Sr. Member
  • ****
  • Posts: 852
  • Gender: Male
    • The Box Of Heart Forum
Re: How to Change Title / Logo part in Default theme
« Reply #13 on: May 10, 2006, 04:55:35 AM »
Is this the same codes for SMF 1.1 RC 2 ?

Offline higherauthority

  • Jr. Member
  • **
  • Posts: 268
  • Gender: Male
    • Midwest Airsofters
Re: How to Change Title / Logo part in Default theme
« Reply #14 on: May 30, 2006, 05:56:22 PM »
I did this   find the above code and delete everything before up to the </td> bla bla bla   so it looks like this

Code: [Select]
// This part is the logo and forum name.  You should be able to change this to whatever you want...
echo '

</td>
</tr>
<tr id="upshrinkHeader"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
<td valign="top">
<div class="headertitles" style="margin-right: 5px; position: relative;"><img src="', $settings['images_url'], '/blank.gif" height="12" alt="" /></div>
<div class="headerbodies" style="position: relative; margin-right: 5px; background-image: url(', $settings['images_url'], '/box_bg.gif);">

This will get rid of the logo and the Forum name then you can insert your logo

insert this for a logo with a hyperlink
Code: [Select]

echo '
<center><a href="http://www.your domain name.com/"><img border="0" src="', $settings['images_url'], '/yourlogo.gif" width="500" style="float: center;" alt="" /></center>';

upload your logo and thats it. 

so the code will look like this when its done

Code: [Select]
// This part is the logo and forum name.  You should be able to change this to whatever you want...

echo '
<center><a href="http://www.yourdomain.com/"><img border="0" src="', $settings['images_url'], '/yourlogo.gif" width="500" style="float: center;" alt="" /></center>';
echo '

</td>
</tr>
<tr id="upshrinkHeader"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
<td valign="top">
<div class="headertitles" style="margin-right: 5px; position: relative;"><img src="', $settings['images_url'], '/blank.gif" height="12" alt="" /></div>
<div class="headerbodies" style="position: relative; margin-right: 5px; background-image: url(', $settings['images_url'], '/box_bg.gif);">
<img src="', $settings['images_url'], '/', $context['user']['language'], '/userinfo.gif" style="position: absolute; left: ', $context['browser']['is_ie5'] || $context['browser']['is_ie4'] ? '0' : '-1px', '; top: -16px; clear: both;" alt="" />
<table width="99%" cellpadding="0" cellspacing="5" border="0"><tr>';

if (!empty($context['user']['avatar']))
echo '<td valign="middle">', $context['user']['avatar']['image'], '</td>';

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

// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
', $txt['hello_member'], ' <b>', $context['user']['name'], '</b>';

// 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'];
echo '.<br />';


I am not an expert but this seemed to work using 1.1RC2
« Last Edit: May 30, 2006, 06:50:44 PM by higherauthority »

Offline BabylonianK

  • Newbie
  • *
  • Posts: 9
Re: How to Change Title / Logo part in Default theme
« Reply #15 on: June 08, 2007, 04:13:21 AM »
^thanks

Offline RiderRaghav

  • Semi-Newbie
  • *
  • Posts: 67
Re: How to Change Title / Logo part in Default theme
« Reply #16 on: June 30, 2007, 04:48:30 PM »
I did this   find the above code and delete everything before up to the </td> bla bla bla   so it looks like this

Code: [Select]
// This part is the logo and forum name.  You should be able to change this to whatever you want...
echo '

</td>
</tr>
<tr id="upshrinkHeader"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
<td valign="top">
<div class="headertitles" style="margin-right: 5px; position: relative;"><img src="', $settings['images_url'], '/blank.gif" height="12" alt="" /></div>
<div class="headerbodies" style="position: relative; margin-right: 5px; background-image: url(', $settings['images_url'], '/box_bg.gif);">

This will get rid of the logo and the Forum name then you can insert your logo

insert this for a logo with a hyperlink
Code: [Select]

echo '
<center><a href="http://www.your domain name.com/"><img border="0" src="', $settings['images_url'], '/yourlogo.gif" width="500" style="float: center;" alt="" /></center>';

upload your logo and thats it. 

so the code will look like this when its done

Code: [Select]
// This part is the logo and forum name.  You should be able to change this to whatever you want...

echo '
<center><a href="http://www.yourdomain.com/"><img border="0" src="', $settings['images_url'], '/yourlogo.gif" width="500" style="float: center;" alt="" /></center>';
echo '

</td>
</tr>
<tr id="upshrinkHeader"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
<td valign="top">
<div class="headertitles" style="margin-right: 5px; position: relative;"><img src="', $settings['images_url'], '/blank.gif" height="12" alt="" /></div>
<div class="headerbodies" style="position: relative; margin-right: 5px; background-image: url(', $settings['images_url'], '/box_bg.gif);">
<img src="', $settings['images_url'], '/', $context['user']['language'], '/userinfo.gif" style="position: absolute; left: ', $context['browser']['is_ie5'] || $context['browser']['is_ie4'] ? '0' : '-1px', '; top: -16px; clear: both;" alt="" />
<table width="99%" cellpadding="0" cellspacing="5" border="0"><tr>';

if (!empty($context['user']['avatar']))
echo '<td valign="middle">', $context['user']['avatar']['image'], '</td>';

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

// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
', $txt['hello_member'], ' <b>', $context['user']['name'], '</b>';

// 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'];
echo '.<br />';


I am not an expert but this seemed to work using 1.1RC2

thanks man......
i was not able to make the right script to keep my banner in the center...
i tried ur way and it worked on SMF 1.1.3 :)

Offline olufemo

  • Semi-Newbie
  • *
  • Posts: 83
Re: How to Change Title / Logo part in Default theme
« Reply #17 on: October 26, 2007, 10:46:18 AM »
How do I alter the background color the default theme , SMF 1.14

Offline higherauthority

  • Jr. Member
  • **
  • Posts: 268
  • Gender: Male
    • Midwest Airsofters
Re: How to Change Title / Logo part in Default theme
« Reply #18 on: October 27, 2007, 02:56:36 AM »
find the style.css file located in themes\default\

look for

Code: [Select]
/* The main body of the entire forum. */
body
{
background-color: #ffffff;
margin: 0px;
padding: 12px 30px 4px 30px;

Alter FFFFFF to whatever color you want

Color lists can be found here  http://www.w3schools.com/html/html_colors.asp

Offline harmoni

  • Semi-Newbie
  • *
  • Posts: 22
Re: How to Change Title / Logo part in Default theme
« Reply #19 on: November 11, 2007, 10:33:01 PM »
logo in table...edit index.template.php

</head>
<body>';
//----------my addition
    echo '
   <div align="center">
   <table id="widthConrol" cellpadding="0" cellspacing="0" border="0">
   <tr> <td>
   <img src=/mylogo.gif></td></tr>
   </table> </div>';
//----------end my edition

// change width to 100% if you it fluid