473,386 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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.

Feb 21 '06 #1
13 4289
Viken Karaguesian wrote:
Can anyone recommend a good online site to learn PHP?
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).
The W3Schools website is quite lacking - leaves much to be desired.
For every subject...
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.
It could do. PHP wouldn't be my preference, but it is an option.
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.
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.
Unfortunately, there's no comp.infosystems.www.authoring.php :>)


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
Feb 21 '06 #2
Viken Karaguesian wrote:

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.

<http://jalbum.net/>

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Feb 21 '06 #3
In article <11**********************@z14g2000cwz.googlegroups .com>,
"Viken Karaguesian" <vi****@aol.com> wrote:
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 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
Feb 22 '06 #4
__/ [ David Dorward ] on Tuesday 21 February 2006 19:12 \__
Viken Karaguesian wrote:
Can anyone recommend a good online site to learn PHP?
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).
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.

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.

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.

It could do. PHP wouldn't be my preference, but it is an option.
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.
Well, each image would have its own page, just not separate files.

Think about search engine optimisation and site indexing as well.

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.

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

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


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

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
Feb 22 '06 #5
> >> 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.

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?

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.

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.

--
Viken K.

Feb 22 '06 #6
Viken Karaguesian wrote:
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 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.

Feb 22 '06 #7
__/ [ 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.

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

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

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

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

--
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
Feb 22 '06 #8
On 22 Feb 2006 10:05:48 -0800, "Tony" <to****@dslextreme.com> wrote:

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)


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/
Feb 22 '06 #9
Roy Schestowitz wrote:
I'm sorry, I don't know what KDE is.
It is a Linux desktop environment.


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
Feb 22 '06 #10
__/ [ David Dorward ] on Wednesday 22 February 2006 19:10 \__
Roy Schestowitz wrote:
I'm sorry, I don't know what KDE is.

It is a Linux desktop environment.


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


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
Feb 23 '06 #11
Gazing into my crystal ball I observed "Viken Karaguesian" <vi****@aol.com>
writing in news:11**********************@z14g2000cwz.googlegr oups.com:
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.


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
Feb 23 '06 #12
Roy Schestowitz wrote:
Scratch Linux. It also runs on BSD, Solaris, Mac, Windows and lots of
other platforms :)
PS - Windows?!?! Really...?


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
Feb 23 '06 #13
Viken Karaguesian wrote:
I currently run a site with an extensive photo gallery.


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.
Feb 23 '06 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: matt | last post by:
I have this code, works perfectly on Windows server, but now i'm trying to run it on a Linux server, the form submits, i get no errors, but the photo doesnt upload, and the caption file doesnt...
1
by: leigh | last post by:
I need a php photo gallery script that will allow me to categorise photos to directories/sections, post captions for each photo and allow users to comment on individual photos. If there is one...
25
by: Ben | last post by:
Hi all! I learned Python as part of my university coursework... I enjoyed it. Now I'm just wondering how Python compares with asp, jsp, php and what not?? I don't have slightest knowledge about...
5
by: fraser | last post by:
Hi, I have a photo gallery with cat photos here http://mouserspage.cjb.net From the beginning, I have been making each page of thumbnails, with a separate page for each photo, entirely in...
14
by: Eric Lindsay | last post by:
I've seen a page using display, and especially display table that did some neat things with boxes, but basically it only worked with Mozilla browsers. Fell over fairly badly with Opera and Safari...
3
by: bob garbados | last post by:
I'm looking for thoughts on photo galleries and security/performance implications... I'm working on an asp.net site in vb that will include an updateable photo gallery that will display thumbnails...
1
by: popotz | last post by:
Hi..I really need a big help.. I was wondering how to make my own photo gallery for my own website. The photo must be uploaded first, and then it automaticly putted into the gallery..if we click...
0
by: Jumping Arne | last post by:
I've searching for some software that would allow me to present my photos on the web (I'm not interested a software that generates static pages that I upload) and there are quite a few, see for...
1
by: Scott Sandeman-Allen | last post by:
On 5/1/08, Jumping Arne (arnlen@mac.com) wrote: I've been working with Photologue for a while with some nice results. <http://code.google.com/p/django-photologue/> It is a Django project ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.