Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old February 21st, 2006, 07:05 PM
Viken Karaguesian
Guest
 
Posts: n/a
Default Where can I learn PHP? Want to create photo gallery.

Hello everyone,

Can anyone recommend a good online site to learn PHP? The W3Schools
website is quite lacking - leaves much to be desired. I'm sure there
are many places, but which ones are good?

I currently run a site with an extensive photo gallery. Hundreds of
photos. Right now I have a system which the thumbnails are laid out in
a table. You click on a thumbnail and you see the full size picture.
That full size picture is in its own html page. So...hundreds of
pictures = hundreds of html pages = bigger headache for changes, more
management, etc.

I think that PHP scripting can solve my issue. With PHP, I could create
one template page for the full-size picture, then use the server
scripting to get the requested image and place it in the template page.
That way, each picture would not have to have it's own html page, and I
can reduce the total number of pages and make the site leaner.

Am I oversimplifying this? I believe that PHP scripting is what I want
for this, no? At the very least, it gives me an excuse to learn som
PHP.

Unfortunately, there's no comp.infosystems.www.authoring.php :>)

Thanks in advance.

Viken K.

  #2  
Old February 21st, 2006, 07:25 PM
David Dorward
Guest
 
Posts: n/a
Default Re: Where can I learn PHP? Want to create photo gallery.

Viken Karaguesian wrote:
[color=blue]
> Can anyone recommend a good online site to learn PHP?[/color]

http://php.net/

(Which is _not_ a good site to learn HTML, HTTP, general programming or
secure web programming - all of which are pretty much prerequisites for
writing web applications).
[color=blue]
> The W3Schools website is quite lacking - leaves much to be desired.[/color]

For every subject...
[color=blue]
> I currently run a site with an extensive photo gallery. Hundreds of
> photos. Right now I have a system which the thumbnails are laid out in
> a table. You click on a thumbnail and you see the full size picture.
> That full size picture is in its own html page. So...hundreds of
> pictures = hundreds of html pages = bigger headache for changes, more
> management, etc.
>
> I think that PHP scripting can solve my issue.[/color]

It could do. PHP wouldn't be my preference, but it is an option.
[color=blue]
> With PHP, I could create one template page for the full-size picture, then
> use the server scripting to get the requested image and place it in the
> template page.
> That way, each picture would not have to have it's own html page, and I
> can reduce the total number of pages and make the site leaner.[/color]

Well, each image would have its own page, just not seperate files.

It wouldn't really be leaner - you'd have to run the PHP script for every
page request, and have to deal with cache control headers yourself (or
expect browsers to rerequest the page for every view).

You _could_ generate static HTML documents from PHP.
[color=blue]
> Unfortunately, there's no comp.infosystems.www.authoring.php :>)[/color]

No, but there is comp.lang.php and alt.php

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
  #3  
Old February 21st, 2006, 07:45 PM
Jim Moe
Guest
 
Posts: n/a
Default Re: Where can I learn PHP? Want to create photo gallery.

Viken Karaguesian wrote:[color=blue]
>
> I currently run a site with an extensive photo gallery. Hundreds of
> photos. Right now I have a system which the thumbnails are laid out in
> a table. You click on a thumbnail and you see the full size picture.
> That full size picture is in its own html page. So...hundreds of
> pictures = hundreds of html pages = bigger headache for changes, more
> management, etc.
>[/color]
<http://jalbum.net/>

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
  #4  
Old February 22nd, 2006, 05:05 AM
Eric Lindsay
Guest
 
Posts: n/a
Default Re: Where can I learn PHP? Want to create photo gallery.

In article <1140548232.815312.318320@z14g2000cwz.googlegroups .com>,
"Viken Karaguesian" <vikenk@aol.com> wrote:
[color=blue]
> I currently run a site with an extensive photo gallery. Hundreds of
> photos. Right now I have a system which the thumbnails are laid out in
> a table. You click on a thumbnail and you see the full size picture.
> That full size picture is in its own html page. So...hundreds of
> pictures = hundreds of html pages = bigger headache for changes, more
> management, etc.[/color]

I recently had a similar problem, of needing a photo gallery in a hurry,
to show all the photos in a specific folder. While I am not doing a
separate page for each photo (just the actual photo linked from the
thumbnail), I found that I didn't need to go past a Bash shell script to
generate a static page that I upload. It is after all mostly fairly
easy text manipulation. So if you have a Linux style shell, that may be
easier than learning another scripting language. Obviously generating a
separate HTML page for each photo is a minor addition (about 3 lines I'd
guess).

I generate the album web page again whenever I make changes to the
photos. Obviously I only update new photos and thumbnails to the site
image folder.

I get the title material direct from the name of the photo. The gallery
is all in CSS, no tables involved, and is fluid, not static (the basis
for the CSS isn't mine, and there is a comment pointing to the original
idea). Working fine with 180 photos at the moment.
http://site.sheltersrus.com.au/galleryall.html

Next step is to extract keywords or comments from the photo files, and
do something with them, so as to add more flexibility. This is very
much a work in progress at the moment, so I don't actually have links to
the page anywhere else. It was mainly so the owner of the site could
see which photos he already had available. I can send or post the guts
of the shell script if you are interested.

--
http://www.ericlindsay.com
  #5  
Old February 22nd, 2006, 07:45 AM
Roy Schestowitz
Guest
 
Posts: n/a
Default Re: Where can I learn PHP? Want to create photo gallery.

__/ [ David Dorward ] on Tuesday 21 February 2006 19:12 \__
[color=blue]
> Viken Karaguesian wrote:
>[color=green]
>> Can anyone recommend a good online site to learn PHP?[/color]
>
> http://php.net/
>
> (Which is _not_ a good site to learn HTML, HTTP, general programming or
> secure web programming - all of which are pretty much prerequisites for
> writing web applications).
>[color=green]
>> The W3Schools website is quite lacking - leaves much to be desired.[/color]
>
> For every subject...[/color]


So I repeatedly hear. That, however, is where I learned some CSS basics.

[color=blue][color=green]
>> I currently run a site with an extensive photo gallery. Hundreds of
>> photos. Right now I have a system which the thumbnails are laid out in
>> a table. You click on a thumbnail and you see the full size picture.
>> That full size picture is in its own html page. So...hundreds of
>> pictures = hundreds of html pages = bigger headache for changes, more
>> management, etc.
>>
>> I think that PHP scripting can solve my issue.[/color][/color]


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 could also generate thumbnails and entire galleries statically. I use
KDE's built-in functionality to achieve that on occasions.

[color=blue]
> It could do. PHP wouldn't be my preference, but it is an option.
>[color=green]
>> With PHP, I could create one template page for the full-size picture, then
>> use the server scripting to get the requested image and place it in the
>> template page.
>> That way, each picture would not have to have it's own html page, and I
>> can reduce the total number of pages and make the site leaner.[/color]
>
> Well, each image would have its own page, just not separate files.[/color]


Think about search engine optimisation and site indexing as well.

[color=blue]
> It wouldn't really be leaner - you'd have to run the PHP script for every
> page request, and have to deal with cache control headers yourself (or
> expect browsers to rerequest the page for every view).
>
> You _could_ generate static HTML documents from PHP.[/color]


You could also derive such pages from the raw data... (for what it's worth)

[color=blue][color=green]
>> Unfortunately, there's no comp.infosystems.www.authoring.php :>)[/color]
>
> No, but there is comp.lang.php and alt.php[/color]


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.

Best wishes,

Roy

--
Roy S. Schestowitz | GPL'd 3-D Othello: http://othellomaster.com
http://Schestowitz.com | SuSE Linux | PGP-Key: 0x74572E8E
7:25am up 4 days 19:44, 10 users, load average: 1.65, 0.88, 0.63
http://iuron.com - next generation of search paradigms
  #6  
Old February 22nd, 2006, 02:15 PM
Viken Karaguesian
Guest
 
Posts: n/a
Default Re: Where can I learn PHP? Want to create photo gallery.

> >> The W3Schools website is quite lacking - leaves much to be desired.[color=blue][color=green]
> >
> > For every subject...[/color]
>
> So I repeatedly hear. That, however, is where I learned some CSS basics.[/color]

Me too...

[color=blue][color=green][color=darkred]
> >> I think that PHP scripting can solve my issue.[/color][/color]
>
>
> 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.[/color]

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.

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.

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).

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

[color=blue]
> You could also generate thumbnails and entire galleries statically. I use
> KDE's built-in functionality to achieve that on occasions.[/color]

I'm sorry, I don't know what KDE is.

[color=blue]
> 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.[/color]

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.

--
Viken K.

  #7  
Old February 22nd, 2006, 06:15 PM
Tony
Guest
 
Posts: n/a
Default Re: Where can I learn PHP? Want to create photo gallery.

Viken Karaguesian wrote:[color=blue]
> Hello everyone,
>
> Can anyone recommend a good online site to learn PHP? The W3Schools
> website is quite lacking - leaves much to be desired. I'm sure there
> are many places, but which ones are good?[/color]

I learned most of what I know about PHP from looking things up on
php.net - of course, I've been programming for quite some time already,
so it was a matter of specific syntax rather than learning a language
from scratch.

I know you asked for online resources, but I would like to recommend a
book: PHP 5 / MySQL Programming for the Absolute Beginner, by Andy
Harris - it's a really good starter book on PHP programming.

As for online resources - you may want to check out alt.php and
comp.lang.php (I've heard that one of these is dead, but at least one
should still be active) - you'll probably get better recommendations
there. In fact, search the archives of those groups & you'll probably
find what you want.

  #8  
Old February 22nd, 2006, 06:35 PM
Roy Schestowitz
Guest
 
Posts: n/a
Default Re: Where can I learn PHP? Want to create photo gallery.

__/ [ Viken Karaguesian ] on Wednesday 22 February 2006 14:04 \__
[color=blue][color=green][color=darkred]
>> >> The W3Schools website is quite lacking - leaves much to be desired.
>> >
>> > For every subject...[/color]
>>
>> So I repeatedly hear. That, however, is where I learned some CSS basics.[/color]
>
> Me too...
>
>[color=green][color=darkred]
>> >> I think that PHP scripting can solve my issue.[/color]
>>
>>
>> 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.[/color]
>
> 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.[/color]


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.

[color=blue]
> 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.[/color]


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).

[color=blue]
> 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).[/color]


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.

[color=blue]
> This is maybe incorrect? Maybe PHP is the wrong scripting language for
> this?[/color]


No, PHP is excellent and is highly scalable too.

http://www.sitepoint.com/blogs/2006/...-pro-php-rant/

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


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

http://schestowitz.com/Gallery/KDE-Screen-shots

[color=blue][color=green]
>> 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.[/color]
>
> 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.[/color]


*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.*

[color=blue]
> --
> Viken K.[/color]


Hope it helps,

Roy

--
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
  #9  
Old February 22nd, 2006, 07:15 PM
Stephen Poley
Guest
 
Posts: n/a
Default Re: Where can I learn PHP? Want to create photo gallery.

On 22 Feb 2006 10:05:48 -0800, "Tony" <tony23@dslextreme.com> wrote:

[color=blue]
>As for online resources - you may want to check out alt.php and
>comp.lang.php (I've heard that one of these is dead, but at least one
>should still be active)[/color]

No, they're both alive and kicking. Even php.general seems to have come
back from the dead. PHP has just too many groups in fact!

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
  #10  
Old February 22nd, 2006, 07:25 PM
David Dorward
Guest
 
Posts: n/a
Default Re: Where can I learn PHP? Want to create photo gallery.

Roy Schestowitz wrote:
[color=blue][color=green]
>> I'm sorry, I don't know what KDE is.[/color][/color]
[color=blue]
> It is a Linux desktop environment.[/color]

Scratch Linux. It also runs on BSD, Solaris, Mac, Windows and lots of other
platforms :)

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
  #11  
Old February 23rd, 2006, 06:15 AM
Roy Schestowitz
Guest
 
Posts: n/a
Default Re: Where can I learn PHP? Want to create photo gallery.

__/ [ David Dorward ] on Wednesday 22 February 2006 19:10 \__
[color=blue]
> Roy Schestowitz wrote:
>[color=green][color=darkred]
>>> I'm sorry, I don't know what KDE is.[/color][/color]
>[color=green]
>> It is a Linux desktop environment.[/color]
>
> Scratch Linux. It also runs on BSD, Solaris, Mac, Windows and lots of other
> platforms :)[/color]

I didn't say a "Linux-_only_ desktop environment". *smile*

Best wishes,

Roy

PS - Windows?!?! Really...?

--
Roy S. Schestowitz | Useful fact: close elevator button = Express Mode
http://Schestowitz.com | SuSE Linux | PGP-Key: 0x74572E8E
4:45am up 5 days 17:04, 8 users, load average: 0.70, 0.64, 0.62
http://iuron.com - help build a non-profit search engine
  #12  
Old February 23rd, 2006, 07:45 AM
Adrienne Boswell
Guest
 
Posts: n/a
Default Re: Where can I learn PHP? Want to create photo gallery.

Gazing into my crystal ball I observed "Viken Karaguesian" <vikenk@aol.com>
writing in news:1140548232.815312.318320@z14g2000cwz.googlegr oups.com:
[color=blue]
> I think that PHP scripting can solve my issue. With PHP, I could create
> one template page for the full-size picture, then use the server
> scripting to get the requested image and place it in the template page.
> That way, each picture would not have to have it's own html page, and I
> can reduce the total number of pages and make the site leaner.
>[/color]

Have a look at <http://www.porjes.com/butterflies/> might give you some
ideas.

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
  #13  
Old February 23rd, 2006, 08:05 AM
David Dorward
Guest
 
Posts: n/a
Default Re: Where can I learn PHP? Want to create photo gallery.

Roy Schestowitz wrote:
[color=blue][color=green]
>> Scratch Linux. It also runs on BSD, Solaris, Mac, Windows and lots of
>> other platforms :)[/color][/color]
[color=blue]
> PS - Windows?!?! Really...?[/color]

Needs a fair bit of work though.

http://kde-cygwin.sourceforge.net/

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
  #14  
Old February 23rd, 2006, 03:06 PM
Bart Lateur
Guest
 
Posts: n/a
Default Re: Where can I learn PHP? Want to create photo gallery.

Viken Karaguesian wrote:
[color=blue]
>I currently run a site with an extensive photo gallery.[/color]

No need to start from scratch: there's free website photo gallery
software, written in PHP and, wait for it: the name is Gallery.

<http://gallery.menalto.com/>

--
Bart.
 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles