- Posts: 29
- Thank you received: 0
Additional field: Sermon filesize
18 Jan 2013 12:41 #2909
by Martini
Additional field: Sermon filesize was created by Martini
Hi,
I'm working at an layout, that will show the sermonfilesize and a Subtitle.
To make this work, I plan to use the empty databasefields custom1 and custom2.
My Question:
Is there any purpose to add the field 'sermonfilesize'?
I'm asking because this is a very useful information and in case I have to use both custom-fields I would have no further one for customization.
I'm working at an layout, that will show the sermonfilesize and a Subtitle.
To make this work, I plan to use the empty databasefields custom1 and custom2.
My Question:
Is there any purpose to add the field 'sermonfilesize'?
I'm asking because this is a very useful information and in case I have to use both custom-fields I would have no further one for customization.
Please Log in or Create an account to join the conversation.
- Thomas Hunziker
- Offline
- Administrator
18 Jan 2013 13:23 #2910
by Thomas Hunziker
Replied by Thomas Hunziker on topic Additional field: Sermon filesize
So far I didn't think about adding the filesize to the database, but I could certainly do it. It could even be automatically filled out for local files using the PHp filesize() function.
I guess showing this information on the detail page could be interesting.
I guess showing this information on the detail page could be interesting.
The following user(s) said Thank You: Martini
Please Log in or Create an account to join the conversation.
18 Jan 2013 14:08 #2911
by Martini
Replied by Martini on topic Additional field: Sermon filesize
Cool, the filesize would be very nice!
Maybe you could call the filesize() function at every changes belonging the sermon. That would allow replacement of the audiofile in backend (if little changes are necessary).
2nd Question:
Is there a way to get the custom fields in the sermons-view without changing the model-file or make an override?
In the site/models/sermons.php the custom-fields aren't requested from database.
Thank you
Maybe you could call the filesize() function at every changes belonging the sermon. That would allow replacement of the audiofile in backend (if little changes are necessary).
2nd Question:
Is there a way to get the custom fields in the sermons-view without changing the model-file or make an override?
In the site/models/sermons.php the custom-fields aren't requested from database.
Thank you
Please Log in or Create an account to join the conversation.
- Thomas Hunziker
- Offline
- Administrator
18 Jan 2013 14:29 #2912
by Thomas Hunziker
Replied by Thomas Hunziker on topic Additional field: Sermon filesize
I'll probably make it so that the filesize will be looked up during save (and maybe id3 lookup) if the field is empty or 0. If anything is entered, I'll leave it as is.
You would have to add the customs to the model. I think it makes sense to add them to the sermons model as well since it doesn't really have a performance impact if you load two more fields.
I saw that currently some sermons layouts even check for them. Since the parameter is only meant to affect the detailpage, I will remove the customs from the sermons layouts. If someone wants to use them there, he can always create a custom layout like you do. Most likely the place where I put it will not match anyway
You would have to add the customs to the model. I think it makes sense to add them to the sermons model as well since it doesn't really have a performance impact if you load two more fields.
I saw that currently some sermons layouts even check for them. Since the parameter is only meant to affect the detailpage, I will remove the customs from the sermons layouts. If someone wants to use them there, he can always create a custom layout like you do. Most likely the place where I put it will not match anyway
Please Log in or Create an account to join the conversation.
Time to create page: 0.109 seconds