Autosort plugin also for autosaved pages

Author Message
Lutz G. 09/01/2009 06:26 pm
I find the Autosort plugin very useful and want that also my autosaved pages get sorted automaticly.

Can you tell me if this can be done and how. I''m not good at Javascript but didn''t this line mean it should work with autosaved pages?

if ((!IQ.Saver.IsUpdate) && (!IQ.Saver.IsUserFolder) && (!IQ.Saver.IsAutoSave))...

Thanks!
Andrey Filatkin 09/02/2009 02:47 am
You need to remove the last condition from the line. Change it to:
if ((!IQ.Saver.IsUpdate) && (!IQ.Saver.IsUserFolder))...

Best regards,
Andrey Filatkin
MP Staff
Lutz G. 09/02/2009 06:04 am
Hello Andrey,

thank you so much for your help. It works!

Is it also possible to sort the folders also by the date the webpage get saved and without the domain as first subfolder so instead of:

com
-metaproducts

I will get:

2009
-09
-02
-metaproducts

Thanks again. This autosort alone is a great help for me.

Regards,
Lutz G.
Lutz G. 09/02/2009 06:08 am
> Hello Andrey,
>
> thank you so much for your help. It works!
>
> Is it also possible to sort the folders also by the date the webpage get saved and without the domain as first subfolder so instead of:
>
> com
> -metaproducts
>
> I will get:
>
> 2009
> -09
> -02
> -metaproducts
>
> Thanks again. This autosort alone is a great help for me.
>
> Regards,
> Lutz G.

sorry the indent didn''t work in my posting

the result I want to have is:

2009
------09
---------02
------------metaproducts
Andrey Filatkin 09/02/2009 07:11 am
Ok, take it

//MPIQPlugin
//Type=PreSave
//Name=Auto sort saved pages by date and URL
//Author=anfilat

function MP_PreSave() {
if ((!IQ.Saver.IsUpdate) && (!IQ.Saver.IsUserFolder)) {
dre1 = new RegExp(/https?:\/\/(?:www.)?([^\/]+)/);
dmn = document.URL.match(dre1);
if (dmn) {
host = dmn[1].toLowerCase();
d = new Date();
FolderName = "By URL\\" + d.getYear() + "\\"
+ ("0" + (d.getMonth() + 1)).substr(-2) + "\\"
+ ("0" + d.getDate()).substr(-2) + "\\"
+ host.replace(/^\s*|\s*$/g,"");
fld = IQ.SavedPages.ForceFolder(FolderName);
IQ.Saver.TargetFolder = fld;
}
}
}
Lutz G. 09/02/2009 09:41 am
Hello Andrey,

Wow! Great! This is amazing. Thank you so much.

I think the plugin system of Inquiry is one of a lot of outstanding features other webcapture softare are missing.

I would really appreciate it if you could come up with more plugins or maybe make a part of the forum where useres can post and share their ideas and explain more in the help file and in the plugins how they can be configured fit the users need.

But for now I''m very happy. Thanks again.

Regards,
Lutz G.
Andrey Filatkin 09/03/2009 01:54 am
Hello Lutz,
I''m glad to help you.

Best regards,
Andrey Filatkin
MP Staff
Andrey Filatkin 09/18/2009 03:59 am
Plugin above has a little bug. 'substr' need to be replaced with 'slice'.

//MPIQPlugin
//Type=PreSave
//Name=Auto sort saved pages by date and URL
//Author=anfilat

function MP_PreSave() {
if ((!IQ.Saver.IsUpdate) && (!IQ.Saver.IsUserFolder)
&& (!IQ.Saver.IsAutoSave)) {
dre1 = new RegExp(/https?:\/\/(?:www.)?([^\/]+)/);
dmn = document.URL.match(dre1);
if (dmn) {
host = dmn[1].toLowerCase();
d = new Date();
FolderName = "By URL\\" + d.getYear() + "\\"
+ ("0" + (d.getMonth() + 1)).slice(-2) + "\\"
+ ("0" + d.getDate()).slice(-2) + "\\"
+ host.replace(/^\s*|\s*$/g,"");
fld = IQ.SavedPages.ForceFolder(FolderName);
IQ.Saver.TargetFolder = fld;
}
}
}

Best regards,
Andrey Filatkin
MP Staff