English > Development

Kroozbox - PVD to media theatre solution

<< < (27/27)

fabs:
Nono,

I'm rendering using a browser in a PC, as I want it mostly as movie catalogue. The main problem is that changing the HTML in the template requires going through many similar files to do the same change.

Additionaly, I cannot seem to find the way to use custom fields in Kroozbox. Are they stored under a special name in the DB?

Nono:
yes, many files... simplicity but redundancy. With the new version of Kroozbox engine, I should be able to simplify a lot but not enough time to do it. You also have the flash version that you can access with :
http://your server address:9009/debug.html (called PVD Syabas flash template or something like that).
But I don't think you will like it - need to move with keyboard.

Yes, you can have access to custom PVD field... There were some posts about this. I'll dig tomorrow and let you know how to do it. (remind me if I forget).

Nono

Nono:
For the custom field:
There are 4 SQL tables that store the data. They are:
CUSTOM_VALUES_DATE - for date custom fields
CUSTOM_VALUES_INT - for?? custom fields
CUSTOM_VALUES_LONGSTR - for long text fields (memo I guess as well)
CUSTOM_VALUES_REAL
CUSTOM_VALUES_SHORSTR - for short text fields.

You will have to choose the proper table for the type of data you store.
The CUSTOM_FIELDS_MOVIES holds the reference of the fields display value and types.

To add a custom field to your Movie details for instance. You would insert a new file into the MovieDetail-x sequence. Rename all the MovieDetail-*.html from 8 to 10 with an increment of 1 making them 9 to 11. So you can now create a file called MovieDetail-8.html.

Put this content in the -8.html file:


--- Code: ---<!--DBINFO
REQUEST=SELECT FIRST 1 "value" FROM "CUSTOM_VALUES_SHORTSTR" INNER JOIN "MOVIES" ON "MOVIES"."mid" = "CUSTOM_VALUES_SHORTSTR"."mid" INNER JOIN "CUSTOM_FIELDS_MOVIES" ON "CUSTOM_FIELDS_MOVIES"."cmfid" = "CUSTOM_VALUES_SHORTSTR"."cmfid" WHERE "CUSTOM_FIELDS_MOVIES"."dispname" = 'My custom display' AND "MOVIES"."mid"=[parentref]
MYCUSTOMFIELD-S=value
RECORDCHARSET=UTF-8
-->

<tr>
           <td class="title3" colspan="1">My field</td>
     <td class="normal" colspan="3"><!--MYCUSTOMFIELD-S--></td>
</tr>

--- End code ---

Replace all occurrence of CUSTOM_VALUES_SHORTSTR with the proper table name for the type of custom field you use.
Replace the 'My custom display' value with want you see in PVD for your custom field.
We could use the globalParam file to store table names or what not and/or other SQL request but I think this is the simplest way.

Make sense?

Navigation

[0] Message Index

[*] Previous page

Go to full version