IF statements and credits bug ?

Report your bugs here - if someone else has already mentioned the same bug, just add on to their post with as much info as possible to make the hunting easier.
User avatar
Kiwan
Bruji Friend
Bruji Friend
Posts: 15
Joined: Thu Aug 30, 2012 7:32 am
Location: France

IF statements and credits bug ?

Post by Kiwan »

Hello,
I customized a template and I would like to incorporate the credits. But I realize that the function <! - IFcredits - ENDcredits -> does not work. Bug or problem from me?

Code: Select all

<!--IFcredits<br>
<b>Distribution :</b><br>[creditsBegin]
<u>[credit:name]</u> : <i>[credit:role]</i><br>
[creditsEnd]ENDcredits-->
When the credits are mentioned in the record, they do not appear.
I also note that this concern is present in the template "Window"

Sorry if my English is not always fair.

thank you
User avatar
Conor
Top Dog
Posts: 5345
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: IF statements and credits bug ?

Post by Conor »

There must be some other issue. I copied the text your provided and added the mandatory BeginRepeat/EndRepeat section and saved it as "Test.thml" in ~/Library/Application Support/DVDpedia/Templates/ then in DVDpedia I choose export and selected "Test" under the HTML tab and got the following:

Image

Please download the template above and try that out as well to find out if you still don't get the same output as I do here.
User avatar
Kiwan
Bruji Friend
Bruji Friend
Posts: 15
Joined: Thu Aug 30, 2012 7:32 am
Location: France

Re: IF statements and credits bug ?

Post by Kiwan »

In fact it is the template folder "infoTemplates" for display in the software. And this is where it does not work. Sorry for the lack of information in my first message.
User avatar
Conor
Top Dog
Posts: 5345
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: IF statements and credits bug ?

Post by Conor »

Thank you for the clarification, but I still can't repeat it. (I should have know when you referred to the Window style, on which I can still see the credits on as well). Drop the file "Test.html" into a folder called "InfoTemplates" (big I) and the credit should display. For debugging you can option click on the main help menu and select the last menu command "Show Info View HTML" and it will actually write out the source that is rendered. You might be able to spot the issue by investigating the final rendered HTML. Otherwise, send me the current template you have and I can try it out.
User avatar
Kiwan
Bruji Friend
Bruji Friend
Posts: 15
Joined: Thu Aug 30, 2012 7:32 am
Location: France

Re: IF statements and credits bug ?

Post by Kiwan »

Unfortunately it still does not work. I send you my template so that you can study. I tried "test.html" but it did not work either ... as "Window"
And rendering html: none of these tags are displayed ...

My template :
https://www.dropbox.com/s/kh2a37wktoc7k ... Kiwan.html
User avatar
Kiwan
Bruji Friend
Bruji Friend
Posts: 15
Joined: Thu Aug 30, 2012 7:32 am
Location: France

Re: IF statements and credits bug ?

Post by Kiwan »

I also notice that [key:features] does not work: if I put the <!--IFlfeatures<b>Bonus :</b><br>[key:features]<br>ENDfeatures--> despite presence of text in this field, the text is not displayed in the presentation (I just update the document on Dropbox to integrate this addition).

Edit : "<!--IFcustomText1<i>[key:customText1]</i>ENDcustomText1-->" don't run...
User avatar
Conor
Top Dog
Posts: 5345
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: IF statements and credits bug ?

Post by Conor »

Thank you for the original template. Unfortunately the credits and features display when testing. The template had a number of errors that might have been the culprit. I have fixed the important ones, such as setting the correct encoding to UTF-8 and making sure all the TD tags were closed. Please download the updated version and give it a try.

If you still have an issue it could be tied to the information that is being exported, please send me two cards for the entries by dragging them from the DVDpedia table view to the Finder to create these cards that contain all the information about the entry and I can then import that on my machine.
User avatar
Kiwan
Bruji Friend
Bruji Friend
Posts: 15
Joined: Thu Aug 30, 2012 7:32 am
Location: France

Re: IF statements and credits bug ?

Post by Kiwan »

It still does not ...
In addition, the layout is no longer valid with the changes.

I give you 2 cards for testing.

https://www.dropbox.com/s/e882jqos18k7qo5/Jo.dcard
https://www.dropbox.com/s/6ip1su0kdz4hf ... rant.dcard

Edit : your test.html does not work either
User avatar
Conor
Top Dog
Posts: 5345
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: IF statements and credits bug ?

Post by Conor »

Thank you. Sadly no change. Not sure what is different on your system that you don't get the credits. Here is a screenshot after adding your info, you might notice a difference to your output (although this is with the version I ran through Tidy). For the "Show Info View HTML" command you might need to be running the beta version.

Image
User avatar
Kiwan
Bruji Friend
Bruji Friend
Posts: 15
Joined: Thu Aug 30, 2012 7:32 am
Location: France

Re: IF statements and credits bug ?

Post by Kiwan »

I redid changes in the template date. I updated via Dropbox. (https://www.dropbox.com/s/kh2a37wktoc7k ... Kiwan.html) Can you try again and capture the film "Jo"?

thank you

Here is my capture :
https://www.dropbox.com/s/23eoi1gyijm1b ... .58.17.png

You are missing credits, [key: customText1] and [key: features] yet present in the card.

Edit : file detailsview.html : https://www.dropbox.com/s/i4ky94nh3k4wi ... sview.html

PS: Regarding "Starring", I deleted my card info.
User avatar
Conor
Top Dog
Posts: 5345
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: IF statements and credits bug ?

Post by Conor »

Thank you for the extra information. Still works perfectly on my machine, even in French. After comparing the outputted files I can only conclude that you must have turned off the those fields in the preferences as the credits are missing perfectly without issue in your HTML. Visit DVDpedia->Preferences->Fields and change the pop up to "Details View", then scroll down and make sure that credits and the other fields are checked.

Image

If that fails please delete the preference file without DVDpedia running and relaunch DVDpedia afterwards. The preference file is located in ~/Library/Preferences/com.bruji.dvdpedia.plist.
User avatar
Kiwan
Bruji Friend
Bruji Friend
Posts: 15
Joined: Thu Aug 30, 2012 7:32 am
Location: France

Re: IF statements and credits bug ?

Post by Kiwan »

My apologies! The problem was well away! I fired a long time ago some information, and I had completely forgotten!

Excuse me more time than I have taken. And thank you very much.

Edit : :oops: :oops: :oops:
Last edited by Kiwan on Sat Sep 01, 2012 4:29 am, edited 1 time in total.
User avatar
Kiwan
Bruji Friend
Bruji Friend
Posts: 15
Joined: Thu Aug 30, 2012 7:32 am
Location: France

Re: IF statements and credits bug ?

Post by Kiwan »

A little more on this issue topic:
There is there a trick to easily add more credits?

Should be prepared in a text file:

Name the actor role 1 = 1,
Name the actor role 2 = 2,
Name the actor role 3 = 3,
...

And then copy / paste to add all of a sudden?
User avatar
Conor
Top Dog
Posts: 5345
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: IF statements and credits bug ?

Post by Conor »

I should have thought of the preference sooner. I was too focused on the template to remember that there was a preference.

There is no way to add a combination of name and role at the moment. You can add names with comma separation and it will add them if missing to the credits as new entries; e.i. "Brad Pitt, Joseph Gordon Levitt, George Clonney". But you would then have to fill out the roles.
User avatar
Kiwan
Bruji Friend
Bruji Friend
Posts: 15
Joined: Thu Aug 30, 2012 7:32 am
Location: France

Re: IF statements and credits bug ?

Post by Kiwan »

Thank you, you know if it will be added soon filling function easier as I was talking about?
Post Reply