4 of 4
4
Multi Drop-down List
Posted: 21 July 2008 11:16 PM   [ Ignore ]   [ # 55 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  379
Joined  11-29-2005

‘Tis working well, thanks!

 Signature 

e x p design: a consultative approach to web site design and development.
- - -
EE Pro Network | Expression Engine Install Best Practices
- - -
Nominate Leevi Graham’s Extensions!—I did.

Profile
 
 
Posted: 21 August 2008 12:23 AM   [ Ignore ]   [ # 56 ]  
Grad Student
Rank
Total Posts:  34
Joined  03-31-2006

Possible bug in Multi Drop-down List with EE 1.6.4.

While in the Edit window, clicking the Preview button de-selects the selected Multi Drop-down list items. The same thing occurs with the Checkboxes extension.

Has anyone else experienced this?

Profile
 
 
Posted: 26 August 2008 09:41 AM   [ Ignore ]   [ # 57 ]  
Summer Student
Total Posts:  27
Joined  08-05-2008

So this extension is the best thing since sliced bread, but I am having one slight issue:

I made a drop-down to add authors to the list in this format: “Smith, J.” Unfortunately, when using {input} to add a new author it does NOT like having a comma in there! It tries to interpret this as two entries.

Anyone know how to change this setting in the extension’s PHP code??

Sean

p.s. You can see what I’m trying to do here: http://www.fouryardmedia.com/cn550ee/index.php/articles/

Profile
 
 
Posted: 03 September 2008 01:08 PM   [ Ignore ]   [ # 58 ]  
Grad Student
Avatar
Rank
Total Posts:  77
Joined  11-05-2007

Awesome extension!

Is there any way to make this work with custom member fields?

I have it installed and see the option to make custom weblog fields multi-select. But, multi-select isn’t an option when editing a custom member field.

It would be great to get this working with members, too.

 Signature 

Looking for EE developers. PM me for details.

Profile
 
 
Posted: 15 October 2008 11:57 AM   [ Ignore ]   [ # 59 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  266
Joined  02-22-2006

Great extension Mark! You da’ man! :D

Just if it helps anyone, here is my approach to testing for values:

On my template:


<?php if(!(in_array("ITEM01", string_to_array("{custom-field-name}", ",")))) { ?>
    
<p>... If "ITEM01" is NOT in the array of selected items, then show this code ...</p>
<?php } ?>

My functions:

<?php
    
    
// @about: Trim beginning and ending white space from referenced $value.
    // @ref: http://us2.php.net/trim
    
function trim_key_value(&$value) {
        $value
= trim($value);
    
}
    
    
// @about: Convert delimited string to array.
    // @param 01: Delimited string to convert.
    // @param 02: Delimiter to explode.
    
function string_to_array($str, $delimiter) {
        $return
= explode(",", $str); // Convert delimited string to an array.
        
array_walk($return, 'trim_key_value'); // Remove white spaces from array keys.
        
return $return; // Return results.
    
}
    
?>

(I include my functions at the head of my master template. PHP set to output for template that has function call.)

Again, amazing work Mark!

Cheers,
Micky

Profile
 
 
Posted: 15 October 2008 12:04 PM   [ Ignore ]   [ # 60 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  266
Joined  02-22-2006

@slorenz

slorenz - 26 August 2008 09:41 AM

it does NOT like having a comma in there! It tries to interpret this as two entries.

Have you tried HTML entity?

&#44; = ,

Read the first technical note on this page to give you an idea of other situations one would want to use HTML entities. Could be a similar fix in your situation?

Hth’s,
M

Profile
 
 
Posted: 16 October 2008 08:21 AM   [ Ignore ]   [ # 61 ]  
Summer Student
Total Posts:  27
Joined  08-05-2008

Ah! The question, then, is where do I place the

&#44; =

? The issue is with the Publish Page, so I’d have to change Mark’s PHP extension file. What line in that code? I have no idea! Ha. Would this be in the “seperator” section?

Profile
 
 
Posted: 16 October 2008 08:51 PM   [ Ignore ]   [ # 62 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  266
Joined  02-22-2006

Hi,

Can you put the &#44; in the “Smith, J.” input?

For example:

“Smith&#44; J.”

... Will output as this via HTML: “Smith, J.”

Alternatively, you could just change the separator via the extension’s options. Instead of using a comma to separate the items, use a pipe “|” character?

You could even use a little PHP to turn the pipes back to commas, if that is your goal.

Or, use PHP to convert the commas, in your list of names, into &#44; before using this plugin:

<?php
function fix_comma($str) { return str_replace(",", "&amp;#44;", $str); }
$name
= fix_comma("Smith, J.");
echo
$name; // Should output "Smith&amp;#44; J."
?>

Hth’s! smile

Cheers,
Micky

Profile
 
 
Posted: 05 November 2008 05:43 AM   [ Ignore ]   [ # 63 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  112
Joined  04-21-2008

Thanks for this great extension smile

Having a slight issue: I’ve uploaded the extension; once Enabled EE returns an error:

Error

Unable to load the following language file:

/lang.multi_drop_down_list.php

Now, I cannot access my CP or anything on the ‘system’. Can’t even Disable the Extension.

Any thoughts on how to resolve this?

Cheers !!

 Signature 

Good Design is What Good Business is all About!

Profile
 
 
Posted: 05 November 2008 06:10 AM   [ Ignore ]   [ # 64 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6610
Joined  04-15-2006

Did you make sure to upload the :

[blang.multi_drop_down_list.php

to your :

system->admin->language->english

folder?

Best wishes,

Mark

 Signature 

Full List Of Plugins Here!! (16)
 
Retrieve Statuses
Maximum Posts Reached
Neat Link
Redirect
Fetch URI

Profile
 
 
Posted: 05 November 2008 06:30 AM   [ Ignore ]   [ # 65 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  112
Joined  04-21-2008

Well, I did upload the language file, but on the wrong folder smile

Works well now. Thanks Mark!

 Signature 

Good Design is What Good Business is all About!

Profile
 
 
Posted: 05 November 2008 06:39 AM   [ Ignore ]   [ # 66 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6610
Joined  04-15-2006

No problem at all.

Glad it’s all working again for you.

Hope everything goes well for you.

Best wishes,

Mark

 Signature 

Full List Of Plugins Here!! (16)
 
Retrieve Statuses
Maximum Posts Reached
Neat Link
Redirect
Fetch URI

Profile
 
 
   
4 of 4
4
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 65086 Total Logged-in Users: 36
Total Topics: 82224 Total Anonymous Users: 19
Total Replies: 441922 Total Guests: 192
Total Posts: 524146    
Members ( View Memberlist )