| We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
| Photo album script | |
|---|---|
| Tweet Topic Started: May 26 2005, 04:10 PM (959 Views) | |
| Jory | May 26 2005, 04:10 PM Post #1 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Hey, I made a photo album script. script in action script scource Any comments on is, ways to make it faster etc? (Because I find it verry slow, though working with files is always slow) Is is ment to be so that there is verry litle maintanence. (Upload the picts, ad a link to the begin view and you're done.) I want to keep it that way ![]() Anyway: what do you people think? (Know its not really a hard thing to make, but its the hardest thing I've made this far so give me a break ):twitch: |
![]() |
|
| Rory | May 26 2005, 04:19 PM Post #2 |
|
i;m a mess
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
You could re-write it to browse through an /albums/ directory, and get a list of all the folders beneath that. That way you don't need to manually add links to new albums etc. and then if you have done that, it is easy to check whether a directory exists, and if it doesn't, you can print a nice error message rather than the ugly php error you get now. Look up opendir(), readdir() and closedir() for more information about looking at what files's and folders are within a main directory. |
![]() |
|
| Jory | May 26 2005, 04:37 PM Post #3 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
But then, how would you give the link a name? (Because just letting the link have the name the directorie has would not give you pretty names )And I do know opendir(), readdir() and closedir() <_< (Only one I didn't use was closedif() and thats just because I didn't feel like doing more work on it once it was all error free) And the error thing: Working on that, though I don't think anybody would even go there because they have nice little links to click on
|
![]() |
|
| Rory | May 26 2005, 05:04 PM Post #4 |
|
i;m a mess
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Well, if you name the directory's names such as: /18th_birthday_party/ you could use replace the _'s with spaces for the link text, if you get me. All you'd need to do is a loop through the directory's echoing out a link. @ the opendir() etc. comment, my bad, didn't read the code properly
|
![]() |
|
| Jory | May 26 2005, 05:26 PM Post #5 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Guess I could do that, yes. Nice idea ![]() Also added closedir() to the script (didn't upload it yet). Guess you should put that in ![]() And did the checking if the dir is there to stop ugly errors. Anyway, thnx for the comments Rory
|
![]() |
|
| Rory | May 26 2005, 05:32 PM Post #6 |
|
i;m a mess
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Not sure how you could do it, because the images aren't in a database or anything (are they?), but perhaps limiting the number of images on a page to 15 or something, then having Page 1 2 3 ... 9 or something? |
![]() |
|
| solinent | May 27 2005, 09:19 PM Post #7 |
|
Member
![]() ![]() ![]() ![]() ![]()
|
a bit off topic..but here i go First of all, couldn't you do this easy with javascript? Second of all, YOU USE BAD WORDS!!! lol
|
![]() |
|
| Rory | May 28 2005, 07:55 AM Post #8 |
|
i;m a mess
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Probably not with Javascript, because there is no way of getting the files from within the directory. |
![]() |
|
| Jory | May 28 2005, 11:27 AM Post #9 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
:huh: What do you mean? And like Rory said: JS won't let you check out the directories. You would need something serverside (and only serverside language I know is PHP (know as in know how to use it) ) |
![]() |
|
| solinent | May 28 2005, 01:52 PM Post #10 |
|
Member
![]() ![]() ![]() ![]() ![]()
|
In your commenting lol ![]() Ok, sry bout that didn't know exactly how the script worked. You can do it however though. (Tell me what won't work and i'll come up with it) Also I don't use php much, as most of my site is built in asp(only cause I didn't have php available at first, but now I do :)) |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Technology Chat · Next Topic » |
| Track Topic · E-mail Topic |
12:55 PM Jul 11
|



![]](../../../../0/1/0/p601690/pipright.png)

)



12:55 PM Jul 11