English > Support
Skin help needed
afrocuban:
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>
--- End quote ---
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>
--- End quote ---
but the result is surprisingly (and frustrating) different:
Ivek23:
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,'.');
--- End quote ---
--- 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
--- End quote ---
These custom fields will be added in the next script update.
IMDB_ [EN] [HTTPS] _ (afrocuban) script is attached.
Ivek23:
--- Quote from: afrocuban on November 06, 2020, 11:03:58 pm ---It looks like fields containing URLs cannot be centered.
--- End quote ---
--- Quote from: afrocuban on November 07, 2020, 06:24:53 pm ---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...
--- End quote ---
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.
afrocuban:
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
Ivek23:
--- Quote from: afrocuban 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
--- End quote ---
No problem. I have now attached each individual skin.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version