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

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

One solution to consider is editing the extension to use javascript to stop submitting the form if any required field is blank. Similar to Brandon’s Quick Save fix.

       
Paramore's avatar
Paramore
40 posts
16 years ago
Paramore's avatar Paramore
One solution to consider is editing the extension to use javascript to stop submitting the form if any required field is blank. Similar to Brandon’s Quick Save fix.

Please correct me if I’m wrong, but I thought he was just disabling the quick save button. The validation seems like a completely different routine.

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

He is, but you could use the extension to check if any required fields are blank. If they are, stop the form from submitting by either returning false or disabling the update/quick save buttons.

       
Phil J Leitch's avatar
Phil J Leitch
85 posts
16 years ago
Phil J Leitch's avatar Phil J Leitch

Love this extension, the only thing it is missing for me is the ability to use {count} so I can treat the first related entry differently.

I saw a few earlier posts about this as well but there doesn’t seem to have been an answer (or alternate solution!).

Thanks.

       
Paramore's avatar
Paramore
40 posts
16 years ago
Paramore's avatar Paramore
Love this extension, the only thing it is missing for me is the ability to use {count} so I can treat the first related entry differently. I saw a few earlier posts about this as well but there doesn’t seem to have been an answer (or alternate solution!).

This is somewhat tested…let me know if you have any problems. PHP must be turned on for the template where you are using this.

<?PHP
    $count = 1; //set your starting value for count
?>

//On your first entry, count should be equal to 1 and output the class called first
//Count will continue to get larger, so it will never equal 1 again
<?PHP if ($count == 1) { echo ' class="first"';} else { $count++; } ?>
       
Phil J Leitch's avatar
Phil J Leitch
85 posts
16 years ago
Phil J Leitch's avatar Phil J Leitch

Wasn’t quite sure where to place your code but wasn’t able to get it to work. Tried placing it within the Playa loop but got a count of 1 for everything.

A little more info on what I’m doing. I have roughly 20 Playa fields in one weblog and for each one I need to define the first one of each field as the default for that group. So the client can reorder each Playa field to have a different default item for that field per entry.

If that made any sense at all…

       
Paramore's avatar
Paramore
40 posts
16 years ago
Paramore's avatar Paramore

Phil,

If you post up what you tried, I can help you out a little more.

I can’t imagine that 20 Playa fields in one weblog would be that efficient though.

       
Bromide01's avatar
Bromide01
3 posts
16 years ago
Bromide01's avatar Bromide01

I can’t get Playa to work. I’m using PHP5.2.2, EE 1.6.4, Playa 1.09

I have uploaded ext.playa.php and the playa folder into the extensions folder.

I can enable Playa in the extensions utility.

I can make a custom field using the type of playa. However, when I go to publish, the Playa field is just an unordered list of all the entries I want to associate with the weblog. The add and remove buttons are present, but no boxes to show which entries are added or removed. I have included a .jpg of what this looks like.

Two things I’ve noticed that may provide some info on what’s happening. In Firefox’s Firebug console I get this script error:

playa_init is not defined
[removed]playa_init("18", 0);[removed]

Also, when I unzip the Playa zipped file there is an additional folder named .svn. There are several files in this folder. I have tried installing the extension with and without this .svn folder. The results are the same.

I have also tried installing the extension on a live server and a local test server with the same results.

Please help. Thanks.

       
dw2's avatar
dw2
19 posts
16 years ago
dw2's avatar dw2

I have having the same Unordered List problem with the same EE version 1.6.4 and PHP 5.2.2.

       
Ryan M.'s avatar
Ryan M.
1,511 posts
16 years ago
Ryan M.'s avatar Ryan M.

@dw2, @Bromide01: Guaranteed you guys have an Extension conflict. What other extensions do you have installed?

       
dw2's avatar
dw2
19 posts
16 years ago
dw2's avatar dw2

Just did a test install on my server which is running: - PHP 5.2.6 on Linux n18 2.6.20.2-1 #8 - EE 1.6.4 - MYSQL 4.1.11 The Playa extension works beautifully.

However on my development environment Playa does not work and here are my specs: - PHP Version 5.2.2 [www.entropy.ch Release 1 (Universal Binary)] running on MacBookPro with OS X 10.4.11 using Darwin Kernel Version 8.11.1 - EE 1.6.4 - MYSQL 5.0.24a

This leads me to believe that it may be a PHP init issue. What PHP init settings are required for running Playa.

If it works online it should work in my development environment.

       
dw2's avatar
dw2
19 posts
16 years ago
dw2's avatar dw2

mdesign;

Here are my server’s extensions: - Playa 1.0.9 [enabled] - LG Image Preview 1.0.0 [enabled] - Multi Drop-down List 1.1.1 [enabled] - Tag Submit 2.1.2 [disabled] - don’t understand this one at all {Poor Docs} - Checkbox 1.0.1 [enabled]

My MacBook Pro’s extensions [development environment]: - Checkbox 1.0.1 [enabled] - LG Image Preview 1.0.0 [enabled] - Multi Drop-down List 1.1.1 [enabled] - Playa 1.0.9 [enabled] - Tag Submit 2.1.2 [disabled]

Note: I have listed the extensions in the order they are listed in each environment.

       
Ryan M.'s avatar
Ryan M.
1,511 posts
16 years ago
Ryan M.'s avatar Ryan M.

@dw2: No different paths? You’re not installing in a subfolder in one environment and not on the other? No masked control panels? And for sure no other extensions?

(Oops, I posted without seeing you posted your extensions in a second post)

       
Ryan M.'s avatar
Ryan M.
1,511 posts
16 years ago
Ryan M.'s avatar Ryan M.

I’ll bet that Checkbox extension is hosing it. In any case, you should update that to Checkbox 1.0.2. It may be an extension priority issue, too. You may need to change Playa’s priority (I’ll see if I can find a link to a thread I started about that from a few days ago).

EDIT/ADD: See this thread (second post): Playa Multi-Relationship REL error regarding the extension’s priority.

       
Gabriel's avatar
Gabriel
130 posts
16 years ago
Gabriel's avatar Gabriel
- Tag Submit 2.1.2 [disabled] - don’t understand this one at all {Poor Docs}

Tag Submit extension is a part of the Solspace’s Tag module 😊

       
First 11 12 13 14 15 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.