Author Topic: Skin help needed  (Read 19736 times)

0 Members and 2 Guests are viewing this topic.

Offline afrocuban

  • Moderator
  • *****
  • Posts: 468
    • View Profile
Re: Skin help needed
« Reply #20 on: November 08, 2020, 02:15:09 am »
It looks different field types react different against same attribute. For example, 'Title' (simple edit) and 'human' (link memo) fields don't respond same on halign="center", or autosize="true", etc...

Here, Title (It's custom Title from AMG script) is "short text" field with additional Year field:
Quote
<row>
     <column space="0" halign="left" autosize="true" wordwrap="true">List number<spacer width="8"/><num width="92">Ordinal number
         <font>
              <size>24</size>
              <color>$FDD017</color>
            </font></num></column>
        <column space="0" halign="center" wordwrap="true" width="100%">Custom (English) Movie Title with year
         <custom field="Title" autosize="true">Custom Title
            <font>
               <size>24</size>
               <color>$FDD017</color>
            </font>
         </custom>
         <label autosize="true">Left Bracket label
            <font>
               <size>24</size>
               <color>$FDD017</color>
            </font>
            <caption> (</caption>
         </label>
            <year autosize="true">Year
            <font>
               <size>24</size>
               <color>$FDD017</color>
            </font>
            </year>
         <label autosize="true">Right Bracket label
            <font>
               <size>24</size>
               <color>$FDD017</color>
            </font>
            <caption>)</caption></label>
         </column>
      </row>

and the result is:



Now, exactly the same formatting, but Title is "memo" field (It's custom Title1 from AMG script which contains year by design) again with additional Year field:

Quote
<row>
            <column space="0" halign="left" autosize="true" wordwrap="true">List number
               <spacer width="8"/>
               <num width="92">Ordinal number
                  <font>
                     <size>24</size>
                     <color>$FDD017</color>
                  </font>
               </num>
            </column>
            <column space="0" halign="center" wordwrap="true" width="100%">Custom (English) Movie Title with year
               <custom field="Title1" autosize="true" collapsedlines="3">Custom Title
                  <font>
                     <size>24</size>
                     <color>$FDD017</color>
                  </font>
               </custom>
               <label autosize="true">Left Bracket label
                  <font>
                     <size>24</size>
                     <color>$FDD017</color>
                  </font>
                     <caption> (</caption>
               </label>
               <year autosize="true">Year
                  <font>
                     <size>24</size>
                     <color>$FDD017</color>
                  </font>
               </year>
               <label autosize="true">Right Bracket label
                  <font>
                     <size>24</size>
                     <color>$FDD017</color>
                  </font>
                     <caption>)</caption>
               </label>
         <spacer width="10"/>
            </column>
         </row>

but the result is surprisingly (and frustrating) different:


« Last Edit: November 08, 2020, 02:58:33 am by afrocuban »

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2711
    • View Profile
Re: Skin help needed
« Reply #21 on: November 08, 2020, 04:26:30 pm »
The following custom fields can be added to the IMDB_ [EN] [HTTPS] script.

Origtitle, Title and Localized title custom box.

Quote
Function ParsePage_IMDBMovieBASE(HTML:String):Cardinal; //BlockOpen
.
.
.
    LogMessage('Function ParsePage_IMDBMovieBASE BEGIN======================|');
    Result:=prFinished;  //It will change to prError if any big problem with exit;
    //Because the script don't retreives the data in the page order a token search for the first curPos position or block select is mandatory
    //Get ~title~, ~year~, ~origtitle~, ~poster~
    //Get all "raw" title summary (in raw because we need the hidden links, we avoid "complete" token in strings which opens/closes)
    ItemList:=TextBetWeenFirst(HTML,'<div class="title_block"','div class="plot_summary_wrapper">'); //WEB_SPECIFIC.
    If (Length(ItemList)>0) Then Begin
        //Get ~title~
        titleValue:=TextBetWeenFirst(ItemList,'<h1 class="">','<');       //Strings which opens/closes the data. WEB_SPECIFIC
        If titleValue = '0' then titleValue:='';
        If titleValue = '' then titleValue:=TextBetWeenFirst(ItemList,'<h1 class="long">','<');       //Strings which opens/closes the data. WEB_SPECIFIC
        AddFieldValueXML('title',titleValue);
      AddCustomFieldValueByName('Title',titleValue);
      AddCustomFieldValueByName('Localized title',titleValue);

        LogMessage('      Get result title:'+titleValue+'||');   
         //First normal kind get of ~year~
        ItemValue:=TextBetWeenFirst(ItemList,'<span id="titleYear">(',')</span>            </h1>');                                 //Strings which opens/closes the data. WEB_SPECIFIC     
        AddFieldValueXML('year',ItemValue);
.
.
.
        //Get ~origtitle~
        ItemValue:=TextBetWeenFirst(ItemList,'<div class="originalTitle">','<');          //Strings which opens/closes the data. WEB_SPECIFIC
        If (Length(ItemValue)=0) Then ItemValue:=titleValue;                           //Provider hides the original title if same that title. WEB_SPECIFIC
        AddFieldValueXML('origtitle',ItemValue);
      AddCustomFieldValueByName('Origtitle',ItemValue);
        LogMessage('      Get result origtitle:'+ItemValue+'||');
        ItemValue:=TextBetWeenFirst(ItemList,BASE_URL_IMAGE_PRE_TRUE,'.');

Quote
Function ParsePage_IMDBMovieAKA(HTML:String):Cardinal; //BlockOpen
    //Returns:
    //     Result:=prFinished; Script has finished gathering data
    //     Result:=prError; If żany big problem? with exit;
    //Retrieve: ~aka~ "Also Known As"
  Var
    curPos,endPos,index:Integer;
    ItemValue,ItemList:String;
    ItemArray: TWideArray;
  Begin
    LogMessage('Function ParsePage_IMDBMovieAKA BEGIN=====================||');
    Result:=prFinished;  //It will change to prError if any big problem with exit;
    //Get ~aka~ (several values in a line break separated list) Be careful don't repeat
    if (Pos('It looks like we don'+Chr(39)+'t have any AKAs for this title yet.',HTML)>0) then Exit;
    //Go to "Also Known As"
    curPos:=Pos('class="ipl-list-title">Also Known As (AKA)',HTML);                      //Strings start which opens the block content data. WEB_SPECIFIC
    curPos:=PosFrom('</h4>',HTML,curPos);                                              //Strings end which opens the block content data.  WEB_SPECIFIC
    curPos:=curPos+Length('</h4>');                                                    //Strings end which opens the block content data.  WEB_SPECIFIC
    //Get all "raw" list aka for create good values separators
    endPos:=PosFrom('</table>',HTML,curPos);                                            //Strings which opens/closes the data. WEB_SPECIFIC
    ItemList:=Copy(HTML,curPos,endPos-curPos);
    ItemList:=StringReplace(ItemList,'<td class="aka-item__name--empty"></td>','(Empty)|',True,True,False);   //Fill the empty values (in countries) con in order to asure that ExplodeString get a value. WEB_SPECIFIC
    ItemList:=StringReplace(ItemList,'<td></td>','(Empty)|',True,True,False);             //Fill the empty values (in countries) con in order to asure that ExplodeString get a value. WEB_SPECIFIC
    ItemList:=StringReplace(ItemList,'</td>','|',True,True,False);                      //WEB_SPECIFIC
    //Get all aka list (NOT necesary in raw because: Several couple of valors (Country/title) but the first is the original title
    ItemList:=RemoveTags(ItemList, False);
    LogMessage('           Parse results ('+IntToStr(curPos)+','+IntToStr(endPos)+') complex ItemList:'+ItemList+'||');
    ExplodeString(ItemList,ItemArray,'|');
    ItemValue:='';
    For index:=Low(ItemArray) To High(ItemArray) Do Begin        //Remember index begin in 0
        If (Pos('original title',ItemArray[index])>0) then begin
            AddFieldValueXML('origtitle',ItemArray[index+1]);       //WEB_SPECIFIC
         AddCustomFieldValueByName('Origtitle',ItemArray[index+1]);       //WEB_SPECIFIC
            LogMessage('      Get result origtitle:'+ItemArray[index+1]+'||');
        end else begin
            //Verify if we get before the same title
            If (Pos(ItemArray[index+1],ItemValue)=0) Then ItemValue:=ItemValue+'<br>'+ItemArray[index+1];
        end;
        index:=index+1;  //In order to make a for loop with +2 increment (one here and one by the for).
    End;
    AddFieldValueXML('aka',ItemValue);
    LogMessage('      Get results aka:'+ItemValue+'||');
    LogMessage('Function ParsePage_IMDBMovieAKA END=====================||');
  End; //BlockClose

These custom fields will be added in the next script update.

IMDB_ [EN] [HTTPS] _ (afrocuban) script is attached.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2711
    • View Profile
Re: Skin help needed
« Reply #22 on: November 08, 2020, 04:53:39 pm »
It looks like fields containing URLs cannot be centered.

Thanks a llot Ivek! "Wordwrap" seems to work only for labels, not for other fields, so we are pretty limited with that... So if I have a movie with the long title, for example, "Jim & Andy: The Great Beyond - Featuring a Very Special, Contractually Obligated Mention of Tony Clifton"
theres no way it's title to be seen in the skin in whole with the font size bigger than 14 or so because of the single line field... Who would say about such a strange limitation...

Some things cannot be done to our liking.



I am attaching a PVD IMDb Conservative AllPhoto Full HD v2 - Dark_MOD zip file with two mod fixes to your Dark Theme skin and two skin test with colors and certain blank skin codes for any skin editing help.

By the way, another piece of advice that you might add somewhere from the tests of the skin so that certain fields will not be visible if they are empty.
« Last Edit: November 08, 2020, 08:08:28 pm by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline afrocuban

  • Moderator
  • *****
  • Posts: 468
    • View Profile
Re: Skin help needed
« Reply #23 on: November 08, 2020, 08:26:10 pm »
Thanks Ivek. I sincerely appreciate your help and your time. I'm getting "\warning.php" while trying to donload skin. Never mind. Don't bother yourself anymore. I'll adjust my ideas to my competeneces and PVD design possibilities.
Best regards
« Last Edit: November 08, 2020, 08:31:49 pm by afrocuban »

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2711
    • View Profile
Re: Skin help needed
« Reply #24 on: November 08, 2020, 10:12:22 pm »
Thanks Ivek. I sincerely appreciate your help and your time. I'm getting "\warning.php" while trying to donload skin. Never mind. Don't bother yourself anymore. I'll adjust my ideas to my competeneces and PVD design possibilities.
Best regards

No problem. I have now attached each individual skin.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2711
    • View Profile
Re: Skin help needed
« Reply #25 on: November 09, 2020, 07:46:51 am »
Thanks Ivek. I sincerely appreciate your help and your time. I'm getting "\warning.php" while trying to donload skin. Never mind. Don't bother yourself anymore. I'll adjust my ideas to my competeneces and PVD design possibilities.
Best regards

If I can help you make the poza easier to your liking, why not. What I mentioned around the blank fields of vision was just my suggestion of how I would do it. On the other hand, you are also right to do something to your taste and desires. I hope you manage to make the skin the way you want to have it, but you can also share it with others if you naturally want to and maybe give them inspiration to create their own skin.

I'm sorry, I didn't mean anything wrong with the suggestions.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline afrocuban

  • Moderator
  • *****
  • Posts: 468
    • View Profile
Re: Skin help needed
« Reply #26 on: November 09, 2020, 06:15:19 pm »
We are imensely grateful you are always, but always there for us, and I just don't want to turn out that it looks like I misuse your good will. We have to spare you and your time for more important things regarding PVD, and that is why I wrote that I won't bother you anymore.

Can't emphesize enough how we depend on you!