var VUrl1: String; VUrl2: String; VCache1: String; VCache2: String; VLocal1: String; VLocal2: String; VExt: String; VEnabled: Boolean; VCaption: String; VUserNumber: String; VUserDescr: String; begin VEnabled := MapAttachmentsInfo.GetEnabled(0); if (not VEnabled) then begin ResultText := SourceText; Exit; end; // get params VUrl1 := MapAttachmentsInfo.GetDefURLBase(1); VUrl2 := MapAttachmentsInfo.GetDefURLBase(2); VCache1 := MapAttachmentsInfo.GetNameInCache(1); VCache2 := MapAttachmentsInfo.GetNameInCache(2); VExt := MapAttachmentsInfo.GetExt(0); // make local path for medium image VLocal1 := VCache1+AttachmentSubCache+AttachmentNumber+VExt; // download medium image //if (not FileExists(VLocal1)) then // if file not exists //DownloadFileToLocal(VUrl1+AttachmentNumber+VExt, VLocal1, MapAttachmentsInfo.GetContentType(1)); // make local path for original image VLocal2 := VCache2+AttachmentSubCache+AttachmentNumber+VExt; // download original image //if (not FileExists(VLocal2)) then // if file not exists //DownloadFileToLocal(VUrl2+AttachmentNumber+VExt, VLocal2, MapAttachmentsInfo.GetContentType(2)); // obtain description with tags VCaption := GetBetween(SourceText,'

','

'); // get user info VUserNumber := GetBetween(SourceText,'panoramio.com/user/',''); VUserDescr := GetAfter('>',VUserNumber); VUserNumber := GetNumberAfter('panoramio.com/user/',SourceText); // make result html text ResultText := '
Уменьшенное изображение'+ '

'+VCaption+'

'+ ''+VUserDescr+'   |   '+ 'Фото на сайте Panoramio   |   '+ 'Оригинал'+'
'; end.