Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Ivek23

Pages: 1 ... 97 98 99 100 101 [102] 103 104 105 106 107 ... 133
2021
Development / Re: Script for egafd.com
« on: December 08, 2011, 09:47:18 am »
I'm back.

Quote
Certainly i made mistakes in modifying my code!
could you post your total code of Parse people?
Here is a complete Procedure Parse people code
Code: [Select]
//--------------------Procedure parse people-----------------
procedure ParsePeople(URL : String; HTML : String);

var curpos, endpos, PosStart, PosEnd, debug_Pos1, difpos : Integer;
    actPosstart, actposstart2, actPosStart3, actPosStart4, actposend, UrlposStart, UrlposEnd : Integer;
    Pseudo, Born, Lien, URL1, Name, OrigT, Title, Year, Av, Role, Notes, Note, tmpYear : String;


begin

//URL
Addfieldvalue(pfURL,URL);


//BORN:
curpos := Pos('<th>Notes</th>', HTML);
endpos := curpos;

While (curpos > 0) AND (curpos < Posfrom('</tr>', HTML, EndPos)) do begin
endpos := curpos;
PosStart := PosFrom('<td><ul class="list"><li>', HTML, endpos);
PosEnd := PosFrom('</li></ul></td>', HTML, PosStart);
Born := Trim(Copy(HTML, (PosStart + 25), (PosEnd - PosStart - 25)));
//LogMessage('BORN :' + Born);
curpos := posfrom('<td><ul class="list"><li>', HTML, posend);
if Born <> '' then
//AddFieldValue(pfBirthplace, Born);
LogMessage('BORN :' + Born);
end;


//AKA:
curpos := Pos('<th>Pseudonyms</th>', HTML);
endpos := curpos;

While (curpos > 0) AND (curpos < Posfrom('<th>Films</th>', HTML, EndPos)) do begin
endpos := curpos;
PosStart := PosFrom('class="acta">', HTML, endpos);
PosEnd := PosFrom('</span>', HTML, PosStart);
Pseudo := Trim(Copy(HTML, (PosStart + 13), (PosEnd - PosStart - 13)));
LogMessage('AKA :' + Pseudo);
curpos := posfrom('class="acta">', HTML, posend);
if Pseudo <> '' then
AddFieldValue(pfAltnames, Pseudo);
end;


//BIO:
curpos := Pos('<th>Films</th>', HTML);
    LogMessage('Films readout');
    if curPos > 0 then    begin

Lien := '';

    EndPos := curPos;
       while (curPos > 0) AND (curPos < PosFrom('</ul>', HTML, EndPos)) do begin
     
         EndPos := curPos; // Set last position to actual position
         // get url
         UrlPosStart := PosFrom('<a href="', HTML, EndPos);  // search for url start
         UrlPosEnd := PosFrom('" class="', HTML, UrlPosStart);  // search for url end     
         URL1 := BASE_URL + Copy(HTML, UrlPosStart + 9, (UrlPosEnd - UrlPosStart - 9) );
         LogMessage(URL1);

   
(*       // get url (for example)
UrlPosStart := PosFrom('<a href="', HTML, EndPos);  // search for url start
         UrlPosEnd := PosFrom('" class="', HTML, UrlPosStart);  // search for url end
         URL1 := BASE_URL + Trim(Copy(HTML, UrlPosStart + 9, (UrlPosEnd - UrlPosStart - 9) ));
         LogMessage(URL1);
*)


         // Get Name
         actPosStart := PosFrom('<a href="', HTML, EndPos);   // search for url start;
         actPosStart2 := PosFrom('">', HTML, actPosStart)
         actPosEnd:=PosFrom('</a>', HTML, actPosStart2);    // search for url end
         Name := Trim(Copy(HTML, (actPosStart2 + 2), (actPosEnd - actPosStart2 - 2) ));
         LogMessage(Name);
     
         debug_pos1:=Pos('(',Name);
            if debug_pos1 >0 then
            Name := Copy(Name,0,debug_pos1-1);
            LogMessage(Name);


//If Original:
        actposstart := actposEnd + 5;
        actposstart := PosFrom('">', HTML, actposstart) + 2;
        actPosEnd := PosFrom('</', HTML, actPosstart) - 1;
        If copy(HTML, actposstart, 3) = 'alt' then
        OrigT := Copy(HTML, (actPosstart + 22),(actPosEnd-actPosStart-21))
        else
        OrigT := Title;


(* // Get Title  (for movies)
         actPosStart := PosFrom('<a href="', HTML, EndPos);   // search for url start;
         actPosStart2 := PosFrom('">', HTML, actPosStart)
         actPosEnd:=PosFrom('</a>', HTML, actPosStart2);    // search for url end
         Title := Trim(Copy(HTML, (actPosStart2 + 2), (actPosEnd - actPosStart2 - 2) ));
         LogMessage(Title);
     
         debug_pos1:=Pos('(',Title);
            if debug_pos1 >0 then
            Title := Copy(Title,0,debug_pos1-1);
            LogMessage(Title);
*)


         //Notes :
     actPosStart := PosFrom('<a href="', HTML, EndPos);
     actPosStart2 := PosFrom('</a>', HTML, actPosStart);
     Av := Trim(Copy(HTML, (actposstart2 + 5), 1));
            logmessage('AV : ' + Av);
            If Av = '<' then begin
            actposStart2 := (actposstart2 + 5);           //Step to go after "</a>"
            actposstart3 := PosFrom('>', HTML, actposStart2);
            actposend := PosFrom('<', HTML, actposstart3);
            Notes := Trim(Copy(HTML, (actposstart3 +1), (actposend - actposStart3 - 1)));
            logmessage('Notes :' + Notes);
            end;   

            debug_pos1:=Pos('(',Notes);
            if debug_pos1 >0 then
            Year:= Copy(Notes,0,debug_pos1-1);
            LogMessage(Notes);

           
            ///Get Year & Note :
        tmpYear := Copy(Notes, 0, 2);
        logMessage('tmpYear :' + tmpYear);

        Case tmpYear of
            'c.' : Begin
               Year := Copy(Notes,4,4);
               Note := '';
   end;
   
'19', '20' : Begin
               If Copy(Notes,0,5) = 's' {OR Copy(Notes,0,5) = '?'} then begin    
                                Year := Copy(Notes,0,5);
                Note := Copy(Notes,7, Length(Notes)-6);
                end
                       else begin
                Year := Copy(Notes,0,4);
                Note := Copy(Notes,6, Length(Notes)-5);
               end;
                           If Copy(Notes,0,5) = '?' then begin
                Year := Copy(Notes,0,5);
                Note := Copy(Notes,7, Length(Notes)-6);
                end
               else begin
                Year := Copy(Notes,0,4);
                Note := Copy(Notes,6, Length(Notes)-5);
               end;
               end;
   
    else begin
             Year := '';
             Note := Notes;
            end;
            end;

logmessage('Year :' + Year);
        logmessage('Note :' + Note);


(*       // Get Year
     actPosStart := PosFrom('<a href="', HTML, EndPos);
     actPosStart2 := PosFrom('</a>', HTML, actPosStart);
     Av := Trim(Copy(HTML, (actposstart2 + 5), 1));
     logmessage('AV : ' + Av);
     If Av = '<' then begin
     actposStart2 := (actposstart2 + 5);           //Step to go after "</a>"
     actposstart3 := PosFrom('>', HTML, actposStart2);
     actposend := PosFrom('<', HTML, actposstart3);
     Year := Trim(Copy(HTML, (actposstart3 +1), (actposend - actposStart3 - 1)));
     logmessage(Year);
     end;   

         debug_pos1:=Pos('(',Year);
         if debug_pos1 >0 then
         Year:= Copy(Year,0,debug_pos1-1);
         LogMessage(Year);
*)


(* // Get Role (Now defined)
         actPosStart4 := PosFrom('<i>', HTML, (actposend-1)) + 4;
         actPosEnd:=PosFrom('</i>', HTML, actPosStart4) - 1;
         Role := Trim(Copy(HTML, actposStart4, (actPosEnd - actPosStart4)));
         LogMessage('Role: ' + Role);
     
         debug_pos1:=Pos('(',Role);
         if debug_pos1 >0 then
         Role:= Copy(Role,0,debug_pos1-1);
         LogMessage(Role);
*)


        // Get Role (Now defined)
     difpos := (PosFrom('<i>', HTML, (actposEnd-1))+4) - actposend;
     logmessage('DIFFERENCE : ' + intToStr(difpos));

     If difpos > 0 then begin
    If difpos < 200 then begin

            actPosStart := PosFrom('<i>', HTML, (actposend-1)) + 4;
            {actPosStart := PosFrom('> <i>', HTML, actPosStart) + 6;}
            actPosEnd:=PosFrom('</i></li>', HTML, actPosStart) - 1;
            Role := Trim(Copy(HTML, actposStart, (actPosEnd - actPosStart)));
            LogMessage('Role: ' + Role);
     
            debug_pos1:=Pos('(',Role);
            if debug_pos1 >0 then
            Role:= Copy(Role,0,debug_pos1-1);
            LogMessage(Role);

        end;
     end;


//AddPersonMovie(Trim(Title), '', Role, Year, LowerCase(URL1), ctActors);
AddPersonMovie(Trim(OrigT), '', Role, Year, LowerCase(URL1), ctActors);


(*    // Total Line
if Lien <> '' then
         Lien := Lien + #13;
if URL1 <> '' then
         Lien := Lien + '<link url="' + URL1 + '">';
            Lien := Lien + Name + '</link>';
if Year <> '' then
         Lien := Lien + ' • ' + Year;
If Note <> '' then
         Lien := Lien + ' • ' + Note;
if Role <> '' then
         Lien := Lien + ' • ' + Role;
*)
 
           
            // Total Line
        If Lien <> '' then
        Lien := Lien + #13;
        If URL1 <> '' then begin
        If OrigT <> Title then
        Lien := Lien + Name
        else
        Lien := Lien + '<link url="' + URL1 + '">' + Name + '</link>';
        end;
        If Year <> '' then
        Lien := Lien + ' • ' + Year;
        If Note <> '' then
        Lien := Lien + ' • ' + Note;
        If Role <> '' then
        Lien := Lien + ' • ' + Role;

        LogMessage('LIEN :' + Lien);
               

         curPos := PosFrom('<a href="', HTML, actPosEnd);
       end;
     
   
        if (Lien <> '') AND (Born = '') then
AddFieldValue(pfBio, Lien);
if (Lien  <> '') AND (Born <> '') then
AddFieldValue(pfBio, Born + #13+#13 + Lien);
end;


//Foto
curPos :=Pos('src="/actresses/id/',HTML);
if curPos > 0 then begin
EndPos := PosFrom('" width', HTML, curPos);
PhotoURL := BASE_URL + Copy(HTML, curPos + 5, EndPos - curPos - 5);
LogMessage('URL de la photo: '+ PhotoURL);
{PhotoURL := HTMLToText (PhotoURL);}
AddImageURL(4, PhotoURL);
end
else begin
PhotoURL := '';
end;

end;

Sorry, i don't understand your modification!
I modified the part of the Bio code


Here is a complete Modified Bio code

Code: [Select]
//BIO:
curpos := Pos('<th>Films</th>', HTML);
    LogMessage('Films readout');
    if curPos > 0 then    begin

Lien := '';

    EndPos := curPos;
       while (curPos > 0) AND (curPos < PosFrom('</ul>', HTML, EndPos)) do begin
     
         EndPos := curPos; // Set last position to actual position
         // get url
         UrlPosStart := PosFrom('<a href="', HTML, EndPos);  // search for url start
         UrlPosEnd := PosFrom('" class="', HTML, UrlPosStart);  // search for url end     
         URL1 := BASE_URL + Copy(HTML, UrlPosStart + 9, (UrlPosEnd - UrlPosStart - 9) );
         LogMessage(URL1);

   
(*       // get url (for example)
UrlPosStart := PosFrom('<a href="', HTML, EndPos);  // search for url start
         UrlPosEnd := PosFrom('" class="', HTML, UrlPosStart);  // search for url end
         URL1 := BASE_URL + Trim(Copy(HTML, UrlPosStart + 9, (UrlPosEnd - UrlPosStart - 9) ));
         LogMessage(URL1);
*)


         // Get Name
         actPosStart := PosFrom('<a href="', HTML, EndPos);   // search for url start;
         actPosStart2 := PosFrom('">', HTML, actPosStart)
         actPosEnd:=PosFrom('</a>', HTML, actPosStart2);    // search for url end
         Name := Trim(Copy(HTML, (actPosStart2 + 2), (actPosEnd - actPosStart2 - 2) ));
         LogMessage(Name);
     
         debug_pos1:=Pos('(',Name);
            if debug_pos1 >0 then
            Name := Copy(Name,0,debug_pos1-1);
            LogMessage(Name);


//If Title:
        actposstart := actposEnd + 5;
        actposstart := PosFrom('">', HTML, actposstart) + 2;
        actPosEnd := PosFrom('</', HTML, actPosstart) - 1;
        If copy(HTML, actposstart, 11) = 'alternative' then
        Title := Copy(HTML, (actPosstart + 22),(actPosEnd-actPosStart-21))
        else
        Title := OrigT;


//If Original:
        actposstart := actposEnd + 5;
        actposstart := PosFrom('">', HTML, actposstart) + 2;
        actPosEnd := PosFrom('</', HTML, actPosstart) - 1;
        If copy(HTML, actposstart, 3) = 'alt' then
        OrigT := Copy(HTML, (actPosstart + 22),(actPosEnd-actPosStart-21))
        else
        OrigT := Title;


(* // Get Title  (for movies)
         actPosStart := PosFrom('<a href="', HTML, EndPos);   // search for url start;
         actPosStart2 := PosFrom('">', HTML, actPosStart)
         actPosEnd:=PosFrom('</a>', HTML, actPosStart2);    // search for url end
         Title := Trim(Copy(HTML, (actPosStart2 + 2), (actPosEnd - actPosStart2 - 2) ));
         LogMessage(Title);
     
         debug_pos1:=Pos('(',Title);
            if debug_pos1 >0 then
            Title := Copy(Title,0,debug_pos1-1);
            LogMessage(Title);
*)


         //Notes :
     actPosStart := PosFrom('<a href="', HTML, EndPos);
     actPosStart2 := PosFrom('</a>', HTML, actPosStart);
     Av := Trim(Copy(HTML, (actposstart2 + 5), 1));
            logmessage('AV : ' + Av);
            If Av = '<' then begin
            actposStart2 := (actposstart2 + 5);           //Step to go after "</a>"
            actposstart3 := PosFrom('>', HTML, actposStart2);
            actposend := PosFrom('<', HTML, actposstart3);
            Notes := Trim(Copy(HTML, (actposstart3 +1), (actposend - actposStart3 - 1)));
            logmessage('Notes :' + Notes);
            end;   

            debug_pos1:=Pos('(',Notes);
            if debug_pos1 >0 then
            Year:= Copy(Notes,0,debug_pos1-1);
            LogMessage(Notes);

           
            ///Get Year & Note :
        tmpYear := Copy(Notes, 0, 2);
        logMessage('tmpYear :' + tmpYear);

        Case tmpYear of
            'c.' : Begin
               Year := Copy(Notes,4,4);
               Note := '';
   end;
   
'19', '20' : Begin
               If Copy(Notes,0,5) = 's' {OR Copy(Notes,0,5) = '?'} then begin    
                                Year := Copy(Notes,0,5);
                Note := Copy(Notes,7, Length(Notes)-6);
                end
                       else begin
                Year := Copy(Notes,0,4);
                Note := Copy(Notes,6, Length(Notes)-5);
               end;
                           If Copy(Notes,0,5) = '?' then begin
                Year := Copy(Notes,0,5);
                Note := Copy(Notes,7, Length(Notes)-6);
                end
               else begin
                Year := Copy(Notes,0,4);
                Note := Copy(Notes,6, Length(Notes)-5);
               end;
               end;
   
    else begin
             Year := '';
             Note := Notes;
            end;
            end;

logmessage('Year :' + Year);
        logmessage('Note :' + Note);


(*       // Get Year
     actPosStart := PosFrom('<a href="', HTML, EndPos);
     actPosStart2 := PosFrom('</a>', HTML, actPosStart);
     Av := Trim(Copy(HTML, (actposstart2 + 5), 1));
     logmessage('AV : ' + Av);
     If Av = '<' then begin
     actposStart2 := (actposstart2 + 5);           //Step to go after "</a>"
     actposstart3 := PosFrom('>', HTML, actposStart2);
     actposend := PosFrom('<', HTML, actposstart3);
     Year := Trim(Copy(HTML, (actposstart3 +1), (actposend - actposStart3 - 1)));
     logmessage(Year);
     end;   

         debug_pos1:=Pos('(',Year);
         if debug_pos1 >0 then
         Year:= Copy(Year,0,debug_pos1-1);
         LogMessage(Year);
*)


(* // Get Role (Now defined)
         actPosStart4 := PosFrom('<i>', HTML, (actposend-1)) + 4;
         actPosEnd:=PosFrom('</i>', HTML, actPosStart4) - 1;
         Role := Trim(Copy(HTML, actposStart4, (actPosEnd - actPosStart4)));
         LogMessage('Role: ' + Role);
     
         debug_pos1:=Pos('(',Role);
         if debug_pos1 >0 then
         Role:= Copy(Role,0,debug_pos1-1);
         LogMessage(Role);
*)


        // Get Role (Now defined)
     difpos := (PosFrom('<i>', HTML, (actposEnd-1))+4) - actposend;
     logmessage('DIFFERENCE : ' + intToStr(difpos));

     If difpos > 0 then begin
    If difpos < 200 then begin

            actPosStart := PosFrom('<i>', HTML, (actposend-1)) + 4;
            {actPosStart := PosFrom('> <i>', HTML, actPosStart) + 6;}
            actPosEnd:=PosFrom('</i></li>', HTML, actPosStart) - 1;
            Role := Trim(Copy(HTML, actposStart, (actPosEnd - actPosStart)));
            LogMessage('Role: ' + Role);
     
            debug_pos1:=Pos('(',Role);
            if debug_pos1 >0 then
            Role:= Copy(Role,0,debug_pos1-1);
            LogMessage(Role);

        end;
     end;


//AddPersonMovie(Trim(Title), '', Role, Year, LowerCase(URL1), ctActors);
AddPersonMovie(Trim(OrigT), '', Role, Year, LowerCase(URL1), ctActors);


(*    // Total Line
if Lien <> '' then
         Lien := Lien + #13;
if URL1 <> '' then
         Lien := Lien + '<link url="' + URL1 + '">';
            Lien := Lien + Name + '</link>';
if Year <> '' then
         Lien := Lien + ' • ' + Year;
If Note <> '' then
         Lien := Lien + ' • ' + Note;
if Role <> '' then
         Lien := Lien + ' • ' + Role;
*)
 
           
            // Total Line
        If Lien <> '' then
        Lien := Lien + #13;
        If URL1 <> '' then begin
    If Title <> OrigT then
        Lien := Lien + Name
else
If OrigT <> Title then
        Lien := Lien + Name
        else
        Lien := Lien + '<link url="' + URL1 + '">' + Name + '</link>';
        end;
        If Year <> '' then
        Lien := Lien + ' • ' + Year;
        If Note <> '' then
        Lien := Lien + ' • ' + Note;
        If Role <> '' then
        Lien := Lien + ' • ' + Role;

        LogMessage('LIEN :' + Lien);
               

         curPos := PosFrom('<a href="', HTML, actPosEnd);
       end;
     
   
        if (Lien <> '') AND (Born = '') then
AddFieldValue(pfBio, Lien);
if (Lien  <> '') AND (Born <> '') then
AddFieldValue(pfBio, Born + #13 + #13 + Lien);
end;

and now, in addition to  Original Title also that Title, which are not  Alternative Title.
Not the best.
In Bio movie list is not as transparent as yours, I like it, Of course, if that is what change is also OK.

Is it still your version of this code is better, perhaps it could be something to fix.

2022
Development / Re: Script for egafd.com
« on: December 06, 2011, 05:50:13 pm »
You can wait two or three days because I was half collapsed computer and I can not get to certain files. Thank you for understanding.

2023
Development / Re: Script for egafd.com
« on: December 06, 2011, 11:47:31 am »

I made two minor modif in egafd_people, for vision only :

Code: [Select]
Born := Trim(Copy(HTML, (PosStart + 25), (PosEnd - PosStart - 25)));
Born := Uppercase(Copy(Born,0,1)) + Copy(Born,2, length(Born)-1) + #13;

Code: [Select]
// BIO: //

curpos := Pos('<th>Films</th>', HTML);
    LogMessage('Films readout');
    if curPos > 0 then    begin

Lien := '----- Filmography (EGAFD) -----' + #09;
    EndPos := curPos;

I have a better and simple solution, the effect is the same as before.
Code: [Select]
// Total Line
        If Lien <> '' then
        Lien := Lien + #13;
       ...
               ...
               ...
        LogMessage('LIEN :' + Lien);
               

         curPos := PosFrom('<a href="', HTML, actPosEnd);
       end;
     
   
        if (Lien <> '') AND (Born = '') then
AddFieldValue(pfBio, Lien);
if (Lien  <> '') AND (Born <> '') then
AddFieldValue(pfBio, Born + #13 + #13 + Lien);
end;

I modified the part of the Bio code
Code: [Select]
//If Title:
        actposstart := actposEnd + 5;
        actposstart := PosFrom('">', HTML, actposstart) + 2;
        actPosEnd := PosFrom('</', HTML, actPosstart) - 1;
        If copy(HTML, actposstart, 11) = 'alternative' then
        Title := Copy(HTML, (actPosstart + 22),(actPosEnd-actPosStart-21))
        else
        Title := OrigT;


//If Original:
        actposstart := actposEnd + 5;
        actposstart := PosFrom('">', HTML, actposstart) + 2;
        actPosEnd := PosFrom('</', HTML, actPosstart) - 1;
        If copy(HTML, actposstart, 3) = 'alt' then
        OrigT := Copy(HTML, (actPosstart + 22),(actPosEnd-actPosStart-21))
        else
        OrigT := Title;
and
Code: [Select]
// Total Line
        If Lien <> '' then
        Lien := Lien + #13;
        If URL1 <> '' then begin
    If Title <> OrigT then
        Lien := Lien + Name
else
If OrigT <> Title then
        Lien := Lien + Name
             else
        Lien := Lien + '<link url="' + URL1 + '">' + Name + '</link>';
        end;
        If Year <> '' then
        Lien := Lien + ' • ' + Year;
        If Note <> '' then
        Lien := Lien + ' • ' + Note;
        If Role <> '' then
        Lien := Lien + ' • ' + Role;

        LogMessage('LIEN :' + Lien);
and now, in addition to  Original Title also that Title, which are not  Alternative Title.
Not the best.
In Bio movie list is not as transparent as yours, I like it, Of course, if that is what change is also OK.

Could be done in BORN that all was as up to now,  Birthplace field arranged so that there are visible such data like these for example:
Czech, b. 1985
Hungarian. b. 1978

2024
Development / Re: Script for egafd.com
« on: December 05, 2011, 03:12:56 pm »
Just a little modification in the case where the last movie in the list has not "role".

Code: [Select]
// Get Role (Not yet defined)
difpos := (PosFrom('<i>', HTML, (actposEnd-1))+4) - actposend;
logmessage('DIFFERENCE : ' + intToStr(difpos));

If difpos > 0 then begin
If difpos < 200 then begin

          actPosStart := PosFrom('<i>', HTML, (actposend-1)) + 4;
          actPosEnd:=PosFrom('</i></li>', HTML, actPosStart) - 1;
        Role := Trim(Copy(HTML, actposStart, (actPosEnd - actPosStart)));
          LogMessage('Role: ' + Role);
     
          debug_pos1:=Pos('(',Role);
          if debug_pos1 >0 then
          Role:= Copy(Role,0,debug_pos1-1);
          LogMessage(Role);

end;
end;

THANK YOU.
This code is now  excellent it works.

As a suggestion up,

I add this :

Code: [Select]
//If Original:
actposstart := actposEnd + 5;
actposstart := PosFrom('">', HTML, actposstart) + 2;
actPosEnd := PosFrom('</', HTML, actPosstart) - 1;
If copy(HTML, actposstart, 3) = 'alt' then
OrigT := Copy(HTML, (actPosstart + 22),(actPosEnd-actPosStart-21))
else
OrigT := Title;


and :

Code: [Select]
// Total Line
If Lien <> '' then
Lien := Lien + #13;
If URL1 <> '' then begin
If OrigT <> Title then
Lien := Lien + Name
else
Lien := Lien + '<link url="' + URL1 + '">' + Name + '</link>';
end;
If Year <> '' then
Lien := Lien + ' • ' + Year;
If Note <> '' then
Lien := Lien + ' • ' + Note;
If Role <> '' then
Lien := Lien + ' • ' + Role;

LogMessage('LIEN :' + Lien);

So in the list of movie in Field Bio, there's only link with original title!
I think it's clearly.

True, it is more transparent, to see the original movie links, which is very nice.
Thank you again.

BTW:

I tried to    EGAFD MOVIE SCRIPT   in section Cast add Role with this code or part of the code:
Code: [Select]

        // Get Role
             actPosStart := PosFrom('href="', HTML, EndPos);   // search for url start;
             actPosStart2 := PosFrom('</a> <', HTML, actPosStart)
             actPosEnd:=PosFrom('</', HTML, actPosStart2);    // search for url end
             Role := Trim(Copy(HTML, (actPosStart2 + 7), (actPosEnd - actPosStart2 - 7) ));
             LogMessage(Role);
     
             debug_pos1:=Pos('(',Role);
                if debug_pos1 >0 then
                Role:= Copy(Role,0,debug_pos1-1);
                LogMessage(Role);

             AddMoviePerson(Trim(Name), '', Role, LowerCase(URL), ctActors);
                 

which should look like this in whole code
Code: [Select]
   //Cast
   curPos:= Pos('<th>Actresses</th>', HTML);
   LogMessage('Cast readout');
   if curPos > 0 then    begin
   EndPos := curPos;
      while (curPos > 0) AND (curPos < PosFrom('</ul>', HTML, EndPos)) do begin
     
         EndPos := curPos; // Set last position to actual position
         // get url
         UrlPosStart := PosFrom('href="', HTML, EndPos);  // search for url start
         UrlPosEnd := PosFrom('>', HTML, UrlPosStart);  // search for url end
     
         URL := BASE_URL + Trim(Copy(HTML, UrlPosStart + 6, (UrlPosEnd - UrlPosStart - 7) ));
   
         LogMessage(URL);
   
         // Get Name
         actPosStart := PosFrom('href="', HTML, EndPos);   // search for url start;
         actPosStart2 := PosFrom('">', HTML, actPosStart)
         actPosEnd:=PosFrom('</a>', HTML, actPosStart2);    // search for url end
         Name := Trim(Copy(HTML, (actPosStart2 + 2), (actPosEnd - actPosStart2 - 2) ));       
LogMessage(Name);

         debug_pos1:=Pos('(',Name);
            if debug_pos1 >0 then
            Name := Copy(Name,0,debug_pos1-1);
            LogMessage(Name);

        // Get Role
             actPosStart := PosFrom('href="', HTML, EndPos);   // search for url start;
             actPosStart2 := PosFrom('</a> <', HTML, actPosStart)
             actPosEnd:=PosFrom('</', HTML, actPosStart2);    // search for url end
             Role := Trim(Copy(HTML, (actPosStart2 + 7), (actPosEnd - actPosStart2 - 7) ));
             LogMessage(Role);
     
             debug_pos1:=Pos('(',Role);
                if debug_pos1 >0 then
                Role:= Copy(Role,0,debug_pos1-1);
                LogMessage(Role);

             AddMoviePerson(Trim(Name), '', Role, LowerCase(URL), ctActors);
                 
            curPos := PosFrom('href="', HTML, actPosEnd);
             end;
      end;
but does not work.

That is what changed.

2025
Development / Re: Script for egafd.com
« on: December 04, 2011, 07:45:14 pm »
I found the problem, tmpYear wrong.  I like this set tmpYear : Integer; ,  but not like this tmpYear : String;

Rest tomorrow.

2026
Development / Re: Script for egafd.com
« on: December 04, 2011, 04:24:19 pm »
Code: [Select]
//Notes :
actPosStart := PosFrom('<a href="', HTML, EndPos);
actPosStart2 := PosFrom('</a>', HTML, actPosStart);
Av := Trim(Copy(HTML, (actposstart2 + 5), 1));
     logmessage('AV : ' + Av);
     If Av = '<' then begin
     actposStart2 := (actposstart2 + 5);           //Step to go after "</a>"
     actposstart3 := PosFrom('>', HTML, actposStart2);
     actposend := PosFrom('<', HTML, actposstart3);
     Notes := Trim(Copy(HTML, (actposstart3 +1), (actposend - actposStart3 - 1)));
     logmessage('Notes :' + Notes);
     end;   

         debug_pos1:=Pos('(',Notes);
         if debug_pos1 >0 then
         Year:= Copy(Notes,0,debug_pos1-1);
         LogMessage(Notes);

///Get Year & Note :
tmpYear := Copy(Notes, 0, 2);
        logMessage(Notes);

Case tmpYear of
'c.' : Begin
Year := Copy(Notes,2,4);
Note := '';
end;

'19', '20' : Begin
If Copy(Notes,0,5) = 's' {OR Copy(Notes,0,5) = '?'} then begin
Year := Copy(Notes,0,5);
Note := Copy(Notes,7, Length(Notes)-6);
end
else begin
Year := Copy(Notes,0,4);
Note := Copy(Notes,6, Length(Notes)-5);
end;
                       If Copy(Notes,0,5) = '?' then begin
Year := Copy(Notes,0,5);
Note := Copy(Notes,7, Length(Notes)-6);
end
else begin
Year := Copy(Notes,0,4);
Note := Copy(Notes,6, Length(Notes)-5);
end;
end;

else begin
Year := '';
Note := Notes;
end;
end;

logmessage('Year :' + Year);
logmessage('Note :' + Note);

This code is OK, but no work yet.

Add your script, that it tested and to see why my modifies script does not work.

2027
Scripts and Templates / Script iafd_people.psf
« on: December 04, 2011, 02:00:38 pm »
I'll try.

In the meantime i modified the script iafd_people in the same idea that egafd_people.

I desactived somes infos, especially the section //Web Site because there's a little bug.
The text in the fieldBio (mode modify) is correct but in mode "design" the first movie of the filmographie go up the link of the website!
I don't know why.
If you're interested i post it.

I fixed a little iafd_people (pra15)1 script which is attached.

Original  iafd_people (pra15) script  is also attached.

[attachment deleted by admin]

2028
Development / Re: Script for egafd.com
« on: December 03, 2011, 06:38:37 pm »
Code: [Select]
// Get Role (Now defined)
         actPosStart := PosFrom('<a href="', HTML, EndPos);   // search for url start;
         actPosStart4 := PosFrom('> <i>', HTML, actPosStart)
         actPosEnd:=PosFrom('</i></li>', HTML, actPosStart4);    // search for url end
         Role := Trim(Copy(HTML, (actPosStart4 + 5), (actPosEnd - actPosStart4 - 5) ));
         LogMessage(Role);
     
         debug_pos1:=Pos('(',Role);
          if debug_pos1 >0 then
            Role:= Copy(Role,0,debug_pos1-1);
            LogMessage(Role);

In egafd_people (2). psf script I tried to add Role, but we do not manage to add a Role in Bio field. Would you try to add this to the script.

Thank you in advance.

2029
Development / Re: Script for egafd.com
« on: December 03, 2011, 03:52:04 pm »
I apologize for the late reply.
As far as I found out I would like to change People skin.
People section does not allow custom fields, for now does not (version 1 is also supposed to allow).

I know nothing about skin, i tried to modify one skin in putting :
<Link memo valsperline="2"/>, before the line <bio/> ---> give an error. (no egality)
This one is not - does not work - error
The potential is as follows

Code: [Select]
<tab>
              <caption>&amp;Biography</caption>
              <color>$E0ECFE</color>
              <row>
                <column halign="center">
                  <fieldlabel field="bio" />
                </column>
              </row>
              <row>
                <column>
                  <bio collapsedlines="3" valsperline="1">
  <font>
                    <size>11</size>
<name>Arial Black</name>
                   </font>
                  </bio>
                </column>
              </row>
            </tab>
or
Code: [Select]
              <color>$E0ECFE</color>
              <row>
                <column halign="center">
                  <fieldlabel field="bio" />
                </column>
              </row>
              <row>
                <column>
                  <bio collapsedlines="3" valsperline="1">
  <font>
                    <size>10</size>
<!-- <name>Arial Black</name> -->
                   </font>
                  </bio>
                </column>
              </row>
           
This is also the approximate answer to this:
I have seen this page but i don't know how use the infos!

How use the properties, how write?

Up, i say i take a xml skin, and i tried to add this line <link memo...., because in the help page this propertie valsperline=”X”    says Number of separate values that should be shown on one line. So if i can separate the link of movie and note of this movie, perhaps i'll can align them.

i tried for example add </italic> manually in the field between the link and the notes but doesn't work!
So i need a tutoriel for learning to use the help?

What i can write directly in the field, (like <Link url=....) and what i must write in a xml?
I don't know if i'am clear!
If for example in the skin Bio box do it Url hyperlink (as shown in the attached picture), then those in xml skin not necessary to enter anything.

However, I suggest you to look for the movie section topic My current skin for Ivek23 and download the skin pvd_movie_tabs_normal extra AllMovie.
For the People section of the skin PVD Personal ITabs and periodically review each of them and reorder them, thus you will also gain knowledge about the skins, at least I hope so.
If you do not know anything, but write a topic in the Support board and you will probably receive an answer to the question.



[attachment deleted by admin]

2030
Scripts and Templates / Re: Are there anime related skins...
« on: December 03, 2011, 07:14:35 am »
I'm honestly still trying to figure out how to get things to display properly with XML. Its... more complicated than a lot of the others I've worked with, in regards to skins and such. For some reason I can't get things to display properly or end up with half the page missing or something. Its most frustrating.

- Katleeh

The most is tiresome Tues time when you do not know more on how and what to make things work properly.

2031
Development / Re: Script for egafd.com
« on: December 02, 2011, 08:33:45 pm »
If you do not mind, would have answered the skin in the morning.

I'm in Bio adding links movies that are now in the movies section (see picture attached).

egafd_people (4)(Ivek23).psf is attached

[attachment deleted by admin]

2032
Development / Re: Script for egafd.com
« on: December 02, 2011, 04:58:22 pm »
Quote
I've seen that you're an expert (IVEK23 real good skins)!
Thanks.
I studied  other skin which is available via auto-update system and worked experiments until I really had made the skin for his taste.

Quote
If you have a link for learning to make an xml ?
Link for help and learning: http://www.videodb.info/help/hlp_skins.html

Quote
I know nothing about skin, i tried to modify one skin in putting :
<Link memo valsperline="2"/>, before the line <bio/> ---> give an error. (no egality)
What exactly are you going to say this and what to do with this. Describe a little more to help.


2033
Development / Re: Script for egafd.com
« on: December 01, 2011, 09:59:58 am »
Now at least I hope so we solve problems around this or will this solve the problem.

For certain players not transfer info data as is the case here:

http://www.egafd.com/actresses/details.php/id/a00004
http://www.egafd.com/actresses/details.php/id/j00012
http://www.egafd.com/actresses/details.php/id/k00007
http://www.egafd.com/actresses/details.php/id/l00451
http://www.egafd.com/actresses/details.php/id/m00958
http://www.egafd.com/actresses/details.php/id/n00481

especially at this url:

http://www.egafd.com/actresses/details.php/id/a01022
http://www.egafd.com/actresses/details.php/id/b00117
http://www.egafd.com/actresses/details.php/id/d00140
http://www.egafd.com/actresses/details.php/id/j00652
http://www.egafd.com/actresses/details.php/id/k00487
http://www.egafd.com/actresses/details.php/id/m01376

It is interesting that in all these URL addresses  egafd_people_mod.psf script  makes transfer all info data under these headings, as well as actresses pictures or pictures with the words "No Picture Available".

That this is perhaps how to fix that will work for all URLs addresses.

egafd_people (3)(Ivek23).psf is attached

This script removes all problems and works great (perfect) for me, at least as far as I have done tests so far.

If this is okay now, or it could be in a similar way fix the egafd_movie. psf script.

[attachment deleted by admin]

2034
Development / Re: Script for egafd.com
« on: November 30, 2011, 09:47:05 pm »
Sorry, it's my first script!
I don't understand "egafd_people_mod.psf script  makes transfer all info data under these headings".

I just wanted to say this, that this script transfers the images actresses as well as titles of films, because usually when something is missing information that your  egafd_people (2). psf script  does not transfer any data.

2037
Development / Re: Script for egafd.com
« on: November 29, 2011, 01:43:59 pm »
1.) Very good job.

2.) 
Quote
Pascal is so strictly!
 
I'm not familiar with Pascal writing.

3. ) In the "year" I had a similar problem, so I eliminated the "Year" from the transfer of data as it is not so important information (concerning the transfer and extract data - the script works better that way).

4.) 
Quote
Just a another question, is there a number limited of logmessage by script because i see somes logmessage give me an error, the syntax was correct and when they are desactived, all is perfect!
I do not know (maybe someone else knows more about it), but if you really do not need it is better to deactivate or even remove the log message.

5. )  Small correction:
This code for BIO

Code: [Select]
if Lien <> '' then
         Lien := Lien + #13;
            if URL <> '' then
         Lien := Lien + '<link url="' + URL + '">';
            Lien := Lien + Name + '</link>';


//if URL1 <> '' then
         //Lien := Lien + '<link url="' + URL1 + '">';
            //Lien := Lien + Name + '</link>';
if Year <> '' then
         Lien := Lien + ' • ' + Year;
//if Role <> '' then
         //Lien := Lien + ' • ' + Role;

transferred to wrong url link to the movies, but this correction code

Code: [Select]
if Lien <> '' then
         Lien := Lien + #13;
           // if URL <> '' then
        // Lien := Lien + '<link url="' + URL + '">';
            //Lien := Lien + Name + '</link>';
if URL1 <> '' then
         Lien := Lien + '<link url="' + URL1 + '">';
            Lien := Lien + Name + '</link>';
if Year <> '' then
         Lien := Lien + ' • ' + Year;
//if Role <> '' then
         //Lien := Lien + ' • ' + Role;

now transferred to the correct url link to the movies.

2038
Development / Re: Script for egafd.com
« on: November 29, 2011, 06:59:07 am »
Quote
egafd have pages with alphabetics letters.

This is really a very big problem to find the url for SEARCH_STR , the best is still to what is mentioned in these words:

Quote
For use this script, the URL of the page must be indicate in the data movie before execute.

2039
Development / Re: Script for egafd.com
« on: November 28, 2011, 08:13:25 pm »
Is it possible to insert a link (to web page) in the field Biographie?
I try <Link="www......">Name</Link> but when i click in, nothing happens!

I managed, so you'll be happy.

egafd_people_mod.psf is attached

[attachment deleted by admin]

2040
Development / Re: Script for egafd.com
« on: November 28, 2011, 06:47:46 pm »
I'm blocked !!!!!
I search to obtain the value of the URL start.
I tried with : getfieldvalue(pfurl) but this give me a number and not a url !!!! 

You can add this code in a reply if you still have this code and add the entire script to the end of the reply that I can see the result (number, not URL), and how or what can help you (if you can, of course) about this problem.

Pages: 1 ... 97 98 99 100 101 [102] 103 104 105 106 107 ... 133