Different Header for different Category/board

Started by santanu, February 13, 2010, 11:45:10 PM

Previous topic - Next topic

santanu

Hi

I am using SMF 1.1.8 and using the theme blackted frm pixelslot.

I want to change the header image of certain catagory/boards.

say when I click a board or a catagory of "Say mangoes" I want header picture to be something relevent to mangoes. overall theme hearder will be mixed fruits etc. similarly if i visit a board for grapes I wnat to use a header with grapes in it.

Please tell me some coding or tricks.


santanu

please help anyone from the customization team

GrassrootsPA

I'm Feeling This!

hcfwesker

I'm new to this, too.  But someone I know says he has a custom made MOD that adds separate headers and footers to different boards, and not just the basic global H/F'er MOD.  Once I get that from him, I'll post it here if I understand it myself.   :P

GrassrootsPA

Thanks hcfwesker!

That mod sounds PERFECT!   ;)

If anyone else has any experience re: a custom headers OR custom images OR custom text depending on what board the reader is on it would be a huge help.
I'm Feeling This!

smp420

This seems simple the only thing I am trying to figure out is what it will do when your not in the category just not show up or show a default picture and where would the picture be.
"Things turn out best for those who make the best of the way things turn out." -Jack Buck

GrassrootsPA

Awesome smp420.

Very impressed by your quick response.  ;D

If you or anyone our there can construct a conditional code that shows a default picture when the user is not in one of the specified forums, that would be fine.

Heck, if you have the code shows no picture when in an unspecified forum that's fine too! (Either way)

Glad to hear you are close to a solution. This would solve like 99% of my problems!
I'm Feeling This!

smp420

I will see what I come up with in the morning it is late here. Where would the picture be if you could show me a screenshot of where you want it that would be great.
"Things turn out best for those who make the best of the way things turn out." -Jack Buck

GrassrootsPA

Oh the code is all I really need. I can simply insert that someplace in the template once that gets nailed down.

Or were you developing a mod?
I'm Feeling This!

smp420

#10
I wasnt planning on making it a mod just trying to make it easier on you but that works
$board = (int) $_REQUEST['board'];
if (!empty($board))
echo '<img src="', $board, '.gif" ALT="">';
else
echo '<img src="default.gif" ALT="">';

Edit- one bug I already found is if you are in a topic it shows the default image. I will look into this in the morning as well as any changes needed for 1.1.x



I decided to try one last thing before I go to sleep and it seems to work this should work with 1.1.x

if (!empty($context['current_board']))
  echo '<img src="brdimg/', $context['current_board'], '.gif" ALT="">';
else
echo '<img src="brdimg/default.gif" ALT="">';


without default image


if (!empty($context['current_board']))
  echo '<img src="brdimg/', $context['current_board'], '.gif" ALT="">';


Make a folder at the root of your forum called brdimg and put the images there.
"Things turn out best for those who make the best of the way things turn out." -Jack Buck

GrassrootsPA

I'm Feeling This!

smp420

The images are the board id .gif you can change gif to whatever you want. I probably should of put thme in a folder. I will update it.
"Things turn out best for those who make the best of the way things turn out." -Jack Buck

Advertisement: