TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 195,856
  • Total Topics: 21,292
  • Online today: 1,096
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 710
  • Total: 710

can't get rid of News-Block?

Started by TauTau, June 22, 2009, 09:10:06 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

TauTau

Hi,

I can't find where to deactivate the News-Block on top of our site (http://www.die-erben-mittelerdes.de). It's currently empty, but there's still the Header. Gotta remove that, need the real estate ;)
That Block usually contains the News from the MainPage Menu. I can't find it under Blocks or anywhere else...

[edit] duh, found it... hardcoded in the theme (or is "toolbar" somewhere to disable?)

Zetan

Hi, it's not a block. It's the Forum News. It's a feature of SMF and some themes utilise it and others don't.

Under Current theme: Show News Fader on board index [  ]

TauTau

Yup, I deactivated it there, but the theme would ignore it... I commented that out in index.template.php


/*   echo '
  <div id="toolbar">
<div id="news">
<h2>', $txt[102], ':</h2>
<p>', $context['random_news_line'], '</p>
</div>
  </div>';
*/


and it was gone. Should I do otherwise?

Zetan

Quote from: TauTau on June 22, 2009, 09:43:10 AM
Yup, I deactivated it there, but the theme would ignore it... I commented that out in index.template.php


and it was gone. Should I do otherwise?


You've done the right thing, and the reason that the theme ignores that the news has been deactivated is because it's not using the same code that the SMF Default theme News Fader uses, which is:

Code (SMF Default theme News Fader) Select


// Show the news fader?  (assuming there are things to show...)
if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))
{
echo '
<table border="0" width="100%" class="tborder" cellspacing="' , ($context['browser']['is_ie'] || $context['browser']['is_opera6']) ? '1' : '0' , '" cellpadding="4" style="margin-bottom: 2ex;">
<tr>
<td class="catbg"> &nbsp;', $txt[102], '</td>
</tr>
<tr>
<td valign="middle" align="center" height="60">';

// Prepare all the javascript settings.
echo '
<div id="smfFadeScroller" style="width: 90%; padding: 2px;"><b>', $context['news_lines'][0], '</b></div>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
// The fading delay (in ms.)
var smfFadeDelay = ', empty($settings['newsfader_time']) ? 5000 : $settings['newsfader_time'], ';
// Fade from... what text color? To which background color?
var smfFadeFrom = {"r": 0, "g": 0, "b": 0}, smfFadeTo = {"r": 255, "g": 255, "b": 255};
// Surround each item with... anything special?
var smfFadeBefore = "<b>", smfFadeAfter = "</b>";

var foreColor, backEl, backColor;

if (typeof(document.getElementById(\'smfFadeScroller\').currentStyle) != "undefined")
{
foreColor = document.getElementById(\'smfFadeScroller\').currentStyle.color.match(/#([\da-f][\da-f])([\da-f][\da-f])([\da-f][\da-f])/);
smfFadeFrom = {"r": parseInt(foreColor[1]), "g": parseInt(foreColor[2]), "b": parseInt(foreColor[3])};

backEl = document.getElementById(\'smfFadeScroller\');
while (backEl.currentStyle.backgroundColor == "transparent" && typeof(backEl.parentNode) != "undefined")
backEl = backEl.parentNode;

backColor = backEl.currentStyle.backgroundColor.match(/#([\da-f][\da-f])([\da-f][\da-f])([\da-f][\da-f])/);
smfFadeTo = {"r": eval("0x" + backColor[1]), "g": eval("0x" + backColor[2]), "b": eval("0x" + backColor[3])};
}
else if (typeof(window.opera) == "undefined" && typeof(document.defaultView) != "undefined")
{
foreColor = document.defaultView.getComputedStyle(document.getElementById(\'smfFadeScroller\'), null).color.match(/rgb\((\d+), (\d+), (\d+)\)/);
smfFadeFrom = {"r": parseInt(foreColor[1]), "g": parseInt(foreColor[2]), "b": parseInt(foreColor[3])};

backEl = document.getElementById(\'smfFadeScroller\');
while (document.defaultView.getComputedStyle(backEl, null).backgroundColor == "transparent" && typeof(backEl.parentNode) != "undefined" && typeof(backEl.parentNode.tagName) != "undefined")
backEl = backEl.parentNode;

backColor = document.defaultView.getComputedStyle(backEl, null).backgroundColor.match(/rgb\((\d+), (\d+), (\d+)\)/);
smfFadeTo = {"r": parseInt(backColor[1]), "g": parseInt(backColor[2]), "b": parseInt(backColor[3])};
}

// List all the lines of the news for display.
var smfFadeContent = new Array(
"', implode('",
"', $context['fader_news_lines']), '"
);
// ]]></script>
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/fader.js"></script>
</td>
</tr>
</table>';
}




Slightly different  :P

This website is proudly hosted on Crocweb Cloud Website Hosting.