Different themes and graphics for certain boards?

Started by Leto Atreides II, December 17, 2004, 03:03:04 AM

Previous topic - Next topic

Leto Atreides II

I have one theme and set of graphics for most of my board, but for the bottom section of my board I want a different appearance. I switched to the SMF Default Scheme, which was suitable, but the graphic images for denoting forums with new posts and forums with no new posts remain the same as the rest of the board. Is it possible to use a separate set of graphics for one category of boards?

andrea

Yes you can activate board specific themes (admin menu - maintain boards).

Andrea Hubacher
Ex Lead Support Specialist
www.simplemachines.org

Personal Signature:
Most recent work:
10 Aqua Themes for SMF



Leto Atreides II

Quote from: andrea on December 17, 2004, 07:18:31 AMYes you can activate board specific themes (admin menu - maintain boards).
I'm in the Admin menu, but how do I set the theme and graphics for one section without affecting the rest of the board?

[Unknown]

You can create extra themes, and then assign them to specific boards.

Go to Admin -> Manage Boards -> select the board -> scroll down to the bottom.

-[Unknown]

Leto Atreides II

At this point, I'm using the SMF default theme for my 'Open Forums'. However, the graphics used to indicate 'New Posts' or 'No New Posts' are identical to those used in my personalized 'Exterminance1' theme. Is it possible to change these graphics for one set of forums without changing them for the rest of the forum?

Leto Atreides II

Quote from: [Unknown] on December 17, 2004, 01:01:20 PM
You can create extra themes, and then assign them to specific boards.

Go to Admin -> Manage Boards -> select the board -> scroll down to the bottom.

-[Unknown]
When I do that, the only apparent option is to click "(modify)" next to the board name, "Open Forums". Clicking this leads to the following options:
QuoteEdit Category
Order
 
Full name:
This is the name that will be displayed.

Collapsable
Allow users to collapse this category?
... and the option of deleting the category. I'm stumped as to finding a means of modifying the graphics scheme for the board.

scottb

Well here is what you do.

Go to Admin -> Manage Boards -> Click on Modify -> scroll down to the bottom -> Find Board Theme -> Use the drop down menu to select the thems you wish to use on that board

Leto Atreides II

Quote from: scottb on December 21, 2004, 01:42:42 AM
Well here is what you do.

Go to Admin -> Manage Boards -> Click on Modify -> scroll down to the bottom -> Find Board Theme -> Use the drop down menu to select the thems you wish to use on that board

As I've said previously, I have the SMF Default theme on my Open Forums. As a basic theme, it's satisfactory. However, the images used to indicate 'New Posts' vs. 'No New Posts' are the same as those on the rest of my forum. How can I change it for one category of boards without affecting the rest of the forum?

[Unknown]

In other words, you want to show a different theme for the section of the board index that show a specific board for certain boards.  This will mean some amount of work, I'm afraid.

-[Unknown]

ViSioNaRy

Quote from: Exterminance on December 20, 2004, 08:37:00 PM
At this point, I'm using the SMF default theme for my 'Open Forums'. However, the graphics used to indicate 'New Posts' or 'No New Posts' are identical to those used in my personalized 'Exterminance1' theme. Is it possible to change these graphics for one set of forums without changing them for the rest of the forum?

If you have plenty of space on your server and want to avoid coding. Just make copies of the main theme and name them differently and change that icon in the copy to what you want and then select that theme for the individual board.
ViSioNaRy   ;D

Leto Atreides II

Quote from: [Unknown] on December 21, 2004, 05:09:06 AMIn other words, you want to show a different theme for the section of the board index that show a specific board for certain boards.  This will mean some amount of work, I'm afraid.

-[Unknown]
Can you point me towards: which file, in which folder, would need to be edited to achieve this, and approximately whereabouts in that file I could find where to alter the code to access a different set of images from the chief default images?

Quote from: ViSioNaRy on December 21, 2004, 10:42:28 AMIf you have plenty of space on your server and want to avoid coding. Just make copies of the main theme and name them differently and change that icon in the copy to what you want and then select that theme for the individual board.
The trouble is, as far as I can determine, the images I'm concerned with here are not actually contained within the new theme folders; when Amacythe was giving me instructions, I was uploading new images to replace those in the Default folder. Is the code written in such a way that even if you use a different theme, the images are still retrieved from the default theme folder? That's how it seems to me to work. Though of course I could be confused; adjusting the appearance of my forum has been a complicated process for me.

andrea

For each theme you can say (in the admin menu / theme settings) if the theme is to use the default images or has an own images folder. This is controlled by setting the theme images folder. So if you don't want the theme to use the default images point the theme images folder to the corresponding "images" dir inside the theme folder.

Andrea Hubacher
Ex Lead Support Specialist
www.simplemachines.org

Personal Signature:
Most recent work:
10 Aqua Themes for SMF



[Unknown]

Let me clarify.  I think I understand what he wants to do.  Let's see if I'm right.

Exterminance, you want to have the board index (that's this page which lists all the categories and boards of the forum) show each different board in a different theme.  Not unlike what BabylonKing has done, but even more so.

Is this correct?

If so, you're going to want to modify the BoardIndex.template.php file in the themes you use.  I suggest you do not modify the default, because that will make upgrading difficult.  The area you're looking for is:

echo '
<tr class="windowbg2">
<td class="windowbg" width="6%" align="center" valign="top">';

// If the board is new, show a strong indicator.
if ($board['new'])
echo '<img src="', $settings['images_url'], '/on.gif" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
// This board doesn't have new posts, but its children do.
elseif ($board['children_new'])
echo '<img src="', $settings['images_url'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
// No new posts at all!  The agony!!
else
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" border="0" />';

echo '</td>
<td align="left">
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b><br />
', $board['description'];

// Show the "Moderators: ".  Each has name, href, link, and id. (but we're gonna use link_moderators.)
if (!empty($board['moderators']))
echo '
<div style="padding-top: 1px;" class="smalltext"><i>', count($board['moderators']) == 1 ? $txt[298] : $txt[299], ': ', implode(', ', $board['link_moderators']), '</i></div>';

// Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...)
if (!empty($board['children']))
{
// Sort the links into an array with new boards bold so it can be imploded.
$children = array();
/* Each child in each board's children has:
id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */
foreach ($board['children'] as $child)
{
$child['link'] = '<a href="' . $child['href'] . '" title="' . ($child['new'] ? $txt[333] : $txt[334]) . ' (' . $txt[330] . ': ' . $child['topics'] . ', ' . $txt[21] . ': ' . $child['posts'] . ')">' . $child['name'] . '</a>';
$children[] = $child['new'] ? '<b>' . $child['link'] . '</b>' : $child['link'];
}

echo '
<div style="padding-top: 1px;" class="smalltext"><i>', $txt['parent_boards'], ': ', implode(', ', $children), '</i></div>';
}

// Show some basic information about the number of posts, etc.
echo '
</td>
<td class="windowbg" valign="middle" align="center" style="width: 12ex;"><span class="smalltext">
', $board['posts'], ' ', $txt[21], ' ', $txt['smf88'], '<br />
', $board['topics'],' ', $txt[330], '
</span></td>
<td class="smalltext" valign="middle" width="22%">';

/* The board's and children's 'last_post's have:
time, timestamp (a number that represents the time.), id (of the post), topic (topic id.),
link, href, subject, start (where they should go for the first unread post.),
and member. (which has id, name, link, href, username in it.) */
if (!empty($board['last_post']['id']))
echo '
', $txt[22], ' ', $txt[30], ' ', $board['last_post']['time'], '<br />
', $txt['smf88'], ' ', $board['last_post']['link'], ' ', $txt[525], ' ', $board['last_post']['member']['link'];

echo '
</td>
</tr>';


You'll have to probably use inline styles to get each to look different on the page.  That means not using classes, which is no big deal.

-[Unknown]

Leto Atreides II

Quote from: [Unknown] on December 22, 2004, 07:28:31 AM
Let me clarify.  I think I understand what he wants to do.  Let's see if I'm right.

Exterminance, you want to have the board index (that's this page which lists all the categories and boards of the forum) show each different board in a different theme.  Not unlike what BabylonKing has done, but even more so.

Is this correct?
Almost. But rather than 'even more so' than what BabylonKing has done, I'd say a little less so. My forum has six categories (you'd only see five, the top one is hidden except to certain members). The very last category is my 'Open Forums' board. The top four visible ones I want to remain as is; it is only the Open Forums I wish to change the images for. I want them to share a common set of images, rather than a different one for each individual forum; merely a separate set of images from the rest of the forum categories. What these images are exactly is unimportant for the present, the original default theme images would be perfectly acceptable.

That's PHP code in the BoardIndex.template.php file, isn't it? Hoo boy this is gonna be an adventure, my area of familiarity is strictly HTML.

Thanks for pointing me in the right direction!  :)

Leto Atreides II

Actually, come to think of it, it is not the entire Open Forums I need to change, but of those Open Forums, specifically the SPRA board and its child-forums.

[Unknown]

So, wait, you just want to change the icon?

There are so very many topics about that already ^_^.

http://www.simplemachines.org/community/index.php?topic=7370.0

-[Unknown]

Leto Atreides II

http://www.simplemachines.org/community/index.php?topic=7370.0

While reading that post, I asked this question:

So, where it says: '/on2', in the code, that part of the script goes looking for a .GIF image by that name in the specified folder (images)?

Then I noticed the stickied topic saying that forum was not for asking questions, so I deleted it and post it here now instead.

Thanks for the help, it's beginning to look like the job may be easier than I thought!

[Unknown]

Heh, sorry, I think we just misunderstood what you were looking for.

Yes, the /on2 part tells it to look for .../images/on2.gif.  You could change that, or add the id number to it.

Just remember - on is for a board that has new posts, and on2 is for boards that have children with new posts.

-[Unknown]

thatguy

Glad I read this before attempting to change my theme on my board.
The statements above have not been evaluated by the Food and Drug Administration.
These statements are not intended to diagnose, treat, cure or prevent any disease.

Advertisement: