English > Development

TITLE UPDATE

(1/2) > >>

nika-model:
Hi all,
i want speak about theme "TITLE UPDATE".

Example:
Push Button PLUS(New Item), Set Name ("Test Name Title") and Apply Changes.

Now I have script who take from field URL. Then from this URL extrac Site Name, Movie Name, Release, TITLE.....
When I used

mfTitle := 1;

AddFieldValueXML('title', 'New Name');
or
AddFieldValue(mfTitle, 'New Name');

nothing happen. Title (Name of Movie) is still  ("Test Name Title").
How can I update this Field.

Ivek23:
Try this, maybe help.


--- Code: ---procedure ParseMovie(MovieURL : String; HTML : String);
var
curPos, endPos : Integer;
New Name : String;
begin

.
.
.

AddFieldValueXML('title', New Name);
or
AddFieldValue(mfTitle, New Name);
--- End code ---

nika-model:
This is the same what I wrote.

variable

newname := 'New Name Movie';


procedure....

Add..

I can update all others fields, but only TITLE I can't.
example:

       desc := TextBetween(HTML, '<p class="para-class t-para">', '</p>', False, iEndPos);
       LogMessage('-------> ParseMovie - Popis : ' + desc);   
       AddFieldValue(mfDescription, desc);   

This works.


Ivek23:
Try if this will work.


--- Quote from: Ivek23 on December 09, 2013, 03:39:49 pm ---
--- Code: ---AddFieldValueXML('title', New Name);
or
AddFieldValue(mfTitle, New Name);
--- End code ---

--- End quote ---

Change 'title' to 'origtitle' :


--- Code: ---AddFieldValueXML('origtitle', New Name);
or
AddFieldValue(mfOrigTitle, New Name);
--- End code ---

If it does not work, ask for Nostra, if you can help.

nika-model:
 This is a problem. Original Title you can update. But TITLE is a Name for your "Movie Tree" (left side tree). Then you need to know first right title of yours movie and then you can edit with script other fields. Field TITLE can't you updated. This was my problem. I can do Custom Field too. I did it for unformated date. Onetime is Oct 15, 2013 second time is Friday Oct 15, 2013 ... For Year I need only 4 digits from end and unformated date i save to Custom Field.

Field TITLE
for XML      'title'
for AField   '1'

is for nothing. You can't there write data with script. :(

Navigation

[0] Message Index

[#] Next page

Go to full version