Hi guys,
I want to add the section attached back into a custom theme. Any one know what i need to add, and what file to add it to?
SMF 2.0 RC4
Thanks in advance.
Deezel.
Thats a fairly easy job, but before giving you the code I would like to know which theme are you using as even after creating the those columns your theme might not be able to utilize them.
it's called Blue Line... it's a new theme by a friend of mine.
Here is a link to it at my site...... will remove link if not allowed.
hxxp://www.pixelmansion.com/index.php?action=downloads;sa=view;down=27
So here we go (Make backup of all files listed below before modifying them)
We need these file
Themes\<theme you are using>\index.template.php
Themes\<theme you are using>\Settings.php
Themes\<theme you are using>\css\index.css
Now make these modifications
Themes\<theme you are using>\index.template.php
Find:
<div id="bodybg">';
echo '
Replace it with:
<div id="bodybg">';
echo !empty($settings['forum_width']) ? '
<div id="wrapper" style="width: ' . $settings['forum_width'] . '">' : '', '
Find:
echo '
<a href="'.$scripturl.'" title=""><span id="logo"></span></a>';
Replace it with:
echo '
<span id="logo"><a href="', $scripturl, '">', empty($context['header_logo_url_html_safe']) ? $context['forum_name'] : '<img src="' . $context['header_logo_url_html_safe'] . '" alt="' . $context['forum_name'] . '" />', '</a></span>';
Themes\<theme you are using>\css\index.css
Find:#logo {
position: absolute;
top: 5em;
left: 1em;
display: block;
width: 500px;
height: 85px;
cursor: pointer;
background: url(../images/theme/logo.png) no-repeat;
}
Replace it with:
#logo {
position: absolute;
top: 5em;
left: 1em;
display: block;
width: 500px;
height: 85px;
cursor: pointer;
}
Themes\<theme you are using>\Settings.php
Find:
array(
'id' => 'smiley_sets_default',
'label' => $txt['smileys_default_set_for_theme'],
'options' => $context['smiley_sets'],
'type' => 'text',
),
Replace it with:
array(
'id' => 'header_logo_url',
'label' => $txt['header_logo_url'],
'description' => $txt['header_logo_url_desc'],
'type' => 'text',
),
array(
'id' => 'smiley_sets_default',
'label' => $txt['smileys_default_set_for_theme'],
'options' => $context['smiley_sets'],
'type' => 'text',
),
array(
'id' => 'forum_width',
'label' => $txt['forum_width'],
'description' => $txt['forum_width_desc'],
'type' => 'text',
'size' => 8,
),
There is one more field of site slogan, but your theme don't use it at all (in fact most of themes don't use it). That field is used for smf logo shown on the right side in default curve theme.
Do post your feedback here.
Thanks Joker, I will give it a go shortly and post back.
Worked like a charm sir... I thank you very much.
Your welcome.
Hey Joker.... another one.
Everything i can figure out except the index.template.php
It doesn't have the sections you say to find within it.
attached for your viewing pleasure...lol.
Quote from: deezel on February 08, 2011, 11:41:24 AM
hxxp://www.pixelmansion.com/index.php?action=downloads;sa=view;down=27
Can you update the link once again?
PM'd you the link, as this theme is not yet ready and we do not want it out in the public until completed. :-X
Are you sure that this was the theme you have shown me earlier? As the theme I've seen before was color combination of dark blue and black and this one is having completely opposite color combinations.
See you post
Quote from: deezel on February 08, 2011, 11:41:24 AM
it's called Blue Line... it's a new theme by a friend of mine.
And now the theme link you have given me is have theme with different name.
Can you verify these things first that on which theme you want to work on then only I'll be able to help you properly ;).
My apologies mate :-[ . The theme is called Redemption. All the info you gave me earlier works on the first theme i was doing but not on this new one.
Quote from: deezel on February 23, 2011, 11:29:33 AM
My apologies mate :-[ . The theme is called Redemption. All the info you gave me earlier works on the first theme i was doing but not on this new one.
Well tonight I'm bit busy, I'll post the edits here tomorrow morning.
Cheers man, and thanks a bunch!!!!
Make backup of your files before editing them
Themes\<your theme>\index.template.php
Find:
<a href="'.$scripturl.'" title=""></a>
Replace it with:
<a href="', $scripturl, '">', empty($context['header_logo_url_html_safe']) ? $context['forum_name'] : '<img src="' . $context['header_logo_url_html_safe'] . '" alt="' . $context['forum_name'] . '" />', '</a>
Find:
echo '
<div id="wrapper">
Replace it with:
echo !empty($settings['forum_width']) ? '
<div id="wrapper" style="width: ' . $settings['forum_width'] . '">' : '', '
In themes\<your theme>\css\index.css
Find:
#logo a {
position: absolute;
top: 5px;
/* right: 20px; */
display: block;
width: 500px;
height: 80px;
cursor: pointer;
background: url(../images/theme/logo.png) no-repeat;
}
Replace it with:
#logo a {
position: absolute;
top: 5px;
/* right: 20px; */
display: block;
width: 500px;
height: 80px;
cursor: pointer;
}
Just see the edits and you will make out how to implement these options in other themes also.
You da man.
Thanks for all your help Joker.
Okay, say i want to set the forum width as 70% by default, but still leaving the option for admin to change if they want to. Can this be done?
See this code in your theme index.css
div#wrapper
{
width: 960px;
margin: 0 auto;
padding: 0;
}
in width make it
width: 70%;
I forgot to thank you once again Joker. You da man!!!!