We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Gypsy

Development and Programming

notacouch's avatar
notacouch
92 posts
16 years ago
notacouch's avatar notacouch
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.)

       
notacouch's avatar
notacouch
92 posts
16 years ago
notacouch's avatar notacouch
@tilzinger LOL
It was a stressful morning 😊 Great extension btw.

btw see the Publish Tweeks thread, I’ve posted what could be a solution for you.

       
Danny T.'s avatar
Danny T.
426 posts
16 years ago
Danny T.'s avatar Danny T.

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?

       
Danny T.'s avatar
Danny T.
426 posts
16 years ago
Danny T.'s avatar Danny T.

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..

       
Brooks Seymore's avatar
Brooks Seymore
106 posts
16 years ago
Brooks Seymore's avatar Brooks Seymore

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?

       
stinhambo's avatar
stinhambo
1,268 posts
16 years ago
stinhambo's avatar stinhambo
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).

       
stinhambo's avatar
stinhambo
1,268 posts
16 years ago
stinhambo's avatar stinhambo

By the way Brandon,

Search doesn’t seem to work with Gypsy :(

       
LynneL's avatar
LynneL
239 posts
16 years ago
LynneL's avatar LynneL

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.

       
Matt Weinberg's avatar
Matt Weinberg
489 posts
16 years ago
Matt Weinberg's avatar Matt Weinberg

You should let Brandon know in his GetSatisfaction.com page, I’m not sure how often he checks this.

       
LynneL's avatar
LynneL
239 posts
16 years ago
LynneL's avatar LynneL

I tried, it needed an account to post, and it was 1am or so and I was too damn tired to create a new account that I’ll soon forget I have. LOL

       
Environ-IT's avatar
Environ-IT
26 posts
15 years ago
Environ-IT's avatar Environ-IT

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

       
Mark Croxton's avatar
Mark Croxton
319 posts
15 years ago
Mark Croxton's avatar Mark Croxton

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']);
                }
            }
       
First 2 3 4

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.