me = geek

Sep. 2nd, 2004 11:46 am
egypturnash: (worried)
[personal profile] egypturnash
I am crazy. I think I've done most of the hacking I intend to do to the Gallery package; I'm getting into silly stuff now. Yesterday and today I rewrote the code that makes the links to first/previous/next/final thumbnail pages - the original behavior is simply four links, which feels really stupid when there happens on only be four pages in the main illustration gallery!

So I replaced it with some code that just generates a list of links to page X - 1, 2, 3, 4, 5, 6, etc, all link to their respective pages.

This got unwieldy when there are more than about ten pages. Then I discovered that, for some reason, the existing code would figure out a small range of pages around the current page - something like five pages back through five pages ahead. With logic so that it doesn't accidentally direct you to a page off either end of the gallery. Why it has this, I don't know; it's not used.

So after some more work, you get that small span of pages listed; before it you get page 1 (if not in that span) and two pages between 1 and the beginning; after that span you get similar behavior out to the final page.

Then I decided that the simple number links were bad: they're just too small a target. And changing the links to "page x" would feel unaesthetic - too repetitive.

So I coded up a PHP routine just now to convert a number to a string - put in "27" and you get back "twenty-seven". Put in text and you get the text back unchanged; put in anything above 999 and you get the digits back 'cause I don't really anticipate having a thousand pages of thumbnails available any time soon.

I should probably finish it off by wiring up some switches in the settings for an individual section of the gallery to have the first/previous/next/last navigation or the number-list navigation; right now I can only change it for the whole system, by going into the source code, commenting the new method out, and uncommenting the old.

Keep in mind that before touching this thing my knowledge of PHP was absolutely zero. I wasn't even clear on exactly what PHP was. I'm really just going on the fact that nearly every computer language is the same, in both underlying concepts and the grammar you use.

I'm such a geek sometimes...

Date: 2004-09-02 12:27 pm (UTC)
From: [identity profile] milkpanzer.livejournal.com
I think some fancier Gallery 'skins' access stuff, like that page-range thing, that the simple skins don't even touch. I may be misunderstanding how it all works though. To be honest, I only fiddled with Gallery enough to get it running and to find skins with appearances I liked without having to tinker with them at all. ^-^;

Date: 2004-09-02 07:22 pm (UTC)
ext_646: (Default)
From: [identity profile] shatterstripes.livejournal.com
I dunno... all the skins I saw looked pretty much exactly the same. Different colors abd images but they all had exactly the same fundamental layout.

Which is why I ended up hacking away...

I now have it working as the root of a virtual egypt.urnash.com that only exists for my machine. Integrate it into the rest of the website I have designed, cut down some animation work for it, and it's ready to go live as soon as I go buy urnash.com...

Date: 2004-09-02 08:25 pm (UTC)
From: [identity profile] momentrabbit.livejournal.com
And changing the links to "page x" would feel unaesthetic - too repetitive.
So I coded up a PHP routine just now to convert a number to a string - put in "27" and you get back "twenty-seven".


Heh. Did that on FM, once. numtowords() converted, well, numbers to words. Precisely because it was unaesthetic, to have a few paragraphs of description interspersed with 5 or 6 numerics amongst the alphas. The impetus was, of course, size-changing descs - proportionate ones, at that. Once you can store a value on your self for a height, and make all other props dependant on that value (like {(store:{prop:height}/10},earlength,*me}), then all you needed to do was write a function to increment or decrement it, and your desc would change automagically, whilst remaining all written in prose.

Being written for sizeplay, of course, I always thought of it as the "Macro Macro"...


Date: 2004-09-02 08:36 pm (UTC)
ext_646: (Default)
From: [identity profile] shatterstripes.livejournal.com
For extra bonus points, build it so that it can switch from incnes to feet to miles, and give you fuzzy descriptions like "about a mile and a half"!

Because "a four hundred and fifty-two thousand, nine hundred and firty-four foot tall spider with LLLLLL-cup breasts" just sounds... absurd. Better than "...452954 foot tall..." but it's still unaesthetic.

Date: 2004-09-03 05:11 am (UTC)
From: [identity profile] momentrabbit.livejournal.com
That I left to the user, although it was fairly easy: if you had @descs that got sillybig, then you could just use division and modulos to get significant digits, and round up as needed. The integer nature of muckmath helped there, by discarding remainders. Anything from 13 to 23 inches, divided by 12, rounded to 1 (foot). And so on.

I did consider numtomeaningfulwords{} (with a switch for metric and imperial, of course). It'd be neat to shift seamlessly from feet to yards to furlongs. And of course, then there's area, and how many people really know what a hectare looks like, and weight, which wouldn't be proportionate but more obey an exponential increase based on height... but eventually, I realized I was spending more time contemplating coding and building, and less time.. er, well, mucking.

(Thinks about the image of spiders with car-crushing bewbs for a while o.O)

Date: 2004-09-03 10:17 am (UTC)
ext_646: (boobs)
From: [identity profile] shatterstripes.livejournal.com
Yeah. I think instead of thinking about the technical thing I'll just ponder spiders with car-smashing size tits as well.

Hmmm.

Date: 2004-09-03 10:21 am (UTC)
ext_646: (Default)
From: [identity profile] shatterstripes.livejournal.com
Giant spider lady. Probably big enough to crush cars with her boobs but not the owner of gratuitously spherical mammaries or anything.

Profile

egypturnash: (Default)
Margaret Trauth

October 2020

S M T W T F S
    123
45678 910
11121314151617
18192021222324
25262728293031

Most Popular Tags

Expand Cut Tags

No cut tags
Page generated Mar. 26th, 2026 02:51 am