/    Sign up×
Community /Pin to ProfileBookmark

gallery generator – suggestions??

EXPERTS!!!
Please see what I’m trying to do, and suggest how I might complete it, or how it could be better.

It’s become quite a puzzle which I’ve created out of newbie ignorance! Actually, it seems to me, I have a good start on it, and what I have so far seems logical.

The project: a 48-thumb border around a large image placeholder and a brief introduction placeholder. It’s locked in at a size that is viewable “above the fold” on 15″ monitors at 800×600. (Or at least I hope it is – I haven’t tested it yet…help? ?)

The gallery arrays and intro arrays make it nicely scalable, so all you have to do to have a new gallery is to make a new array for picture names and one for intros.

[URL=http://www.powell3d.com/bryce_pics/gallery1A.html]This page[/URL] shows the format I want. The thumbs are working, so you can view the gallery, but things arre messed up a little right now.

And as of this posting, this code has holes all over it.
[URL=http://www.powell3d.com/js/all_galleries.js]The JavaScript file is here.[/URL]

How many more variables am I going to need? What will make this program idea better? Is it a good idea to begin with?

to post a comment
JavaScript

27 Comments(s)

Copy linkTweet thisAlerts:
@NevermoreFeb 23.2003 — Personally, I think it's a great idea. Love the pics.

What do you want me to do, though? The arrows didnt seem to work - do you want those to scroll the images? What do you actually want it to do other than what it already does?
Copy linkTweet thisAlerts:
@mitchpowellauthorFeb 23.2003 — Thank you cijori, for enjoying the pics -- I have several more 48-picture-sets that I will be using once the CODE IS WRITTEN!

One needs to study the CODE I have written. I described what I want it to do. There are two links on my original post. [URL=http://powell3d.com/bryce_pics/gallery1A.html]The exemplary picture page[/URL], and [URL=http://powell3d.com/js/all_galleries.js]the "all_galleries.js" JavaScript file[/URL]. The JavaScript file is intended to DYNAMICALLY GENERATE A PAGE [I]LIKE[/I] THE EXAMPLE PAGE.

The example page is NOT the end result. It's there to show the layout.

The code must take the 48-picture-set selected by the user, (i.e., the user selects: "Gallery One", "Gallery Two", etc., from the calling page), and it must build a page [I]LIKE[/I] my example page.

The JavaScript file needs lots of work. Variables aren't exactly right yet; and some functions that may be needed haven't even been written yet.

The navigation arrows are for "Previous gallery", "Home", and "Next gallery". "Previous" and "Next" will call this same JavaScript file to generate the corresponding gallery set. "Home", of course, returns to the calling page; i.e., the main index of galleries.

The thumbs will populate the border of the page, the header, (or title) of the gallery will appear in the main display area, and the intro (or brief description area to the right of that,) will begin with some "blanket" introductory text; then when a thumb is clicked, the associated description for that thumb appears there.

I mentioned there are holes all over the code. I made comments throughout the code in hopes of enlightening anyone reading it as to what is happening at that part of the code. There are open-ended variables which need to be figured out. The table cell where the navigation arrows goes, e.g., isn't figured out yet.

If you were in "Gallery One", e.g., you wouldn't have a "Previous" arrow, and if you were at the last set of pictures, (the last gallery), there wouldn't be a need for a "Next" arrow.

And so on.

Thank you,

Mitch Powell
Copy linkTweet thisAlerts:
@NevermoreFeb 24.2003 — Correct me if I'm wrong, but it sounds like you want the new galley to generate befor the page loads, not once it has loaded. I so, PHP or ASP would be better choices. Does your server support PHP?
Copy linkTweet thisAlerts:
@mitchpowellauthorFeb 24.2003 — By george, I think you've got it!

My host has PHP4 and MySQL. I thought about writing this in PHP, but I have a better understanding of JavaScript, so I was better able to envision the whole project from this angle.

So, how would one write a PHP file that does what I want this to do?
Copy linkTweet thisAlerts:
@NevermoreFeb 24.2003 — Just one problem... Youve taken the 'model' offline - I need to see the format you want again, so can you put it on the forum as an attachment, please?

Thanks
Copy linkTweet thisAlerts:
@mitchpowellauthorFeb 24.2003 — I am so sorry. My host has been upgrading to new servers since the beginning of the year, and it has surely tested my mettle, as well as make me learn so much more. I'm now in the process of transferring files to the correct nameserver. I wish I had someone who could walk me through all this. My hosting company has been inept at communicating to me what I need to do. Their e-mails are in ALL CAPS, and they form their sentences awkwardly, and sometimes they take days to respond.

I hope to have everything available in a few hours.

Did you already save the .js file locally?

The variables I use there to write the HTML table pretty much sum up the layout of the table. 11 rows, 15 columns; if it's the second row, make it 4 columns; if it's the 3rd through 9th rows, make it 2 columns; if it's the tenth row, make it 3 columns; and by default, rows 11 and 1 will get 15 columns.

And while populating those cells with the thumbs, the header, and the navcell, link them to the javascript functions doPic and doIntro to show the big picture and the associated intro when clicked.

Getting busy --

Thanks for your interest.

For a little fun and a laugh at my expense, try powelltownusa.com. For some reason that's still up and running.
Copy linkTweet thisAlerts:
@NevermoreFeb 25.2003 — I'll try and rebuild from memory, but it would be really useful if you've got a version of the page saved.
Copy linkTweet thisAlerts:
@mitchpowellauthorFeb 25.2003 — I posted it all on [URL=http://powelltownusa.com]powelltownusa.com[/URL]

I'm so sorry. Right in the midst of everything, my host is giving me troubles with their new servers and interface. I'm looking into Host4Profiit.com. (Any thoughts?)

In the meantime, I'm not sure why, but [URL=http://powelltownusa.com]powelltownusa.com[/URL] is still up-and-running.

Thanks for your continued interest. there's a little tiny link at the very bottom of the index page for 'Help me with my gallery generator'.
Copy linkTweet thisAlerts:
@NevermoreFeb 25.2003 — What do you want to display in the text frames when the pictures are clicked?
Copy linkTweet thisAlerts:
@mitchpowellauthorFeb 25.2003 — The arrays at the bottom of the "all_galleries.js" file do not have a full 48 elements in them yet, but ultimately they will, and the "introN[] array is to correlate to the galleryN[] array. When viewing Gallery One, for example, the HTML string for galleryOne[1] would be intro[1], and so on...

This can be HTML complete with links. I never want it to exceed the maximum text. The table should never expand.
Copy linkTweet thisAlerts:
@NevermoreFeb 25.2003 — How many galleries?
Copy linkTweet thisAlerts:
@mitchpowellauthorFeb 25.2003 — N galleries.

It's irrelevant. I want to be able to add new ones as I go, and merely name them "Gallery Seventeen", Gallery One Hundred and Fifty-Four", etc.

For now two or three will do.

I don't actually have 3x48 pictures yet, but I want to get the code in place, then create more, and write good tutorials for each one etc. The brief intro in the frame on the right will have a link to the full tutorial page for each picture.
Copy linkTweet thisAlerts:
@NevermoreFeb 25.2003 — I can either:

make a javascript which will change the images, and you put in the source files

or:

make a php, and you rename the filesas things like 'gallone[1].jpg'
Copy linkTweet thisAlerts:
@mitchpowellauthorFeb 25.2003 — PHP would be much better wouldn't it?

I'm getting the impression that PHP is the mighty conqueror over the Microsoft ASP NET whatever thingie? ?

I haven't studied ASP. I have studied PHP some.

I wish I could be in your brain when you start laying out the structure for a project like this. When I get an idea in my head, I try to see it both from the top down, and from the bottom up. But I always become awash in ignorance. I just don't know enough of the programming language to be sure I'm writing solid code that gets the job done the most efficient way, and doesn't create any memory leaks or what-have-you.

Off-Topic: Are you happy with your web host, and if so, would you recommend them to a wannabe like myself?

And BTW, TYSM -- (Thank You So Much!)

(I just now made that up)
Copy linkTweet thisAlerts:
@NevermoreFeb 25.2003 — a)No, you NEVER want to be in my mind. Not pretty...

b)I don't have paid hosting, I'm hosted by an organisation I make pages for, so I can speak to the technician, see the servers etc. Can't complain, I suppose, although they do seem a [I]little[/I] over protective of the servers.

ps I'll try to have it finished within a few days.
Copy linkTweet thisAlerts:
@mitchpowellauthorFeb 25.2003 — I'm floored! So happy you can imagine a resolution to my plan. I'll be busy settling in with Host4Profit. I think they offer everything I need and they have heart too.

Internet Marketing Gurus with silver tongues are dime-a-dozen. It's when their eloquent writing convinces you they have heart, that you know. The rest is all "Happy Talk".

Thanks again! I'm beginning to pull stuff togeher. I'll be an Internet Warrior soon!
Copy linkTweet thisAlerts:
@NevermoreFeb 27.2003 — I am REALLY SORRY about this, but it is going to take me a bit longer than I thought to get the stuff written. This is due to three reasons:

1) To make the php work, I have had to start the page again

2) My web host, which I just said was good, is now down

3) I have somehow got myself involved ina drama production (damndamndamndamndamndamn)

Once again, I am really sorry.
Copy linkTweet thisAlerts:
@mitchpowellauthorFeb 27.2003 — Go directly to my new host, [edited by me after realizing I was plugging something inappropriately --I'll send the name to you by e-mail]!

I'm very happy so far with my new move!

Plus I'll get a commission if you sign up with them. Oops! I'm selling aren't I? Well, you've followed the thread. It's what's been happening while we've been messaging back and forth. I had to change hosts because the old one, which will remain nameless, was terrible. Now I know I'm going to be happy with my new host.

Don't forget to tell them who referred you.
Copy linkTweet thisAlerts:
@NedalsFeb 27.2003 — I recently completed a site for a customer [http://www.luxbrotherspainting.com] which included picture galleries for each of the 'services' pages. It uses only javascript and really simple at that. Take a look. There are 2 simple external scripts that you could use. If you have trouble extracting them from the web, let me know and I'll post them. ?
Copy linkTweet thisAlerts:
@NevermoreMar 01.2003 — Is that what you want, or do you want your previous format? Let me know - my host's back up now, so on with the scripting!
Copy linkTweet thisAlerts:
@mitchpowellauthorMar 01.2003 — I don't understand what you're asking. Previous format? If you're responding to what nedals showed me, I didn't find the javascript files, and I've been busy trying to pull things together at my new host, so I haven't been worried about the gallery generator much. But if you're responding to my post about going to my web host, well your response doesn't really follow, does it. You must be asking me if [I]that[/I] (nedals script) is what I want. Then no. I'd rather see what you can get going.

Thanks. Take your time.
Copy linkTweet thisAlerts:
@NevermoreMar 01.2003 — I [I]think[/I] that this works... but I haven't actually tested it with real pictures, so I'm not sure. I've put it on Lycos for the time being, because my normal host is having problems (again), and I'm too poor to pay for hosting. Maybe some time soon.

Anyway, I have attached the files. To make them your own, all you need to do is:

Insert you database name, username and password after the appropriate variables in the scripts.

Upload the scripts (well, duh)

Create a mysql table in the database you specified, called gallery, and in it place two columns. These two columns need to be called id and source. The column ID needs to be set to auto_increment, unique and primary key. Then, feed in the source into the source column [B]without[/B] specifying an ID. The id will therefore go up by 1 each time. If you do not let the ID go up by 1 each time, say it goes up by two once, the php will not find the correct pictures.

I don't know if I've put the correct source for the starting image in the main frame. This is dictated in display1.php.

You will also need to change the source for the arrows to the next and previous galleries.

I'm pretty sure that's everything. Sorry it took longer than I thought. It should work- if it doesn't, PM me, and check that the MYSQL is right.

P.S. If a picture does not show up, right click on it and choose properties. If there is no image source in the URL, then you have not specifyed it in your database.

P.P.S. You guessed right - I meant did you still want me to work on it.

[upl-file uuid=97da0d13-4013-4680-96d4-8de53c8f2528 size=3kB]gallery.zip[/upl-file]
Copy linkTweet thisAlerts:
@NevermoreMar 01.2003 — I was just re-reading the previou parts of this thread, and realised that I omitted any code to display the descriptions of the pictures, or a home button. The previous code should work, and I will post an upgrade shortly which [I]should[/I] allow you to use the new code without having to dramatically remake anything.

Sorry about that.

:rolleyes: ? :rolleyes:

P.S. nedals - you're code doesn't allow for a flexible number of pictures, a smae-page preview, none-javascript browsers etc. Mine will, I think.
Copy linkTweet thisAlerts:
@mitchpowellauthorMar 02.2003 — Yes. Thank you. I noticed the missing "introText" too. But it's cool what you've done. I hope you understand I'm a real novice at this. Let me see if I understand something about PHP and My SQL:

For me to test my programs locally, I should have my own copy of PHP and MySQL on my computer? While just now moving in to my new web host, I've discovered they provide phpMyAdmin, and MySQL, but I'm not sure if I need to have copies of these on my hard drive in order to do development and testing?

I am attempting to work with your code to better "guide" it to where I want it to go... but I have to take a lot of time out to read the PHP manual and even the Perl Manual again, and I'm trying to design a 3D magnet that makes things snap to it when you mouse over it too!

I'm looking to build all kinds of fun stuff on my web site, but my imagination is soaring while my knowledge of programming is a little limited. Some Perl/CGI, mostly web design applications and Flash and JavaScript. I'm lost when it comes to e-mail.

Did we go way off topic? Sorry...
Copy linkTweet thisAlerts:
@NevermoreMar 02.2003 — I'll post tyhe new code later (i.e. when I've made it), but first, yes, to vie PHP files on your computer you would need to be running a server on it, e.g. Apache, and a PHP interpreter. I find it easier just to view them on Lycos, who are free, and allow FTP uploads. That's where I put most files I'm working on.
Copy linkTweet thisAlerts:
@NevermoreMar 05.2003 — Sorry about the delay - I was a bit busy. What URL is your home page?
Copy linkTweet thisAlerts:
@mitchpowellauthorMar 06.2003 — http://powell3d.com

I finally got moved over from the other host to the new host.

I haven't had time to yank at your code. I'm doing so many things in preparation to launch an official business website or two or three. I am developing for myself, my friends, and a few other choice affiliations that are going to help provide me with an income.

I'm excited.

OT: Ever been over to Angus Turnbull's Javascript website [url="http://twinhelix.com"]Twin Helix[/url]? Way cool.
×

Success!

Help @mitchpowell spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...