Advertisement:

removing the user info and search2

Aloittaja AllanD, toukokuu 10, 2011, 10:38:32 AP

« edellinen - seuraava »

AllanD

How would i go about removing the user info and search in the header area?
Check out this great sites.
KnD Hosting

MrGrumpy

first thing you would do to remove the user info is to give people a bit of information so they are able to help you as we aren't mind readers

what SMF version?
what theme?
what part of the header info do you want removed - avatar? username/welcome? search? news? date?
the possession of knowledge is worthless unless imparted upon others
My Custom Themes
2.0 themes only - I don't do 1.1.x

AllanD

sorry the theme is curve on 2.o rc 5 and i wanted to remove everything in the top part.News, search, user info etc etc...
Check out this great sites.
KnD Hosting

MrGrumpy

Are you planning on using the header space for something else or do you just want to remove the info from that section - reason I ask is that there is a collapse for that section of the theme and if you just want to get rid of the header it would be wise to remove the collapse too as it will be redundant
the possession of knowledge is worthless unless imparted upon others
My Custom Themes
2.0 themes only - I don't do 1.1.x

AllanD

i removed the collapse and the smf logo already.
I 'm try  to make my own theme but i'm not good at coding at all.
so i was hoping to add a banner image after i clear that info out.
Check out this great sites.
KnD Hosting

MrGrumpy

Ah ok, you want to look at changing

Changing this

<div id="upper_section" class="middletext"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
<div class="user">';

// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
if (!empty($context['user']['avatar']))
echo '
<p class="avatar">', $context['user']['avatar']['image'], '</p>';
echo '
<ul class="reset">
<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>
<li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';

// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<li class="notice">', $txt['maintain_mode_on'], '</li>';

// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '
<li>', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=admin;area=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '</li>';

if (!empty($context['open_mod_reports']) && $context['show_open_reports'])
echo '
<li><a href="', $scripturl, '?action=moderate;area=reports">', sprintf($txt['mod_reports_waiting'], $context['open_mod_reports']), '</a></li>';

echo '
<li>', $context['current_time'], '</li>
</ul>';
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
elseif (!empty($context['show_login_bar']))
{
echo '
<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/sha1.js"></script>
<form id="guest_form" action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" ', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<div class="info">', $txt['login_or_register'], '</div>
<input type="text" name="user" size="10" class="input_text" />
<input type="password" name="passwrd" size="10" class="input_password" />
<select name="cookielength">
<option value="60">', $txt['one_hour'], '</option>
<option value="1440">', $txt['one_day'], '</option>
<option value="10080">', $txt['one_week'], '</option>
<option value="43200">', $txt['one_month'], '</option>
<option value="-1" selected="selected">', $txt['forever'], '</option>
</select>
<input type="submit" value="', $txt['login'], '" class="button_submit" /><br />
<div class="info">', $txt['quick_login_dec'], '</div>';

if (!empty($modSettings['enableOpenID']))
echo '
<br /><input type="text" name="openid_identifier" id="openid_url" size="25" class="input_text openid_login" />';

echo '
<input type="hidden" name="hash_passwrd" value="" />
</form>';
}

echo '
</div>
<div class="news normaltext">
<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>';

// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<h2>', $txt['news'], ': </h2>
<p>', $context['random_news_line'], '</p>';

echo '
</div>
</div>
<br class="clear" />';



To


echo'
<div id="upper_section" class="middletext"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>


</div>
<br class="clear" />';



Then if you want to add any other code/banner you want to place it in the gap I've left in the above code block
the possession of knowledge is worthless unless imparted upon others
My Custom Themes
2.0 themes only - I don't do 1.1.x

AllanD

ok so just change these out.Again sorry not thatgood at coding. An i take it that the ? is the where a code/banner would go.
Thank you for helping
Check out this great sites.
KnD Hosting

MrGrumpy


echo'
<div id="upper_section" class="middletext"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>

            ********* Add your banner code in this gap ***********

</div>
<br class="clear" />';
the possession of knowledge is worthless unless imparted upon others
My Custom Themes
2.0 themes only - I don't do 1.1.x

AllanD

Check out this great sites.
KnD Hosting

AllanD

I did what you sad except the banner part and I got a fatal error.
Check out this great sites.
KnD Hosting

Baby Daisy

あなたは私のお尻にキスするとき、私はそれを愛する

AllanD

Check out this great sites.
KnD Hosting

MrGrumpy

If you want attach your index.template.php and i'll remove the code for you in a little while, i'm on laptop at the moment so need to switch to my pc.
the possession of knowledge is worthless unless imparted upon others
My Custom Themes
2.0 themes only - I don't do 1.1.x

AllanD

Check out this great sites.
KnD Hosting

MrGrumpy

the possession of knowledge is worthless unless imparted upon others
My Custom Themes
2.0 themes only - I don't do 1.1.x

AllanD

Check out this great sites.
KnD Hosting

AllanD

Check out this great sites.
KnD Hosting

MrGrumpy

the possession of knowledge is worthless unless imparted upon others
My Custom Themes
2.0 themes only - I don't do 1.1.x

AllanD

Check out this great sites.
KnD Hosting

AllanD

Sorry to ask again but i tried a banner code where you said to put it and it didn't work.
What code should i be using i just wanted to display the banner in the center

Check out this great sites.
KnD Hosting

Advertisement: