How to build this gallery? HELP!

Ask for help about FlashGot, no registration needed to post
Post Reply
AlNaimi
Posts: 10
Joined: Fri Aug 28, 2009 9:19 am

How to build this gallery? HELP!

Post by AlNaimi »

Hi every one....
I couldn't figure out how to build this gallery, You may solve my problem if you can...PLZ
It look like this:
There were 10 albums, Each album contain 25 jpg's. But first pictures in album 1 start from [001-025], The second album start from [025-050], The third album start from [050-075]....etc
When using build gallery in Flashgot, it gave me this formula: What should i do?
http://www.Example.com/album[01-01;1]/name[001-001;1].jpg

Thanks in advanced
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16 AutoPager/0.5.2.2 (http://www.teesoft.info/)
User avatar
therube
Ambassador
Posts: 7969
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: How to build this gallery? HELP!

Post by therube »

An expensive way would be something like:

Code: Select all

album[01-10]/name[001-999]
A theoretical way (& I don't know if it can be done, but thinking why can't you do it with JavaScript):

Code: Select all

album[01-10]/name[001-025]+(25*[$001-1])
My intent with the above is to use a mathematical equation (in JavaScript) - basically the way it is written.

So ...

Code: Select all

001/001+( 25 * 0 ) = 001/001
001/002+( 25 * 0 ) = 001/002
001/003+( 25 * 0 ) = 001/003
...
002/001+( 25 * 1 ) = 002/026
002/002+( 25 * 1 ) = 002/027
002/003+( 25 * 1 ) = 002/028
...
002/001+( 25 * 2 ) = 002/051
002/002+( 25 * 2 ) = 002/052
002/003+( 25 * 2 ) = 002/053
Now whether something like that can be done, I wouldn't have a clue?
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090825 SeaMonkey/1.1.18
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: How to build this gallery? HELP!

Post by Giorgio Maone »

First enter the following pattern in the "Variable URLs" panel:

Code: Select all

http://www.Example.com/album[by(25, [1-250])]/name[$001].jpg
Then switch to the "JavaScript functions" panel, select the "by" function which should be shown on the top left and past the following code to replace the right text area content:

Code: Select all

return Math.floor((arguments[1] - 1) / arguments[0]) + 1;
For who's interested, the first square bracket group encloses a JavaScript call to the "by" function (which gets defined on the fly), whose arguments are the step (25) and the variable interval [1-250].
The [$001] expression is just a backreference to the first variable interval defined in this pattern.
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 (.NET CLR 3.5.30729)
AlNaimi
Posts: 10
Joined: Fri Aug 28, 2009 9:19 am

Re: How to build this gallery? HELP!

Post by AlNaimi »

Thanks therube...
********************************************
And you Giorgio Maone, You are the best....
I don't no what i was wrote but i was like a magic formula :o ...... Please Let me get you a cup of coffee... :mrgreen:
Thanks man
I will study the function very well....
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16 AutoPager/0.5.2.2 (http://www.teesoft.info/)
AlNaimi
Posts: 10
Joined: Fri Aug 28, 2009 9:19 am

Re: How to build this gallery? HELP!

Post by AlNaimi »

BTW, Giorgio Maone.....
If the album was like this: album01, album02...etc . What should we do?
This formula set album1, album2....etc
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16 AutoPager/0.5.2.2 (http://www.teesoft.info/)
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: How to build this gallery? HELP!

Post by Giorgio Maone »

Modify the by() function this way:

Code: Select all

return arguments[1] == 10 ? 10 : "0".concat(Math.floor((arguments[1] - 1) / arguments[0]) + 1)
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 (.NET CLR 3.5.30729)
AlNaimi
Posts: 10
Joined: Fri Aug 28, 2009 9:19 am

Re: How to build this gallery? HELP!

Post by AlNaimi »

The problem with new new by function was: in with album10 show album010.....
also ablum11 show ablum011....etc...
Thanks
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16 AutoPager/0.5.2.2 (http://www.teesoft.info/)
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: How to build this gallery? HELP!

Post by Giorgio Maone »

AlNaimi wrote:There were 10 albums
AlNaimi wrote:also ablum11 show ablum011....etc...
:roll:

However

Code: Select all

var n  = Math.floor((arguments[1] - 1) / arguments[0]) + 1;
return n < 10 ? "0".concat(n) : n;
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 (.NET CLR 3.5.30729)
AlNaimi
Posts: 10
Joined: Fri Aug 28, 2009 9:19 am

Re: How to build this gallery? HELP!

Post by AlNaimi »

Thanks....
Forgive my stupidity. :roll:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16 AutoPager/0.5.2.2 (http://www.teesoft.info/)
Post Reply