replace buttons with PHP generated images

Started by Cccddd, November 25, 2003, 12:38:22 PM

Previous topic - Next topic

Cccddd

replacing the buttons would severly shrink the size of the distribution, and allow translators to focus on editing text files instead of graphics. SMF could set aside a place on the site for button templates to replace the php (or SVG) generated buttons, as well as allowing complete disabling of dynamically generated images, and sticking to the classic images.

Also some people hate having to replace 100+ buttons every time they make a theme. Having one button template.png file as the template, and running a script via the admin page to generate all the images would take HOURS off the time it would take to generate a new theme. especially with teh mindless task of formatting buttons.

andrea

I programmed already a utility which satisfied these needs (and more). It is able to create full button sets (and more) out of some base definitions and torso graphics. So far it runs on my localhost server and on 2 more (private) webservers. If there is interest and a serious will to contribute to the expenses it can be made available as a public service.

Andrea Hubacher
Ex Lead Support Specialist
www.simplemachines.org

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



dschwab9

Quote from: andrea on November 25, 2003, 01:08:56 PM
If there is interest and a serious will to contribute to the expenses it can be made available as a public service.

What exactly do you need?  If you just need server space for it, I can help you out there.

David

There is a difference here.  Do you mean a script to generate a button set OR all the buttons are generated on the fly, maybe cached, with each page load?
This space for rent.

[Unknown]

He means generated with tables.  Personally I find this method hateful, and it looks worse too.  People are used to being able to click the entire button, not just the words on it.  And browsers word wrap html buttons REALLY strangely.

But, by all means, you are welcome to make your theme(s) use tables for buttons.

-[Unknown]

Gobalopper

No I think he wants a script that would, given a sample template image, create the entire set of buttons for a new theme. So instead of having to go into a image editing program you could just pass it the template and the script will know enough to build the required buttons.

It would sorta be like andrea's idea but reversed. Instead of passing the text and already having the button you are passing the button and already having the text.

Jack.R.Abbit™

Quote from: [Unknown] on November 25, 2003, 04:48:06 PM
He means generated with tables.  Personally I find this method hateful, and it looks worse too.  People are used to being able to click the entire button, not just the words on it.  And browsers word wrap html buttons REALLY strangely.

But, by all means, you are welcome to make your theme(s) use tables for buttons.

-[Unknown]
Not that I am saying its a good thing to do, but can't those issues you spoke of be handled with CSS/divs rather than tables.  You should be able to make the entire div clickable and a norwap would keep the text from wrapping.  I'm not a CSS expert, but I think it could be done.  But I'm not going to do it... :)

[Unknown]

Should.  You might put a background on it and then give it a padding... but it would still take three divs, and it would still only be the words that are clickable.  Limitation of browsers, not the standard...

-[Unknown]

Acf

<td class="menu" title="" onmouseover="this.className='over'" onmouseout="this.className = 'out'" class="out" onclick="document.location.href='http://www.simplemachines.org/community/index.php?action=post;topic=3117/0'" style="">
onclick uses the whole table and not the words...
Sigh...

dschwab9

Quote from: [Unknown] on November 25, 2003, 04:48:06 PM
He means generated with tables.

I think he means dynamically generated with GD, since the post talked about "Dynamic image generation"  :D

[Unknown]

That is horribly inefficient.

I understand he also talked about that, but I'm under the impression that he's suggesting two things.

-[Unknown]

dschwab9

Quote from: [Unknown] on November 26, 2003, 09:19:50 AM
That is horribly inefficient.

Butit could be done once and cached, couldn't it?

Still seems like a lot of coding for something that's easily done in photshop.

Maybe if you included a set of blank buttons in the distribution, that would make it easy for people to put whatever text they wanted on them?

Spaceman-Spiff

generating all images dynamically via GD will slow down your forum, A LOT!

David

This space for rent.

Cccddd

okay i guess i didnt explain my idea clearly enough :)

instead of buttons made in a graphics program, I think using the php commands (using GD) found here could be used to create all the different buttons on a single button template image. this would be done ONCE through the theme admin page (so as to create button sets for all themes).

the distribution package for smf, tho already incredibly small, could be made even smaller by allowing all button images except the one template to be removed. perhaps 5 or 10 templates could be sent with the first non beta release.

the second part of this which i didnt mention earlier was that you could also create button packages for smf, so if people, for some wacky reason, DONT have GD, then they can come to the SMF site and download the default button pack separately. also this allows for regular joe's to make button packs to post on the SMF site, and makes it easier for users to update buttons, and *breaths* makes it so that people stop using crazy different filenames for some of these buttons, and therefore makes it easier to incorporate other ppl's buttons into your own site.

Unless you add some antialiasing stuff to the gd button maker, then the buttons would look less professional, but if you put effort into it, you can have smf create really professional buttons dynamically simply by reading in a language file!

andrea

#15
That is how I had understood your request. Read my reply #1 in this thread...

My button set creator does all the antialiasing stuff and lots more... I will post some buttons sets (with empty buttons in there, see also this thread for that:
http://www.simplemachines.org/community/index.php?topic=2025)

Andrea Hubacher
Ex Lead Support Specialist
www.simplemachines.org

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



Cccddd

yeah i knew you understood. it was the rest of the ppl i was replying to. thats cool that your stuff does this already. wonder what it would take to get it packaged with smf... :)

Advertisement: