Advertisement:
2by2host

Author Topic: main_block.png  (Read 5758 times)

Offline MovedGoalPosts

  • Jr. Member
  • **
  • Posts: 248
    • nthwgaming
main_block.png
« on: May 07, 2012, 11:51:16 AM »
So I want to change the colour schemes to my default curve forum, probably with a few other layout changes too.

From browsing the index.css file I can see there are numerous things I can change for colours of fonts, backgrounds.  But many of these don't seem to change because of the linked file main_block.png.  Opening that picture just seems to be a load of different shade colours that influence the curve skin.

But what parts of main_block.png are used by what part of the css styles.  It all looks a bit random too me?

If I remove main_block.png, amongst other stuff, the curved corners to most of the SMF blocks disappear.  But the main block.png file seems to be a series of rows, not rounded shapes, so how does that work?

Offline Jade Elizabeth

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,167
  • Gender: Female
  • Keep your enemies close and your friends closer ;)
    • @BunnyRabbitSex on Twitter
    • BunnyRabbitSex
Re: main_block.png
« Reply #1 on: May 07, 2012, 11:53:35 AM »
The way I figure it out is to colour each one a different colour, or make a new layer/copy and change the hues....then you get to see where the images end too :).
Once proud Documentation Writer and Help Squad Leader
I'm for HIRE! | Check out my Fiverr Jobs! | Let's play games on OMGPOP together!


Need More Posts?

Quote
[12:13am] <%Jade> link me
[12:14am] <+orstio> <a href="Jade">link</a>


Offline MovedGoalPosts

  • Jr. Member
  • **
  • Posts: 248
    • nthwgaming
Re: main_block.png
« Reply #2 on: May 07, 2012, 12:34:37 PM »
Thanks, I can see this is not going to be easy :(

Online The Craw

  • Beta Tester
  • Jr. Member
  • *
  • Posts: 390
  • Gender: Male
    • Chinese Raundry
Re: main_block.png
« Reply #3 on: May 07, 2012, 01:18:46 PM »
It's easier than you think. The bars in the image are used as backgrounds for the bars and containers in your forum. As Jade suggested, I would color each one differently to see what they do.
http://chineseraundry.com/

Cool people don't have to brag. If what they're doing is really all that cool, others will see it for what it is without the person dancing around, shouting "Look at how AWESOME I AM!"

Having a good IDE doesn't make you a good programmer, any more than having Photoshop makes you a good artist, or sitting in your garage makes you a Ferrari. People make good tools, but tools don't make good people. :P

Offline MovedGoalPosts

  • Jr. Member
  • **
  • Posts: 248
    • nthwgaming
Re: main_block.png
« Reply #4 on: May 07, 2012, 01:43:35 PM »
So I'm trying to change stuff using GIMP (Can't afford the rip off of photoshop).  I'm probably not using GIMP correctly (latest 2.8 version), but if I manage to open and select one colour strip or area inevitably that is selecting a lot of the rest of the image too.  As a result I can't change individual parts to find out what they might affect.

At this rate I can see my having to create individual images for each linked file in the css :(


Offline Deezel

  • Jr. Member
  • **
  • Posts: 202
  • Gender: Male
  • It Is What It Is
    • Owner/Admin
Re: main_block.png
« Reply #6 on: May 07, 2012, 02:19:01 PM »
if you still need help after checking out ApplianceJunk's post let me know.

Offline MovedGoalPosts

  • Jr. Member
  • **
  • Posts: 248
    • nthwgaming
Re: main_block.png
« Reply #7 on: May 07, 2012, 02:29:12 PM »
Thanks I have looked at Colorize it, but that doesn't seem to be precise enough.  I don't just want to change one colour but am wanting to reskin with some subtle differences between the different areas of the board, i.e table borders, alternating post and poster backgrounds, etc.  I did have a theme I'm trying to work with and build from based on my older vbulletin forum http://web.archive.org/web/20100531060737/http://www.nthwgaming.co.uk/

I suspect I'm coming across as a numpty, but I'm sure it should be simple, I just can't get my head around how the main_block thing is actually called by the forum so that one image can create such a large number of effects.  Simply adding or changing background colors to the various css elements doens't always change the forum appearance as the main_block.png takes precedence.

Offline Old Fossil

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 9,487
  • Gender: Male
  • Fussy Old Sod
    • @mkcommforum on Twitter
Re: main_block.png
« Reply #8 on: May 07, 2012, 02:30:25 PM »
if you still need help after checking out ApplianceJunk's post let me know.
My Forum
Simple Portal Beta Tester
 Mod Emulate
Forum Themes
My Forums Broken Fix

PMs for support will be returned with dynamite attached

Offline Deezel

  • Jr. Member
  • **
  • Posts: 202
  • Gender: Male
  • It Is What It Is
    • Owner/Admin
Re: main_block.png
« Reply #9 on: May 07, 2012, 02:38:01 PM »
have you considered trying one of the many other themes available as opposed to the curve theme? Just curious...
Many of the themes may be easier to change to look more like your old vB skin you mentioned.

Offline MovedGoalPosts

  • Jr. Member
  • **
  • Posts: 248
    • nthwgaming
Re: main_block.png
« Reply #10 on: May 07, 2012, 04:05:12 PM »
Yes I have looked around and tried out a couple of other themes.  But again it comes back to issues with this image file when I wish to make some modifications.

I'm coming to a conclusion that I simply deleted the block and accept my forum will have square edges to all it's corners.  That way I can edit using the css alone.

It just strikes me as really odd that one image can do so much.  Surely specific named images dealing with specific parts would have been so much easier to identify and modify.

Online The Craw

  • Beta Tester
  • Jr. Member
  • *
  • Posts: 390
  • Gender: Male
    • Chinese Raundry
Re: main_block.png
« Reply #11 on: May 07, 2012, 06:03:21 PM »
SMF uses CSS image sprites to select specific areas of that image. The reason for this is that it's slightly faster to load one image file and use it over and over than to load several different images individually. You can change the style of SMF's cat_bars and containers in your theme's index.css file.
http://chineseraundry.com/

Cool people don't have to brag. If what they're doing is really all that cool, others will see it for what it is without the person dancing around, shouting "Look at how AWESOME I AM!"

Having a good IDE doesn't make you a good programmer, any more than having Photoshop makes you a good artist, or sitting in your garage makes you a Ferrari. People make good tools, but tools don't make good people. :P

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 22,046
  • Master of BBC Abuse
Re: main_block.png
« Reply #12 on: May 07, 2012, 06:56:19 PM »
I'm coming to a conclusion that I simply deleted the block and accept my forum will have square edges to all it's corners.  That way I can edit using the css alone.

You can set rounded corners by using css3 border-radius if you're not worried about the corners being square in IE8 or lower. We'll be using this approach in future releases.


Quote
It just strikes me as really odd that one image can do so much.  Surely specific named images dealing with specific parts would have been so much easier to identify and modify.

Not really. It's quite simple once you get your head around it, and it does give performance advantages. Take this:

Code: [Select]
.catbg, .catbg2, tr.catbg td, tr.catbg2 td, tr.catbg th, tr.catbg2 th
{
color: #fff;
font-family: arial, helvetica, sans-serif;
font-size: 1.1em;
font-weight: bold;
background: #a7b9cd url(../images/theme/main_block.png) no-repeat -10px -280px;
}

That's for the darker blue header bars that have square ends. These appear in places like some tables, etc. If you look at the image 280px from the top, you'll see that darker blue bar. That is the part of the image that shows, with the rest being clipped by the edges of the div or tr. The negative X-axis positioning of 10px clips the end of the bar, which of course has the rounded corners on it. Elements that do have rounded corners (like the first_th and last_th table headers) will use the same Y-axis positioning but use 0 or 100% for X-axis positioning.
"My idea of heaven consists of all the things I would go to Hell for."

I need another coding language like I need tertiary syphilis.

Antechinus modzRantyheinous themez - PSD pack for 2.0.x default theme

Offline Old Fossil

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 9,487
  • Gender: Male
  • Fussy Old Sod
    • @mkcommforum on Twitter
Re: main_block.png
« Reply #13 on: May 07, 2012, 07:06:30 PM »
@Ant

Is there anywhere where a theme how to can be found on the forum?

preferably technobabble free.
My Forum
Simple Portal Beta Tester
 Mod Emulate
Forum Themes
My Forums Broken Fix

PMs for support will be returned with dynamite attached

Offline MovedGoalPosts

  • Jr. Member
  • **
  • Posts: 248
    • nthwgaming
Re: main_block.png
« Reply #14 on: May 07, 2012, 07:28:07 PM »
You can set rounded corners by using css3 border-radius if you're not worried about the corners being square in IE8 or lower. We'll be using this approach in future releases.
  That will make sense for the future, but we are stuck with the present as computers are upgraded.  At present I suspect too many people have older browsers that they won't or don't know how to update.  Even myself from my workplace I have to use IE8 as IE has to be used for active-x compatibility and the PC is stuck on Windows XP until replacement.


Quote
It just strikes me as really odd that one image can do so much.  Surely specific named images dealing with specific parts would have been so much easier to identify and modify.

Not really. It's quite simple once you get your head around it, and it does give performance advantages. Take this:

Code: [Select]
.catbg, .catbg2, tr.catbg td, tr.catbg2 td, tr.catbg th, tr.catbg2 th
{
color: #fff;
font-family: arial, helvetica, sans-serif;
font-size: 1.1em;
font-weight: bold;
background: #a7b9cd url(../images/theme/main_block.png) no-repeat -10px -280px;
}

That's for the darker blue header bars that have square ends. These appear in places like some tables, etc. If you look at the image 280px from the top, you'll see that darker blue bar. That is the part of the image that shows, with the rest being clipped by the edges of the div or tr. The negative X-axis positioning of 10px clips the end of the bar, which of course has the rounded corners on it. Elements that do have rounded corners (like the first_th and last_th table headers) will use the same Y-axis positioning but use 0 or 100% for X-axis positioning.

Ah thanks, now a bit of a glimmer of hope in my befuddled brain.  The pixel numbers are actually identifying the bit of the image used.  So the challenge now is identifying the pixel space and getting GIMP to edit just the specfic bits.

Offline MovedGoalPosts

  • Jr. Member
  • **
  • Posts: 248
    • nthwgaming
Re: main_block.png
« Reply #15 on: May 07, 2012, 07:32:46 PM »
SMF uses CSS image sprites to select specific areas of that image. The reason for this is that it's slightly faster to load one image file and use it over and over than to load several different images individually. You can change the style of SMF's cat_bars and containers in your theme's index.css file.

Eureka.  I was not aware of the css image sprites terminology.  With that google has become useful to work out what is actually occuring under the hood.

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 22,046
  • Master of BBC Abuse
Re: main_block.png
« Reply #16 on: May 07, 2012, 07:33:34 PM »
@Ant

Is there anywhere where a theme how to can be found on the forum?

preferably technobabble free.

It's code. That means technobabble, to some extent. :)

The sprites aren't hard to understand if you understand how css positioning works. The numbers in px or % are used to set X-axis and Y-axis positioning. In the case of single images for each bit, those numbers are usually 0 or 100%. In the case of sprites (compound images) they can be set to any required value.

You can also set them to any required value for single images if you want to, for instance if you would rather tweak the position of an icon via css instead of making a new image, but it's not often done in practice.

If you want to do theming you really need to learn at least basic css anyway. There's no way around that. In fact, with the use of non-tabular layout in large parts of 2.0 you really need to know a fair amount of css if you want to change anything substantial.

There are basic theme tutorials but I can't recall how detailed they are or where they are. Not to boast excessively, but it's been quite a while since I needed one so I haven't bothered looking.
"My idea of heaven consists of all the things I would go to Hell for."

I need another coding language like I need tertiary syphilis.

Antechinus modzRantyheinous themez - PSD pack for 2.0.x default theme

Offline MovedGoalPosts

  • Jr. Member
  • **
  • Posts: 248
    • nthwgaming
Re: main_block.png
« Reply #17 on: May 07, 2012, 07:40:39 PM »
Thanks all.  My limited understanding of css had extended to font background positioning images and stuff, but the concept of sprites was new.  That's what happens when you blunder around by trial and error picking things up as you go.  It all makes sense once pointed in the right direction :)

Offline Old Fossil

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 9,487
  • Gender: Male
  • Fussy Old Sod
    • @mkcommforum on Twitter
Re: main_block.png
« Reply #18 on: May 07, 2012, 07:43:17 PM »
Quote
It all makes sense once pointed in the right direction

If you still have any hair left.

 :D
My Forum
Simple Portal Beta Tester
 Mod Emulate
Forum Themes
My Forums Broken Fix

PMs for support will be returned with dynamite attached

Offline MovedGoalPosts

  • Jr. Member
  • **
  • Posts: 248
    • nthwgaming
Re: main_block.png
« Reply #19 on: May 07, 2012, 07:44:51 PM »
Quote
It all makes sense once pointed in the right direction

If you still have any hair left.

 :D

Lost it years ago :(

Offline Old Fossil

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 9,487
  • Gender: Male
  • Fussy Old Sod
    • @mkcommforum on Twitter
Re: main_block.png
« Reply #20 on: May 07, 2012, 07:47:59 PM »
Marking as solved for now.

Ya not nicking my hair.
My Forum
Simple Portal Beta Tester
 Mod Emulate
Forum Themes
My Forums Broken Fix

PMs for support will be returned with dynamite attached

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 22,046
  • Master of BBC Abuse
Re: main_block.png
« Reply #21 on: May 07, 2012, 07:48:51 PM »
That will make sense for the future, but we are stuck with the present as computers are upgraded.  At present I suspect too many people have older browsers that they won't or don't know how to update.  Even myself from my workplace I have to use IE8 as IE has to be used for active-x compatibility and the PC is stuck on Windows XP until replacement.

Usage of IE8 and lower isn't all that high in global terms and is falling all the time. The vast majority of users will get the full effect if you use css3. For minor aesthetic details like rounded corners I wouldn't necessarily worry too much. Often it will still look quite acceptable without them. Use your own judgement. :)


Quote
Ah thanks, now a bit of a glimmer of hope in my befuddled brain.  The pixel numbers are actually identifying the bit of the image used.  So the challenge now is identifying the pixel space and getting GIMP to edit just the specfic bits.

Yup. Unfortunately we don't have a copy of the image in .xcf format. It shouldn't be that hard to make one and we probably should, but me hatez GIMP. :D
"My idea of heaven consists of all the things I would go to Hell for."

I need another coding language like I need tertiary syphilis.

Antechinus modzRantyheinous themez - PSD pack for 2.0.x default theme

Offline MovedGoalPosts

  • Jr. Member
  • **
  • Posts: 248
    • nthwgaming
Re: main_block.png
« Reply #22 on: May 07, 2012, 08:05:23 PM »
That will make sense for the future, but we are stuck with the present as computers are upgraded.  At present I suspect too many people have older browsers that they won't or don't know how to update.  Even myself from my workplace I have to use IE8 as IE has to be used for active-x compatibility and the PC is stuck on Windows XP until replacement.

Usage of IE8 and lower isn't all that high in global terms and is falling all the time. The vast majority of users will get the full effect if you use css3. For minor aesthetic details like rounded corners I wouldn't necessarily worry too much. Often it will still look quite acceptable without them. Use your own judgement. :)

Looks like I haven't got to grips with CSS2, and you want me to do CSS3.  Trying to run before I can walk again.  ???
Quote
Ah thanks, now a bit of a glimmer of hope in my befuddled brain.  The pixel numbers are actually identifying the bit of the image used.  So the challenge now is identifying the pixel space and getting GIMP to edit just the specfic bits.

Yup. Unfortunately we don't have a copy of the image in .xcf format. It shouldn't be that hard to make one and we probably should, but me hatez GIMP. :D

I'm not exactly enamoured with GIMP myself (but that may in part be because I haven't really got into it) but, at the somewhat extortionate pricing of over £650, Photoshop is not going to happen.  Infact, given that SMF is freely licenced with a view for users to adapt edit and enhance, perhaps files it relies upon should be as compatible as practicable with other open source software.   

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 22,046
  • Master of BBC Abuse
Re: main_block.png
« Reply #23 on: May 07, 2012, 08:07:52 PM »
Yes it's a good point about the files. At the moment we only have them in Adobe formats.
"My idea of heaven consists of all the things I would go to Hell for."

I need another coding language like I need tertiary syphilis.

Antechinus modzRantyheinous themez - PSD pack for 2.0.x default theme

Offline Jade Elizabeth

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,167
  • Gender: Female
  • Keep your enemies close and your friends closer ;)
    • @BunnyRabbitSex on Twitter
    • BunnyRabbitSex
Re: main_block.png
« Reply #24 on: May 15, 2012, 12:48:20 AM »
You can get free trials for Photoshop, and I'm pretty certain there are free alternatives that open and edit the files. I think GIMP is one of those.

If you're too lazy to scribble lines of colour over each bar to see where they're used then there's no help for you.
Once proud Documentation Writer and Help Squad Leader
I'm for HIRE! | Check out my Fiverr Jobs! | Let's play games on OMGPOP together!


Need More Posts?

Quote
[12:13am] <%Jade> link me
[12:14am] <+orstio> <a href="Jade">link</a>


Offline MovedGoalPosts

  • Jr. Member
  • **
  • Posts: 248
    • nthwgaming
Re: main_block.png
« Reply #25 on: May 16, 2012, 05:45:37 AM »
If you're too lazy to scribble lines of colour over each bar to see where they're used then there's no help for you.

Thanks for that rather unhelpful comment.  You'll not doubt have read http://www.simplemachines.org/community/index.php?topic=476142.msg3329639#msg3329639 which indicates my knowledge of graphical editing programmes is somewhat limited and was having no success.  You'll also have seen subsequent posts that have indicated that GIMP may not open the file for a full edit.  PhotoShop may offer a free trial, and I may in due course look at that, but is there much point in learning to use software that I am not going to be able to afford to keep, and will the trial version create fully useable files - many trial software leaves watermarks or suchlike?).

The most helpful advice is that which lead me to understand the concept of image sprites and indeed does identify which part of the image is used for what.  The suggestion that CSS3 is a way forward to style with less use of the image, is the direction I will however be pursuing, as the vast majority of my forum's users, being computer gamers, have current kit, which will be running modern CSS3 compatible browsers.

Offline Jade Elizabeth

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,167
  • Gender: Female
  • Keep your enemies close and your friends closer ;)
    • @BunnyRabbitSex on Twitter
    • BunnyRabbitSex
Re: main_block.png
« Reply #26 on: May 19, 2012, 07:33:13 AM »
It wasnt unhelpful, you wanted to know where the images displayed....you can just open the png file in paint and scribble over the bars in different colours and then upload it and look for each colour :). There are HEAPS of programs that open PSD files, and GIMP opens them fine, or it does for me.

http://www.raymond.cc/blog/how-to-open-psd-extension-files-without-installing-adobe-photoshop/

My comment was not unhelpful, just scribble on each of the thingies with a different colour and then save and look around your forum and make note of where each one goes. Which was my original suggestion - and would surely have solved your problem?


On cost I can understand that. Photoshop is also announcing (or maybe already announced) their new suite is going to be $50 a month, which when worked out saves you over $1000...while that's savings I cannot afford that. If you're a student you can get it for about $150 or so....If you're a student google "student software". They have massive discounts in all major countries because they wanted to stop students pirating the software (another option for you). I bought Design Premium for $435 or something. And I'm using a trial for Lightroom which I wish came with it because it's flippin fantastic! lol


If you want help with sprites (I lote them), just get the co-ordinates from the css (or by using Firebug to select the image in your browser) and in what ever program you use you can either make two guides and find where they meet, or you can make a selection of the size and stick it in the top left corner. I suck at explaining so I hope that makes sense to you lol.
Once proud Documentation Writer and Help Squad Leader
I'm for HIRE! | Check out my Fiverr Jobs! | Let's play games on OMGPOP together!


Need More Posts?

Quote
[12:13am] <%Jade> link me
[12:14am] <+orstio> <a href="Jade">link</a>


Offline amitkool21

  • Semi-Newbie
  • *
  • Posts: 19
Re: main_block.png
« Reply #27 on: September 11, 2012, 04:19:15 AM »
i'm also facing a problem like this but the thing is whenever i change the color in main_block.png and refreshes the home page the older color appears for a sec(like a flash) and than new color comes back........what to do now ?

Online Shambles

  • SMF Hero
  • ******
  • Posts: 2,085
  • Gender: Male
    • i30 Owners Club
Re: main_block.png
« Reply #28 on: September 11, 2012, 05:06:28 AM »
Hey amitkool21, you might be better opening your own topic as this one is marked as solved and may be overlooked because of such :)

Offline Jade Elizabeth

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,167
  • Gender: Female
  • Keep your enemies close and your friends closer ;)
    • @BunnyRabbitSex on Twitter
    • BunnyRabbitSex
Re: main_block.png
« Reply #29 on: September 11, 2012, 09:21:29 AM »
I think what you might be seeing is either your browser cache, OR the css colour underneath. If it's square it's CSS and your image is being loaded too slow, so you should google how to optimise it.
Once proud Documentation Writer and Help Squad Leader
I'm for HIRE! | Check out my Fiverr Jobs! | Let's play games on OMGPOP together!


Need More Posts?

Quote
[12:13am] <%Jade> link me
[12:14am] <+orstio> <a href="Jade">link</a>