Author Topic: Custom Field Questions  (Read 10010 times)

0 Members and 1 Guest are viewing this topic.

Offline Raptre

  • Member
  • *
  • Posts: 5
    • View Profile
Custom Field Questions
« on: January 21, 2010, 12:47:23 am »
I'm trying to create a custom field section for my database to place my trailers.  I've managed to create a link to a trailer in a memo field, but I can only place 1 link.  This doesn't help if I have more than one trailer unless I make multiple memo fields.

1. Is it possible to place more than one link in a custom field?  If so, how?

I would also like to center the text in the custom field instead of the left alignment.  I found a tag in the skin <customsection> but I'm unsure what to do.

2. What would I need to do in order to center the text in my custom field?

Lastly it would be more aesthetically pleasing if I was able to use an image file instead of text as the link to the trailer.

3. Is it possible to use an image for the link to the trailer?

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Custom Field Questions
« Reply #1 on: January 21, 2010, 01:35:10 am »
Welcome, Raptre.

1. You should be able to put an unlimited number of links in a custom memo field, but not other field types. They can be raw URLs or hyperlinks—right-click and select Create Hyperlink.

2. AFAIK, while an object can be centered in a column, it's not possible to center the contents of a field.

3. No.

Offline Raptre

  • Member
  • *
  • Posts: 5
    • View Profile
Re: Custom Field Questions
« Reply #2 on: January 21, 2010, 02:06:19 am »
Thanks for your response and although I'm a tad disappointed with the inability to use images or center the text the prospects of just adding the links are good.

However this is the coding I'm using in the memo field, but only the link to trailer 1 shows up.
Code: [Select]
<link url="Z:\Trailers\2012_t1.mov">Watch Trailer #1</link>
<link url="Z:\Trailers\2012_t2.mov">Watch Trailer #2</link>

EDIT:
I managed to get multiple links to appear, but only when I dont use a line break.
Code: [Select]
<link url="Z:\Trailers\2012_t1.mov">Watch Trailer #1</link> | <link url="Z:\Trailers\2012_t2.mov">Watch Trailer #2</link>
« Last Edit: January 21, 2010, 02:08:58 am by Raptre »

Offline nostra

  • Administrator
  • *****
  • Posts: 2852
    • View Profile
    • Personal Video Database
Re: Custom Field Questions
« Reply #3 on: January 21, 2010, 02:09:16 am »
The second link will appear if you expand the field by clicking on plus to the right ;)
Gentlemen, you can’t fight in here! This is the War Room!

Offline Raptre

  • Member
  • *
  • Posts: 5
    • View Profile
Re: Custom Field Questions
« Reply #4 on: January 21, 2010, 02:21:05 am »
Haha now I feel just so utterly stupid.  Thanks for that.

Here is a screencap if anyone has an idea on how to center the text
http://img.photobucket.com/albums/v122/Raptre/pvd-issue1.png

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Custom Field Questions
« Reply #5 on: January 21, 2010, 02:39:05 am »
Quote
Here is a screencap if anyone has an idea on how to center the text

Forget about centering. Put the field in the column beside the poster—where the column with is about half what it would be otherwise. This is just right for displaying several links on one line (as you are now) without having to to expand the field.

Offline Raptre

  • Member
  • *
  • Posts: 5
    • View Profile
Re: Custom Field Questions
« Reply #6 on: January 21, 2010, 02:49:39 am »
Ok...  I did that with the description field, but I don't know how to do it with the custom section.

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Custom Field Questions
« Reply #7 on: January 21, 2010, 04:09:33 am »
The customsection is a special section used in the default skin to hold custom fields that cannot be explicitly defined in the skin. In a custom skin, you would normally place your fields (standard and custom) exactly where you want them—and would not use customsection.

Offline Raptre

  • Member
  • *
  • Posts: 5
    • View Profile
Re: Custom Field Questions
« Reply #8 on: January 21, 2010, 05:19:27 pm »
I'm not really wanting to write up a skin from scratch.  I'm just trying to slightly alter the classic skin to suit my wants.  I have no idea how I would define the field.

I have tried, but obviously if "trailers" isn't defined its pointless.
Code: [Select]
<row>
 <column halign="center">
  <fieldlabel field="trailers"/>
 </column>
 <column>
  <trailers/>
 </column>
</row>

EDIT:
I figured out everything I needed.  Thank you Rick.ca!  I decided to use your theater view skin coding as an example and I got everything how I like it.
« Last Edit: January 21, 2010, 06:18:51 pm by Raptre »

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Custom Field Questions
« Reply #9 on: January 21, 2010, 11:14:27 pm »
Quote
I figured out everything I needed.

Great. For the sake of others...

The code for custom fields is necessarily different. Here's an example:

Code: [Select]
<column>
<label width="132" halign="right">
 <caption>Trailers:</caption>
 </label>
 <spacer width="7"/>
 <custom field="trailers"/>
 </column>

Quote
I'm not really wanting to write up a skin from scratch.

Neither would I. I don't think I could. My "Theatre View" skin, for example, is a modification of Classic. I suppose there's number of techniques used in that don't exist in Classic. But even then, I normally start by copying some code that does something similar to what I want.

 

anything