The entryproperties plugin offers the option to add custom fields for entries. Sometimes, it would be useful to be able to add “presets” to those fields.
For example, I use custom fields in the S9y InfoCamp blog to add urls to and sizes of the mp3 and ogg files to entries. The actual values for the url fields are very much alike, only the number of the episode changes.
Suggested syntax: key:value, i.e. “Customfield1:Presetvalue1,Customfield2:Presetvalue2” etc. Or just use “Customfield1,Customfield2” to not use presets.
YL
Feature request: presets for custom fields
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Feature request: presets for custom fields
Hi!
Good idea. Shouldn't be too hard to implement.
Regards,
Garvin
Good idea. Shouldn't be too hard to implement.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: Feature request: presets for custom fields
Should be possible to “mix” key:value pairs as well, i.e. “Customfield1,Customfield2:Presetvalue2”.
YL
YL
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Feature request: presets for custom fields
Hi!
Just committed to the 1.7 branch. Please test if this works for you, then I'll commit to 2.0 tree as well.
New variable also allows to escape ":" and "," if you need to use it for the default value; thought that might be important.
Regards,
Garvin
Just committed to the 1.7 branch. Please test if this works for you, then I'll commit to 2.0 tree as well.
New variable also allows to escape ":" and "," if you need to use it for the default value; thought that might be important.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: Feature request: presets for custom fields
Works just fine for me, including the escape mechanism.
YL
YL
Re: Feature request: presets for custom fields
Hmmmm. In 1.7-alpha1, I get this when publishing an entry:
Full error log: https://dl.dropbox.com/u/691134/entryprop-error.txt
Might be due a strange setup in my dev blog, though.
YL
Code: Select all
== TESTING ERROR MODE ==
Array
(
[0] => 2
[1] => explode() expects parameter 2 to be string, array given
[2] => /var/www/virtual/xxx/sub.domain.tld/plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php
[3] => 179
[4] => Array
Might be due a strange setup in my dev blog, though.
YL
Re: Feature request: presets for custom fields
Could you please check if you have this last commit change in it?
https://github.com/s9y/Serendipity/comm ... erties.php
https://github.com/s9y/Serendipity/comm ... erties.php
Regards,
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Re: Feature request: presets for custom fields
Probably not, I haven't updated this dev blog in a while since I've been working on 2.0. My bad. I will report back if updating does not fix it.
YL
YL
Re: Feature request: presets for custom fields
yellowled wrote:Probably not, I haven't updated this dev blog in a while since I've been working on 2.0. My bad. I will report back if updating does not fix it.
EDIT: JFTR, it works fine in latest 1.7.
YL