Personal Video Database
English => Support => Topic started by: Ivek23 on June 08, 2010, 07:25:07 pm
-
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:
//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);
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]
-
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.
-
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 To display a URL as a hyperlink, use a memo field.
but since the update with a new search function me that this update remove the hyperlink.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.
Yes it is true.
In the future I will try maybe find a solution.
-
I did not change this
//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:
.
I just changed thisAddCustomFieldValueByName('AMG Url', '<link>'+ MovieURL + TmpStr1 + '</link>');
.
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 (http://www.videodb.info/forum_en/index.php?topic=1877.0 msg9118#msg9118).
[attachment deleted by admin]
-
Here is a solution :
//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>');
or//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>');
Work,I have tested and show pictures attached.
Even this //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>');
like this added together, I have tested ,work,
and show pictures 1 attached.
[attachment deleted by admin]
-
Now I found a partially correct code for AllMovie Url:
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('Url', '<link url="' + MovieURL + '">Url For Movie</link>');
works properly but can not display AllMovie Url.
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('Url', '<link url="' + MovieURL + '">' + MovieURL + '</link>');
is working properly and it appears that AllMovie Url.
Attached are pictures to prove it is indeed shown AllMovie Url.
I apologize for the first scan picture Before AllMovie Url logo can be seen as Portable Appz so I added an additional figure.
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.
Rick.ca here is a partial answer to the second part of the reply(quote).
I suppose you could modify the script to use the new field, but I don't have a clue how to do that.
In the first part still attached to the reply(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.
To display a URL as a hyperlink, use a memo field.
Only by hand not automatically.
[attachment deleted by admin]
-
Final solution:
//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);
//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 + '">' + MovieURL + '</link>');
The first part of the code is changed back to original
AddFieldValue(mfURL, MovieURL); // Changed to:
AddCustomFieldValueByName('AMG Url', MovieURL);
changed to originalAddFieldValue(mfURL, MovieURL);
another piece of code is added to the new.//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 + '">' + MovieURL + '</link>');
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.
Now, the record be updated without a new search.
-
A better and simple solution:
The URL is added to the url field as well as the custom field.
//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);
AddCustomFieldValueByName('Url', '<link url="' + MovieURL + '">' + MovieURL + '</link>');