Quantcast

Forums | MacLife

You are not logged in.

#1 2003-01-12 10:39 am

blobbo
Member
From: Montr
Registered: 2000-09-09
Posts: 154

scripting help - complete newb

hey all,

i just subscribed to this free hosting at portland communications, and i must say it's pretty good...  free hosts usually suck (there's a reason why they're free), but this one offers a modest amount of space, etc...  i'm using dreamweaver mx on my mac as my upload client as well as design utility (it's simple, and integrated into my webdesign app).  what i'm looking for is a script that can take a folder from my ftp directory (i.e. /Gallery/Etc/) and turn it into a page that contains a grid of thumbnails, 4 across and 2 down.  i want to specify the header and footer so that my website-consistent navigation bars are there...  i'd also (although this isn't entirely necissary, it'd be helpful...) like it to auto-create the thumbnails from full sized images that when clicked on open them in a new page where (again) i can specify the header and footer to keep my website consistent.  i'm not a programming clutz entirely - i've worked with realbasic (mac equivelant to visual basic) quite a bit, and i've learnt some of the basics of objective c programming for mac...  i'm not at ALL able to make my own script though...  help!  thanks in advance...

btw, for those interested the site is at this link.

i know, i know it's bland.  but the load-time is very fast and it will look basically the same on every browser (tables aren't that hard to render lol).  besides, this is my first webpage ever (yes, my first)...  i'm just using dreamweaver templates...  eventually i'll try to make it better...  portland offers php and cgi, but to what level i don't know.  i've seen some ok stuff there, though.  i just don't want to have to make up a page for every single picture my mom wants to upload...  what a pain.


-macintosh isn't just a platform: it's a way of life

Offline

 

#2 2003-01-12 10:45 am

Daniel
[dp] design#
From: Melbourne, FL
Registered: 2000-11-21
Posts: 9706
Website

Re: scripting help - complete newb

You mentioned that your host supports PHP.  Do they also support MySQL?  What you request could be easily done with a PHP/MySQL combo. smile


Airman Dan
Private Pilot, Instrument Airplane Single-Engine Land
http://homepage.mac.com/dp.design/.Pictures/atat/AtAT-Banner.jpg

Offline

 

#3 2003-01-12 11:32 am

blobbo
Member
From: Montr
Registered: 2000-09-09
Posts: 154

Re: scripting help - complete newb

i do believe it does support mysql, but i don't think it would be too easy to implement seeing as i'm using their free service...  for sure, i'd have zippo support.  i really don't want to pay for hosting...  is there a way to do this without using mysql?


-macintosh isn't just a platform: it's a way of life

Offline

 

#4 2003-01-12 11:40 am

blobbo
Member
From: Montr
Registered: 2000-09-09
Posts: 154

Re: scripting help - complete newb

in retrospect, i just looked at the site's "how to do mysql" thing - seems it is fairly supported after all...  any advice for solutions involving or not involving mysql are now welcome!  thanks in advance...


-macintosh isn't just a platform: it's a way of life

Offline

 

#5 2003-01-12 12:45 pm

Gipetto
Yankee Doodle's noodle
Royal Wombat
From: People! Ahg!!
Registered: 2000-09-24
Posts: 9941
Website

Re: scripting help - complete newb

I just looked at the service listings and the free account does not include PHP/MySQL.

Offline

 

#6 2003-01-12 12:59 pm

blobbo
Member
From: Montr
Registered: 2000-09-09
Posts: 154

Re: scripting help - complete newb

according to this page it does...  in any case, i've got some other hosts (one of my friends' servers) that can support both php and mysql...  so i'd love to hear solution ideas, both ones that deal with cgi and php, and ones that deal with the above two and mysql...  thanks in advance...


-macintosh isn't just a platform: it's a way of life

Offline

 

#7 2003-01-12 6:52 pm

Gipetto
Yankee Doodle's noodle
Royal Wombat
From: People! Ahg!!
Registered: 2000-09-24
Posts: 9941
Website

Re: scripting help - complete newb

I'd be interested to find out which it is.

http://www.portland.co.uk/freewebhosting.esp

At that page it refers you to a pay version to gain full features.

If it is free with PHP and SQL I'd be in.

Offline

 

#8 2003-01-12 10:04 pm

blobbo
Member
From: Montr
Registered: 2000-09-09
Posts: 154

Re: scripting help - complete newb

indeed i just applied for mysql support and got it as quickly as the intial registration...  try it - i'm not an expert but it looks ok to me...  anyway, any advice on gallery-type scripts?


-macintosh isn't just a platform: it's a way of life

Offline

 

#9 2003-01-12 10:16 pm

Gipetto
Yankee Doodle's noodle
Royal Wombat
From: People! Ahg!!
Registered: 2000-09-24
Posts: 9941
Website

Re: scripting help - complete newb

Sorry, I use GoLive, so I don't know of any dreamweaver specific examples.

But you can look here for help

http://www.phpfreaks.com/index.php

I've found some useful stuff there.


But I'll definitely have to check out that service.

Thanks

Offline

 

#10 2003-01-12 10:33 pm

Altivec
I like fishy crackers
Moderator
From: Rat's Mouth, FL
Registered: 2002-01-27
Posts: 2361
Website

Re: scripting help - complete newb

Actually, after taking a look at your requirements, I don't see where you even need a database to house any information, since everything you are pulling is already available to PHP:

Requirement 1:  Pull image files in a folder on your site & create a page.  PHP contains a full library of functions for dealing with the filesystem & directories on a server:

http://www.php.net/manual/en/ref.filesystem.php
http://www.php.net/manual/en/ref.dir.php

The PHP.NET manual page for readdir() has a good sample function for printing a list of files in a directory:

http://www.php.net/manual/en/function.readdir.php

This could be modified with a little TLC to do what you want.

Requirement 2: Headers & Footers:

Adding header and footer files are as simple as creating them as HTML pages, and using include() functions.

Requirement 3: Auto-generate thumbnails:

The creation of thumbnails from base images will require that gd support is compiled into your host's build of PHP.  A good tutorial can be found here:

http://www.onlinetools.org/articles/cre … nails1.php

It doesn't go into excruciating detail on how to create thumbs, but is more of a high-level overview on how it could be done (kind of like my post big_smile ).

Helpful PHP links:

http://www.phpbuilder.net/ - Geared more toward intermediate PHP programmers, but a good resource.
http://www.php.net/manual/en/tutorial.php - Beginners tutorial on php.net.

And if you really want to be lazy, a script package has already been created for what you are trying to do.  wink

http://gallery.menalto.com/

Offline

 

Board footer

Powered by PunBB 1.2.6
© Copyright 2002–2005 Rickard Andersson