English > Support

AllMovie Url in custom items

(1/2) > >>

Ivek23:
Question:
Is it possible to add or switch AllMovie Url in custom items.

I try fix it myself at work but I only write the URL address and not the url as a hyperlink or other URL.
I changed this:

--- Code: --- //Get URL
 EndPos := Pos('">Overview</a>', HTML);
 if EndPos > 0 then begin
  curPos := PrevPos('<a href="', HTML, EndPos);
  AddFieldValue(mfURL, Copy(HTML, curPos + 9, EndPos - curPos - 9));
 end else

  //AddFieldValue(mfURL, MovieURL); // Changed to:
AddCustomFieldValueByName('AMG Url', MovieURL);  

--- End code ---

I wonder what it would be necessary to add or change the url to act as a hyperlink or other URL.

[attachment deleted by admin]

rick.ca:
If you remove AddFieldValue(mfURL, MovieURL);, the URL will not be added to the URL field and the script will not be able to update the record without searching for it again. I suppose you could modify the script to use the new field, but I don't have a clue how to do that.

To display a URL as a hyperlink, use a memo field.

Ivek23:
Thanks.
URL is not a problem because I use the original AllMovioe script and AllMovie + (Ivek23) script.
This change I wanted to do in AllMovie + (Ivek23) script where you can do a hyperlink
--- Quote ---To display a URL as a hyperlink, use a memo field.
--- End quote ---
but since the update with a new search function me that this update remove the hyperlink.
--- Quote ---If you remove AddFieldValue(mfURL, MovieURL);, the URL will not be added to the URL field and
the script will not be able to update the record without searching for it again.
--- End quote ---
Yes it is true.

In the future I will try maybe find a solution.

Ivek23:
I did not change this
--- Code: --- //Get URL
 EndPos := Pos('">Overview</a>', HTML);
 if EndPos > 0 then begin
  curPos := PrevPos('<a href="', HTML, EndPos);
  AddFieldValue(mfURL, Copy(HTML, curPos + 9, EndPos - curPos - 9));
 end else

  //AddFieldValue(mfURL, MovieURL); // Changed to:

--- End code ---
.

I just changed this
--- Code: ---AddCustomFieldValueByName('AMG Url', '<link>'+ MovieURL + TmpStr1 + '</link>');
--- End code ---
.

I came to this result, as seen in attached images.It is not a hyperlink and the URL is not work.
Who may have some idea of chance how this might give way to edit.

I helped a little bit of DVD releases code here.

[attachment deleted by admin]

Ivek23:
Here is a solution :


--- Code: --- //Get URL
 EndPos := Pos('">Overview</a>', HTML);
 if EndPos > 0 then begin
  curPos := PrevPos('<a href="', HTML, EndPos);
    AddFieldValue(mfURL, Copy(HTML, curPos + 9, EndPos - curPos - 9));
 end else

  //AddFieldValue(mfURL, MovieURL); // Changed to:
AddCustomFieldValueByName('AMG Url', '<link url="' + MovieURL + '">Url For Movie</link>');

--- End code ---
or
--- Code: ---//Get URL
 EndPos := Pos('">Overview</a>', HTML);
 if EndPos > 0 then begin
  curPos := PrevPos('<a href="', HTML, EndPos);
    AddFieldValue(mfURL, Copy(HTML, curPos + 9, EndPos - curPos - 9));
 end else

  //AddFieldValue(mfURL, MovieURL); // Changed to:
AddCustomFieldValueByName('Url', '<link url="' + MovieURL + '">Url For Movie</link>');
--- End code ---

Work,I have tested and show pictures attached.


Even this
--- Code: --- //Get URL
 EndPos := Pos('">Overview</a>', HTML);
 if EndPos > 0 then begin
  curPos := PrevPos('<a href="', HTML, EndPos);
  AddFieldValue(mfURL, Copy(HTML, curPos + 9, EndPos - curPos - 9));
 end else

  //AddFieldValue(mfURL, MovieURL); // Changed to:
AddCustomFieldValueByName('AMG Url', MovieURL);

//Get URL
 EndPos := Pos('">Overview</a>', HTML);
 if EndPos > 0 then begin
  curPos := PrevPos('<a href="', HTML, EndPos);
    AddFieldValue(mfURL, Copy(HTML, curPos + 9, EndPos - curPos - 9));
 end else

  //AddFieldValue(mfURL, MovieURL); // Changed to:
AddCustomFieldValueByName('Url', '<link url="' + MovieURL + '">Url For Movie</link>');
 

--- End code ---
like this added together, I have tested ,work,
and show pictures 1 attached.

[attachment deleted by admin]

Navigation

[0] Message Index

[#] Next page

Go to full version