Home
Tour
Costs
Answers
Demos
Access
Tools
Assistance
Enroll
 SearchSearch
How to create an automatic gallery with thumbnails

 
   Answers Forum Index -> Special how to's
View previous topic :: View next topic  
Author Message
ws
Write and Show support


Joined: 27 May 2007
Posts: 140

PostPosted: Tue Sep 11, 2007 4:14 pm    Post subject: How to create an automatic gallery with thumbnails

How to create an automatic gallery with thumbnails

It is quite easy to automatically create galleries from photos you own and display them on your gallery chapter pages.
Quote:
This is amazing. It makes your gallery automatically created from any directory (like a chapter or subject directory). It simply grabs all the pics (gifs, jpgs, pngs)... automatically makes the thumbnails and displays them. Click the thumbnail and it opens in a new window (you can see then the location of these files in your browser). These are done from simple directories you create in the WriteandShow file manager. Nice
All you have to do is:

Three simple steps (honestly)

Quote:
a. Put your photos you will be displaying into a single directory (which you start in your WriteandShow file manager).

b. Then you insert two simple files (one is an htm file, which you edit to match the url of your new gallery) into that directory.

c. Next, you go in your author panel and create a new page in your "Gallery" chapter and show that htm file in an iframe.

Your gallery is created on the fly complete with thumbnails... your larger photos show in new windows when a viewer clicks on the thumbnail. Does that sound simple enough? Following is a step by step lesson to make it happen:


Last edited by ws on Wed Dec 12, 2007 11:09 am; edited 6 times in total
Back to top
ws
Write and Show support


Joined: 27 May 2007
Posts: 140

PostPosted: Tue Sep 11, 2007 4:19 pm    Post subject: Step-by-step to create an automatic gallery

"How to" guide - to create a new gallery display:

1 Create a new directory (folder) on your pc's hard-drive of the same name as what you will later create in the Write and Show file manager. The pc folder (or directory) is named to match the chapter, as for example, gallery1, gallery2, etc., you are making the gallery for (could be any other name too).

2. Access your chapter (the one you are creating this gallery for). Page by page go through the chapter. Save all the photo files from that chapter.

How to save a photo file you see on a webpage
Quote:
a. WIth the mouse cursor over the picture. Right Click.
b. With Internet Explorer: choose: Save Picture as" Mozilla: choose: "Save image as...".
c. Navigate to your new folder and save.into that newly created folder on your pc, being sure you like the names (and fixing them to suit as you go).


3. Next, you will be downloading two special files from your Write and Show file manager:
Quote:
a. Access your Write and Show file manager:
b. You will see the "1mastergallery" directory at the top of your directory listings.
c. This is where you will find the two special files used to make an automatic gallery.



4. Open that 1mastergalley" directory (click on it) and you will see the two special files:


5. Download those two files:

Quote:
a. Download (or Copy if you did this previously) into your new folder on your pc, the special htm file (called gallery1.htm). Name that htm file to match the directory, such as, gallery8.htm or gallery9.htm, etc .

b. Next, download (or copy if you did this previously) into that new folder on your pc , the other file. It is special code file, "getpics.php."


Last edited by ws on Tue Sep 11, 2007 7:45 pm; edited 12 times in total
Back to top
ws
Write and Show support


Joined: 27 May 2007
Posts: 140

PostPosted: Tue Sep 11, 2007 4:46 pm    Post subject: How to edit the special gallery htm files

What do you do with those two special files?

1. The file called "getpics.php" requires no editing and never has to be changed. it will be the same for all new gallery directories. It simply has to be placed inside the directory you are making into a gallery. (That's easy, huh?)

2. The file called gallery1.htm has to be changed.

Here is how to edit your special gallery htm file:

Quote:
a. Edit (with notepad is fine) that gallery1.htm (or whatever name you gave it for the appropriate chapter)

b. You will be changing only two url locations. You will be changing numbers to match your new gallery name (like 4 or 5).


Screenshot of where to make the two changes in gallery1.htm.



3. Save that htm file with a new name (if you didn' t do that when you downloaded), like galley12.htm. to match your directory name (where the pics are).

4. Now, create a matching directory (same name as you just did on your pc) using the Write and Show file manager.

5. Copy all the files (upload) from your pc's matching folder into the remote directory of the same name.

That's it.

You have created a gallery.
Next you wll learn how to create your gallery page (same as any other page... but we walk you through it anyhow).


Last edited by ws on Tue Sep 11, 2007 6:12 pm; edited 9 times in total
Back to top
ws
Write and Show support


Joined: 27 May 2007
Posts: 140

PostPosted: Tue Sep 11, 2007 5:02 pm    Post subject: Creating your gallery pages

How to create your gallery pages

--------- What follows is somewhat routine page creation covered elsewhere in the Answers pages---

But notice that pastable code -- it is different

1. Go to the gallery in the author's panel. Create a new page. Use the iframe butto to create iframe with a link to that gallery4.htm (or whatever).

Please paste this code - it's different:
Quote:

<h5>Chapter 3 photo gallery</h5>
<div><iframe src="http://zqv.com/yourbooktitle/files/galleryname/galleryname.htm" width="100%" height="600" scrolling="no" frameborder="0"></iframe></div>


Code differences from standard:
1. height=" 600"
2. has frameborder="0"
3. has scrolling="no"


2. Put in whatever text you wish to appear on the page and give a name title to the page like (Chapter 4 - photo gallery).



3. Change the creation date of that page to make it in sequence (slightly later) with the gallery page that preceded it.

3. Save that page and exit to your book.

4. Enjoy your new gallery, with thumbnails and pages created created on the fly.
Back to top
ws
Write and Show support


Joined: 27 May 2007
Posts: 140

PostPosted: Sun Dec 09, 2007 7:00 pm    Post subject: How to have your images displayed in a special order.

How to have images showing in a specified order

1. View your specialgallery.htm file (the special .htm file that you include in your automatic gallery directory) in a text editor (like Notepad).

2. First, make the two standard changes (discussed above) which you normally do to make this htm file relate to the special gallery you are creating.

3. After those changes are complete, scroll down in the text editor and find this code:

Quote:
//Sort images by date? ("asc", "desc", or "")
//"desc" for example causes the newest images to show up first in the gallery
//"" disables this feature, so images are sorted by file name (default)
var gsortorder="asc"


4. Change that last line to look like this:

Quote:
var gsortorder=""


5. Save your specialgallery.htm file and place it (as usual) in the directory you have created for this automatic gallery. Be sure to name it to match the gallery.

6. Name your images so that they will be sorted alphabethically by name. Alphabetical sorting puts numbers first, so name all of your files (in the order you want them to appear) like this:

Quote:
1aoldbarn.jpg
1bflowersinfield.jpg
1cstonefence.jpg
1dwindmill.jpg
(and so on).


Notice that we put two prefacing characters, 1a, 1b, 1c, 1d, etc (at the beginning of each image file name). This makes them to be sorted in order. If you have more than 26, then go to 2a, 2b,2c,2d, etc.

7. Place your images in your newly created directory along with the specialgallery.htm file (named accordingly, of course) and your getpics.php file.

8. Display your gallery page (using iframe) and your images will display in the order you specified.
Back to top
Display posts from previous:   
   Answers Forum Index -> Special how to's All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  


Created by WriteandShow.com WriteandShow.com  Answer forum utilizes phpBB © 2001, 2005 phpBB Group