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

Playa

Development and Programming

Brandon Kelly's avatar
Brandon Kelly
257 posts
17 years ago
Brandon Kelly's avatar Brandon Kelly

Playa is a powerful one-to-many field loosely based on Mark’s Multi-Relation extension.

Unlike the others, it enables you to…

  • Pull content from multiple weblogs
  • Limit the number of selectable entries
  • Order your selections with drag-and-drop
  • Close your entries and mean it
  • Set selections as searchable

Like Relationship and Multi-Relation fields, Playa uses the related_entries template tag:

{related_entries id="my_playa_field"}
    <h4>{title}</h4>
    {body}
{/related_entries}

For more information and the download, go to http://brandon-kelly.com/apps/playa/

Current version: 1.1.3

Most recent updates: - When saving an entry, Playa now leaves unchanged relationships in-tact - Fixed a caching issue by automatically clearing the relationship cache whenever a change is made

View the full Change Log

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
17 years ago
Mark Bowen's avatar Mark Bowen

Brandon, you’ve done it again!! 😉

Will try this out today as it sounds absolutely brilliant!! How do you keep on coming up with these ideas and implementing them so fast.

Sounds like this one will definitely have a place for a lot of people.

Great one.

Best wishes,

Mark

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
17 years ago
Mark Bowen's avatar Mark Bowen

Oops!

Brandon I just tried the extension out and whilst I think it is working it does have a lot of errors popping up when I go to Publish an entry. I am getting :

Notice: Undefined variable: r in /usr/local/psa/home/vhosts/*******/httpdocs/*******/extensions/ext.playa.php on line 610 Warning: Missing argument 2 for get_rel_ids() in /usr/local/psa/home/vhosts/*******/httpdocs/*******/extensions/ext.playa.php on line 191 Notice: Undefined index: selected in /usr/local/psa/home/vhosts/*******/httpdocs/*******/extensions/ext.playa.php on line 763 The last error is repeated 14 times

Not sure if it is another extension messing with it though so will go and try turning them all off one by one and let you know what I come up with. Looks really neat so far though.

Best wishes,

Mark

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
17 years ago
Mark Bowen's avatar Mark Bowen

Hi Brandon,

Just a really quick update on this one. I disabled all extensions except for Playa and still get the errors. Admittedly not so many of the last error but still around 4 of them.

Not really sure what it all means though. Would be great to have this one working without the errors though 😉 Seems like it would be a life-saver.

Best wishes,

Mark

       
Brandon Kelly's avatar
Brandon Kelly
257 posts
17 years ago
Brandon Kelly's avatar Brandon Kelly

My apologies! I just fixed those two issues. Try downloading it again, and let me know if it works out for you!

       
smartpill's avatar
smartpill
456 posts
17 years ago
smartpill's avatar smartpill

Ya, I’m getting errors also. The custom field does appear on the Publish page and seems to do what it is supposed to, and looks like a really nice addition.

Here are the errors I’m getting at the top of the publish page:

Warning: Missing argument 2 for Playa::get_rel_ids(), called in /home/*******/public_html/ee/*******/extensions/ext.playa.php on line 681 and defined in /home/*******/public_html/ee/*******/extensions/ext.playa.php on line 191

Notice: Undefined index: selected in /home/*******/public_html/ee/*******/extensions/ext.playa.php on line 763

Notice: Undefined index: selected in /home/*******/public_html/ee/*******/extensions/ext.playa.php on line 763

Notice: Undefined index: selected in /home/*******/public_html/ee/*******/extensions/ext.playa.php on line 763

Notice: Undefined index: selected in /home/*******/public_html/ee/*******/extensions/ext.playa.php on line 763

Notice: Undefined index: selected in /home/*******/public_html/ee/*******/extensions/ext.playa.php on line 763

Edit: While I was typing this, Brandon posted an update and yes, the errors went away! Thanks!

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
17 years ago
Mark Bowen's avatar Mark Bowen
My apologies! I just fixed those two issues. Try downloading it again, and let me know if it works out for you!

Downloading again and I’m sure that it will work out fine!! 😉

Thanks Brandon 😉

Best wishes,

Mark

       
Eric Barstad's avatar
Eric Barstad
198 posts
17 years ago
Eric Barstad's avatar Eric Barstad

Hi Brandon,

This looks really great.

Since this uses the {related_entries} template tag, I don’t suppose the backspace parameter (or something similar) is available in Playa? For example, if I wanted to output:

{related_entries id="my_playa_field"}
    {title}, 
{/related_entries}

would there be a way to lose the comma after the last {title}?

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
17 years ago
Mark Bowen's avatar Mark Bowen

Hi Brandon,

Seems to be working okay now but unless it’s just something weird on my system I think that maybe there is still something a bit awry and I think it is to do with the CSS file perhaps. There is a slight discrepancy in the control panel now.

Have taken a quick screen-shot (attached) of what is happening. Also happens on the other side of the control panel too. As long as it isn’t doing anything deeper to the system though then I can live with it but would be nice to get it back the way it should be 😉

Great extension though so thanks.

Best wishes,

Mark

       
Brandon Kelly's avatar
Brandon Kelly
257 posts
17 years ago
Brandon Kelly's avatar Brandon Kelly
Since this uses the {related_entries} template tag, I don’t suppose the backspace parameter (or something similar) is available in Playa? For example, if I wanted to output:
{related_entries id="my_playa_field"}
    {title}, 
{/related_entries}
would there be a way to lose the comma after the last {title}?

If you enable PHP parsing on output, you could:

<?php $re_count = 1; ?>
{related_entries id="my_related_entries"}<?php
    if ($re_count > 1) echo ',';
    $re_count++;
?> {title}{/related_entries}

It’s kindof hacky, but it would get the job done.

       
Brandon Kelly's avatar
Brandon Kelly
257 posts
17 years ago
Brandon Kelly's avatar Brandon Kelly
Have taken a quick screen-shot (attached) of what is happening. Also happens on the other side of the control panel too. As long as it isn’t doing anything deeper to the system though then I can live with it but would be nice to get it back the way it should be 😉

I’m getting that too… didn’t realize it was from Playa. I’ll look into it.

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
17 years ago
Mark Bowen's avatar Mark Bowen

Oops I spoke too soon unfortunately.

On a rendered template I am getting the dreaded :

{REL[11][staff-picks]fREzvVHhREL}{REL[12][staff-picks]fREzvVHhREL}{REL[13][staff-picks]fREzvVHhREL}{REL[14][staff-picks]fREzvVHhREL}

kind of output.

Anything I should be doing that I’m not?

Best wishes,

Mark

       
Yvonne Martinsson's avatar
Yvonne Martinsson
204 posts
17 years ago
Yvonne Martinsson's avatar Yvonne Martinsson

Just wanting to let you know that I had the same problems as mentioned above. Grabbed the new version and both warnings and the css is now ok. Also foreign characters which the first version disrupted.

Great add-on! I’m usually a bit reluctant to use extensions since so few of them actually work. But this one does! (well, I haven’t tested it on the frontend yet…;)! Thank you!

       
Brandon Kelly's avatar
Brandon Kelly
257 posts
17 years ago
Brandon Kelly's avatar Brandon Kelly
On a rendered template I am getting the dreaded :
{REL[11][staff-picks]fREzvVHhREL}{REL[12][staff-picks]fREzvVHhREL}{REL[13][staff-picks]fREzvVHhREL}{REL[14][staff-picks]fREzvVHhREL}

Can you post the code you’re using in your template?

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
17 years ago
Mark Bowen's avatar Mark Bowen

Hi Brandon,

Simply this :

{exp:weblog:entries weblog="staff" limit="1" dynamic="on" disable="member_data|trackbacks|pagination|categories|category_fields"}

{related_entries id="staff-picks"}
<h4>{title}</h4>
{news-body}

<a href="#" title="{title}">{title}</a>
{/related_entries}

{/exp:weblog:entries}

Just this at the moment. I have a weblog setup called staff and a playa relationship field called staff-picks which allows staff members on their detailed page (which is what the code above is from) to show items from other weblogs.

All I keep on getting is the problems above though. I have tried clearing caches and everything but just get those weird numbers all the time which seem to change every time I refresh the template.

Just as a thought. Does this require a certain version of PHP to work correctly? I am on V4 ish but I seem to remember something about V5 working better for these kinds of extensions? Just a thought though.

Thanks for any help on this.

Best wishes,

Mark

       
1 2 3 Last

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.