Author Topic: How to make NewsBox bigger  (Read 8392 times)

Offline victor

  • Administrator
  • Hero Member
  • *****
  • Posts: 1411
  • Karma: 18
How to make NewsBox bigger
« on: September 29, 2006, 01:08:53 PM »
Hi, guys,

does anyone have an idea how to make Newsbox bigger?

I added Pavel's announcement about Wiki into announcement box but it is soooooooo small!
I looked at smf but could not find a way to make USERINFO smaller and NEWSBOX bigger.

Does anyone know how to do it?
Vic

Offline sy278

  • Jr. Member
  • **
  • Posts: 72
  • Karma: 1
Re: How to make NewsBox bigger
« Reply #1 on: October 10, 2006, 11:40:31 PM »
Its in one of the template files mate, you need to change the height of the table, but this would make it that size for ALL news items.


Its here:

Themes\default\BoardIndex.template.php

And you need to edit this line:


   
Code: [Select]
<td valign="middle" align="center" height="60">';

to change the height of the box just change the value of 60 in quotes after height=


Hope this helps.

« Last Edit: October 10, 2006, 11:53:24 PM by sy278 »

Offline sy278

  • Jr. Member
  • **
  • Posts: 72
  • Karma: 1
Re: How to make NewsBox bigger
« Reply #2 on: October 10, 2006, 11:56:52 PM »
Hold on a second, are you talking about the main news box on the forum, or the stupid wee one at the top right of the page?



If so, in Themes\default\ndex.template.php - find this:


Code: [Select]
<td width="262" style="padding-left: 5px;" valign="top">';

// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<div class="headertitles" style="width: 260px;"><img src="', $settings['images_url'], '/blank.gif" height="12" alt="" /></div>
<div class="headerbodies" style="width: 260px; position: relative; background-image: url(', $settings['images_url'], '/box_bg.gif); margin-bottom: 8px;">
<img src="', $settings['images_url'], '/', $context['user']['language'], '/newsbox.gif" style="position: absolute; left: -1px; top: -16px;" alt="" />
<div style="height: 50px; overflow: auto; padding: 5px;" class="smalltext">', $context['random_news_line'], '</div>
</div>';

// The "key stats" box.
echo '
<div class="headertitles" style="width: 260px;"><img src="', $settings['images_url'], '/blank.gif" height="12" alt="" /></div>
<div class="headerbodies" style="width: 260px; position: relative; background-image: url(', $settings['images_url'], '/box_bg.gif);">
<img src="', $settings['images_url'], '/', $context['user']['language'], '/keystats.gif" style="position: absolute; left: -1px; top: -16px;" alt="" />
<div style="height: 35px; padding: 5px;" class="smalltext">
<b>', $modSettings['totalMessages'], '</b> ', $txt[95], ' ', $txt['smf88'], ' <b>', $modSettings['totalTopics'], '</b> ', $txt[64], ' ', $txt[525], ' <b>', $modSettings['memberCount'], '</b> ', $txt[19], '<br />
', $txt[656], ': <b> <a href="', $scripturl, '?action=profile;u=', $modSettings['latestMember'], '">', $modSettings['latestRealName'], '</a></b>
</div>


And replace with this:

Code: [Select]
<td width="50%" style="padding-left: 5px;" valign="top">';

// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<div class="headertitles" style="width: 100%;"><img src="', $settings['images_url'], '/blank.gif" height="12" alt="" /></div>
<div class="headerbodies" style="width: 100%; position: relative; background-image: url(', $settings['images_url'], '/box_bg.gif); margin-bottom: 8px;">
<img src="', $settings['images_url'], '/', $context['user']['language'], '/newsbox.gif" style="position: absolute; left: -1px; top: -16px;" alt="" />
<div style="height: 50px; overflow: auto; padding: 5px;" class="smalltext">', $context['random_news_line'], '</div>
</div>';

// The "key stats" box.
echo '
<div class="headertitles" style="width: 100%;"><img src="', $settings['images_url'], '/blank.gif" height="12" alt="" /></div>
<div class="headerbodies" style="width: 100%; position: relative; background-image: url(', $settings['images_url'], '/box_bg.gif);">
<img src="', $settings['images_url'], '/', $context['user']['language'], '/keystats.gif" style="position: absolute; left: -1px; top: -16px;" alt="" />
<div style="height: 35px; padding: 5px;" class="smalltext">
<b>', $modSettings['totalMessages'], '</b> ', $txt[95], ' ', $txt['smf88'], ' <b>', $modSettings['totalTopics'], '</b> ', $txt[64], ' ', $txt[525], ' <b>', $modSettings['memberCount'], '</b> ', $txt[19], '<br />
', $txt[656], ': <b> <a href="', $scripturl, '?action=profile;u=', $modSettings['latestMember'], '">', $modSettings['latestRealName'], '</a></b>
</div>



Also if you change the height value in this line:

Code: [Select]
<div style="height: 50px; overflow: auto; padding: 5px;" class="smalltext">',
this will change the height of the news box, and is line 8 of the code i posted above.
« Last Edit: October 11, 2006, 12:16:51 AM by sy278 »

Offline victor

  • Administrator
  • Hero Member
  • *****
  • Posts: 1411
  • Karma: 18
Re: How to make NewsBox bigger
« Reply #3 on: December 15, 2006, 02:54:32 PM »
Sy,

why do you know all these things?!!!

Offline victor

  • Administrator
  • Hero Member
  • *****
  • Posts: 1411
  • Karma: 18
Re: How to make NewsBox bigger
« Reply #4 on: December 18, 2006, 08:28:39 PM »
Ok, I tried it, and I know why it did not work!!!
I think I owe sy278 a big apology:

default template!!!

We are not using a default template. We are using a Babylon template and even though it would get chat working, the problem is that it make the site look very complicated (the colors) What do you think? Try to test it by going to profile and choosing default template.

It will make my life much easier if I don't have to always cut and paste code into a differnet directory!
Any thoughts?

Offline sy278

  • Jr. Member
  • **
  • Posts: 72
  • Karma: 1
Re: How to make NewsBox bigger
« Reply #5 on: January 04, 2007, 12:34:19 AM »
I'll have a look at it victor, and get back to you.


PS I know these things as I run a couple of websites myself.

Offline sy278

  • Jr. Member
  • **
  • Posts: 72
  • Karma: 1
Re: How to make NewsBox bigger
« Reply #6 on: January 04, 2007, 12:36:33 AM »
personally I think the default theme is much smarter looking, Ill have a look at the changes for this one and if you PM me your email address i'll send you the files.

Offline sy278

  • Jr. Member
  • **
  • Posts: 72
  • Karma: 1
Re: How to make NewsBox bigger
« Reply #7 on: January 04, 2007, 02:20:20 AM »
Sent you a PM about this vic!


SY