MozillaZine

Flashgot, Build Gallery, please help :)

Talk about add-ons and extension development.
ripkord
 
Posts: 2
Joined: April 30th, 2005, 6:46 am

Post Posted April 30th, 2005, 6:51 am

Hi there, im trtying to assemble a gallery and it has preview thumbs in a structure like this....

http://www.example.com/gallery/100/100.jpg
http://www.example.com/gallery/101/101.jpg
http://www.example.com/gallery/102/102.jpg

Each preview thumb is in its own folder, as you can see...

I cant figure out what syntax to use with the latest version of flashgot...

http://www.example.com/gallery/[100-200]/[100-200].jpg as you would expect generates

http://www.example.com/gallery/100/100.jpg
http://www.example.com/gallery/100/101.jpg
http://www.example.com/gallery/100/102.jpg
http://www.example.com/gallery/100/103.jpg

etc and that just chews up memory :(

Anyone know of a method to generate


http://www.example.com/gallery/100/100.jpg
http://www.example.com/gallery/101/101.jpg
http://www.example.com/gallery/102/102.jpg
http://www.example.com/gallery/103/103.jpg
http://www.example.com/gallery/104/104.jpg
http://www.example.com/gallery/105/105.jpg

Thanks so much for this excellent extension!

Giorgio Maone

User avatar
 
Posts: 3516
Joined: September 21st, 2004, 12:05 am
Location: Palermo - Italy

Post Posted April 30th, 2005, 9:30 am

You need a bit of JavaScript magic ;)

Simplicistic (not much reusable) version
Use this pattern:

http://www.example.com/gallery/[customFx([100-200])].jpg

In the JavaScript tab you'll find a new function called customFx. Paste into the code text area the following snippet:
Code: Select all
return arguments[0]+"/"+arguments[0];

Done!

Sligtly more advanced, but very reusable version
Use this pattern:

http://www.example.com/gallery/[push('[100-200]')]/[pop()].jpg

In the JavaScript tab you'll find 2 new functions, called push and pop.
Paste the following definitions:

push() {
Code: Select all
if(!this.stack) this.stack=[];
this.stack.push(arguments[0]);
return arguments[0];

}

pop() {
Code: Select all
return this.stack.pop();

}

ripkord
 
Posts: 2
Joined: April 30th, 2005, 6:46 am

Post Posted April 30th, 2005, 9:35 am

Thanks a lot thats excellent, I'll go and try that :)

Giorgio Maone

User avatar
 
Posts: 3516
Joined: September 21st, 2004, 12:05 am
Location: Palermo - Italy

Post Posted May 13th, 2005, 5:09 am

ripkord wrote:Thanks a lot thats excellent, I'll go and try that :)

I guess you'll enjoy this very new trick as well ;)

makea
 
Posts: 2
Joined: December 12th, 2011, 2:12 am

Post Posted December 12th, 2011, 7:20 am

Hi there!
Referring to the previous..I tried different settings, but it did not work. Could you help me?
As you can see, change directory and file name in the same way

http://xyz.com/files/files/01/27/84/80/ ... _large.jpg
http://xyz.com/files/files/01/27/84/81/ ... _large.jpg
http://xyz.com/files/files/01/27/84/82/ ... _large.jpg
http://xyz.com/files/files/01/27/84/83/ ... _large.jpg

What should I do?
Apologies for the poor little English language. :/

LoudNoise
Moderator

User avatar
 
Posts: 40048
Joined: October 18th, 2007, 1:45 pm
Location: Next door to the west

Post Posted December 12th, 2011, 10:27 am

Flashgot and NoScript have a forum now. http://forums.informaction.com/
Post wrangler
"Choose between the Food Select Feature or other Functions. If no food or function is chosen, Toast is the default."

makea
 
Posts: 2
Joined: December 12th, 2011, 2:12 am

Post Posted December 12th, 2011, 11:26 am

Thanks for link!
However, I have already browsed the given forum. I have not found a working answer to my problem.
Next, I put a couple of examples

orginal address:
http://xyz.com/files/files/01/27/84/80/ ... _large.jpg
http://xyz.com/files/files/01/27/84/81/ ... _large.jpg
http://xyz.com/files/files/01/27/84/81/ ... _large.jpg

http://xyz.com/files/files/[01-01;1]/[27-27;1]/[84-84;1]/[00-99;1]/[1278400-1278499;1]_large.jpg (This works just fine. However, the problem is a large memory consumption, because of incorrect addresses will be much)
http://xyz.com/files/files/[01-01;1]/[27-27;1]/[84-84;1]/[$01]/[1278400-1278499;1]_large.jpg (This option not work)
http://xyz.com/files/files/[01-01;1]/[27-27;1]/[84-84;1]/[00-99;1]/[12784[$01]_large.jpg (not work..)
http://xyz.com/files/files/[01-01;1]/[27-27;1]/[84-84;1]/[$01]/[12784$01]_large.jpg (not work..)

So the problem is, the directory and file name of the one-time change does not work.

Thank you for your answer!

LoudNoise
Moderator

User avatar
 
Posts: 40048
Joined: October 18th, 2007, 1:45 pm
Location: Next door to the west

Post Posted December 12th, 2011, 11:39 am

The point being is that you should ask over there, not in a thread from 2005. Locking.
Post wrangler
"Choose between the Food Select Feature or other Functions. If no food or function is chosen, Toast is the default."

Return to Extension Development


Who is online

Users browsing this forum: No registered users and 4 guests