Putting section back in admin

Started by Deezel, February 08, 2011, 08:56:17 AM

Previous topic - Next topic

Deezel

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.

Joker™

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.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Deezel

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

Joker™

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.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Deezel

Thanks Joker, I will give it a go shortly and post back.

Deezel

Worked like a charm sir... I thank you very much.

Joker™

Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Deezel

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.


Joker™

Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Deezel

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

Joker™

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 ;).
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Deezel

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.

Joker™

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.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Deezel

Cheers man, and thanks a bunch!!!!

Joker™

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.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Deezel

You da man.
Thanks for all your help Joker.

Deezel

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?

Joker™

See this code in your theme index.css

div#wrapper
{
width: 960px;
margin: 0 auto;
padding: 0;
}


in width make it

width: 70%;
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Deezel

I forgot to thank you once again Joker. You da man!!!!

Advertisement: