Backstage - OOC Forums

Please login or register.

Login with username, password and session length
Advanced search  

News:

That some Minmatar pilots have a tradition of gifting Rodj Blake's corpse to newly-weds?

Author Topic: Seperate Did you know?/Search bar  (Read 2415 times)

Ché Biko

  • Space Buddho-Commu-Nihilist
  • Veteran
  • Offline Offline
  • Posts: 1166
  • I'll face the stars or the abyss.
    • Biko's Backstage Character Thread
Seperate Did you know?/Search bar
« on: 16 Sep 2013, 09:09 »

I quite like the Did you know bar with all the fiction and RP trivia, but I don't like that I have to expand the entire section with my avatar and logged in time et cetera to see it.
I would prefer it if that bar is seperated from the section it is now part of.
Logged
-OOChé

Steffanie Saissore

  • Knight Commander (in training)
  • Omelette
  • Offline Offline
  • Posts: 275
  • Lawful Good Pirate
    • Ebon Rose Forum
Re: Seperate Did you know?/Search bar
« Reply #1 on: 16 Sep 2013, 13:29 »

I believe that that is part of the actual code for SMF; depending on the theme you choose, the "Did you know" will display in different spots.  The site I had been playing around with, in the default theme, it appears to the right of the screen near the top.
Logged
"And if the music stops, there's only the sound of the rain.  All the hope and glory, all the sacrifice in vain.  And if love remains though everything is lost, we will pay the price, but we will not count the cost."

Havohej

  • Friendly Neighborhood Forum Admin
  • Veteran
  • Offline Offline
  • Posts: 1671
  • Ex-convict
    • EWF Digital Consulting
Re: Seperate Did you know?/Search bar
« Reply #2 on: 20 Sep 2013, 06:35 »

Could be changed... given access to a faster pc.  Also, :effort:

It's a pita, so without either overwhelming support for the request or a billion ISK, I probably won't do it.   Maybe Misan?  vOv
Logged

Twitter
This is a forum on steroids tbh. The rate at which content worth reading is being generated could get you pregnant.

Niraia

  • Clonejack
  • Offline Offline
  • Posts: 24
Re: Seperate Did you know?/Search bar
« Reply #3 on: 20 Sep 2013, 11:49 »

Had a few mins to spare, enjoy!

In /Themes/backnblack205/index.template.php:

1. Delete the following:
Code: [Select]
echo '
<div id="news_section" class="titlebg2 clearfix"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
<form class="floatright" id="search_form" action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
<a href="', $scripturl, '?action=search;advanced" title="', $txt['search_advanced'], '"><img id="advsearch" src="'.$settings['images_url'].'/filter.gif" align="middle" alt="', $txt['search_advanced'], '" /></a>
<input type="text" name="search" value="" style="width: 140px;" class="input_text" />&nbsp;
<input type="submit" name="submit" value="', $txt['search'], '" style="width: 11ex;" 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 '
<div id="random_news"><h3>', $txt['news'], ':</h3><p>', $context['random_news_line'], '</p></div>';

2. Immediately below where you deleted this, you'll see two closing div tags being echoed. Remove one of them.

3. Add the following directly below that echo.
Code: [Select]
echo '
<div id="news_section" class="titlebg2 tborder clearfix"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
<form class="floatright" id="search_form" action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
<a href="', $scripturl, '?action=search;advanced" title="', $txt['search_advanced'], '"><img id="advsearch" src="'.$settings['images_url'].'/filter.gif" align="middle" alt="', $txt['search_advanced'], '" /></a>
<input type="text" name="search" value="" style="width: 140px;" class="input_text" />&nbsp;
<input type="submit" name="submit" value="', $txt['search'], '" style="width: 11ex;" 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 '
<div id="random_news"><h3>', $txt['news'], ':</h3><p>', $context['random_news_line'], '</p></div>';
echo '</div>';

4. Right below where you pasted that, you'll see some javascript. In the "aSwappableContainers" array, remove "news_section", so this :
Code: [Select]
aSwappableContainers: [
\'user_section\',
\'news_section\'
],
Becomes this:
Code: [Select]
aSwappableContainers: [
\'user_section\'
],
« Last Edit: 20 Sep 2013, 11:54 by Niraia »
Logged