Brandon, Great extension - can’t believe I missed its launch! And like many others I agree that this kind of functionality should really have been standard in EE.
Strangely enough it was b/c of this extension that I have a better idea of how the custom fields work and why they’re sort of in a direct relation to weblogs. (Searching can be a tricky affair with Gypsy fields, I prefer to just use it for non-searchable fields.)
This is great. Does anybody have a tried and tested workflow on how to approach using this in a way that makes sense?
I have a few weblogs and don’t have a default field group assigned to them at all, and am just using Gypsy to exclusively extract the body, image, and a few other fields from a default group and pointing it to a respective weblog.
I’ve thought if I had some very unique fields I could make a secondary field group and exclusively just assign them through Gypsy.
Does this approach make sense?
Attempted to use Gypsy this morning with a custom field which uses Mark Hout’s File extension as the field type. The custom field showed up on all publish pages despite being configured to only appear on one. Is this a known incompatibility or something which I might be doing incorrectly?
Just wanted to add: Has anybody tried using Gypsy in an SAEF? Get Satisfaction doesn’t seem to have any answers to this question for 2 months. Will be giving it a go a bit later..
I thought I’d chime in just case you don’t have a solution yet.
I have a simple SAEF here -
{exp:weblog:entry_form weblog="your_weblog" return="site/index" enctype="multi"}
<label for="field_id_1">Write me a thank you note :blush:</label>
<textarea name="field_id_1" rows="12" cols="50"></textarea>
{/exp:weblog:entry_form}
What you have to do is first of all define the weblog name then in the custom fields group you have the Gypsy field in, hover over and in your status bar at the bottom of the browser will be the a link and the bit at the end with the number is what you need to tack on the end of the field_id_ bit above (where I have written field_id_1 in this case).
Bug alert! Email/URL obscuring settings are not being honored in related_entries with Gypsy…
How I found it…I had shut off all “Automatically turn URLs and email addresses into links?” in my weblogs, every single one.
I iterate out one weblog into my template, which has a Gypsy text field I store an email in, which comes out fine as text instead of obscuring script. I then use {related_entries id="customfieldhere"} to find a related entry to that field. It is slipping into obscuring the email for that related entry despite the fact that the parent AND the child are both set to not do so.
I unset this field as a Gypsy field and then it works fine. So the bug, unfortunately, is Gypsy.
Not a killer on this project (as the field group is assigned to both weblogs that need the field, so when they share a field I can just default to it not being Gypsy) but something maybe to look at fixing, none the less.
You should let Brandon know in his GetSatisfaction.com page, I’m not sure how often he checks this.
Sorry if this is a duplicate posting of a bug, but Gypsy fields don’t seem to show up in the File Browser pop up window when uploading a file while editing a weblog entry.
The ‘Select Field’ drop down list shows all the ‘normal’ fields, but not a gypsy field. Yes it’s easy enough to work around, but just thought you’d want to know.
Andrew
Someone pointed out in this thread that the search module doesn’t work with Gypsy fields. Here is a dirty hack that will enable the module to properly search gypsy fields. Use at your own risk!
/system/modules/search/mod.search.php (as ships with EE 1.6.8) Replace lines 481-506:
if ($query->num_rows > 0)
{
$fql = "SELECT field_id, field_name, field_search FROM exp_weblog_fields WHERE (";
foreach ($query->result as $row)
{
$fql .= " group_id = '".$row['field_group']."' OR";
}
$fql = substr($fql, 0, -2).')';
$query = $DB->query($fql);
if ($query->num_rows > 0)
{
foreach ($query->result as $row)
{
if ($row['field_search'] == 'y')
{
$fields[] = $row['field_id'];
}
$this->fields[$row['field_name']] = array($row['field_id'], $row['field_search']);
}
}
}
With the following:
$field_groups = array();
if ($query->num_rows > 0)
{
foreach ($query->result as $row)
{
$field_groups[] = $row['field_group'];
}
}
$fql = "SELECT field_id, field_name, field_search, group_id, field_is_gypsy, gypsy_weblogs FROM exp_weblog_fields";
$query = $DB->query($fql);
if ($query->num_rows > 0)
{
foreach ($query->result as $row)
{
$gypsy_weblogs = array();
if ($row['field_is_gypsy'] == 'y')
{
$gypsy_weblogs = array_filter(explode(' ', $row['gypsy_weblogs']));
}
if ($row['field_search'] == 'y' && (in_array($row['group_id'], $field_groups) || array_intersect($blog_array, $gypsy_weblogs) ))
{
$fields[] = $row['field_id'];
}
$this->fields[$row['field_name']] = array($row['field_id'], $row['field_search']);
}
}
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.