Page 1 of 1
is it possible to have http url instead of jpg in export?
Posted: 2004-02-06 14:29:24
by Guest
hello, i'm trying to build up a simple export template for my space limited web site
is there a way to have just http urls of the covers instead of the files?
seems that the option "link to original file" anyway stores jpg in hard disk
is there a workaround?
thank you so much, i DO love AMC

Posted: 2004-02-06 15:06:01
by antp
The "link to file" is a link to a local file.
In the current versiont the program cannot manager links to web pictures (it will be added in the future) but you could store the picture URL in one of the fields that you do not use, and then use this field as source for the image when exporting with something like <img src="$$ITEM_TheFieldThatHasTheLink">
Posted: 2004-02-06 15:17:06
by Guest
that's a cool trick...but still i don't know how to include in my db the picture absolute url, i mean i search info with amc, and i would like to include picture url, gathered by scripts, mean i don't know the url, information in html
Posted: 2004-02-06 17:24:07
by antp
In the scripts, just before the "GetPicture" call put a SetField.
e.g., in a script you find :
GetPicture(Value, ExternalPictures);
The first part is the address of the picture.
So if for example you want to store this address in the "Media Label" field, insert the following line :
SetField(fieldMedia, Value);
Posted: 2004-02-07 01:51:40
by Guest
yeah!!!
it rocks and it rolls now
thank you man!
you REALLY have saved my web space

Posted: 2004-02-09 13:43:24
by Guest
mmm, i have a slight problem...
i've found that the site has some "antileech" and replace a part of the url:
/locand/ in
/loc/500/
how can i STORE the right url?
this is the code, with your suggestion about the use of SetField,
of course thank you in advance, i'm really not able to program, not just a lazy boy
Code: Select all
LineNr := FindLine('<a href="posters/locp/', Page, PrevLineNr);
if LineNr = -1 then
begin
LineNr := FindLine('<img src="locand/', Page, PrevLineNr);
if LineNr > -1 then
begin
Line := Page.GetString(LineNr);
Delete(Line,1,pos('<img src="locand/', Line)+9);
SetField(fieldMedia, 'http://www.filmup.com/'+Copy(Line,1,pos('"',Line)-1));
GetPicture('http://www.filmup.com/'+Copy(Line,1,pos('"',Line)-1), False);
end;
end
else
begin
Line := Page.GetString(LineNr);
Delete(Line,1,pos('<a href="posters/locp/',Line)+8);
Line := GetLineFromOtherPage('http://www.filmup.com/'+Copy(Line,1,pos('"',Line)-1),'<img src="../loc/500/');
if Line <> '' then
begin
Delete(Line,1,pos('<img src="../',Line)+12);
SetField(fieldMedia, 'http://www.filmup.com/'+Copy(Line,1,pos('"',Line)-1) );
GetPicture('http://www.filmup.com/posters/'+Copy(Line,1,pos('"',Line)-1), False);
end;
end;
Posted: 2004-02-09 14:48:12
by antp
SetField(fieldMedia, '
http://www.filmup.com/'+StringReplace(Copy(Line,1,pos('"',Line)-1), '/locand/', '/loc/500/');
Posted: 2004-02-11 13:01:53
by Guest
mmm...
it's a cuple of day that i try to have some results but still no changes..
even replacing the SetField() with
SetField(fieldMedia, '
http://www.filmup.com/'+StringReplace(Copy(Line,1,pos('"',Line)-1), '/locand/', '/loc/500/')); seems to change nothing on the result..
same loc/500/ instead of locand/..
any clues of what could i try
(apart from stop bothering, of course

)
thank you in advance
Posted: 2004-02-11 14:25:00
by antp
maybe because there is no "/" in the front of the string.
Try remove it from the 2nd and 3rd string in the StringReplace (i.e. 'locand/' instead of '/locand/' and same for other)
Posted: 2004-02-12 12:28:41
by Guest
not so slick, but now it works like a charme:
Code: Select all
//Picture
LineNr := FindLine('<a href="posters/locp/', Page, PrevLineNr);
if LineNr = -1 then
begin
LineNr := FindLine('<img src="locand/', Page, PrevLineNr);
if LineNr > -1 then
begin
Line := Page.GetString(LineNr);
Delete(Line,1,pos('<img src="locand/', Line)+9);
GetPicture('http://www.filmup.com/'+Copy(Line,1,pos('"',Line)-1), False);
SetField(fieldMedia, 'http://www.filmup.com/'+StringReplace(Copy(Line,1,pos('"',Line)-1), 'locand/', 'loc/500/'));
end;
end
else
begin
Line := Page.GetString(LineNr);
Delete(Line,1,pos('<a href="posters/locp/',Line)+8);
Line := GetLineFromOtherPage('http://www.filmup.com/'+Copy(Line,1,pos('"',Line)-1),'<img src="../loc/500/');
if Line <> '' then
begin
Delete(Line,1,pos('<img src="../',Line)+12);
GetPicture('http://www.filmup.com/posters/'+Copy(Line,1,pos('"',Line)-1), False);
SetField(fieldMedia, 'http://www.filmup.com/'+StringReplace(Copy(Line,1,pos('"',Line)-1), 'loc/500/', 'locand/'));
end;
end;
DisplayResults;
really thank you for your suggestions