English > Development

Script for egafd.com

<< < (16/27) > >>

Ivek23:
Countries that are currently required for TabCountry :


--- Code: ---TabCountry := ['Austrian', 'Belgian', 'Brazilian', 'Bulgarian', 'Belarusian', 'Canadian'
                , 'Cuban', 'Colombian', 'Czech', 'Dutch', 'Danish', 'English', 'Estonian'
, 'Ecuadorian', 'French', 'German', 'Greek', 'Hungarian', 'Indian'
, 'Italian', 'Kyrgyzstan', 'Latvian', 'Lithuanian', 'Maori', 'Moldovan'
, 'Netherlands', 'Norwegian', 'Portuguese', 'Polish', 'Romanian', 'Russian'
, 'Slovak', 'Spanish', 'Swiss', 'Swedish', 'Venezuelan', 'Ukrainian'
, 'Yugoslavian', 'French-Canadian', 'French (Algerian origin)'
, 'French, Moroccan origin', 'French (Moroccan origin)', 'French of Vietnamese origin'
, 'French, Vietnamese origin,', 'Russian / Kyrgyzstan', 'Yugoslavian/French'
, 'exit'];
--- End code ---

Ivek23:
I can not connect Birthday and TabCountry info data into a single, into a single piece of code to connect to the Birthplace box transferred data for the country and year of birth together.

Should look something like as attached code:


--- Code: ---if (Birthday <> '') AND (TabCountry[I] <> '') then
AddFieldValue(pfBirthplace, Birthday + '  b. ' + TabCountry[I]);
I := High(TabCountry);
--- End code ---
or

--- Code: ---if (Birthplace <> '') AND (TabCountry[I] <> '') then
AddFieldValue(pfBirthplace, Birthplace + '  b. ' + TabCountry[I]);
I := High(TabCountry);
--- End code ---

You can somehow arrange to make this work, nice please.

pra15:
Thanks,

The method addfieldvaluesXml('comment', _____) works good!
Thanks for the list of country too.
For the déclaration i have forgotten to say i had declare my array PartBorn and TabCountry in global variables!

For your problem
AddFieldValue(pfBirthplace, (Birthday + 'b.' + TabCountry) ); you have forgotten ()

I'm just trying this and it works!

For country i add somes :

--- Code: ---TabCountry := ['Austrian', 'Belgian', 'Brazilian', 'Bulgarian', 'Belarusian', 'Canadian'
                , 'Chinese', 'Cuban', 'Colombian', 'Croatian', 'Cyprus', 'Czech', 'Dutch'
                , 'Danish', 'English', 'Estonian', 'Ecuadorian', 'Finnish', 'French', 'German'
                , 'Greek', 'Hungarian', 'Indian', 'Irish', 'Italian', 'Kyrgyzstan', 'Latvian'
                , 'Lithuanian', 'Maori', 'Moldovan', 'Netherlands', 'Norwegian', 'Portuguese'
                , 'Polish', 'Romanian', 'Russian', 'Slovak', 'Slovenian', 'Spanish', 'Swiss'
                , 'Swedish', 'Venezuelan', 'Ukrainian', 'Yugoslavian', 'French-Canadian'
                , 'French (Algerian origin)', 'French, Moroccan origin', 'French (Moroccan origin)'
                , 'French of Vietnamese origin','French, Vietnamese origin,', 'Russian / Kyrgyzstan'
                , 'Yugoslavian/French', 'exit'];
--- End code ---

Ivek23:

--- Quote from: pra15 on December 19, 2011, 09:50:49 pm ---For country i add somes :

--- Code: ---TabCountry := ['Austrian', 'Belgian', 'Brazilian', 'Bulgarian', 'Belarusian', 'Canadian'
                , 'Chinese', 'Cuban', 'Colombian', 'Croatian', 'Cyprus', 'Czech', 'Dutch'
                , 'Danish', 'English', 'Estonian', 'Ecuadorian', 'Finnish', 'French', 'German'
                , 'Greek', 'Hungarian', 'Indian', 'Irish', 'Italian', 'Kyrgyzstan', 'Latvian'
                , 'Lithuanian', 'Maori', 'Moldovan', 'Netherlands', 'Norwegian', 'Portuguese'
                , 'Polish', 'Romanian', 'Russian', 'Slovak', 'Slovenian', 'Spanish', 'Swiss'
                , 'Swedish', 'Venezuelan', 'Ukrainian', 'Yugoslavian', 'French-Canadian'
                , 'French (Algerian origin)', 'French, Moroccan origin', 'French (Moroccan origin)'
                , 'French of Vietnamese origin','French, Vietnamese origin,', 'Russian / Kyrgyzstan'
                , 'Yugoslavian/French', 'exit'];
--- End code ---

--- End quote ---

Thanks for clearing the list.


--- Quote from: Ivek23 on December 19, 2011, 07:45:16 pm ---I can not connect Birthday and TabCountry info data into a single, into a single piece of code to connect to the Birthplace box transferred data for the country and year of birth together.

Should look something like as attached code:


--- Code: ---if (Birthday <> '') AND (TabCountry[I] <> '') then
AddFieldValue(pfBirthplace, Birthday + '  b. ' + TabCountry[I]);
I := High(TabCountry);
--- End code ---
or

--- Code: ---if (Birthplace <> '') AND (TabCountry[I] <> '') then
AddFieldValue(pfBirthplace, Birthplace + '  b. ' + TabCountry[I]);
I := High(TabCountry);
--- End code ---

You can somehow arrange to make this work, nice please.

--- End quote ---

--- Quote from: pra15 on December 19, 2011, 09:50:49 pm ---For your problem
AddFieldValue(pfBirthplace, (Birthday + 'b.' + TabCountry) ); you have forgotten ()

I'm just trying this and it works!

--- End quote ---

Anyway I do with this part of code with your solution, we PVD always report this error:
Out of Range
so I do not know more what to do that this would still work as it should, because I almost gave up in this case.
I use the PVD version 9.9.21, what about you.

Are two redundant beauty error:
First this:

--- Code: ---begin
AddFieldValue(pfGenre, 'EGAFD');

// URL: //
--- End code ---

I have blocked or deleted, because there will always be one way or another display, and my opinion is that does not belong there at all.

Second this

--- Code: ---//////////
// BIO: //

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

Lien := '----- Filmographie (EGAFD) -----' + #09;

    EndPos := curPos;
--- End code ---

Equal, this will always be displayed, and if there is a filmography or is not, so it is better so that


--- Code: ---//////////
// BIO: //

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

Lien := '' ;

    EndPos := curPos;
--- End code ---

and not otherwise shown, because important the fact this is that when the script as final version of the script well done and it will be possible to get, or will also available via auto-update system, potential users this part of the displayed data probably they will not like.

I would ask if you can attach the full script to test it, even with my with problems associated part of the code, and see my script errors.
Thanks.

Ivek23:

--- Quote from: Ivek23 on December 20, 2011, 09:47:37 am ---
--- Quote from: Ivek23 on December 19, 2011, 07:45:16 pm ---I can not connect Birthday and TabCountry info data into a single, into a single piece of code to connect to the Birthplace box transferred data for the country and year of birth together.

Should look something like as attached code:


--- Code: ---if (Birthday <> '') AND (TabCountry[I] <> '') then
AddFieldValue(pfBirthplace, Birthday + '  b. ' + TabCountry[I]);
I := High(TabCountry);
--- End code ---
or

--- Code: ---if (Birthplace <> '') AND (TabCountry[I] <> '') then
AddFieldValue(pfBirthplace, Birthplace + '  b. ' + TabCountry[I]);
I := High(TabCountry);
--- End code ---

You can somehow arrange to make this work, nice please.

--- End quote ---

--- Quote from: pra15 on December 19, 2011, 09:50:49 pm ---For your problem
AddFieldValue(pfBirthplace, (Birthday + 'b.' + TabCountry) ); you have forgotten ()

I'm just trying this and it works!

--- End quote ---

Anyway I do with this part of code with your solution, we PVD always report this error:
Out of Range
so I do not know more what to do that this would still work as it should, because I almost gave up in this case.
I use the PVD version 9.9.21, what about you.

I would ask if you can attach the full script to test it, even with my with problems associated part of the code, and see my script errors.
Thanks.

--- End quote ---

No more problems and frustration with this, I  managed to solve this problem by using the enclosed part of the code


--- Code: ---/// BirthDay:

ExplodeString(Born, PartBorn, #46);

If High(partBorn) > 0 then
Begin
  logmessage('birhtday commence')
    For I := Low(partBorn) to High(partBorn) do
    Begin
    PartBorn[I] := Trim(partBorn[I]);
    End;

For I := Low(partBorn) to High(partBorn) do
Begin
If (Lowercase(partBorn[I]) = 'b') OR (Copy(partBorn[I], length(partBorn[I])-2,3) = ', b') then
     BirthDay := '01/01/' + Copy(partBorn[I+1], 0, 4);
end;
end;

If BirthDay <> '' then AddFieldValue(pfBirthday, BirthDay);

BirthDay:= StringReplace(BirthDay, '01/01/', '  b. ', true, false, true);
       if Pos(', ', BirthDay) = 1 then Delete(BirthDay, 1, 2);
   
  // Birthplace:
 
  TabCountry := ['Austrian', 'Belgian', 'Brazilian', 'Bulgarian', 'Belarusian', 'Canadian'
                , 'Chinese', 'Cuban', 'Colombian', 'Croatian', 'Cyprus', 'Czech', 'Dutch'
                , 'Danish', 'English', 'Estonian', 'Ecuadorian', 'Finnish', 'French', 'German'
                , 'Greek', 'Hungarian', 'Indian', 'Irish', 'Italian', 'Kyrgyzstan', 'Latvian'
                , 'Lithuanian', 'Maori', 'Moldovan', 'Netherlands', 'Norwegian', 'Portuguese'
                , 'Polish', 'Romanian', 'Russian', 'Slovak', 'Slovenian', 'Spanish', 'Swiss'
                , 'Swedish', 'Venezuelan', 'Ukrainian', 'Yugoslavian', 'French-Canadian'
                , 'French (Algerian origin)', 'French, Moroccan origin', 'French (Moroccan origin)'
                , 'French of Vietnamese origin','French, Vietnamese origin,', 'Russian / Kyrgyzstan'
                , 'Yugoslavian/French', 'exit'];
 
  I := 0;
  For I := Low(TabCountry) to High(Tabcountry) do
  Begin
    If Pos((copy(TabCountry[I], 1 ,Length(TabCountry[I])-1)),Born) > 0 then
    Begin
    Addfieldvalue(pfBirthPlace, (TabCountry[I] + BirthDay));
    I := High(TabCountry);
    end;
  End;
--- End code ---

I am very relieved now solve this problem. ::)
Now, happily to edit the script. :)

BTW:
Would be found to regulate  egafd movie script  that may be looking for movie titles the same way as in  egafd  people  script .

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version