Home Messages Index
[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index

Re: Where can I learn PHP? Want to create photo gallery.

__/ [ Viken Karaguesian ] on Wednesday 22 February 2006 14:04 \__

>> >> The W3Schools website is quite lacking - leaves much to be desired.
>> >
>> > For every subject...
>> So I repeatedly hear. That, however, is where I learned some CSS basics.
> Me too...
>> >> I think that PHP scripting can solve my issue.
>> No intention of stepping on your toes here, but why not make use of
>> existing photo gallery/management software such as Gallery or Coppermine?
>> It gets updated, patched, extended and so forth.
> You don't have to worry about stepping on my toes :>)
> The biggest point is about needing an excuse to learn PHP - doing it
> myself.

Ahh... okay. Have you considered taking an existing Open Source image gallery
software and extending (or hacking) it to better suit your taste, needs and
perspective? I consider this practice to be one which offers a superior
(i.e. faster, more effective) learning curve. If you take software that is
no longer maintained by anyone (e.g. B2 to become WordPress), then you
actually contribute to a potentially large community and become a star.

> The second point would be that I want to have valid code. I've used
> Photoshop's photo album generator, but it generates non-valid code. It
> takes a lot of time to clean up the code and apply my theme to it.
> The theme of the website is "white on black". The background is black,
> the text white. If I link directly to a .jpg file, it comes up in a
> white screen with no formattting and is aligned upper-left.  In order
> to keep the style of the website, I have to place the picture in an
> html document to apply the style, text, and keep the image centered.
> So, for thirty pictures, I have to have 30 html pages. It's just a
> hassle.
> Maybe I have the wrong idea about PHP? I'm still somewhat of a novice.
> I have a decent handle of html and css, but don't really know the
> server scripting stuff. I see many pages with ?php extensions. I
> thought that these pages were mostly templates and just pulled
> information out of a database or other files to display them. So, in
> theory, you can change content by changing files and database info, not
> by editing the actual html document.

Yes, but the only point missing is that images are (should be) resized
offline to generate thumbnails and moderate-sized versions, as to reduce CPU
load, which could slow down the Web server(s).

> My vision (right or wrong) is that I can have one html document for all
> the image files and just place the image in that one html document. So,
> if someone clicks on a picture thumbnail, the command would be like
> "take img0001.jpg and place it in img_template.htm", "take img0002.jpg
> and place it in img_template.htm". Of course, this is a bit
> oversimplified. I would, of course, have to tell it *where* in the
> document to put it, but you get the idea, (I hope).

In the scripts, you should be able find simplified (encapsulated) calls such
as get_image(). You need only move such function calls around your HTML
template (the PHP file) in order to change image placements.

> This is maybe incorrect? Maybe PHP is the wrong scripting language for
> this?

No, PHP is excellent and is highly scalable too.


>> You could also generate thumbnails and entire galleries statically. I use
>> KDE's built-in functionality to achieve that on occasions.
> I'm sorry, I don't know what KDE is.

It is a Linux desktop environment. See, for example, this out-of-date photo
gallery (timely and topical mention):


>> Yes, that's what I thought too. There's also a photography newsgroup, but
>> I don't believe it's technical enough. I used to be subscribed to it.
> Which newsgroup would that be? rec.photo.equipment.35mm? That newsgroup
> is full of people who equate the cost of their gear to the quality of
> their pictures.

*LOL* I know exactly what you mean. Some people believe that the choice of
pricey equipment, the manipulation of the (unneeded) manual focus and the
click which exposes the aperture make them extremely talented. It reminds me
of the blogging phenomenon and its effect on 'real' journalists and
so-called 'mainstream' media.

I can't remember which group I was subscribed to or even why/how. I believe
it fell under the sparse tree level which is: rec.photo.*

> --
> Viken K.

Hope it helps,


Roy S. Schestowitz      |    "Avoid missing ball for higher score"
http://Schestowitz.com  |    SuSE Linux     |     PGP-Key: 0x74572E8E
  6:05pm  up 5 days  6:24,  8 users,  load average: 0.29, 0.52, 0.73
      http://iuron.com - Open Source knowledge engine project

[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index