News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Unique board images

Started by erlend_sh, July 04, 2007, 04:46:00 PM

Previous topic - Next topic

erlend_sh

Note: Ye I've done a search and I found a few similar threads regarding this topic, but I found them all to be not that precise nor clear in their request.

I would like the ability to add a unique icon for every board. The reason I want this to be made as a default feature instead of just a mod is because I can imagine there would easily be problems with custom themes when installing the mod. I think everything would go much more smoothly if this became a default for all themes, and an in-built feature for every SMF installation.

As an example of what I'm talking about, you can have a look at this site, powered by IPB.

A seperate icon for each board helps make it much more unique, and I believe it's a feature that should be available to all users, even the non-technical ones, meaning it should be done via forumsettings, not via the stylesheets.

Edit: I'd just like to mention that I also support this request for a similar way of making unique icons for each board.

shadow82x

Colin B
Former Spammer, Customize, & Support Team Member

erlend_sh

From what I can see there, that mod is only compatible with a very few select themes. I don't think I'll bother (or risk) installing that on my forum. It doesn't say if it's compatible with 1.1.3 either, but I guess most 1.1.2 mods are right?

Anyways, I'm suggesting this as a default feature because I think it should be an easy task for any theme, seeing as it's a small visible change, yet with big potential.

I also stumbled upon this in the sticky of this board: "One of the design goals for SMF is not to be bloatware, but rather to be sleek and easily extendable."
Now, wouldn't a feature such as this add even more extendability to both SMF in general as well as all of its themes? I realize that this would require all theme makers to design their themes with this feature in mind, but this would just be one among many other factors they have to take in consideration already wouldn't it?

It could even add some more options to themedesigns that the designers might appreciate. Like, they could include several custom options for category pics themselves, that fit nicely with their theme.

falguni1

i too agree that there should be unique icon for each board

erlend_sh

I just noticed this site, and it says that it's using SMF 2.0 alpha. And it's using unique gallery images! So, is this an actual feature in 2.0, or has this developer done exclusively for his own theme/site?..

Gary

#5
In reference to the PM and the above post. No, the unique board icons are not part of 2.0. It is something I coded into the forum myself.  Along with quite a few other things.

You can use this mod since it'll work on 1.1.3 no worries. Or you can do the same thing I did and in BoardIndex.template.php find

// 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], '" />';
// 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], '" />';
// No new posts at all! The agony!!
else
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" />';


and replace it with:


if ($board['new'])
echo '<img src="', $settings['images_url'], '/special/new' , $board['id'] ,'.png" 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'], '/special/child' , $board['id'] ,'.png" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
// No new posts at all!  The agony!!
else
echo '<img src="', $settings['images_url'], '/special/old' , $board['id'] ,'.png" alt="', $txt[334], '" title="', $txt[334], '" border="0" />';


and place the images as on1.png, con10.png, off35.png etc where 1, 10, and 35 are the board ID numbers. Also place them in a /special directory inside of your images directory.

-ALM

PS. I'm not a developer, I'm a doc writer. :P
Gary M. Gadsdon
Do NOT PM me unless I say so
War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

falguni1

ok but it should be a part of the new SMF

shadow82x

Quote from: falguni1 on July 20, 2007, 10:28:43 AM
ok but it should be a part of the new SMF
I don't think so. Why need it if people wont use it. I would like it to remain a mod.
Colin B
Former Spammer, Customize, & Support Team Member

Gary

I think it was discussed to become default in 2.0. But I think it was turned down or something. I'unno, I dont remember stuff too good.

<blinks out of sync> ;)

-ALM
Gary M. Gadsdon
Do NOT PM me unless I say so
War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

erlend_sh

Quote from: ALM on July 20, 2007, 09:47:52 AM(...) You can use this mod since it'll work on 1.1.3 no worries. Or you can do the same thing I did and in BoardIndex.template.php find (...)
- Both of those methods require customly made changes done by the user, hence the reason why I want a default feature for this still stands strong. I need something that will easy to do for any non-technical user. Just a simple upload of a picture and a pick of category/board.

QuotePS. I'm not a developer, I'm a doc writer. :P
- Yes I know, I meant it just in the meaning as "one who develops further upon a system", not necessarily with that status in the crew ;)

Quote from: shadow82x on July 20, 2007, 11:20:24 AM
Quote from: falguni1 on July 20, 2007, 10:28:43 AM
ok but it should be a part of the new SMF
I don't think so. Why need it if people wont use it. I would like it to remain a mod.
- What makes you think people won't use it? People create and download skins all the time to give their forum a more unique appearance, what makes you think they won't appreciate some more options for visual enhancement?

Well, I'm off to Chile to stay there as an exchange student, so I won't be able to actively support this proposition anymore. I just hope that the SMF staff will take it in serious consideration (or reconsider it should they have already dismissed the idea once) before making up their minds.

Thank you for your time,
~ Sadr

DavaMO

Quote from: ALM on July 20, 2007, 09:47:52 AM
Or you can do the same thing I did and in BoardIndex.template.php find

// 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], '" />';
// 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], '" />';
// No new posts at all! The agony!!
else
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" />';


and replace it with:


if ($board['new'])
echo '<img src="', $settings['images_url'], '/special/new' , $board['id'] ,'.png" 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'], '/special/child' , $board['id'] ,'.png" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
// No new posts at all!  The agony!!
else
echo '<img src="', $settings['images_url'], '/special/old' , $board['id'] ,'.png" alt="', $txt[334], '" title="', $txt[334], '" border="0" />';


and place the images as on1.png, con10.png, off35.png etc where 1, 10, and 35 are the board ID numbers. Also place them in a /special directory inside of your images directory.



okey... here...
i try this, but i get some error....

i open BoardIndex.template.php and find this

// 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], '" />';

// 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], '" />';

// No new posts at all! The agony!!

else

echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" />';




and replace with:

      // If the board is new, show a strong indicator.

                if ($board['new'])

echo '<img src="', $settings['images_url'], '/onoff/new' , $board['1'] ,'1_on.gif" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
echo '<img src="', $settings['images_url'], '/onoff/new' , $board['2'] ,'2_on.gif" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
echo '<img src="', $settings['images_url'], '/onoff/new' , $board['3'] ,'3_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'], '/onoff/child' , $board['1'] ,'1_on.gif" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
echo '<img src="', $settings['images_url'], '/onoff/child' , $board['2'] ,'2_on.gif" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
echo '<img src="', $settings['images_url'], '/onoff/child' , $board['3'] ,'3_on.gif" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';

// No new posts at all!  The agony!!

else
echo '<img src="', $settings['images_url'], '/onoff/old' , $board['1'] ,'1_off.gif" alt="', $txt[334], '" title="', $txt[334], '" border="0" />';
echo '<img src="', $settings['images_url'], '/onoff/old' , $board['2'] ,'2_off.gif" alt="', $txt[334], '" title="', $txt[334], '" border="0" />';
echo '<img src="', $settings['images_url'], '/onoff/old' , $board['3'] ,'3_off.gif" alt="', $txt[334], '" title="', $txt[334], '" border="0" />';


                        }


but when i upload a new BoardIndex.template.php i get error:

Parse Error predloška!

Problem u učitavanju /Themes/default/BoardIndex.template.php predloška ili jezične datoteke. Provjerite sintaksu i pokušajte ponovno - zapamtite, jednostavni navodnici (') često moraju biti odvojeni sa kosom crtom (\). Da bi ste pogledali informacije o određenoj PHP pogreški, pokušajte pristupiti datoteci direktno.

Možete i probati osviježiti / refresh ovu stranicu ili koristite standardni predložak.

syntax error, unexpected T_ELSEIF


it's on croatianm but it means something like

parse error template
problem with reading /Themes/default/BoardIndex.template.php template or language file. check sintax and try again - remember (') sometimes must be separete with (\)
syntax error, unexpected T_ELSEIF[

can u please help me? :(

DavaMO


DavaMO

ok..

i did it...

In BoardIndex.template.php

Find:

// 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], '" />';
// 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], '" />';
// No new posts at all! The agony!!
else
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" />';



and replace with:


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



And then upload images into a folder called boards with the names of 1on.gif 1on2.gif 1off.gif for each board changing the 1 to the BOARD_ID of the board which you can find on the end of the URL for that board (index.php?board=1)

www.forum.monitor.ba ;)

fifo

my SMF hxxp:cnt43dh.org [nonactive]

warhonowicz

You can use html in the board name, so all I did was this
<img src="http://www.mmc.uk.com/images/boards/arrow_branch.png">Club Pub Run</img>
where all my images are in a folder on the server and are named in the full board name
Tell me and I will forget
Show me and I might remember
But involve me and I will understand

SMF 2.0.11 with TP 1.2

Gary

Thats for board names, not the icons used to denote if there are new posts in the boards.
Gary M. Gadsdon
Do NOT PM me unless I say so
War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

青山 素子

Quote from: Sadr on July 04, 2007, 05:53:31 PM
I also stumbled upon this in the sticky of this board: "One of the design goals for SMF is not to be bloatware, but rather to be sleek and easily extendable."
Now, wouldn't a feature such as this add even more extendability to both SMF in general as well as all of its themes? I realize that this would require all theme makers to design their themes with this feature in mind, but this would just be one among many other factors they have to take in consideration already wouldn't it?

Yes, I know this post is old, but as a note:

Extensible means that it can be easily customized, not have tons of features. The ability to make a mod that can offer custom icons is a demonstration of extensibility.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


erlend_sh

Hmm, it's been a while since I talked about this, but I think what I was talking about was more freedom for the theme-makers, or theme-settings in general. Like when creating a new theme, this feature should be taken into account, but not necessarily used. A theme-maker could choose to add pre-defined (default) images to boards, like hidden boards, sub-boards etc., or add a batch of images to choose from. The theme-maker could also add things like frames to choose between for the picture added, like a firegraphics, or a classic painting's frame.

adrunkentheory

Excellent Modification!!! This should definitely be added to the list of default features provided by SMF. I had tried the other mods, but this is EXACTLY what I was looking for.

EASIER INSTRUCTIONS: (assumes you've already did the find and replace.)
After you do the find and replace in the BoardIndex.Template.php ...

1.) Create your new Images Directory named 'special'.
/Themes/default/images/special/

2.) Upload the images you want to use to the ' /Themes/default/images/special/ ' and name them accordingly.

EX: For Board ID 9.0 name your images as follows:
old9.png
new9.png
child9.png

It's that easy! Worked like a charm.

NOTE: You can change the directory, and image type by modifying the replaced code. For Example: I changed .png to .gif and changed the 'special' directory to 'cbi' (custom board icons)

Hope that helps.

SMF v1.1.10
Pubstar Network

Advertisement: