|
|
Author |
Thread |
Wes
Paranoid (IV) Mad Scientist
From: Inside THE BOX Insane since: May 2000
|
posted 02-10-2003 20:57
Okay, boys and girls, I just agreed to do a site for a friend of a friend and before I get started, I'd like to explore the possibility of simplifying my work.
The site will include a page with thumbnails of artwork, which will link to a page with details. The thumbnail page can be static, that's no problem. I of course want to use a template for the detail page, though, which will include a larger version of the image, the title of the work and possibly some other details.
If it were just one item on the detail page, I could use XSSI, but with multiple variables for each thumbnail, I'm guessing I need to use PHP, which I know nothing about.
I've looked at a couple of beginner tutes, but all I've found so far are lessons in basic syntax, which then go into very specific examples on how to do things unrelated to my task.
Can someone help me get started? Please?
|
DL-44
Maniac (V) Inmate
From: under the bed Insane since: Feb 2000
|
posted 02-10-2003 22:04
PHP is a relatively easy language to get started in...especially if you have the help that is available here.
If you want a starter tutorial, I would recommend the 'PHP Templates' one at the GN. From there, hop on over to the manual - it's a great resource.
Also, try to get people to show you their code!
There are a bunch of ways to do what you mention, some simple, some complex - depending on how thorough you want to be...
I have a script that I wrote here that does some similar things, it may be of use -
http://www.in-dented.com/asylum.php?sec=sp
Of course the actual display/setup can be output any possible way you would like. Some of the info I'm showing there is stored in an array that needs to be manually updated, but the technical details about the image at the bottom are pulled directly from the .JPG via PHP.
I'll be happy to share the code if it's something you're interested in.
|
Skaarjj
Maniac (V) Mad Scientist
From: :morF Insane since: May 2000
|
posted 02-11-2003 02:38
DL...couldI get a look at the actual PHP souce code for asylum.php. All I can seem to get is the parsed code, and I'd really like to know how you accomplish multi-sectioned pages like that. I'm going to need to know that later on.
|
DL-44
Maniac (V) Inmate
From: under the bed Insane since: Feb 2000
|
posted 02-11-2003 20:11
The asylum.php doesn't actually have much code in it - it (and all the other pages there) call one big included file with the bulk of the scripting in it, and that kicks out all the content.
When I get home I'll zip it up and post it.
|
Skaarjj
Maniac (V) Mad Scientist
From: :morF Insane since: May 2000
|
posted 02-12-2003 05:02
Thanks much DL
|
Wes
Paranoid (IV) Mad Scientist
From: Inside THE BOX Insane since: May 2000
|
posted 02-13-2003 15:33
Honestly, I had expected my friend to get back with me on my quote by now. As soon as I'm sure I'll be doing this work, I will get back to this. Thanks for the leads so far.
|
DL-44
Maniac (V) Inmate
From: under the bed Insane since: Feb 2000
|
posted 02-13-2003 17:45
Another thing to think about, Wes, is whether or not you want to go with a Database.
If you're going to go into PHP, SQL isn't too much more to learn.
Even if you don't end up doing this site, I've often thought how beneficial it would be for you to run bigwaste with PHP/MySQL.
Skaarjj - I've been slacking...I'll try to remember to post the file tonight when I get home. I put up a .txt version, but for some reason the server partially parses it...
|
DL-44
Maniac (V) Inmate
From: under the bed Insane since: Feb 2000
|
posted 02-14-2003 04:22
|
Skaarjj
Maniac (V) Mad Scientist
From: :morF Insane since: May 2000
|
posted 02-14-2003 07:57
Thanks DL...this should be an interesting read.
|
Wes
Paranoid (IV) Mad Scientist
From: Inside THE BOX Insane since: May 2000
|
posted 02-14-2003 14:21
DL -
I thought about how much better organized it would be and how much more sense it would make to do this site using a database, but to be honest, the project isn't paying enough and isn't going to be big enough for me to put in the time to learn a whole lot of new stuff.
Don't get me wrong ? I know that sounds horrible, not wanting to put in the time to learn. It's not the learning I'm averse to; I just have so much else going on that I can't put more time into this freelance job than is necessary.
Besides, come to think of it, I don't know what's going to be available on the host.
As for running The Big Waste of Space using a database, I think you're right, especially for the Photologue. Actually, I would do it for Texas Twisted first since that's my current focus. Just not sure I want to put that can of worms on the menu just yet.
|
bitdamaged
Maniac (V) Mad Scientist
From: 100101010011 <-- right about here Insane since: Mar 2000
|
posted 02-14-2003 17:47
I've got a couple of quick and dirty scripts for doing stuff like this in PHP One just associates a flat file with images and one that grabs a bunch of thumbnails and prints a table with links to popup windows of the full images.
Lemme know if something like this would help.
.:[ Never resist a perfect moment ]:.
|
Skaarjj
Maniac (V) Mad Scientist
From: :morF Insane since: May 2000
|
posted 02-16-2003 13:43
Well if you want a hand with that can of worms Wes...we're here.
|
Wes
Paranoid (IV) Mad Scientist
From: Inside THE BOX Insane since: May 2000
|
posted 02-24-2003 02:31
Hmm...this is interesting. I got the go-ahead to do the site, so I'm testing to see if PHP works on the target server. (I asked if it was installed, but he hasn't answered yet.)
If I use any other extension except .php4 (like .php or php3), I get the download dialogue box. However, even though it will display the page named with .php4, the PHP code won't work.
http://judy.iteamwork.com/products/test.php
http://judy.iteamwork.com/products/test.php3
http://judy.iteamwork.com/products/test.php4
Update
I e-mailed my friend and he's checking the server config. He says he's not sure what's wrong, but he knows the following is in the httpd.conf file:
code:
###############
# php support #
###############
AddType application/x-httpd-php .php .php3 .phtml
Anyone have any ideas what could be wrong?
[This message has been edited by Wes (edited 02-24-2003).]
|
Emperor
Maniac (V) Mad Scientist with Finglongers
From: Cell 53, East Wing Insane since: Jul 2001
|
posted 02-24-2003 03:01
Wes: Put this in your .htaccess file:
code:
AddType application/x-httpd-php .php .php3 .php4 .phtml
and I suspect you might also need:
code:
DirectoryIndex index.php index.php4 default.php default.php4 index.html default.html
___________________
Emps
FAQs: Emperor
|
Wes
Paranoid (IV) Mad Scientist
From: Inside THE BOX Insane since: May 2000
|
posted 02-24-2003 03:05
Looks like you caught me as I was editing there, Emps.
I tried adding it to an .htaccess file, too, but no go.
I can't imagine why I would get a download dialogue box for the extensions listed in the httpd.conf.
[This message has been edited by Wes (edited 02-24-2003).]
|
Skaarjj
Maniac (V) Mad Scientist
From: :morF Insane since: May 2000
|
posted 02-24-2003 10:30
I run AMP on my computer, for PHP testing purposes....and I foundthat toget it to accept PHP extensions I had to add the .php, .php3 and .php4 extensions to both my httpd.conf and httpd.default.conf files...don't know why...but it didn't work until I did that.
|
Wes
Paranoid (IV) Mad Scientist
From: Inside THE BOX Insane since: May 2000
|
posted 02-24-2003 23:57
Ah, well, it looks like my friend discovered that PHP is, in fact, not installed on that server.
I'll have to stick to linking to a template with only a larger image, perhaps later switching to JavaScript to get any other details.
Thanks anyhow, guys.
|
Skaarjj
Maniac (V) Mad Scientist
From: :morF Insane since: May 2000
|
posted 02-25-2003 03:09
Well, yeah...that'll do it.
He could install the PHP modules pretty easilt though...unless he doesn't maintain the server.
|
Wes
Paranoid (IV) Mad Scientist
From: Inside THE BOX Insane since: May 2000
|
posted 02-25-2003 14:40
He did mention that it looked to him at first glance like he would need to reinstall Apache to get PHP installed. I'm not sure what the circumstances are, but this is a guy who knows what he's doing, so I'm inclined to believe him that it would be a big deal.
If you know a link to some easy steps to installing PHP, though, I could pass it along to him.
I get paid the same either way, though, so it's really no difference to me, to be honest.
|