BinaryWorks.it Official Forum
BinaryWorks.it Official Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 eXtreme Movie Manager (Rel. 7), No More Updates
 HTML Cards
 movie_bigcover update
 New Topic  Reply to Topic
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 35 Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

JDommi
Administrator

Germany
4638 Posts

Posted - 21 Mar 2011 :  16:04:05  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Well, the function seems to work - except an or-statement.
Sometimes the AKA contains " - Germany" and sometimes " - West Germany". When I change
case (srcLang="de"): srcTerm = '.-.Germany'; break;
to
case (srcLang="de"): srcTerm = '.-.Germany|.-.West.Germany'; break;
and
var lng = new RegExp("^.*"+srcTerm+".*$","m");
to
var lng = new RegExp("^.*("+srcTerm+").*$","m");
then the result shows a doubled (West) Germany.


<script type="text/javascript">
var srcLang = window.navigator.systemLanguage;
var srcTerm = null;
switch (srcLang) {
  case (srcLang="de"): srcTerm = '.-.Germany'; break;
  case (srcLang="it"): srcTerm = '.-.Italy'; break;
  case (srcLang="es-ar"): srcTerm = '.-.Argentina'; break;
  case (srcLang="es"): srcTerm = '.-.Spain'; break;
  case (srcLang="fr"): srcTerm = '.-.France'; break;
  case (srcLang="pl"): srcTerm = '.-.Poland'; break;
  default: srcTerm = '';
}

if (srcTerm != '') {
  var Custom9 = '_MOVIE_CUSTOMFIELD9_';
  var lng = new RegExp("^.*"+srcTerm+".*$","m");
  Custom9 = Custom9.replace(/\<br\>/g, "\n");
  Custom9 = Custom9.match(lng);
  if (Custom9 != null) {
    document.write("AKA: " + Custom9);
  }
}
</script>

In order to achieve what is possible, you have to try the impossible over and over again.
Hermann Hesse
Go to Top of Page

Prinz
Senior Member

Germany
1522 Posts

Posted - 21 Mar 2011 :  16:29:01  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Those search terms won't work in many cases anyway.

Only 2 Examples for German titles (Movies from my Database):

- Austria / Germany
- Argentina / Canada (French title) / Denmark / Finland / France / Germany / Greece (imdb display title) / Norway / Poland (imdb display title) / Portugal / Spain / Turkey (Turkish title)

It's not always only one Country behind the -

Edited by - Prinz on 21 Mar 2011 16:29:25
Go to Top of Page

JDommi
Administrator

Germany
4638 Posts

Posted - 21 Mar 2011 :  16:39:04  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I know, because of this I wanted to use the | in the regexp.
But I don't get the OR to work :(

In order to achieve what is possible, you have to try the impossible over and over again.
Hermann Hesse
Go to Top of Page

Prinz
Senior Member

Germany
1522 Posts

Posted - 21 Mar 2011 :  16:52:39  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
This should work:


<a style="display:none;" id='MCustom9'>_MOVIE_CUSTOMFIELD9_</a>				
				<script type="text/javascript">
var srcLang = window.navigator.systemLanguage;
var srcTerm = null;
switch (srcLang) {
  case (srcLang="de"): srcTerm = '.-.[^-]*Germany'; break;
  case (srcLang="it"): srcTerm = '.-.[^-]*Italy'; break;
  case (srcLang="es-ar"): srcTerm = '.-.[^-]*Argentina'; break;
  case (srcLang="es"): srcTerm = '.-.[^-]*Spain'; break;
  case (srcLang="fr"): srcTerm = '.-.[^-]*France'; break;
  case (srcLang="pl"): srcTerm = '.-.[^-]*Poland'; break;
  default: srcTerm = '';
}

if (srcTerm != '') {
  var Custom9 = $('#MCustom9').html();
  var reldate = Custom9.indexOf('Release Dates:');
  if (reldate != -1) {Custom9=Custom9.substring(0,reldate)}
  var lng = new RegExp("^.*"+srcTerm+".*$","m");
  Custom9 = Custom9.replace(/\<BR\>/g, "\n");
  Custom9 = Custom9.match(lng);
  if (Custom9 != null) {
    document.write("AKA: " + Custom9);
  }
}
</script>

Edited by - Prinz on 21 Mar 2011 17:10:14
Go to Top of Page

JDommi
Administrator

Germany
4638 Posts

Posted - 21 Mar 2011 :  17:14:03  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Great! Now it works for all.
Only thing still is needed: a beforelast "-" for very much countries or for this example:
Capricorn One
AKA: Unternehmen Capricorn - West Germany Release Dates: 2 June 1978 (USA) 26 July 1978 (France) 27 July 1978 (Australia) 3 August 1978 (West Germany)

*EDIT*
*lol* you was one time more faster ;)
But still missing beforelast "-" and the comparison if the AKA is identical to title or original title... then it would be perfect!

In order to achieve what is possible, you have to try the impossible over and over again.
Hermann Hesse

Edited by - JDommi on 21 Mar 2011 17:21:18
Go to Top of Page

Prinz
Senior Member

Germany
1522 Posts

Posted - 21 Mar 2011 :  17:27:41  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by JDommi
But still missing beforelast "-"


Don't know what you mean.

quote:
and the comparison if the AKA is identical to title or original title... then it would be perfect!



And what should happen if it is?

Now i have to take a little break, will be back in 2-3 hours.
Go to Top of Page

JDommi
Administrator

Germany
4638 Posts

Posted - 21 Mar 2011 :  17:45:55  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Allow yourself the break !!!

I meant:
AKAtitle = Beforelast(AKAtitle," - ") => keep string before last occurence of " - " like strrpos in php
if (AKAtitle != MovieTitle) or (AKAtitle != OriginalTitle) {document.write}

*EDIT*
Why do these code snippets do not work???
Custom9 = Custom9.match(lng);
var reldate = Custom9.lastIndexOf(' - ');
if (reldate != -1) {Custom9=Custom9.substring(0,reldate)}

var Custom9 = Custom9.match(lng);
Custom9 = Custom9.match(/.*.-./g);


In order to achieve what is possible, you have to try the impossible over and over again.
Hermann Hesse

Edited by - JDommi on 21 Mar 2011 18:28:18
Go to Top of Page

Prinz
Senior Member

Germany
1522 Posts

Posted - 21 Mar 2011 :  19:09:46  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
As a Result you get back a Array of Strings. So you have to search the first result only [0].

<a style="display:none;" id='MCustom9'>_MOVIE_CUSTOMFIELD9_</a>				
<script type="text/javascript">
var srcLang = window.navigator.systemLanguage;
var srcTerm = null;
switch (srcLang) {
  case (srcLang="de"): srcTerm = '.-.[^-]*Germany'; break;
  case (srcLang="it"): srcTerm = '.-.[^-]*Italy'; break;
  case (srcLang="es-ar"): srcTerm = '.-.[^-]*Argentina'; break;
  case (srcLang="es"): srcTerm = '.-.[^-]*Spain'; break;
  case (srcLang="fr"): srcTerm = '.-.[^-]*France'; break;
  case (srcLang="pl"): srcTerm = '.-.[^-]*Poland'; break;
  default: srcTerm = '';
}

if (srcTerm != '') {
  var Custom9 = $('#MCustom9').html();
  var reldate = Custom9.indexOf('Release Dates:');
  if (reldate != -1) {Custom9=Custom9.substring(0,reldate)}
  var lng = new RegExp("^.*"+srcTerm+".*$","m");
  Custom9 = Custom9.replace(/\<BR\>/g, "\n");
  Custom9 = Custom9.match(lng);
  var reldate = Custom9[0].lastIndexOf(' - ');
  if (reldate != -1) {Custom9[0]=Custom9[0].substring(0,reldate)}
  if (Custom9 != null) {
    document.write("AKA: " + Custom9[0]);
  }
}
</script>
Go to Top of Page

Prinz
Senior Member

Germany
1522 Posts

Posted - 21 Mar 2011 :  19:17:42  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Were on the Movie Card should i add the AKA Title?
Go to Top of Page

JDommi
Administrator

Germany
4638 Posts

Posted - 21 Mar 2011 :  19:23:17  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
aargh, I'm really too stupid!
I haven't remembered that the match result returns an array. I really need "delphi for html" *ggg*

In order to achieve what is possible, you have to try the impossible over and over again.
Hermann Hesse
Go to Top of Page

JDommi
Administrator

Germany
4638 Posts

Posted - 21 Mar 2011 :  19:26:21  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I would place it right behind or under the original title

Must it not be:
if (Custom9[0] != null) {
document.write("AKA: " + Custom9[0]);
}
}
</script>

In order to achieve what is possible, you have to try the impossible over and over again.
Hermann Hesse

Edited by - JDommi on 21 Mar 2011 19:28:08
Go to Top of Page

Prinz
Senior Member

Germany
1522 Posts

Posted - 21 Mar 2011 :  20:12:24  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
- Added AKA Title
- Added 1 Award

http://www.mediafire.com/download.php?h4e3g1db27l0qiz
Go to Top of Page

JDommi
Administrator

Germany
4638 Posts

Posted - 21 Mar 2011 :  20:18:08  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
If you were a Prinzessin I would give you a big :-*

In order to achieve what is possible, you have to try the impossible over and over again.
Hermann Hesse
Go to Top of Page

Prinz
Senior Member

Germany
1522 Posts

Posted - 21 Mar 2011 :  20:56:13  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Now we just have to add all Language Codes: http://4umi.com/web/html/languagecodes.php
Go to Top of Page

JDommi
Administrator

Germany
4638 Posts

Posted - 21 Mar 2011 :  21:29:31  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Yes, but fortunately not all have to be used. The list is already on my desktop... but we have to compare which codes are really as important as Afrikaans

In order to achieve what is possible, you have to try the impossible over and over again.
Hermann Hesse
Go to Top of Page

Prinz
Senior Member

Germany
1522 Posts

Posted - 22 Mar 2011 :  11:41:57  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
- Added JDommi's Studio pics to the zip
- Added a protection against wrong Data to the AKA Title Function (AKA Titles with 150 and more chars will be ignored as wrong Data. I don't think that any Title is that long.)

http://www.mediafire.com/download.php?ccrhy1bv4a9s3rc
Go to Top of Page

JDommi
Administrator

Germany
4638 Posts

Posted - 22 Mar 2011 :  19:56:45  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Added all(!) country codes for AKA titles

Full archive for movie-bigcover:
http://www.mediafire.com/file/ncesgpbje5rhvil/card-aka-3.zip

In order to achieve what is possible, you have to try the impossible over and over again.
Hermann Hesse
Go to Top of Page

Prinz
Senior Member

Germany
1522 Posts

Posted - 23 Mar 2011 :  22:34:12  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Found another Bug in the Awards Display (Movie Card). Sometimes the Tooltip is wrong. I'm trying to fix it.
Go to Top of Page

Prinz
Senior Member

Germany
1522 Posts

Posted - 23 Mar 2011 :  22:58:22  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hopefully fixed the wrong Tooltip (it's late and I'm )

- Added case insensitive compare to the AKA Title Display

http://www.mediafire.com/download.php?2408f7qs37bby88
Go to Top of Page

Prinz
Senior Member

Germany
1522 Posts

Posted - 24 Mar 2011 :  13:21:38  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
- Bugfix Award Display on the MovieCard (Tooltip corrected if there was no description for that award)

http://www.mediafire.com/download.php?th0knko8yrv8k83
Go to Top of Page
Page: of 35 Previous Topic Topic Next Topic   Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
Previous Page | Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
BinaryWorks.it Official Forum © Binaryworks.it Go To Top Of Page
Generated in 0.16 sec. Powered By: Snitz Forums 2000 Version 3.4.07