Advertisement:

Author Topic: how do I do this?  (Read 2236 times)

Offline hismaimai9999

  • Newbie
  • *
  • Posts: 1
how do I do this?
« on: October 26, 2018, 05:31:32 AM »
I want to move the Welcome X area onto the header like the image below. I'm not sure how to do this.
I also want to remove the upshrink and the search bar from the header.

Offline SychO

  • Lead Customizer
  • Sophist Member
  • *
  • Posts: 1,234
  • Gender: Male
    • SychO9 on GitHub
    • SychO
Re: how do I do this?
« Reply #1 on: October 26, 2018, 05:46:02 AM »
What Image ?

You can remove the upshrink image by removing this from index.template.php (starting from line 181)
Code: [Select]
// the upshrink image, right-floated
echo '
<img id="upshrink" src="', $settings['images_url'], '/upshrink.png" alt="*" title="', $txt['upshrink_description'], '" style="display: none;" />';

And removing (starting from line 278)

Code: [Select]
// Define the upper_section toggle in JavaScript.
echo '
<script type="text/javascript"><!-- // --><![CDATA[
var oMainHeaderToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: ', empty($options['collapse_header']) ? 'false' : 'true', ',
aSwappableContainers: [
\'upper_section\'
],
aSwapImages: [
{
sId: \'upshrink\',
srcExpanded: smf_images_url + \'/upshrink.png\',
altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
srcCollapsed: smf_images_url + \'/upshrink2.png\',
altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
}
],
oThemeOptions: {
bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
sOptionName: \'collapse_header\',
sSessionVar: ', JavaScriptEscape($context['session_var']), ',
sSessionId: ', JavaScriptEscape($context['session_id']), '
},
oCookieOptions: {
bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
sCookieName: \'upshrink\'
}
});
// ]]></script>';

Ans you can remove the search bar by removing (starting from line 251)
Code: [Select]
<form id="search_form" action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
<input type="text" name="search" value="" class="input_text" />&nbsp;
<input type="submit" name="submit" value="', $txt['search'], '" class="button_submit" />
<input type="hidden" name="advanced" value="0" />';

// Search within current topic?
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="topic" value="', $context['current_topic'], '" />';
// If we're on a certain board, limit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd[', $context['current_board'], ']" value="', $context['current_board'], '" />';

echo '</form>

Imazighen