1 of 7
1
Multi Text
Posted: 10 October 2006 07:01 PM   [ Ignore ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1183
Joined  01-05-2006

Alright, I have another extension with gives you control over matrices of data.  It was developed to hold information for a variable number of committee members positions.  The number of columns are customizable in the extensions settings, as are the labels for the columns.

For a little more control replace the number of columns with a space and the labels with a space.  Then in the edit field page change the field type to a text field and enter the number of columns you would like in the textarea rows.  Then change it to a drop-down list and enter your labels in the drop down list box.  Finally change the field back to a multi text and you’re done.  Field specific settings.

Also, the template for this field is a pair and should look as follows (assuming my field name is {members}):

<ul>
{members limit="50"}
<li><strong>{col_1}</strong>: {col_2}</li>
{/members}
</ul>

<
ul>
{members col_1="Mark"}
<li><strong>{col_1}</strong>: {col_2}</li>
{/members}
</ul>

Update: You can now use the backspace="x" attribute like in weblog entries tags.

Image Attachments
multi_text.png
Click thumbnail to see full-size image
File Attachments
ext_multi_text_110.zip  (File Size: 5KB - Downloads: 449)
 Signature 

================================================
    Mark Huot
    http://markhuot.com
================================================

Profile
 
 
Posted: 11 October 2006 03:24 AM   [ Ignore ]   [ # 1 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  238
Joined  05-24-2002

Oh wow!! I’ve always been looking for something like this, but ended up with tables inside a text-field. I’ll use it for future development. Thanks a lot!

 Signature 

You know me better than that, love. I don’t “do” anything. Things just happen.

Profile
 
 
Posted: 11 October 2006 05:20 AM   [ Ignore ]   [ # 2 ]  
Lab Assistant
RankRank
Total Posts:  192
Joined  03-31-2006

This extension looks awesome! Thank you for creating it. smile

 Signature 

Elegant webstandards based design - Rockatee

Profile
 
 
Posted: 11 October 2006 07:37 AM   [ Ignore ]   [ # 3 ]  
Research Assistant
RankRankRank
Total Posts:  968
Joined  06-13-2005

1) There’s a bug—incompatibility with other extensions of yours (I don’t know with which of them, that will take another hour).

It works if there’re no similar ext’s. If I use it & resave the Article after enabling other ext’s, the data disappear in the Article, Drop-Down doesn’t work at all—it has only the first line with “1").

2) How to use it similarly {if demo_extended != “"}?

(or to embed the option)

 Signature 

tulks.com | expressionengine.lv

Profile
 
 
Posted: 12 October 2006 05:54 PM   [ Ignore ]   [ # 4 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  111
Joined  12-29-2004

Mark, this a great extension, thanks for sharing so many great mods and exts.

One problem - for posts that don’t have a custom field set up with a multi text field, I was getting an undefined index error - index: field line :388

My quick solution was to check the query results and bail out in the modify_post() function that was throwing the error. Not sure if there’s a better way… but fyi:

$field_data = "";
        
$query = $DB->query("SELECT f.field_id FROM exp_weblog_fields AS f, exp_weblogs AS w WHERE w.weblog_id=".$_POST["weblog_id"]." AND f.group_id=w.field_group AND f.field_type='".$this->type."'");
        
        if (
$query->num_rows == 0)
        
{
            
return;
        
}

-mike

 Signature 

imagehat studio
the forum user formerly known as lavalamp

Profile
 
 
Posted: 14 October 2006 12:03 PM   [ Ignore ]   [ # 5 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1183
Joined  01-05-2006

I’ve fixed the undefined index error.  You can get the latest version up top.  Also if you’re using the “file”, “multi drop-down list”, or “checkbox” extension you’ll have to update them to fix the problem with saving that you were seeing.  You can find the updates at their respective posts:

Checkbox: http://expressionengine.com/forums/viewthread/38843/
Multi Drop-down List: http://expressionengine.com/forums/viewthread/38370/
Multi Text: http://expressionengine.com/forums/viewthread/39153/
File: http://expressionengine.com/forums/viewthread/38997/

Or you can find a list of them on my docs page: http://docs.markhuot.com

 Signature 

================================================
    Mark Huot
    http://markhuot.com
================================================

Profile
 
 
Posted: 14 October 2006 12:11 PM   [ Ignore ]   [ # 6 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1183
Joined  01-05-2006

sigork, I was able to use the extension in a conditional to check if it was empty just as you said:

{if mtext!=""}...{/if}

did this not work for you?

 Signature 

================================================
    Mark Huot
    http://markhuot.com
================================================

Profile
 
 
Posted: 14 October 2006 12:44 PM   [ Ignore ]   [ # 7 ]  
Research Assistant
RankRankRank
Total Posts:  968
Joined  06-13-2005

I think I understood now.

If I have

<ul>
{members}
<li><strong>{col_1}</strong>: {col_2}</li>
{/members}
</ul>

I should use

{if members!=""}...{/if}

P.S. I tried it in such a way: {if col_1!=""}...{/if}

Thanks!

 Signature 

tulks.com | expressionengine.lv

Profile
 
 
Posted: 14 October 2006 12:46 PM   [ Ignore ]   [ # 8 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1183
Joined  01-05-2006

You got it place the following around your <ul>

{if members!=""}...{/if}

I haven’t come up with a way to check individual columns yet., but i’ll investigate.

 Signature 

================================================
    Mark Huot
    http://markhuot.com
================================================

Profile
 
 
Posted: 16 October 2006 02:21 AM   [ Ignore ]   [ # 9 ]  
Lab Assistant
RankRank
Total Posts:  185
Joined  10-09-2006

I was happy to see that you had updated the extension to get rid of the error.
Only now i’m experiencing a new one :(.

Notice: Uninitialized string offset: 0 in /opt/guide/www.domain.com/HTML/login/extensions/ext.multi_text.php on line 355

Warning
: Cannot modify header information - headers already sent by (output started at /opt/guide/www.domain.com/HTML/login/extensions/ext.multi_text.php:355) in /opt/guide/www.domain.com/HTML/login/core/core.functions.php on line 293

 Signature 

G - B - O
___________
Version 1.5.1

Profile
 
 
Posted: 16 October 2006 06:45 AM   [ Ignore ]   [ # 10 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1183
Joined  01-05-2006

thanks GBO.  That should be fixed now.

 Signature 

================================================
    Mark Huot
    http://markhuot.com
================================================

Profile
 
 
Posted: 16 October 2006 07:05 AM   [ Ignore ]   [ # 11 ]  
Lab Assistant
RankRank
Total Posts:  185
Joined  10-09-2006

Great! I’ll give it a shot.
(great ext btw!)

UPDATE: Installed and no more errors!!! smile

 Signature 

G - B - O
___________
Version 1.5.1

Profile
 
 
Posted: 16 October 2006 09:28 AM   [ Ignore ]   [ # 12 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  111
Joined  12-29-2004

Awesome, thanks for the updates Mark. I’m using your extension to build a product variation select list (large, medium, small etc) with the label, value, and image name (already existing) each in their own column. Works awesome. Now if I may just see if can just figure out a way to make one column accept images either from a file-like interface or the build in EE uploader.

Thanks so much again for releasing these to the community, great stuff and great inspiration for what can be done with such a flexible system.

-mike

 Signature 

imagehat studio
the forum user formerly known as lavalamp

Profile
 
 
Posted: 20 October 2006 08:10 AM   [ Ignore ]   [ # 13 ]  
Lab Assistant
RankRank
Total Posts:  185
Joined  10-09-2006

Hi there,

I wanted to use this plugin to create flash slideshows with images and captions.
I set it up to have three columns: images (wich contains a url to the images), caption_1 and caption_2.
now when i submit a new entry, only the content of {col_1} stays, the rest disappears ...

Have you heard about this before?
How can this be fixed ?

 Signature 

G - B - O
___________
Version 1.5.1

Profile
 
 
Posted: 20 October 2006 08:44 AM   [ Ignore ]   [ # 14 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1183
Joined  01-05-2006

Thanks for pointing this out.  It stemmed from an error when custom (per-field) settings were used.  So I’ve fixed that and also fixed a bug that occurred when you tried to preview an entry (all your data would disappear!).  Like always grab the latest version at the top of this thread.

 Signature 

================================================
    Mark Huot
    http://markhuot.com
================================================

Profile
 
 
Posted: 20 October 2006 08:50 AM   [ Ignore ]   [ # 15 ]  
Lab Assistant
RankRank
Total Posts:  185
Joined  10-09-2006

Great!
The error is gone! Thanks.
Hope i won’t encounter any errors anymore wink .

 Signature 

G - B - O
___________
Version 1.5.1

Profile
 
 
Posted: 10 December 2006 05:05 PM   [ Ignore ]   [ # 16 ]  
Research Assistant
RankRankRank
Total Posts:  543
Joined  01-05-2005

Mark, top work again.

Not sure if it’s possible but any chance of a backspace parameter?  I’d be looking to do something like this:

{websites backspace="1"}<a href="{col_2}">{col_1}</a>,{/websites}

For the record, I’m using the Find & Replace plugin to ‘fix’ it right now.  Something cleaner would be better though.

{exp:replace find="Websites: ," replace="Websites: "}Websites: {websites}, <a href="{col_2}">{col_1}</a>{/websites}{/exp:replace}

 Signature 

Celebrating again soon.

Profile
 
 
Posted: 10 December 2006 05:41 PM   [ Ignore ]   [ # 17 ]  
Research Assistant
RankRankRank
Total Posts:  543
Joined  01-05-2005

Sorry, me again.  I’ve just noticed a strange error when using this extension.

The error only happens on pages where I’m using related or reverse related entries.  I’m not actually using the extension on these pages.

The error is:

Notice: Undefined index: field_id_60 in \blah\extensions\ext.multi_text.php on line 461

field_id_60 is the custom field set as multi text.

 Signature 

Celebrating again soon.

Profile
 
 
Posted: 10 December 2006 08:20 PM   [ Ignore ]   [ # 18 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  398
Joined  10-10-2004

Just fyi, I’m experiencing a similar problem (different extension of Mark’s but same type of use of related content, etc) - here.

Profile
 
 
   
1 of 7
1
 
‹‹ Settings Not Filling      Invisible CAPTCHA ››
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 10:33 AM
Total Registered Members: 61008 Total Logged-in Users: 14
Total Topics: 73778 Total Anonymous Users: 9
Total Replies: 398021 Total Guests: 467
Total Posts: 471799    
Members ( View Memberlist )